传统题 1000ms 256MiB

F - Hanjo 2

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

F - Hanjo 2

Score : $600$ points

Problem Statement

We have a rectangular room that is $H$ meters long and $W$ meters wide.
We will fill this entire room with tatami (rectangular mats) that are $2$ meters long and $1$ meter wide, and hanjo (square mats) that are $1$ meter long and $1$ meter wide. Each tatami can be placed vertically or horizontally.
How many ways are there to fill the room?
We distinguish ways that match only after rotation or reflection.

Since the count can be enormous, find it modulo $998244353$.

Constraints

  • $1 \leq H \leq 6$
  • $1 \leq W \leq 10^{12}$

Input

Input is given from Standard Input in the following format:

HH WW

Output

Print the answer.


2 2
7

We have the following seven ways:


3 3
131

5 100
379944232

Be sure to find the count modulo $998244353$.

2024春季入门组刷题营(五)

未参加
状态
已结束
规则
IOI
题目
8
开始于
2024-4-5 13:00
结束于
2024-4-5 15:00
持续时间
2 小时
主持人
参赛人数
6