Score : $600$ points
In a grid with $N$ horizontal rows and $M$ vertical columns of squares, we will write an integer between $1$ and $K$ (inclusive) on each square and define sequences $A, B$ as follows:
Given $N, M, K$, find the number of different pairs of sequences that can be $(A, B)$, modulo $998244353$.
Input is given from Standard Input in the following format:
$N$ $M$ $K$
Print the number of different pairs of sequences that can be $(A, B)$, modulo $998244353$.
2 2 2
7
$(A_1,A_2,B_1,B_2)$ can be $(1,1,1,1)$, $(1,1,1,2)$, $(1,1,2,1)$, $(1,1,2,2)$, $(1,2,2,2)$, $(2,1,2,2)$, or $(2,2,2,2)$ - there are seven candidates.
1 1 100
100
31415 92653 58979
469486242