영어 원문입니다. 원문의 수식·표를 글자로 옮겨 모양이 다를 수 있습니다. 정확한 내용은 원문 페이지에서 확인하세요. 원문 페이지 열기 (새 창)
Problem
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.
(그림은 원문 저장소에서 볼 수 있습니다)
Light strips in Lund, used with permission
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 x SEK per meter. To avoid appearing wasteful, the municipality demands that the average cost for each light strip ordered is at most y SEK per light strip.
The municipality has now provided you with a list of how long the light strips need to be in order to be installed in N different locations in the city. Can you help them set up as many as possible?
Input
The first line of the input contains the integer N (1 ≤ N ≤ 10^5), the number of spots where we might install a light strip.
The second line contains the integer x (1 ≤ x ≤ 30), the cost in SEK of buying one whole meter of light strip.
The third line contains the integer y (1 ≤ y ≤ 1000), the highest average cost per light strip the municipality is willing to pay for.
Afterwards, there will be a line with N integers L_1, L_2, …, L_n (1<=L_i<=20), where L_i means that a light strip must be exactly L_i meters to illuminate the i:th location.
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 |
|---|---|---|
| 1 | 20 | L_i=10 for all i |
| 2 | 20 | L_i=10 or 20 for all i |
| 3 | 20 | N ≤ 500 |
| 4 | 40 | No additional constraints. |
Explanation of sample 1
It is possible to buy the first 3 light strips. The average cost will then be (6+9+12)/3=9 SEK, which barely fits within the budget of at most 9 SEK per light strip on average.
예제
예제 1
4 3 9 2 3 4 5
3
예제 2
2 4 50 10 10
2
예제 3
3 4 60 20 20 10
2