Codeforces Round 717 (Div. 2)
E
Baby Ehab Plays with Permutations
Codeforces
2500
原题
← D→
翻译中…

This time around, Baby Ehab will play with permutations. He has $n$ cubes arranged in a row, with numbers from $1$ to $n$ written on them. He'll make exactly $j$ operations. In each operation, he'll pick up $2$ cubes and switch their positions.

翻译中…

He's wondering: how many different sequences of cubes can I have at the end? Since Baby Ehab is a turbulent person, he doesn't know how many operations he'll make, so he wants the answer for every possible $j$ between $1$ and $k$.

翻译中…

Input

翻译中…

The only line contains $2$ integers $n$ and $k$ ($2 \le n \le 10^9$, $1 \le k \le 200$) — the number of cubes Baby Ehab has, and the parameter $k$ from the statement.

翻译中…

Output

翻译中…

Print $k$ space-separated integers. The $i$-th of them is the number of possible sequences you can end up with if you do exactly $i$ operations. Since this number can be very large, print the remainder when it's divided by $10^9+7$.

翻译中…

Note

翻译中…

In the second example, there are $3$ sequences he can get after $1$ swap, because there are $3$ pairs of cubes he can swap. Also, there are $3$ sequences he can get after $2$ swaps:

翻译中…
  • $[1,2,3]$,
  • $[3,1,2]$,
  • $[2,3,1]$.
翻译中…

样例

Input #1
2 3
Output #1
1 1 1
InputCopy OutputCopy
Input #2
3 2
Output #2
3 3
InputCopy OutputCopy
Input #3
4 2
Output #3
6 12
InputCopy OutputCopy
题目信息
题号
1516E
时间限制
2 s
内存限制
256 MB
标签
组合数学
动态规划
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。