b367.
翻轉世界
--
自己
| From: [202.86.136.162, 192.168.4.140] |
發表日期
:
2015-01-20 15:21
var
t,z,j,k,i,n,m:longint; a:array[1..11,1..11] of longint;
begin
readln(t);
for z:=1 to t do
begin
readln(n,m);
for i:=1 to n do
begin
for j:=1 to m do read(a[i,j]);
readln;
end;
k:=0;
for i:=1 to n do
for j:=1 to m do
begin
if a[i,j]<>a[n+1-i,m+1-j] then
begin k:=1; writeln('keep defending'); break; end;
end;
if k=0 then writeln('go forward');
end;
end.