#P9684. Hello, Solitude.
Hello, Solitude.
Background
@【data deleted】 : I 【data deleted】. || @【data deleted】 : Which one are you voting for || @【data deleted】 : Yukino vs. Mikoto (sad)
Problem Description
There is a very long table. On one side of the table, there are chairs, numbered from left to right, and the distance between any two adjacent chairs is the same.
Initially, there is one person sitting on chair and one person sitting on chair . Then 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 to , find the probability that there is someone sitting on it.
Input Format
The first line contains two integers .
Output Format
Output lines, each containing one integer. The integer on the -th line represents the probability that there is someone sitting on chair , taken modulo .
6 3
324429415
948332136
224604980
224604980
948332136
324429415
Hint
Explanation of Sample 1
Below is one possible seating process:
- Initially, no one sits on chairs to .
- Choose . The distance to the nearest person (at seat ) is .
- After moving right to chair , the distance to the nearest person increases to , so set .
- If moving right again to , the distance to the nearest person (at seat ) is still , so they sit on chair .
- Choose . The distance to the nearest person (at seat ) is .
- After moving left to chair , the distance to the nearest person increases to , so set .
- If moving left or right again, the distance to the nearest person will decrease in both cases, so they sit on chair .
- Choose . Since they cannot move left or right, they directly sit on chair .
In the end, chairs are occupied.
Constraints
For all testdata, , .
Subtasks
| # | Special property | Points |
|---|---|---|
| 0 | Sample | 0 |
| 1 | 9 | |
| 2 | 10 | |
| 3 | 12 | |
| 4 | 11 | |
| 5 | 12 | |
| 6 | such that | 13 |
| 7 | 15 | |
| 8 | - | 18 |
Translated by ChatGPT 5