You are given a formal power series $f(x) = \sum_ {i=0}^ {N-1} a_ i x^ i \in \mathbb{Q}[[x]]$ with $a_ 0 = 0$.
Calculate the first $N$ terms of $\exp(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{Q}[[x]]$ such that
$$g(x) \equiv \sum_ {k=0}^ {N-1} \frac{f(x)^ k}{k!} \pmod{x^ N}.$$
Print the coefficients modulo $998244353$.
$N$
$a_ 0$ $a_ 1$ $\cdots$ $a_ {N - 1}$
$b_ 0$ $b_ 1$ $\cdots$ $b_ {N - 1}$
5 0 1 2 3 4
1 1 499122179 166374064 291154613
No. | Testdata Range | Score |
---|