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

建议使用的浏览器:

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

6100:WrongStatement

题目描述
The board is a rectangle of unit grids with N rows and M columns.
There are infinity $1 \times 2$ and $2 \times 1$ dominoes.
Some grids are broken, so they are removed, marked with 'X' character.
It is pressure to place dominoes in the board as many as possible.
But sometimes there may be one grid unfilled no matter how you place them.
The board has only one special gird marked with '@'. This special grid can place domino, but should be empty when you finish placement.
It is a pity that the only empty grid is marked with '.' when you finish placement.
You have chance to move the dominoes.The domino can be moved when the short edge is adjacent to the blank grid. The domino will move horizontally or vertically one grid. You can move the domino as many times as you want. Now, the question is how many initial placement can be adjust
with movement to the final state which means every droppable grid except '@' grid, marked with '.', should be filled with domino, and the '@' grid empty.
输入解释
The first line of the input gives the number of test cases T; T test cases follow.
Each case begins with one line with two integers N and M : the number of rows and columns in the grid.
The N lines of M characters each follow; each character is '.', 'X' or '@', as described in the statement.

Limits
$T \leq 100$
$1 \leq N,M \leq 8$
Each character in the grid is one of '.', 'X' or '@'.
'@' will appear exactly once;
输出解释
For each test case output one integer denotes the answer.
As for the answer may be too large, you should output it modulo 1000000007 ($10^{9} + 7$).
输入样例
3
3 5
....X
.@...
...X.
3 5
.....
.@...
.....
3 3
...
...
..@
输出样例
4
10
16
来自杭电HDUOJ的附加信息
Recommend liuyiding

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

源链接: HDU-6100

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

共提交 0

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