#P5395. 第二类斯特林数·行
第二类斯特林数·行
Description
The Stirling number of the second kind is the number of ways to partition distinct elements into identical non-empty sets.
Given , for every integer , you need to compute .
Since the answer can be very large, you must output the result modulo (, which is a prime).
Input Format
A single line containing a positive integer , as described above.
Output Format
A single line containing non-negative integers.
Output, in order, the values of $\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
Hint
For of the testdata, .
For of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号