Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rows = int(input())
- ships = []
- counter = 0
- for i in range(rows):
- current_list = [int(el) for el in input().split()]
- ships.append(current_list)
- command = [el for el in input().split()]
- for x in range(len(command)):
- if ships[int(command[x][0])][int(command[x][2])] != 0:
- ships[int(command[x][0])][int(command[x][2])] -= 1
- if ships[int(command[x][0])][int(command[x][2])] == 0:
- counter += 1
- print(counter)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement