题目描述
Problem Statement
There are N servals on a bridge of length L.
The i-th serval is located at position A_{i} from the left end of the bridge.
Here, $0 < A_{1} < A_{2} < \cdots < A_{N} < L$ holds.
For each $i = 1, 2, \dots, N,$ answer the following question:
The servals will perform the following three actions in order:
- Action 1: The N - 1 servals other than the i-th serval face left or right.
- Action 2: The i-th serval faces left or right.
- Action 3: All servals start moving simultaneously. All servals move at a constant speed of exactly 1 unit distance per unit time. When a serval reaches the end of the bridge, it leaves the bridge. If two servals collide, they both reverse their direction and continue moving.
The i-th serval is smart and loves this bridge, so when choosing a direction in Action 2, it will observe the directions of the other N-1 servals and choose the direction that allows it to stay on the bridge the longer during Action 3.
There are 2^{N-1} possible combinations of directions for the N-1 servals in Action 1. Find the sum, modulo 998244353, over all these combinations, of the durations the i-th serval can stay on the bridge. It can be proved that the output value is an integer.
Input
The input is given from Standard Input in the following format:
N L
$A_{1} A_{2} \cdots A_{N}$
Output
Print N lines. The k-th line should contain the answer for i=k.
Constraints
- $1 \leq N \leq 10^{5}$
- $0 < A_{1} < A_{2} < \cdots < A_{N} < L \leq 10^{9}$
- All input values are integers.
Sample Input 1
2 167
9 24
Sample Output 1
182
301
For i = 1, it is always optimal to face right.
For i = 2, it is optimal to face the opposite direction from the first serval.
Sample Input 2
1 924
167
Sample Output 2
757
Sample Input 3
10 924924167
46001560 235529797 272749755 301863061 359726177 470023587 667800476 696193062 741860924 809211293
Sample Output 3
112048251
409175578
167800512
997730745
278651538
581491882
884751575
570877705
747965896
80750577
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分