生化武器2

查看题解 查看答案
题目描述
Time Limit: 1000 ms
Memory Limit: 256 mb

请先登录再刷题,不会做的题目右上可以查看题解和答案~

输入输出格式
输入描述:
The first line of input is the number of test cases T. 
 For each test case. 
The first line contains three integers N(4<=N<=100),M(4<=M<=100)and t(0<=t<=1000). 
N and M means that the rows and columns, t represent time, 
'G' is gogo performances location, 'S' is for SJ to see the performance of the location and 'X' is the wall, '.' is Blank.
输出描述:
For each test case,
if SJ can find a safe place after t seconds, 
then output now the situation room, 
'G' is 'chemical and biological weapons',
 ‘S’ is indicates a place of safety.
Otherwise, output "No".
输入输出样例
输入样例#:
2
5 9 4
XXXXXXXXX
X...X...X
X.G.S...X
X...X...X
XXXXXXXXX
5 5 1
XXXXX
X...X
X.GSX
X...X
XXXXX
输出样例#:
复制
XXXXXXXXX
XGGGXGSSX
XGGGGGGSX
XGGGXGSSX
XXXXXXXXX
No
重置

提交代码后在此处可查看状态