Partition Number

아직 제출이 없습니다시간 제한3초메모리 제한256 MB

문제

You are given an integer set A=a_1,a_2,,a_nA=\\{a\_1,a\_2,\ldots,a\_n\\}. Please calculate the number of solutions for equation x_1+x_2++x_k=mx\_1+x\_2+\ldots+x\_k=m, where x_ix\_i are positive integers, x_1x_2x_kx\_1 \le x\_2 \le \ldots \le x\_k and x_i∉Ax\_i \not \in A.

As the answer may be very large, you are only asked to calculate it modulo (109+7)(10^9 + 7).

입력

There are multiple test cases. The first line of the input contains an integer TT indicating the number of test cases. For each test case:

The first line contains two integers nn and mm (1n5001 \le n \le 500, nm3105n \le m \le 3 \cdot 10^5).

The second line contains nn integers a_1,a_2,,a_na\_1,a\_2,\ldots,a\_n (1a_im1 \le a\_i \le m, a_ia_ja\_i \ne a\_j for all iji \ne j).

It is guaranteed that the sum of nn over all test cases does not exceed 500500.

출력

For each test cases, output an integer denoting the answer.

힌트

There are 55 solutions for m=4m=4 if the constraints set AA is empty. They are: 4=1+1+1+1 =1+1+2 =1+3 =2+2 =4\begin{aligned} 4 & = & 1+1+1+1 \\\ {} & = & 1+1+2 \\\ {} & = & 1+3 \\\ {} & = & 2+2 \\\ {} & = & 4 \end{aligned}