Problem8861--[yosupo] Enumerative Combinatorics - Stirling Number of the First Kind

8861: [yosupo] Enumerative Combinatorics - Stirling Number of the First Kind

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

Description

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

Input

$N$

Constraints

$0 \le N \le 500,000$

Sample 1 Input

5

Sample 1 Output

0 24 998244303 35 998244343 1

HINT

相同题目:yosupo

Source/Category