2597. Tatami

单点时限: 10.0 sec

内存限制: 256 MB

A tatami mat, a Japanese traditional floor cover, has a rectangular form with aspect ratio 1:2. When spreading tatami mats on a floor, it is prohibited to make a cross with the border of the tatami mats, because it is believed to bring bad luck.

Your task is to write a program that reports how many possible ways to spread tatami mats of the same size on a floor of given height and width.

输入格式

The input cosists of a line which contains two integers H and W in this order, separated with a single space. H and W are the height and the width of the floor respectively. The length of the shorter edge of a tatami mat is regarded as a unit length.

You may assume 0 < H,W <= 20.

输出格式

Print the number of possible ways to spread tatami mats in one line.

样例

Input
3 4
/*
4 4
*/
Output
4
/*
2
*/

1 人解决,3 人已尝试。

1 份提交通过,共有 55 份提交。

9.9 EMB 奖励。

创建: 15 年,4 月前.

修改: 8 年前.

最后提交: 3 周前.

来源: Japan

题目标签