2653Special Knight

2653   Special Knight

题目描述

Special knight is a special chess which can move to a square that is two squares away horizontally and one square vertically, and he can only move once. In other words, the special knight can only move to previous row and next row, which is different from common knights. Given a chessboard whose size is n*m. You can put any number of special knights on it. Asking how many kinds of method can assure that, the knights will not kill other special knights.

输入格式:

Multiple cases (<=10).

For each test case, there’s one line consisting of two integers n, m(1 <= n <= 1000000000, 1 <= m <= 6)

输出格式:

For each test case, output one line, representing the answer mod 1000000007.

输入样例 复制
2 3
输出样例 复制
36

说明

1
2
通过提交
时空限制2000ms/64mb
题目来源数据结构实验与竞赛训练
评测方式在线评测
题目类型
难        度