-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path6096.py
More file actions
31 lines (26 loc) · 664 Bytes
/
6096.py
File metadata and controls
31 lines (26 loc) · 664 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
board = [
[0 for i in range(20)] for j in range(20)
]
for i in range(0, 19):
nums = input().split()
board[i] = list(map(int, nums))
repeat = int(input())
for i in range(0, repeat):
point = input().split()
point = list(map(int, point))
x = point[0] - 1
y = point[1] - 1
for j in range(0, 19) :
if (board[x][j]) == 0 :
board[x][j] = 1
else :
board[x][j] = 0
for k in range(0, 19) :
if (board[k][y]) == 0 :
board[k][y] = 1
else :
board[k][y] = 0
for i in range(0, 19) :
for j in range(0, 19) :
print(board[i][j], end = " ")
print()