#P5383. 普通多项式转下降幂多项式

    ID: 6024 远端评测题 2000ms 500MiB 尝试: 0 已通过: 0 难度: 9 上传者: 标签>数学O2优化快速傅里叶变换 FFT快速数论变换 NTT

普通多项式转下降幂多项式

Background

This is a template problem.

Problem Description

Given an ordinary polynomial F(x)=i=0n1aixiF(x)=\displaystyle\sum_{i=0}^{n-1}a_ix^{i}.

Find a falling-factorial polynomial $G(x)=\displaystyle\sum_{i=0}^{n-1}b_ix^{\underline{i}}$.

Such that G(x)=F(x)G(x)=F(x).

All operations are performed modulo 998244353998244353.

Input Format

The first line contains a positive integer nn, as described above.

The second line contains nn numbers. The ii-th number represents ai1a_{i-1}.

Output Format

Output one line with nn numbers. The ii-th number is bi1b_{i-1}.

3
1 1 1
1 2 1

Hint

For all testdata, ai[0,998244353)a_i\in\lbrack0,998244353).

This problem has a total of 1010 subtasks.

Among them, 33 subtasks have n=2000n=2000.

The other 77 subtasks have n=105n=10^5.

Translated by ChatGPT 5