1694. RXD and functions

时间限制 2000 ms   内存限制 512 MB

RXD has a polynomial function $f(x)$, $f(x) = \sum_{i = 0}^{n}{c_ix^i}$
RXD has a transformation of function $Tr(f, a)$, it returns another function $g$, which has a property that $g(x) = f(x - a)$.
Given $a_1, a_2, a_3, \dots , a_m$, RXD generates a polynomial function sequence $g_i$, in which $g_0 = f$ and $g_i = Tr(g_{i - 1}, a_i)$
RXD wants you to find $g_m$, in the form of $\sum_{i = 0}^{m}{b_ix^i}$
You need to output $b_i$ module 998244353.
$n\leq 10^5$

输入数据

There are several test cases, please keep reading until EOF.
For each test case, the first line consists of 1 integer $n$, which means $\deg F$.
The next line consists of $n + 1$ intergers $c_i, 0 \leq c_i < 998244353$, which means the coefficient of the polynomial.
The next line contains an integer $m$, which means the length of $a$.
The next line contains $m$ integers, the i - th integer is $a_i$.
There are 11 test cases.
$0<=ai<998244353$
$\sum m\leq 10^5$

输出数据

For each test case, output an polynomial with degree n, which means the answer.

样例输入

复制
2
0 0 1
1
1 \n
 · · \n
 \n
 \n

样例输出

复制
1 998244351 1 
 ·         · \n

样例说明

$(x - 1) ^ 2 = x^2 - 2x + 1$

提交

请先 登录

Source

2017 Multi-University Training Contest - Team 3

© 2025 FAQs Contact About