8862: [yosupo] Enumerative Combinatorics - Stirling Number of the Second Kind
[Creator : ]
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$.
$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