Universal Cup Judging System

Universal Cup

Límite de tiempo: 4.0 s Límite de memoria: 1024 MB Puntuación total: 100 Hackeable ✓
Estadísticas

小 N 最近学习了 MEX。MEX(Minimum Excluded,最小未出现值)指的是不在数组中出现的最小非负整数。例如:$\text{MEX}([3, 1, 0]) = 2$,$\text{MEX}([2, 2, 1]) = 0$,$\text{MEX}([0, 3, 1, 2]) = 4$。小 N 定义,对于一个长度为 $k$ 的非负整数数组 $[b_1, b_2, \dots, b_k]$,如果 $\text{MEX}([b_1, b_2, \dots, b_k]) = k$,则称数组 $b$ 为一个 $k$-好数组。

给定一个正整数 $n$,对于一个 $n$-好数组 $p_1, p_2, \dots, p_n$,小 N 定义函数 $f(p)$ 为满足以下条件的整数对 $(l, r)$ 的数量:

  • $1 \le l \le r \le n$;
  • $p_l, \dots, p_r$ 是一个 $(r - l + 1)$-好数组。

小 N 已经证明了以下定理:对于任意 $n$-好数组 $p$,均有 $1 \le f(p) \le n$。现在,小 N 希望你能对于每个 $i \in [1, n]$,求出满足 $f(p) = i$ 的 $n$-好数组 $p$ 的数量。当然,这个数量可能非常大,因此你需要输出其对 $998244353$ 取模后的结果。

输入格式

输入仅包含一行,包含一个整数 $n$($1 \le n \le 10^5$)。

输出格式

输出一行,包含 $n$ 个整数,其中第 $i$ 个整数表示满足 $f(p) = i$ 的 $n$-好数组 $p$ 的数量,对 $998244353$ 取模。

样例

输入样例 1

1

输出样例 1

1

输入样例 2

3

输出样例 2

0 2 4

输入样例 3

7

输出样例 3

0 2312 1424 728 352 160 64

说明

对于 $n = 3$,可以证明共有六个 $3$-好数组,其对应的函数值分别为:

$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.