logo AlgoBeat OnlineJudge
登录 注册

#216749. [GKS 2020 #A] Allocation

内存限制:1024 MiB 时间限制:3000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

There are houses for sale. The -th house costs dollars to buy. You have a budget of dollars to spend.

What is the maximum number of houses you can buy?

输入格式

The first line of the input gives the number of test cases, . test cases follow. Each test case begins with a single line containing the two integers and . The second line contains integers. The -th integer is , the cost of the -th house.

输出格式

For each test case, output one line containing Case #x: y, where x is the test case number (starting from 1) and y is the maximum number of houses you can buy.

样例

样例输入 1

3
4 100
20 90 40 90
4 50
30 30 10 10
3 300
999 999 999

样例输出 1

Case #1: 2
Case #2: 3
Case #3: 0

数据范围与提示

In Sample Case #1, you have a budget of dollars. You can buy the 1st and 3rd houses for dollars.

In Sample Case #2, you have a budget of dollars. You can buy the 1st, 3rd and 4th houses for dollars.

In Sample Case #3, you have a budget of dollars. You cannot buy any houses (so the answer is ).

Limits

.

.

, for all .

Test Set 1

.

Test Set 2

.