Universal Cup Judging System

Universal Cup

时间限制: 2 s 内存限制: 512 MB 总分: 100
统计

对于即将到来的比赛,共提出了 $n$ 道题目。第 $i$ 道题目初始得分为 $a_i$。

共有 $m$ 位评委为他们喜欢的题目投票。每位评委独立地选择恰好 $v$ 道题目,并将每道被选中的题目的得分增加 1。

在所有 $m$ 位评委投票结束后,题目将按得分非递增顺序排序,得分最高的前 $p$ 道题目将被选入题集,其中 $p$ 为 $1$ 到 $n$ 之间的某个整数。得分相同的题目可以任意排序(该顺序由比赛负责人决定)。

请问有多少种不同的可能题集?输出该数量对 $998\,244\,353$ 取模的结果。如果两个题集包含的题目集合不同,则视为不同的题集。

输入格式

每个测试点包含多个测试用例。第一行包含测试用例的数量 $t$ ($1 \le t \le 50$)。接下来是各测试用例的描述。

每个测试用例的第一行包含三个整数 $n, m, v$,分别表示题目数量、评委数量以及每位评委投票选择的题目数量 ($2 \le n \le 100; 1 \le m \le 100; 1 \le v \le n - 1$)。

第二行包含 $n$ 个整数 $a_1, a_2, \dots, a_n$,表示题目的初始得分 ($0 \le a_i \le 100$)。

保证所有测试用例中 $n$ 的总和不超过 $100$。

输出格式

对于每个测试用例,输出可能的题集数量,对 $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

说明

在第一个测试用例中,所有可能的题集为 $\{2\}, \{3\}, \{1, 3\}, \{2, 3\}$ 和 $\{1, 2, 3\}$。

在第二个测试用例中,所有可能的题集为 $\{1\}, \{2\}, \{3\}, \{1, 3\}, \{2, 3\}$ 和 $\{1, 2, 3\}$。

在第三个测试用例中,任何非空题目子集都是可能的题集。

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.