当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

5434:Peace small elephant

题目描述
Xiao Ming likes playing the international chess ,especially like the elephant(it can move by slant while no barrier),

but he think the big elephant of the chess is cruel,and a kind of small elephant is not as cruel as the big elephant.

Its attack range is checks on the ramp of the small elephant's check's right angle.Now Ming is going to put many small elephants on his chessboard.

It's interesting that when two small elephants have a common side they'll become one solidarity elephant,

and more than 2 small elephants also can do this if satisfy the condition,and the attack range of solidarity elephants is same as the small elephant.

Now there is a requirement that it's empty on anyone of elephants' attack range(no piece).Xiao Ming has a special chessboard with $m*n$ checks.

Please figure out the number of all the plans that satisfy the condition.As the number is too big,we need to have a modulo $1000000007$.

The following is pictures show the attack range of elephants with different shape,"X"means attack range.


输入解释
There are at most $5$ testcases .

For each testcase contains two integers $n,m$ ,meaning as in the title.
$1 \leq n \leq 1000000000,1 \leq m\leq 7$
输出解释
For each testcase print a single integer - the number of all the plans that satisfy the condition.
输入样例
1 1
2 3
输出样例
2
50
来自杭电HDUOJ的附加信息
Recommend hujie

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-5434

最后修改于 2020-10-25T23:22:38+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
10000/5000MS(Java/Others) 65536/65536K(Java/Others)