| International Collegiate Programming Contest, Egyptian Collegiate Programming Contest (ECPC 2018) |
|---|
| Finished |
We heard you like problems with short statements and no stories, this one is for you!
Count the number of permutations of length N where the maximum length of an increasing subarray is exactly K.
The first line of input is the number of test cases T.
Each test case consists of a single line containing two integers N and K, where 1 ≤ K ≤ N ≤ 200.
For each test case output a single line containing the answer to the problem modulo 109 + 7.
4
9 4
9 3
7 1
7 7
60875
189524
1
1
| Name |
|---|


