luogu#P5273. 【模板】多项式幂函数(加强版)
【模板】多项式幂函数(加强版)
Background
This is a template problem with no background.
Problem Description
Given a degree polynomial , find a polynomial under such that .
All polynomial coefficients are computed under .
Input Format
The first line contains two integers .
The next line contains integers, which are the coefficients of in order: .
Output Format
Output integers, which are the first coefficients of in order: , each being the smallest non-negative integer modulo .
2 2
1 1
1 2
Hint
For of the testdata, , , .
Translated by ChatGPT 5