luogu#P4721. 【模板】分治 FFT
【模板】分治 FFT
Background
It can also be solved using polynomial inversion.
Problem Description
Given a sequence , find the sequence .
Here, , with the boundary condition .
Take the answer modulo .
Input Format
The first line contains an integer .
The second line contains integers .
Output Format
Output one line with integers, representing the values of modulo .
4
3 1 2
1 3 10 35
10
2 456 32 13524543 998244352 0 1231 634544 51
1 2 460 1864 13738095 55389979 617768468 234028967 673827961 708520894
Hint
Constraints: , .
Translated by ChatGPT 5