AtCoder Regular Contest 193 (Div. 1)
C
Grid Coloring 3
AtCoder
⌀ 3047
原题
← BD →
翻译中…

Problem Statement

翻译中…

There is a grid of $H$ rows and $W$ columns. Initially, all cells are uncolored.

翻译中…

You can repeat the following procedure any number of times:

翻译中…
  • Choose an integer $i$ between $1$ and $C$, inclusive, and choose exactly one cell in the grid.
  • Then, color that chosen cell, as well as all cells in the same row as the chosen cell and all cells in the same column as the chosen cell (a total of $(H+W-1)$ cells), with color $i$. (If any cell is already colored, its color is overwritten with color $i$.)
翻译中…

Print the number, modulo $998244353$, of different grids in which every cell is colored that can be obtained by repeating the procedure above.

翻译中…

Constraints

翻译中…
  • $1 \leq H, W \leq 400$
  • $1 \leq C \leq 10^9$
  • All input values are integers.
翻译中…

Input

翻译中…

The input is given from Standard Input in the following format:

翻译中…

H W C

翻译中…

Output

翻译中…

Print the answer.

翻译中…

样例

Input #1
2 3 2
Output #1
26
Below, let $(i, j)$ denote the cell at the $i$-th row from the top and the $j$-th column from the left. Also, let `.`, `1`, `2` denote an uncolored cell, a cell colored with color $1$, a cell colored with color $2$, respectively. From the initial grid in Sample Input 1, if you first choose color $2$ and cell $(2, 2)$, the grid becomes: Then, if you choose color $1$ and cell $(1, 1)$, the grid becomes: All cells are colored in this grid, so it satisfies the condition in the problem statement. Furthermore, if you then choose color $1$ and cell $(1, 3)$, the grid becomes: All cells are again colored in this grid, satisfying the condition in the problem statement.
Input #2
3 2 1
Output #2
1
Input #3
229 327 763027379
Output #3
547014653
题目信息
题号
arc193_c
时间限制
4 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。