#P1833F. Ira and Flamenco
Ira and Flamenco
Description
Ira loves Spanish flamenco dance very much. She decided to start her own dance studio and found students, th of whom has level .
Ira can choose several of her students and set a dance with them. So she can set a huge number of dances, but she is only interested in magnificent dances. The dance is called magnificent if the following is true:
- exactly students participate in the dance;
- levels of all dancers are pairwise distinct;
- levels of every two dancers have an absolute difference strictly less than .
For example, if and , the following dances are magnificent (students participating in the dance are highlighted in red): , . At the same time dances , , are not magnificent.
In the dance only students participate, although .
The dance involves students with levels and , although levels of all dancers must be pairwise distinct.
In the dance students with levels and participate, but , although .
Help Ira count the number of magnificent dances that she can set. Since this number can be very large, count it modulo . Two dances are considered different if the sets of students participating in them are different.
The first line contains a single integer () — number of testcases.
The first line of each testcase contains integers and () — the number of Ira students and the number of dancers in the magnificent dance.
The second line of each testcase contains integers () — levels of students.
It is guaranteed that the sum of over all testcases does not exceed .
For each testcase, print a single integer — the number of magnificent dances. Since this number can be very large, print it modulo .
Input
The first line contains a single integer () — number of testcases.
The first line of each testcase contains integers and () — the number of Ira students and the number of dancers in the magnificent dance.
The second line of each testcase contains integers () — levels of students.
It is guaranteed that the sum of over all testcases does not exceed .
Output
For each testcase, print a single integer — the number of magnificent dances. Since this number can be very large, print it modulo .
Note
In the first testcase, Ira can set such magnificent dances: , , , , .
The second testcase is explained in the statements.