Type: Default 1000ms 256MiB

走方格

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

给你一个 n×mn\times m 的网格图,你要从 (1,1)(1,1) 点走到 (n,m)(n,m) 点,每一步只能向下或者向右走,你在行走的过程中最多转弯k次,有多少种方案?答案对 998244353998244353 取模。

注:刚开始面向的方向可以任意定,不算转弯。

Format

Input

一行 33 个数,分别表示 n,m,kn,m,k

Output

一行表示你的答案。记得对 998244353998244353 取模哦!

Samples

3 3 2
4
11 45 14
233393228

Limitation

image

对于 40%40\% 的数据,满足 2n,m,k5002\leq n,m,k \leq 500

对于 100%100\% 的数据,满足 2n,m,k1062\leq n,m,k \leq 10^6

[北辰杯 North-Star-Cup] 十二月月赛

Not Attended
Status
Done
Rule
Ledo
Problem
6
Start at
2023-12-22 18:00
End at
2023-12-23 0:00
Duration
6 hour(s)
Host
Partic.
96