Polynomial Taylor Shift

AC一覧

Problem Statement問題文

A Polynomial $f(x) = \sum_{i=0}^{N-1} a_ix^i$ 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 $998{,}244{,}353$.

Constraints制約

• $1 \leq N \leq 524{,}288$
• $0 \leq c, a_i < 998{,}244{,}353$

Input入力

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


Output出力

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


Sampleサンプル

# 1

5 3
1 2 3 4 5

547 668 309 64 5


# 2

2 10000000
10000000 10000000

881938225 10000000


Timelimit: 5 secs

Before submitting, please confirm terms and conditions