P9684 Hello, Solitude.

Background

@【data deleted】 : I 【data deleted】. || @【data deleted】 : Which one are you voting for || @【data deleted】 : Yukino vs. Mikoto (sad)

Description

There is a very long table. On one side of the table, there are $n+2$ chairs, numbered $0,1,\dots,n+1$ from left to right, and the distance between any two adjacent chairs is the same. Initially, there is one person sitting on chair $0$ and one person sitting on chair $n+1$. Then $m$ people enter one by one and sit down according to the following rules: - First, uniformly at random choose an empty seat. - If moving to an adjacent seat can increase the minimum distance to the nearest adjacent person, then move to the adjacent seat. It can be proven that the above operation will definitely stop after a finite number of steps. For each chair $1$ to $n$, find the probability that there is someone sitting on it.

Input Format

The first line contains two integers $n,m$.

Output Format

Output $n$ lines, each containing one integer. The integer on the $i$-th line represents the probability that there is someone sitting on chair $i$, taken modulo $998\,244\,353$.

Explanation/Hint

#### Explanation of Sample 1 Below is one possible seating process: 0. Initially, no one sits on chairs $1$ to $n$. 1. Choose $x=2$. The distance to the nearest person (at seat $0$) is $2$. 1. After moving right to chair $3$, the distance to the nearest person increases to $3$, so set $x\gets x+1$. 2. If moving right again to $4$, the distance to the nearest person (at seat $6$) is still $3$, so they sit on chair $3$. 2. Choose $x=6$. The distance to the nearest person (at seat $7$) is $1$. 1. After moving left to chair $5$, the distance to the nearest person increases to $2$, so set $x\gets x-1$. 2. If moving left or right again, the distance to the nearest person will decrease in both cases, so they sit on chair $5$. 3. Choose $x=4$. Since they cannot move left or right, they directly sit on chair $4$. In the end, chairs $3,4,5$ are occupied. ### Constraints For all testdata, $1\le n\le 5\times 10^5$, $0\le m\le n$. ### Subtasks | # | Special property | Points | | :----------: | :----------: | :----------: | | 0 | Sample | 0 | | 1 | $n\le20$ | 9 | | 2 | $n\le100$ | 10 | | 3 | $n\le500$ | 12 | | 4 | $n\le2000$ | 11 | | 5 | $n\le5000$ | 12 | | 6 | $\exists k\in \mathbb{N}$ such that $n=2^k-1$ | 13 | | 7 | $n\le 10^5$ | 15 | | 8 | - | 18 | Translated by ChatGPT 5