Universal Cup Judging System

Universal Cup

시간 제한: 3.0 s 메모리 제한: 1024 MB 총점: 100 해킹 가능 ✓
통계

Міша виписав у блокнот кілька цілих чисел, які він вважає красивими, і пішов гратися з плюсами та мінусами. Він вважає рядок із плюсів та мінусів збалансованим, якщо в ньому порівну обох знаків, а в кінці стоїть красива кількість мінусів. Скільки існує збалансованих рядків довжини $2, 4, \dots, 2n$? Відповіді можуть бути дуже великими, тому знайдіть їх за модулем $998244353$.

Вхідні дані

Перший рядок містить два цілі числа $n$ і $m$: параметр максимальної довжини рядка та кількість цілих чисел у блокноті Міші ($1 \le n, m \le 200000$).

Наступний рядок містить $m$ різних невід'ємних цілих чисел із діапазону $[0, n]$: числа з блокнота Міші.

Вихідні дані

Виведіть $n$ рядків із відповідями за модулем $998244353$.

Приклад

Вхідні дані

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.