#P7461. [2017年杭电多校]RXD and functions
[2017年杭电多校]RXD and functions
RXD and functions
Problem Description
RXD has a polynomial function , RXD has a transformation of function , it returns another function , which has a property that . Given , RXD generates a polynomial function sequence , in which and RXD wants you to find , in the form of You need to output module 998244353.
Input
There are several test cases, please keep reading until EOF. For each test case, the first line consists of 1 integer , which means . The next line consists of intergers , which means the coefficient of the polynomial. The next line contains an integer , which means the length of . The next line contains integers, the i - th integer is . There are 11 test cases.
Output
For each test case, output an polynomial with degree n, which means the answer.
Sample Input
2
0 0 1
1
1
Sample Output
1 998244351 1
Hint
Source
2017 Multi-University Training Contest - Team 3