AtCoder Beginner Contest 204
F
Hanjo 2
AtCoder
⌀ 2044
原题
← E→
翻译中…

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:

翻译中…

H W

翻译中…

Output

翻译中…

Print the answer.

翻译中…

样例

Input #1
2 2
Output #1
7
We have the following seven ways: ![image](https://img.atcoder.jp/ghi/67d23276d886185110ef4d487123a911.png)
Input #2
3 3
Output #2
131
Input #3
5 100
Output #3
379944232
Be sure to find the count modulo $998244353$.
题目信息
题号
abc204_f
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。