#P5395. 第二类斯特林数·行
第二类斯特林数·行
题目描述
第二类斯特林数 表示把 个不同元素划分成 个相同的集合中(不能有空集)的方案数。
给定 ,对于所有的整数 ,你要求出 。
由于答案会非常大,所以你的输出需要对 (,是一个质数)取模。
输入格式
一行一个正整数 ,意义见题目描述。
输出格式
共一行 个非负整数。
你需要按顺序输出 $\begin{Bmatrix} n \\0 \end{Bmatrix},\begin{Bmatrix} n \\1 \end{Bmatrix},\begin{Bmatrix} n \\2 \end{Bmatrix},\dots,\begin{Bmatrix} n \\n \end{Bmatrix}$ 的值。
3
0 1 3 1
提示
对于 的数据,。
对于 的数据,。