시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 128 MB | 79 | 46 | 37 | 60.656% |
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.
The first line of input will contain T (≤ 100) denoting the number of cases. Each case starts with 3 integers n (1 ≤ n ≤ 30), P (1 ≤ P ≤ 30) and Q (1 ≤ Q ≤ 100). The next line contains n positive integers (not greater than 10). These integers denote the weight of the eggs in grams.
For each case, print the case number and the desired result.
3 3 2 10 1 3 2 4 5 5 4 4 5 5 5 5 15 2 5 5 5 9
Case 1: 2 Case 2: 1 Case 3: 3