RXD and functions

TimeLimit:2000MS  MemoryLimit:524288KB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description

RXD has a polynomial function f(x), f(x)=ni=0cixi
RXD has a transformation of function Tr(f,a), it returns another function g, which has a property that g(x)=f(xa).
Given a1,a2,a3,,am, RXD generates a polynomial function sequence gi, in which g0=f and gi=Tr(gi1,ai)
RXD wants you to find gm, in the form of mi=0bixi
You need to output bi module 998244353.
n105

Input
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$
Output
For each test case, output an polynomial with degree n, which means the answer.
SampleInput
2
0 0 1
1
1
SampleOutput
1 998244351 1 

 Hint $(x - 1) ^ 2 = x^2 - 2x + 1$
Submit
题目统计信息详细
总AC数4
通过人数3
尝试人数3
总提交量5
AC率60.00%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: