Problem I
Kattis Completionist
Katryna has one goal in her life, and that is to solve all the problems published on Kattis. Of course, she can’t do them all at once, as she still has to work on her computer science degree. Also, attempting to solve the most difficult problems early on could hurt her motivation and persistence.
For that reason, she has concocted a plan. Every Kattis
problem is assigned a difficulty score
So Katryna will, at the start of every day, pick the
unsolved problem with the lowest difficulty score and solve it
(if there are multiple with the lowest difficulty score, she
will pick one of them at random). If her score has increased by
at least
Assuming all the problems’ difficulty scores does not change, how many days would it take Katryna to solve every Kattis problem?
Input
The first line consists of the integer
Then follows a single line with
Output
Output the number of days Katryna will use to solve all her currently unsolved Kattis problems.
Limits
-
-
-
-
All real numbers will have exactly one digit after the decimal point.
Sample Input 1 | Sample Output 1 |
---|---|
5 3.0 1.3 1.7 1.7 1.7 3.1 |
3 |
Sample Input 2 | Sample Output 2 |
---|---|
3 2.1 2.0 2.0 2.0 |
2 |
Sample Input 3 | Sample Output 3 |
---|---|
3 3.6 1.3 2.3 2.3 |
2 |