No.3030 Kruskal-Katona
タグ : / 解いたユーザー数 49
作問者 :
ジュ・ビオレ・グレイス
/ テスター :
👑 Problem Statement
It is known that for any positive integers $N$ and $i$, there uniquely exist integers $N_i > N_{i-1} > \dots > N_j \geq j \geq 1$ such that, using the binomial coefficient $\displaystyle\binom{n}{m} = \frac{n!}{m!(n-m)!}$,
$\displaystyle N = \binom{N_i}{i} + \binom{N_{i-1}}{i-1} + \dots + \binom{N_j}{j}$
holds. Given $N, i$ as input, find $N_i, N_{i-1}, \dots, N_j$ and print them in this order, separated by single half-width spaces.
Input
$N \ i$
$1 \leq N \leq 10^8,$
$1 \leq i \leq 100.$
Output
Print the numbers separated by single half-width spaces. Print a newline at the end.
Sample
Sample 1
Input
10 3
Output
5
$\displaystyle10 = \binom{5}{3}$.
Sample 2
Input
135 17
Output
18 17 16 15 14 13 12 11 10 9
$\displaystyle135=\binom{18}{17} + \binom{17}{16} + \binom{16}{15} + \binom{15}{14} + \binom{14}{13} + \binom{13}{12} + \binom{12}{11} + \binom{11}{10} + \binom{10}{9} + \binom{9}{8}$.
Sample 3
Input
1000 1
Output
1000
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。