Japanese Cursed Doll
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Problem Statement
There are people, and the current hair length of the -th person is .
Each person's hair grows by per day.
Print the number of days after which the number of people whose hair length is at least becomes or more for the first time.
If there are already or more people whose hair length is at least now, print .
Constraints
- All input values are integers.
Input
The input is given from Standard Input in the following format:
N T P
L1 L2 L3 ... LN
Output
Print the number of days after which the number of people whose hair length is at least becomes or more for the first time. If this condition is already satisfied now, print .
Sample
5 10 3
3 11 1 6 2
7
There are five people, and their current hair lengths are , so there is one person whose hair length is at least .
After seven days, the hair lengths of the people will be , respectively, and there will be three people whose hair length is at least .
After six days, there are only two people whose hair length is at least , not satisfying the condition, so print .
2 5 2
10 10
0
Since there are already two people whose hair length is at least now, satisfying the condition, so print .
3 10 1
1 2 3
7
Programming exercise on 11 August
- 状态
- 已结束
- 规则
- IOI
- 题目
- 4
- 开始于
- 2024-8-11 16:30
- 结束于
- 2024-8-11 17:30
- 持续时间
- 1 小时
- 主持人
- 参赛人数
- 2