#P6597. 烯烃计数

    ID: 7075 远端评测题 2000ms 500MiB 尝试: 0 已通过: 0 难度: 9 上传者: 标签>O2优化Pólya 定理生成函数快速数论变换 NTT

烯烃计数

Background

You may need:

Since Luogu does not have the two problems above, this problem is made instead.

Problem Description

Find the number of isomers of alkenes (homologs of ethylene) with chemical formula CnH2n\text{C}_n \text{H}_{2n}.

In this problem, stereoisomerism and cis-trans isomerism are not considered.

The answer should be taken modulo 998244353998244353.

Input Format

A positive integer nn.

Output Format

Output a total of n1n-1 lines, where the ii-th line is the answer for alkenes with 2n2 \sim n carbon atoms.

5
1
1
3
5

Hint

Explanation for Sample 1

  • n=2n=2: ethylene.
  • n=3n=3: propylene.
  • n=4n=4: 1-butene; 2-butene; 2-methyl-1-propene.
  • n=5n=5: 1-pentene; 2-pentene; 2-methyl-1-butene; 3-methyl-1-butene; 2-methyl-2-butene.

Constraints

For 100%100\% of the testdata, it is guaranteed that 1n1000001 \leq n \leq 100000.

Translated by ChatGPT 5