Universal Cup Judging System

Universal Cup

実行時間制限: 7.0 s メモリ制限: 1024 MB 満点: 100 ハック可能 ✓
統計

有 $n$ 盏灯排成一行,初始时全部熄灭。表演持续 $m$ 天。

第 $i$ 天,你必须恰好选择 $a_i$ 盏不同的灯,并切换每盏选中的灯的状态:熄灭的灯变为点亮,点亮的灯变为熄灭。

一个方案是这 $m$ 天所选集合组成的序列。如果存在某一天两个方案所选的集合不同,则这两个方案不同。

求在第 $m$ 天结束后恰好有 $r$ 盏灯点亮的方案数,对 $998\,244\,353$ 取模。

输入格式

第一行包含三个整数 $n$、$m$ 和 $r$($1 \le n \le 10\,000$,$1 \le m \le 200\,000$,$0 \le r \le n$)。

第二行包含 $m$ 个整数 $a_1, a_2, \ldots, a_m$($0 \le a_i \le n$)。

输出格式

输出一个整数:在第 $m$ 天结束后恰好有 $r$ 盏灯点亮的方案数,对 $998\,244\,353$ 取模。

样例

输入格式 1

3 2 1
1 2

输出格式 1

6

输入格式 2

7 4 4
1 2 4 5

输出格式 2

57960

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.