問題一覧 > 通常問題

No.2763 Macaron Gift Box

レベル : / AI推定難易度 : 2200 / 実行時間制限 : 1ケース 3.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 47
作問者 : 👑 binap / テスター : matcharate12 👑 magurofly aplysiaSheep
お気に入りにしたユーザー ProblemId : 10151 / 自分の提出
問題文最終更新日: 2024-05-29 11:20:00
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 430 (順位表) の他の問題:

Problem Statement

The binap pastry shop sells $N$ types of macarons, macaron $1$ through macaron $N$. There are $K$ of each macaron in stock, and macaron $i$ ( $1 \leq i \leq N$ ) costs $i$ yen. Macarons of the same type are indistinguishable from each other.

Solve the following problem for each of $X = 1, \ldots, N$.

  • Find the number of ways to buy macarons so that their total price is exactly $X$ yen.

Since the answer can be very large, find the remainder when it is divided by the prime $998244353$.

Input

$N$ $K$

$1 \leq K \leq N \leq 2 \times 10^5$

All inputs are integers.

Output

$Ans_1$ $Ans_2$ $\dots$ $Ans_N$

Output the answers for $X=1,\ldots,N$ in this order, each ${\rm mod}\ 998244353$, separated by spaces.

Print a newline at the end.

Sample

Sample 1
Input
4 2
Output
1 2 2 4

For example, when $X = 4$, there are the following

  • $2$ of macaron $1$ and $1$ of macaron $2$.
  • $1$ of macaron $1$ and $1$ of macaron $3$.
  • $2$ of macaron $2$.
  • $1$ of macaron $4$.

$4$ ways.

Note that macarons of the same type are not distinguished when counting.

Sample 2
Input
13 5
Output
1 2 3 5 7 10 14 20 27 37 49 65 85

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。