Boxes
Given n boxes with widths of w_1, w_2, ..., w_n and another big box with width W, find how many ways the boxes can be put in the big box. The constrains are:
Of course the summation of widths of the placed boxes should not be greater than W.
The boxes should be placed one by one starting from left without leaving any empty spaces between them. So, the end of the big box may contain empty spaces. But if there is any unplaced box which can be fit in this space, the ordering should be considered invalid (See the explanation for sample case 1).
Two orderings are considered different if in one ordering, one box is in i^th position, but in another ordering, it isn’t.
If two boxes have same widths, they should be considered same.
Input
Input starts with an integer T (≤ 100), denoting the number of test cases.
Each case starts two integers n (1 ≤ n ≤ 100) and W (1 ≤ W ≤ 1000). The next line contains n space separated integers, denoting w_1 w_2 ... w_n (1 ≤ w_i ≤ W).
Output
For each case, print the case number first and the result modulo 10007.
Notes
For the first case, the orderings are
1 2
1 3
2 1
2 3
3 1
3 2
Only 1 or 2 or 3 is not solutions since we can still place another box.