cswork / OA打开练习工作台

SofiOA #1

Job Scheduling

估计中等可在线判题

考点(AI 标注)二分查找位运算

Assign m jobs to n processors, with at least one job on each. The numbers of jobs on adjacent processors differ by at most 1. The given k-th processor is the most efficient; find the maximum number of jobs it can get in a valid assignment.

This site added the standard input/output protocol.

输入格式

Input n m k, where k is 1-based.

输出格式

Output the maximum number of jobs the k-th processor can get.

样例 1

输入:

5 11 5

输出:

4

样例 2

输入:

5 11 3

输出:

3

样例 3

输入:

1 9 1

输出:

9