Universal Cup Judging System

Universal Cup

حد الوقت: 4.0 s حد الذاكرة: 1024 MB مجموع النقاط: 100 قابلة للهجوم ✓
الإحصائيات

Little N은 최근 MEX에 대해 배웠습니다. MEX(Minimum Excluded)는 배열에 나타나지 않는 가장 작은 음이 아닌 정수를 뜻합니다. 예를 들어 $\operatorname{{MEX}}([3, 1, 0]) = 2$, $\operatorname{{MEX}}([2, 2, 1]) = 0$, $\operatorname{{MEX}}([0, 3, 1, 2]) = 4$입니다. Little N은 길이가 $k$인 음이 아닌 정수 배열 $[b_1, b_2, \dots, b_k]$에 대해 $\operatorname{MEX}([b_1, b_2, \dots, b_k]) = k$이면 배열 $b$를 $k$-좋은 배열이라고 정의합니다.

양의 정수 $n$이 주어질 때, $n$-좋은 배열 $p_1, p_2, \dots, p_n$에 대해 Little N은 다음 조건을 만족하는 정수 쌍 $(l, r)$의 개수로 함수 $f(p)$를 정의합니다:

  • $1 \le l \le r \le n$;
  • $p_l, \dots, p_r$은 $(r - l + 1)$-좋은 배열입니다.

Little N은 임의의 $n$-좋은 배열 $p$에 대해 $1 \le f(p) \le n$이 성립한다는 정리를 증명했습니다. 이제 Little N은 각 $i \in [1, n]$에 대해 $f(p) = i$를 만족하는 $n$-좋은 배열 $p$의 개수를 구하기를 바랍니다. 물론 이 수는 매우 클 수 있으므로 $998\,244\,353$으로 나눈 나머지를 출력해야 합니다.

입력

입력은 정수 $n$ ($1 \le n \le 10^5$) 하나를 포함하는 한 줄로 이루어집니다.

출력

한 줄에 $n$개의 정수를 출력합니다. 여기서 $i$번째 정수는 $f(p) = i$를 만족하는 $n$-좋은 배열 $p$의 개수를 $998\,244\,353$으로 나눈 나머지를 나타냅니다.

예제

예제 입력 1

1

예제 출력 1

1

예제 입력 2

3

예제 출력 2

0 2 4

예제 입력 3

7

예제 출력 3

0 2312 1424 728 352 160 64

노트

$n = 3$일 때, $3$-좋은 배열은 총 $6$개가 있으며 각각의 함숫값은 다음과 같음을 보일 수 있습니다:

$f([0, 1, 2]) = 3$, $f([0, 2, 1]) = 2$, $f([1, 0, 2]) = 3$, $f([1, 2, 0]) = 2$, $f([2, 0, 1]) = 3$, $f([2, 1, 0]) = 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.