#Lutece0319. Subsequence's Sum
Subsequence's Sum
Migrated from Lutece 319 Subsequence's Sum
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
Given a sequence, you should calculate there are how many subsequence that sum of every number of the subsequence is less than a given number .
Input
First a number () indicates the test cases. Then test cases followed.
Every case are six integers , , , , , , where is the size of the sequence, and is mentioned above.
, , is described the sequence. If the sequence is , then , , , .
, , .
Output
For each test case, output one line. First ,output Case #C:
, where is the number of test case, from to . Then, output the answer.
Samples
1
5 4 7 0 11 19
Case #1: 9
Note
The sequence is 4 7 6 9 10
, so there are subsequence's sum less than .
The subsequence should be continuous and contain at least one number.
Resources
standy