Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- T = int(input())
- while T:
- T -= 1
- n, m = map(int, input().split())
- arr = [list(map(int, input().split())) for i in range(n)]
- isDiff = False
- for i in range(n):
- for j in range(m):
- if arr[i][j] != arr[-i-1][-j-1]:
- isDiff = True
- if isDiff:
- print("keep defending")
- else:
- print("go forward")
Add Comment
Please, Sign In to add comment