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

建议使用的浏览器:

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

3180:Furion's Sprout

题目描述
Furion is the leader of all Night Elves in DOTA. He has a powerful and interesting skill: Szzprout. After he used this skill, several trees will grow quickly to form a square and trap enemy in this square. Now, give you the size of square and map of DOTA, please trap as many enemies as you can. If there are several solutions, show me the topmost one. If there's still a tie, show me the leftmost one.
输入解释
The first line contains an integer T indicating the number of test cases, and then follows T cases. The first line of each case contains three integer : X, the size of square, and N, the row number of map, and M, the column number of map. The rest of a case contains N lines, each contains M characters, which '.' indicating an empty grid, and 'x' indicating an grid occupied by an enemy.
0 < T <= 20, 1 < N <= 10, 1 < M <= 10, 1 < x <= min (N, M).
输出解释
Print N + 1 lines for each case. In the first line, print the number of trapped enemies Y in this format "Trapped Y enemy(ies).”
Then print a map with N lines and each line contains M characters. In each grip:
a) '.' stands for an empty grid;
b) 'T' stands for a grid occupied by a tree;
c) 'x' stands for a grip occupied by an enemy;
d) 'I' stands for a grip occupied by a tree and an enemy meanwhile.
Print a blank line after each case.
输入样例
2

2 2 6
x.x.x.
x.xx..

3 6 3
.x.
xx.
...
.x.
.xx
..x
输出样例
Trapped 3 enemy(ies).
x.ITx.
x.II..

Trapped 4 enemy(ies).
.x.
xx.
...
TIT
TxI
TTI
来自杭电HDUOJ的附加信息
Recommend lcy

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

源链接: HDU-3180

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

共提交 0

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