| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 1024 MB | 10 | 4 | 4 | 44.444% |
For an upcoming contest, $n$ problems are proposed. Problem $i$ has an initial integer score of $a_i$ points.
There are $m$ judges who will vote for problems they like. Each judge will choose exactly $v$ problems, independently from other judges, and increase the score of each chosen problem by 1ドル$.
After all $m$ judges cast their vote, the problems will be sorted in non-increasing order of score, and the first $p$ problems will be chosen for the problemset, for some $p$ between 1ドル$ and $n$. Problems with the same score can be ordered arbitrarily (this order is decided by the contest director).
How many different problemsets are possible? Print this number modulo 998ドル,244円,353円$. Two problemsets are considered different if some problem belongs to one of them but not to the other.
Each test contains multiple test cases. The first line contains the number of test cases $t$ (1ドル \le t \le 50$). The description of the test cases follows.
The first line of each test case contains three integers $n,ドル $m,ドル and $v,ドル denoting the number of problems, the number of judges, and the number of problems every judge will vote for (2ドル \le n \le 100$; 1ドル \le m \le 100$; 1ドル \le v \le n - 1$).
The second line contains $n$ integers $a_1, a_2, \ldots, a_n,ドル denoting the initial scores of the problems (0ドル \le a_i \le 100$).
It is guaranteed that the sum of $n$ over all test cases does not exceed 100ドル$.
For each test case, print the number of possible problemsets, modulo 998ドル,244円,353円$.
6 3 1 2 1 2 3 3 2 1 1 2 3 10 1 1 0 0 0 0 0 0 0 0 0 0 6 1 2 2 1 1 3 0 2 6 1 5 2 1 1 3 0 2 10 4 8 7 2 3 6 1 6 5 4 6 5
5 6 1023 23 19 240
In the first test case, all possible problemsets are $\{2\},ドル $\{3\},ドル $\{1, 3\},ドル $\{2, 3\},ドル and $\{1, 2, 3\}$.
In the second test case, all possible problemsets are $\{1\},ドル $\{2\},ドル $\{3\},ドル $\{1, 3\},ドル $\{2, 3\},ドル and $\{1, 2, 3\}$.
In the third test case, any non-empty subset of problems is a possible problemset.