Given integer sequences $x_ 0, x_ 1, ..., x_ {N - 1}$ and $y_ 0, y_ 1, ..., y_ {N - 1}$.
Calculate a polynomial $f(x) = \sum_ {i = 0}^ {N - 1} c_ i x^ i \in \mathbb{Z}[x]$ s.t. $f(x_ i) \equiv y_ i (\bmod 998244353)$ is satisfied for each $i$.
Also, $0 \leq c_ i < 998244353$ must be satisfied.
$N$
$x_ 0$ $x_ 1$ ... $x_ {N-1}$
$y_ 0$ $y_ 1$ ... $y_ {N-1}$
$c_ 0$ $c_ 1$ ... $c_ {N -1}$
5 5 6 7 8 9 586 985 1534 2257 3178
1 2 3 4 0
1 10000000 10000000
10000000
| No. | Testdata Range | Score |
|---|