Problem11319--[yosupo] Polynomial - Polynomial Taylor Shift

11319: [yosupo] Polynomial - Polynomial Taylor Shift

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 512 MiB

Description

A Polynomial $f(x) = \sum_{i=0}^{N-1} a_ix^i \in \mathbb{Z}[x]$ and an integer $c$ is given.
Compute the sequence $b_0, b_1, \ldots, b_{N-1}$ satisfying $f(x+c) = \sum_{i=0}^{N-1}b_ix^i$, and print it modulo $998244353$.

Input

$N$ $c$
$a_0$ $a_1$ ... $a_{N-1}$

Output

$b_0$ $b_1$ ... $b_{N - 1}$

Constraints

- $1 \leq N \leq 2^{19}$
- $0 \leq c, a_i < 998244353$

Sample 1 Input

5 3
1 2 3 4 5

Sample 1 Output

547 668 309 64 5

Sample 2 Input

2 10000000
10000000 10000000

Sample 2 Output

881938225 10000000

HINT

Yosupo.

Source/Category