Codeforces Round 783 (Div. 1)
E
Centroid Probabilities
Codeforces
3000
原题
← DF →
翻译中…

Consider every tree (connected undirected acyclic graph) with $n$ vertices ($n$ is odd, vertices numbered from $1$ to $n$), and for each $2 \le i \le n$ the $i$-th vertex is adjacent to exactly one vertex with a smaller index.

翻译中…

For each $i$ ($1 \le i \le n$) calculate the number of trees for which the $i$-th vertex will be the centroid. The answer can be huge, output it modulo $998\,244\,353$.

翻译中…

A vertex is called a centroid if its removal splits the tree into subtrees with at most $(n-1)/2$ vertices each.

翻译中…

Input

翻译中…

The first line contains an odd integer $n$ ($3 \le n \lt 2 \cdot 10^5$, $n$ is odd) — the number of the vertices in the tree.

翻译中…

Output

翻译中…

Print $n$ integers in a single line, the $i$-th integer is the answer for the $i$-th vertex (modulo $998\,244\,353$).

翻译中…

Note

翻译中…

Example $1$: there are two possible trees: with edges $(1-2)$, and $(1-3)$ — here the centroid is $1$; and with edges $(1-2)$, and $(2-3)$ — here the centroid is $2$. So the answer is $1, 1, 0$.

翻译中…

Example $2$: there are $24$ possible trees, for example with edges $(1-2)$, $(2-3)$, $(3-4)$, and $(4-5)$. Here the centroid is $3$.

翻译中…

样例

Input #1
3
Output #1
1 1 0
InputCopy OutputCopy
Input #2
5
Output #2
10 10 4 0 0
InputCopy OutputCopy
Input #3
7
Output #3
276 276 132 36 0 0 0
InputCopy OutputCopy
题目信息
题号
1667E
时间限制
3 s
内存限制
256 MB
标签
组合数学
动态规划
FFT
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。