#P1916. Hermite 多点求值 / 多点 Taylor 展开
Hermite 多点求值 / 多点 Taylor 展开
Description
Given a polynomial of degree less than , and pairs , satisfying .
For each pair , find , , with the answers taken modulo .
Here denotes the -th derivative of .
Input Format
The first line contains two positive integers .
The second line contains integers, namely in order.
Each of the next lines represents the values of on the -th line.
Output Format
Output lines.
The -th line contains numbers, representing $F(a_i),F'(a_i),F^{(2)}(a_i),\cdots ,F^{(k_i-1)}(a_i)$ in order.
All answers are taken modulo .
11 11
18 2 6 17 7 19 17 6 2 12 14
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
9 1
10 1
11 1
120
23750
1107240
18147258
161737928
973451550
464732548
722342802
682083299
545845982
686473504
11 4
18 2 6 17 7 19 17 6 2 12 14
4 2
15 3
5 2
20 4
18147258 44343650
804760733 115057816 300031140
161737928 317914212
73381527 279355195 666843568 217219267
Hint
For all testdata, , .
It is guaranteed that each is a positive integer and .
It is guaranteed that the are pairwise distinct.
Translated by ChatGPT 5
京公网安备 11011102002149号