#jag2018summerday2k. [jag2018summer_day2_k]Short LIS
[jag2018summer_day2_k]Short LIS
Problem Statement
You are given three integers , , and .
Let be a permutation of . is said good if and only if it satisfies all of the following conditions:
- The length of a longest increasing subsequence of is at most .
Count the number of good permutations modulo .
Constraints
Input
Input is given from Standard Input in the following format:
Output
Print the number of good permutations modulo .
Sample Input 1
Sample Output 1
The only good permutation is .