AtCoder Regular Contest 124
翻译中…
Problem Statement
翻译中…
Given is a grid with $H$ rows and $W$ columns. Let $(i, j)$ denote the square at the $i$-th row from the top and $j$-th column from the left.
翻译中…
Initially, a camel is on $(1, 1)$, and a cat is on $(H, 1)$.
翻译中…
You can send the following four kinds of orders.
翻译中…
R: Move the camel on$(i, j)$to$(i, j+1)$.D: Move the camel on$(i, j)$to$(i+1, j)$.r: Move the cat on$(i, j)$to$(i, j+1)$.u: Move the cat on$(i, j)$to$(i-1, j)$.
翻译中…
A sequence of orders satisfying all of the four conditions below is said to be good. Find the number of good sequences of orders, modulo $998244353$.
翻译中…
- The final position of the camel will be
$(H, W)$. - The final position of the cat will be
$(1, W)$. - The following will happen exactly once: the camel and the cat are on the same square after an order is processed.
- Neither the camel nor the cat will leave the grid.
翻译中…
Constraints
翻译中…
- All values in input are integers.
$2 \leq H,W \leq 2 \times 10^{5}$
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
H W
翻译中…
Output
翻译中…
Print the number of good sequences of orders, modulo $998244353$.
翻译中…
样例
Input #1
2 2
Output #1
16
- The good sequences of orders include `DRur`, `DurR`, `RruD`, `RDru`, but not `DRru`, `RRR`.
Input #2
200000 200000
Output #2
412709667
- Be sure to print the count modulo $998244353$.
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。