#P5408. 第一类斯特林数·行
第一类斯特林数·行
Description
The Stirling number of the first kind represents the number of ways to arrange distinct elements into circular permutations.
Given , for every integer , you need to compute .
Since the answer can be very large, you should output the result modulo (, which is a prime).
Input Format
A single line containing a positive integer , as described in the statement.
Output Format
Output one line with non-negative integers.
You need to 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 2 3 1
Hint
For of the testdata, .
For of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号