Problem Statement
You are given an integer $N \geq 2$ and an integer $P$ between $0$ and $100$, inclusive. Let $p=P/100$.
There is a sequence $A$. Initially, the length of $A$ is $1$, and its only element is $1$.
The following operation is repeated $N-1$ times on sequence $A$:
- Let
$m$be the smallest positive integer that does not appear in$A$. With probability$p$, perform operation$1$; with probability$1-p$, perform operation$2$: - Operation
$1$: Append$m$to the end of$A$.- Operation
$2$: Let$c_1,c_2,\dots,c_{m-1}$be the number of times$1,2,\dots,m-1$appear in$A$, respectively. Choose an integer$k$between$1$and$m-1$, inclusive, with probability proportional to$c_k$. That is, choose$k$with probability$c_k/\sum_{j=1}^{m-1} c_j$. Then, append$k$to the end of$A$.
- Operation
For each $k=1,2,\dots,N$, find the expected number of occurrences of $k$ in $A$ after $N-1$ operations, modulo $998244353$.
Definition of expected value modulo $998244353$ It can be proved that the expected value you seek is always a rational number. Also, under the constraints of this problem, it can be proved that when this value is expressed as an irreducible fraction $\frac{P}{Q}$, we have $Q {{}\not\equiv{}} 0 \pmod{998244353}$. Therefore, there is a unique integer $R$ such that $R \times Q \equiv P \pmod{998244353}$ and $0 \leq R \lt 998244353$. Output this $R$.
Constraints
$2 \leq N \leq 10^5$$0 \leq P \leq 100$- All input values are integers.
Input
The input is given from Standard Input in the following format:
N P
Output
Output $N$ lines. The $k$-th $(1\leq k \leq N)$ line should contain the expected number of occurrences of $k$ in $A$ after the operations, modulo $998244353$.
样例
3 50
124780546
124780545
748683265
2 0
2
0
5 24
297734288
442981554
937492320
798158491
518366411
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。