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

建议使用的浏览器:

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

1739:Tony's Tour

题目描述
A square township has been divided up into n*m(n rows and m columns) square plots (1<=N,M<=8),some of them are blocked, others are unblocked. The Farm is located in the lower left plot and the Market is located in the lower right plot. Tony takes her tour of the township going from Farm to Market by walking through every unblocked plot exactly once.
Write a program that will count how many unique tours Betsy can take in going from Farm to Market.
输入解释
The input contains several test cases. The first line of each test case contain two integer numbers n,m, denoting the number of rows and columns of the farm. The following n lines each contains m characters, describe the farm. A '#' means a blocked square, a '.' means a unblocked square.
The last test case is followed by two zeros.
输出解释
For each test case output the answer on a single line.
输入样例
2 2
..
..
2 3
#..
...
3 4
....
....
....
0 0
输出样例
1
1
4

该题目是Virtual Judge题目,来自 北京大学POJ

题目来源 LouTiancheng@POJ

源链接: POJ-1739

最后修改于 2020-10-29T06:12:43+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
1000 30000