 Timer is Running

Distributing Balls
##### Submissions: 654   Accuracy: 18.2%   Difficulty: Medium   Marks: 4

John is a very calm person. He loves children very much. As his birthday is coming, he decided to give some gifts to the poor children and wants to make them happy by giving them the balls. But his enemy does not like his idea and therefore he wants to destroy John's Plan. So, his enemy takes away the balls as much as he can in the absence of John. John becomes very sad and thinks how he would distribute the remaining balls so that all the children feel happy. Therefore our task is to find the number of ways of distributing the balls. If he can distribute it, output number of ways else print "-1" without quotes.

Input:
First line of the input contains an integer T, denoting number of test cases. Then T test cases follow. Each test case consists of two lines. The first line of each test case consists of three integers m, n and p denoting total number of balls, number of children and the balls enemy has taken respectively. The second line of each test case consists of n space separated integers denoting minimum number of balls needed by a child numbered i, where 1<= i <= n.

Output:
If he can distribute, print the number of ways mod 109+7, else print "-1" without quotes.

Constraints:
1 <= T <= 100
1 <= m <= 1000
2 <= n <= 100
1 <= p <= 1000

Example:
Input

2
13 4 5
2 3 1 3
30 10 14
2 2 1 1 1 2 2 3 1 1

Output
-1
1

#### ** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Vaibhav Garg