You are given a formal power series $f(x) = \sum_ {i=0}^ {N-1} a_ i x^ i \in \mathbb{F}_ {998244353}[[x]]$ and a non-negative integer $M$.
Calculate the first $N$ terms of $(f(x))^ M = \sum_ {i=0}^ {\infty} b_ i x^ i$.
$N$ $M$
$a_ 0$ $a_ 1$ $\cdots$ $a_ {N-1}$
$b_ 0$ $b_ 1$ $\cdots$ $b_ {N - 1}$
4 3 0 0 9 12
0 0 0 0
2 2 1 1
1 2
2 0 0 0
1 0
| No. | Testdata Range | Score |
|---|