#P7584. [COCI 2012/2013 #1] F7
[COCI 2012/2013 #1] F7
Description
There are players participating in a contest. In each round, the player in 1st place gets points, the player in 2nd place gets points, and so on, with the last player getting point.
Now the -th player initially has points. Determine how many players, after one round, have a chance for their score to become the highest among all players.
Input Format
The input has lines.
The first line contains a positive integer , the total number of players.
The next lines each contain an integer , the initial score of the -th player.
Output Format
Output one line with an integer, the number of players whose score has a chance to become the highest among all players.
3
8
10
9
3
5
15
14
15
12
14
4
Hint
Constraints
For of the testdata, , .
Notes
The score setting of this problem follows the original COCI problem, with a full score of .
Translated from COCI2012-2013 CONTEST #1 T2 F7.
Translated by ChatGPT 5
京公网安备 11011102002149号