Logo
(追記) (追記ここまで)

28203번 - Classical Counting Problem 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 1024 MB104444.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円$.

제한

예제 입력 1

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

예제 출력 1

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.

출처

Camp > Petrozavodsk Programming Camp > Winter 2023 > Day 7: Gennady Korotkevich Contest 7 B번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /