No.2023 Tiling is Fun
Problem Statement
Consider the hexagon $ABCDEF$ on the $xy$-plane with vertices $A=(1,0),B=(a,0),C=(a,b-1),D=(a-1,b),E=(0,b),F=(0,1)$.
We tile this hexagon with the following $3$ types of shapes. Shape $1$ is a square with side length $1$, and shapes $2,3$ are parallelograms with two sides of lengths $1,\sqrt{2}$ where the angle between these two sides is $45^{\circ}$.
How many ways are there to tile the hexagon with these shapes, without rotating or reflecting them, so that there are no gaps or overlaps? Find the answer modulo $998244353$.
Constraints
- $2\le a,b\le 10^5$
- All inputs are integers.
Input
$a$ $b$
Output
Output the total number of tilings modulo $998244353$.
Sample
Sample 1
Input
2 3
Output
3
There are the following $3$ ways.
Sample 2
Input
31415 92653
Output
556511073
Output the answer modulo $998244353$.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
hahho