Stirling Number of the Second Kind

AC一覧

Problem Statement
問題文

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 998{,}244{,}353$ for $0 \le k \le N$.

Constraints
制約

Input
入力

$N$

Output
出力

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

Sample
サンプル

# 1

5
0 1 15 25 10 1

Forum


Timelimit: 10 secs

Before submitting, please confirm terms and conditions