问题 1171. -- Furude_Rika and wall

1171: Furude_Rika and wall

时间限制:1000 ms 内存限制:128 MB
提交:36 解决:16
[ 提交][ 状态][ 讨论版]

题目描述

Furude_Rika decided to paint a wall.The wall consists of n*m tiles,that are arranged in an n*m table,
and each tile is a 1*1 square.At the beginning all the tiles are not painted.
Furude_Rika wants to paint the wall that in each row and in each column the number of printed tile
is 0,1 or 2.She wants to know how many different ways she can paint her wall.
As the answer will be too big,mod it by 14020130063.

输入

Only two intergers n,m(n<=100,m<=100).

输出

Output an interger,the answer to the problem.

样例输入

1 3

样例输出

7

提示

For every tile you can choose whether to paint it or not,the total way of sample is 2*2*2=8.
but if we paint all the tiles,the number of painted tiles in the 1 row is 3.
so the final answer is 8-1=7.

来源

[ 提交][ 状态][ 讨论版]
Baidu
map