luogu#P5158. 【模板】多项式快速插值
【模板】多项式快速插值
Background
This is a template problem, with no background.
Problem Description
You are given points .
Find a polynomial of degree such that .
Input Format
The first line contains a positive integer .
The next lines each contain two integers .
Output Format
Output one line: the coefficients of from low degree to high degree.
If the degree is less than , pad with until there are coefficients.
4
1 1
2 4
3 9
4 16
0 0 1 0
Hint
Constraints:
.
.
It is guaranteed that all are pairwise distinct.
For of the testdata, .
Note that the numbers you output must be integers in the range .
The testdata was generated using CYaRon within five minutes.
Translated by ChatGPT 5