Problems
You want to boil eggs for breakfast. You have n eggs and a pot.
It takes 15 minutes to boil a pot of eggs (no matter the number of eggs).
It is risky to put more than P eggs in the pot and the pot can carry at most Q grams of eggs.
Now you are given the weight of the eggs in grams, and you have exactly 15 minutes in hand.
Write a program to find the maximum number of eggs that you can boil without taking any risk.
Input
Integer in the first line
In the next line
Output
Print the desired result.
Example #1
3 2 10
1 3 2
2
Example #2
4 5 5
4 4 5 5
1
Example #3
5 5 15
2 5 5 5 9
3
Tag
Source
ICPC Thailand Southern Programming Contest 2012 C번 (수정)