問題一覧 > 通常問題

No.1388 Less than K

レベル : / AI推定難易度 : 2400 / 実行時間制限 : 1ケース 3.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 16
作問者 : 蜜蜂 / テスター : Mitarushi
お気に入りにしたユーザー ProblemId : 5565 / 自分の提出
問題文最終更新日: 2021-03-23 18:38:37
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
灘高入試コンテスト2021 (順位表) の他の問題:

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)$
ミタルシ君:$\ (1,1) \rightarrow (2,1) \rightarrow (3,1) \rightarrow (3,2) \rightarrow (3,3)$
In this case, the distance between the two blocks they are on changes as follows.
$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もしくは右上の雲マークをクリックしてアカウントを作成してください。