No.1388 Less than K
Problem Statement
There is a city consisting of $\ HW\ $ blocks in total, divided into a grid with $\ H\ $ rows and $\ W\ $ columns.
Let $\ (i,j)\ $ denote the block in the $\ i\ $-th row from the top and the $\ j\ $-th column from the left. For two blocks $\ A,B\ $, the distance between the two blocks is defined as follows.
- When block $\ A\ $ is $\ (p,q)\ $ and block $\ B\ $ is $\ (r,s)\ $, the distance between blocks $\ A\ $ and $\ B\ $ is $\ |p-r|+|q-s|$
Now Mitsubachi-kun and Mitarushi-kun are both at $\ (1,1)\ $. They head for $\ (H,W)\ $ by repeatedly choosing the block adjacent below or to the right and moving there, simultaneously and at the same speed. (The two may choose different directions of movement.)
How many pairs of movement paths of the two are there such that the distance between the two blocks they are on is always at most $\ K\ $?
Since the answer can be very large, find it modulo $\ 998244353\ $.
Here, two pairs of movement paths of the two are considered different when the following holds.
- There exists an integer $\ i\ $ such that, for the $\ i\ $-th block of the movement paths, it is not the case that "the block where Mitsubachi-kun is located is the same and the block where Mitarushi-kun is located is the same"
Input
$H\ W\ K$
- $ 2 \leq H,W \leq 2 \times 10^5$
- $ 0 \leq K \leq H+W-2$
- All inputs are integers
Output
Output the number of possible pairs of movement paths of the two, modulo $\ 998244353\ $.
Print a newline at the end.
Sample
Sample 1
Input
3 3 2
Output
34
For example, the following movement paths satisfy the condition.
ミツバチ君:$\ (1,1) \rightarrow (1,2) \rightarrow (2,2) \rightarrow (3,2) \rightarrow (3,3)$In this case, the distance between the two blocks they are on changes as follows.
ミタルシ君:$\ (1,1) \rightarrow (2,1) \rightarrow (3,1) \rightarrow (3,2) \rightarrow (3,3)$
$0 \rightarrow 2 \rightarrow 2 \rightarrow 0 \rightarrow 0$
Sample 2
Input
10 10 0
Output
48620
In this case, Mitsubachi-kun and Mitarushi-kun must follow the same movement path.
Sample 3
Input
314 1592 653
Output
13839116
Output the answer modulo $\ 998244353\ $.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
蜜蜂