Problem8862--[yosupo] Enumerative Combinatorics - Stirling Number of the Second Kind

8862: [yosupo] Enumerative Combinatorics - Stirling Number of the Second Kind

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 512 MiB

Description

The Stirling numbers of the second kind $S(n, k)$ are defined as the coefficients in the identity
$x^n = \sum_{k=0}^n S(n, k) x (x - 1) \cdots (x - (k - 1)).$
You are given an integer $N$.
Calculate $S(N, k) \bmod 998244353$ for $0 \le k \le N$.

Input

$N$

Output

$S(N, 0)$ $\cdots$ $S(N, N)$

Constraints

$0 \le N \le500,000$

Sample 1 Input

5

Sample 1 Output

0 1 15 25 10 1

HINT

相同题目:yosupo

Source/Category