Time Limit: 4000/2000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others)
Is there true love in the world?maybe or not, god knows! We know there are some complex relationships between ds and cxlove, they fell into love when they were rookies in acm,.
Now It's the season of graduation, it's also a season for lovers to say good-bye.But, ds and cxlove don't believe this. They want to show their true love and they plan to go out for a trip. But you know ds is a chihuo, he has a lot of snacks, now he wants to know how many different volumes he can take with a bag of a certain capacity.
First line there is a t. represent the test cases.
Each test case begins with two integers n, cap
(1 <= n <= 100, 0 <= cap <= 100000).
the next line contains n integers denoting the volume of the snacks.
a, a, a...a[n];
1 <= a[i] <= 100000
the last line contains n integers denoting the number of the corresponding snack.
b, b, b...b[n];
1 <= b[i] <= 1000
please look at the Sample Output