Given $N \times N$ matrix $A = \lbrace a_{ij} \rbrace$ with entries in $\mathbb{Z}/998244353\mathbb{Z}$, print $A^ {-1} = \lbrace b_{ij} \rbrace$. If it doesn't exist, print -1
.
$N$
$a_{11}$ $a_{12}$ ... $a_{1N}$
$a_{21}$ $a_{22}$ ... $a_{2N}$
:
$a_{N1}$ $a_{N2}$ ... $a_{NN}$
If there are no matrices satisfying the condition, print
-1
and if such matrix exists, print
$b_{11}$ $b_{12}$ ... $b_{1N}$
$b_{21}$ $b_{22}$ ... $b_{2N}$
:
$b_{N1}$ $b_{N2}$ ... $b_{NN}$
3 3 1 4 1 5 9 2 6 5
188557267 255106890 587855008 122007643 987152749 321656514 576763404 310564910 976061145
3 1 2 3 4 5 6 7 8 9
-1
2 0 1 1 0
0 1 1 0
No. | Testdata Range | Score |
---|