#P4238. 【模板】多项式乘法逆
【模板】多项式乘法逆
Background
Note: This problem is not within the knowledge points designated by the China Computer Federation (CCF) for the Senior track.
Problem Description
Given a polynomial , find a polynomial such that . Coefficients are taken modulo 998244353.
Input Format
First, input an integer , indicating the number of terms of the input polynomial.
Then input integers; the -th integer denotes the coefficient of the term of with degree .
Output Format
Output integers; the -th integer denotes the coefficient of the term of with degree . It is guaranteed that a solution exists.
5
1 6 3 4 9
1 998244347 33 998244169 1020
Hint
For of the testdata, , .
Translated by ChatGPT 5