#P5809. 【模板】多项式复合逆
【模板】多项式复合逆
Background
Shen Yu (姐姐) is procrastinating too much qwq.
Problem Description
Let be a degree polynomial.
Given and the coefficients of , find a degree polynomial such that:
Output the coefficients of modulo .
It is guaranteed that and .
Input Format
The first line contains a positive integer .
The second line contains non-negative integers , where is the coefficient of the -th term of . It is guaranteed that and .
Output Format
Output one line with non-negative integers. The -th non-negative integer is the coefficient of the -th term of .
6
0 1 2 2 4 3
0 1 998244351 6 998244329 113
7
0 1 1 4 5 1 4
0 1 998244352 998244351 10 7 998244202
Hint
For of the testdata, and .
Translated by ChatGPT 5