Problem A
Illuminated City
Languages
en
sv
To make the city more pleasant, the municipality of Lund has decided to install light strips over the streets. The municipality prefers to have lighting in as many places as possible. There are many locations where light strips could be installed, and since the city council is busy, you have been asked to figure out where the light strips should be placed.

The streets in Lund vary in width, which means that the
light strips will need to be custom ordered. It is possible to
custom order light strips in lengths of whole meters, which
cost
The municipality has now provided you with a list of how
long the light strips need to be in order to be installed in
Input
The first line of the input contains the integer
The second line contains the integer
The third line contains the integer
Afterwards, there will be a line with
Output
Print an integer: the largest number of locations that can be illuminated by light strips within the municipalitys budget.
Points
Your solution will be tested on several test case groups. To get the points for a group, it must pass all the test cases in the group.
Group |
Point value |
Constraints |
|
|
|
|
|
|
|
|
|
|
|
No additional constraints. |
Explanation of sample 1
It is possible to buy the first 3 light strips. The average
cost will then be
Sample Input 1 | Sample Output 1 |
---|---|
4 3 9 2 3 4 5 |
3 |
Sample Input 2 | Sample Output 2 |
---|---|
2 4 50 10 10 |
2 |
Sample Input 3 | Sample Output 3 |
---|---|
3 4 60 20 20 10 |
2 |