问题4152--True Love

4152: True Love

[命题人 : ]
时间限制 : 3.000 sec  内存限制 : 128 MB

题目描述

It's the season of graduation, it's also a season for lovers to say good-bye.But, Alice and Bob don't believe this. They want to show their true love and they plan to go out for a trip from ZheJiang to BeiJing.But you know Alice is a chihuo, she has a lot of snacks, now she wants to know how many different volumns she can take with a bag of a certain capacity.

输入

Each test case begins with two integers n, cap
(1 <= n <= 100, 0 <= cap <= 100000).
the next line contains n integers denoting the volumn of the snacks.
a[1], a[2], a[3]...a[n]; 1 <= a[i] <= 100000
the last line contains n integers denoting the number of the corresponding snack.
b[1], b[2], b[3]...b[n];
1 <= b[i] <= 1000

输出

please look at the Sample Output

样例输入 Copy

2
2 10
1 2
1 1
2 2
1 2
1 1

样例输出 Copy

Case 1: 3
Case 2: 2

来源/分类