Universal Cup Judging System

Universal Cup

Süre Sınırı: 3.0 s Bellek Sınırı: 1024 MB Toplam puan: 100 Hack'lenebilir ✓
İstatistikler

미샤는 자신이 아름답다고 생각하는 몇 개의 정수를 공책에 적어 두고 플러스와 마이너스를 가지고 놀러 갔습니다. 그는 플러스와 마이너스로 이루어진 문자열에서 두 기호의 개수가 같고, 끝에 아름다운 개수만큼의 마이너스가 연속해 있을 때 그 문자열이 균형 잡혀 있다고 생각합니다. 길이가 $2, 4, \dots, 2n$인 균형 잡힌 문자열은 각각 몇 개나 있을까요? 답이 매우 클 수 있으므로 $998244353$으로 나눈 나머지를 구하세요.

입력

첫 번째 줄에 문자열의 최대 길이 매개변수와 미샤의 공책에 적힌 정수의 개수를 나타내는 두 정수 $n$과 $m$ ($1 \le n, m \le 200000$)이 주어집니다.

다음 줄에는 범위 $[0, n]$에 속하는 서로 다른 $m$개의 음이 아닌 정수(미샤의 공책에 적힌 수들)가 주어집니다.

출력

$998244353$으로 나눈 나머지 답을 $n$개의 줄에 출력합니다.

예제

입력

5 3
1 2 3

출력

1
3
10
34
120

Editorials

IDTypeStatusTitlePosted ByLast UpdatedActions
#1081EditorialOpenNew Editorial for Problem #17166GotoHiotoriView
#1537EditorialOpenNew Editorial for Problem #17166Xuan0109View
#1217EditorialOpen题解jianglyView

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.