SnowflakeOA #15
Job Execution
估计中等可在线判题
考点(AI 标注)二分查找
In one operation, choose an unfinished task and run it for x seconds while every other task runs for y seconds, where y<x; a task exits once its accumulated run time reaches its required time. Find the minimum number of operations needed to finish all tasks. The original snapshot restores y<x.
输入格式
The first line contains n x y, and the second line contains n execution times; 1≤n≤100000, 1≤time≤10⁹, 1≤y<x≤10⁹.
输出格式
Output the single integer required by the problem.
样例 1
输入:
5 4 2
3 4 1 7 6
输出:
3
样例 2
输入:
1 2 1
1
输出:
1
样例 3
输入:
2 3 1
10 10
输出:
6
样例说明
The answers to the three public examples are, in order: 3; 1; 6. All examples have been verified by independent small-scale enumeration or state search.