No.1080 Strange Squared Score Sum
問題文最終更新日: 2020-06-12 21:37:42
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 252
(順位表)
の他の問題:
Problem Statement
yuki is trying to fill $N$ cells arranged in a row with integers from $0$ to $N$. Specifically, the following operation is performed.
- Choose one integer $M$ between $0$ and $N$, inclusive.
- Write $0$ in $N-M$ distinct cells. Here, operations that differ in the order of writing $0$ are distinguished.
- Write natural numbers from $1$ to $N$ in the other $M$ cells. The sum of the written integers must be $K$. Also, operations that differ in the order of writing in the $M$ cells are not distinguished.
- For the integer $A_i$ written in the $i$-th cell, the square of the product of all $A_i+1$ is the "score" of the operation. However, when $M \bmod 4$ is $2$ or $3$, the score is multiplied by $-1$.
Input
$N$
$N$ is a natural number.
$1 \le N \le 10^5$
Output
Output the answers to the problem for $K=1,2, \cdots ,N$ in order, separated by newlines.
Sample
Sample 1
Input
3
Output
24 6 999999825
When $K=2$, the following $9$ operations can be performed.
- There are $6$ ways to write $0$ in $2$ cells and $2$ in the remaining cell, and the score is $9$.
- There are $3$ ways to write $0$ in $1$ cell and $1$ in the remaining cells, and the score is $-16$.
Sample 2
Input
10
Output
14515200 3628800 888716809 488944009 572188178 240216987 181447707 619221884 695987525 438850637
Note that the output must be $\bmod 10^9+9$.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
tko919
yosupot