当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6900:Residual Polynomial

题目描述
Kanade has $n$ polynomials $f_1(x)...f_n(x)$. These polynomials satisfy the following conditions:

1. $f_1(x)=\sum_{i=0}^{n}a_ix^i$

2. $\forall i\in [2,n], f_i(x)=b_i(f_{i-1}(x))'+c_if_{i-1}(x)$

Given $a_0,a_1,\cdots,a_n,b_2,b_3,\cdots,b_n,c_2,c_3,\cdots,c_n$, Kanade wants to know $f_n(x)$

Because the coefficients of $f_n(x)$ may be very large, you only need to output them module $998244353$
输入解释
There are $T$ test cases.

The first line has 1 integer $T$.

Then for every test case:

The first line has 1 integer $n$.

The second line has $n+1$ integers $a_{0...n}$

The third line has $n-1$ integers $b_{2...n}$

The fourth line has $n-1$ integers $c_{2...n}$

$1\leq T\leq 100$

$3\leq n\leq 10^5$

$0\leq a_i,b_i,c_i < 998244353$

There are at most $3$ test cases satisfy that $n>1000$
输出解释
For every test case, if $f_n(x)=\sum_{i=0}^{n}w_ix^i$, then output $n+1$ integers $w_{0...n}$ in a line and separate them by spaces.
输入样例
3
3
0 0 0 1
1 1
1 1
4
1 1 1 1 1
1 2 1
2 3 2
5
3 4 5 6 5 4
4 1 6 0
6 9 2 7
输出样例
0 6 6 1
66 166 204 92 12
37940 117264 204708 207256 60900 3024
来自杭电HDUOJ的附加信息
Recommend IceyWang

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6900

最后修改于 2020-10-25T23:35:23+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
6000/3000MS(Java/Others) 524288/524288K(Java/Others)