1299: Hardwood floor

内存限制:128 MB 时间限制:5.000 S
评测方式:文本比较 命题人:
提交:0 解决:0

题目描述

The banquet hall of Computer Scientists‘ Palace has a rectangular form of the size M x N (1<=M<=9, 1<=N<=9). It is necessary to lay hardwood floors in the hall. There are wood pieces of two forms: 1) rectangles (2x1) 2) corners (squares 2x2 without one 1x1 square) You have to determine X - the number of ways to cover the banquet hall. Remarks. The number of pieces is large enough. It is not allowed to leave empty places, or to cover any part of a surface twice, or to saw pieces.

输入

Each line contains two integers m and n.

输出

First line should contain the number X, or 0 if there are no solutions.

样例输入 复制

1 1
2 3

样例输出 复制

0
5

提示

状态压缩DP

来源/分类