Bobo has a sequence of integers s1, s2, ..., sn where 1 ≤ si ≤ k. Find out the number of distinct sequences modulo (109+7) after removing exactly m elements.
输入描述:
The input consists of several test cases and is terminated by end-of-file.The first line of each test case contains three integers n, m and k.The second line contains n integers s1, s2, ..., sn.
输出描述:
For each test case, print an integer which denotes the result.
示例1
输入
3 2 2
1 2 1
4 2 2
1 2 1 2
备注:
* 1 ≤ n ≤ 105* 1 ≤ m ≤ min{n - 1, 10}* 1 ≤ k ≤ 10* 1 ≤ si ≤ k* The sum of n does not exceed 106.
加载中...