You are given a formal power series $f(x) = \sum_ {i=0}^ {N-1} a_ i x^ i \in \mathbb{F}_ {998244353}[[x]]$ with $a_ 0 \ne 0$.
Calculate the first $N$ terms of $\frac{1}{f(x)} = \sum_ {i=0}^ {\infty} b_ i x^ i$.
In other words, find $g(x) = \sum_ {i=0}^ {N-1} b_ i x^ i \in \mathbb{F}_ {998244353}[[x]]$ such that
$$f(x) g(x) \equiv 1 \pmod{x^ N}.$$
$N$
$a_ 0$ $a_ 1$ $\cdots$ $a_ {N - 1}$
$b_ 0$ $b_ 1$ $\cdots$ $b_ {N - 1}$
5 5 4 3 2 1
598946612 718735934 862483121 635682004 163871793
No. | Testdata Range | Score |
---|