Score : $500$ points
There is a $H \times W$-square grid with $H$ horizontal rows and $W$ vertical columns. Let $(i, j)$ denote the square at the $i$-th row from the top and $j$-th column from the left.
The grid has a rook, initially on $(x_1, y_1)$. Takahashi will do the following operation $K$ times.
How many ways are there to do the $K$ operations so that the rook will be on $(x_2, y_2)$ in the end? Since the answer can be enormous, find it modulo $998244353$.
Input is given from Standard Input in the following format:
$H$ $W$ $K$ $x_1$ $y_1$ $x_2$ $y_2$
Print the number of ways to do the $K$ operations so that the rook will be on $(x_2, y_2)$ in the end, modulo $998244353$.
2 2 2 1 2 2 1
2
We have the following two ways.
1000000000 1000000000 1000000 1000000000 1000000000 1000000000 1000000000
24922282
Be sure to find the count modulo $998244353$.
3 3 3 1 3 3 3
9