[BOJ 9784] Boiled Eggs
View as PDFYou 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.</p>
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
Comments