AT_arc230_d [ARC230D] Min Max Matrix
Description
You are given positive integers $ H $ , $ W $ , and $ M $ .
Find the number, modulo $ 998244353 $ , of $ H\times W $ matrices $ A $ , each of whose elements is an integer between $ 1 $ and $ M $ (inclusive), satisfying the following condition.
$$
\min_{1\le i\le H}\max_{1\le j\le W}A_{i,j}=\max_{1\le j\le W}\min_{1\le i\le H}A_{i,j}
$$
Here, $ A_{i,j} $ denotes the element at the $ i $ -th row and $ j $ -th column of matrix $ A $ .
Input Format
The input is given from Standard Input in the following format:
> $ H $ $ W $ $ M $
Output Format
Output the answer.
Explanation/Hint
### Sample Explanation 1
For example, $ A=\begin{pmatrix} 1 & 2\\ 2 & 3\end{pmatrix} $ satisfies the condition.
- $ \displaystyle\min_{1\le i\le H}\max_{1\le j\le W}A_{i,j}=\max_{1\le j\le W}\min_{1\le i\le H}A_{i,j}=2 $ holds.
On the other hand, $ A=\begin{pmatrix} 1 & 3\\ 3 & 2\end{pmatrix} $ does not satisfy the condition.
- $ \displaystyle\min_{1\le i\le H}\max_{1\le j\le W}A_{i,j}=3,\max_{1\le j\le W}\min_{1\le i\le H}A_{i,j}=2 $ .
There are $ 67 $ matrices $ A $ satisfying the condition.
### Constraints
- $ 1 \le H,W \le 200 $
- $ 1 \le M \le 10^8 $
- All input values are integers.