Problem p02760 (python)

Fixed submission:
A = [list(map(int,input().split())) for _ in range(3)]
N = int(input())
b = [int(input()) for i in range(N)]
    
import numpy as np
A = np.array(A)
l = []
for i in range(N):
  if b[i] in A:
    l.append(tuple(nd[0] for nd in np.where(A == b[i])))
if (0, 0) in l and (1, 0) in l and (2, 0) in l:
  print("Yes")
elif (0, 0) in l and (1, 1) in l and (2, 2) in l:
  print("Yes")
elif (0, 1) in l and (1, 1) in l and (2, 1) in l:
  print("Yes")
elif (0, 2) in l and (1, 1) in l and (2, 0) in l:
  print("Yes")
elif (0, 2) in l and (1, 2) in l and (2, 2) in l:
  print("Yes")
elif (0, 0) in l and (0, 1) in l and (0, 2) in l:
  print("Yes")
elif (1, 0) in l and (1, 1) in l and (1, 2) in l:
  print("Yes")
elif (2, 0) in l and (2, 1) in l and (2, 2) in l:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
A = [list(map(int,input().split())) for _ in range(3)]
N = int(input())
b = list(map(int,input().split()))
    
import numpy as np
A = np.array(A)
l = []
for i in range(N):
  if b[i] in A:
    l.append(tuple(nd[0] for nd in np.where(A == b[i])))
if (0, 0) in l and (1, 0) in l and (2, 0) in l:
  print("Yes")
elif (0, 0) in l and (1, 1) in l and (2, 2) in l:
  print("Yes")
elif (0, 1) in l and (1, 1) in l and (2, 1) in l:
  print("Yes")
elif (0, 2) in l and (1, 1) in l and (2, 0) in l:
  print("Yes")
elif (0, 2) in l and (1, 2) in l and (2, 2) in l:
  print("Yes")
elif (0, 0) in l and (0, 1) in l and (0, 2) in l:
  print("Yes")
elif (1, 0) in l and (1, 1) in l and (1, 2) in l:
  print("Yes")
elif (2, 0) in l and (2, 1) in l and (2, 2) in l:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
A = [list(map(int,input().split())) for _ in range(N)]
N = int(input())
b = list(map(int,input().split()))
    
import numpy as np
A = np.array(A)
l = []
for i in range(N):
  if b[i] in A:
    l.append(tuple(nd[0] for nd in np.where(A == b[i])))
if (0, 0) in l and (1, 0) in l and (2, 0) in l:
  print("Yes")
elif (0, 0) in l and (1, 1) in l and (2, 2) in l:
  print("Yes")
elif (0, 1) in l and (1, 1) in l and (2, 1) in l:
  print("Yes")
elif (0, 2) in l and (1, 1) in l and (2, 0) in l:
  print("Yes")
elif (0, 2) in l and (1, 2) in l and (2, 2) in l:
  print("Yes")
elif (0, 0) in l and (0, 1) in l and (0, 2) in l:
  print("Yes")
elif (1, 0) in l and (1, 1) in l and (1, 2) in l:
  print("Yes")
elif (2, 0) in l and (2, 1) in l and (2, 2) in l:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
A = [list(map(str,input().split())) for i in range(3)]
N = int(input())
b = list(map(int,input().split()))
import numpy as np
A = np.array(A)
l = []
for i in range(N):
  if str(b[i]) in A:
    l.append(tuple(nd[0] for nd in np.where(A == str(b[i]))))
if (0, 0) in l and (1, 0) in l and (2, 0) in l:
  print("Yes")
elif (0, 0) in l and (1, 1) in l and (2, 2) in l:
  print("Yes")
elif (0, 1) in l and (1, 1) in l and (2, 1) in l:
  print("Yes")
elif (0, 2) in l and (1, 1) in l and (2, 0) in l:
  print("Yes")
elif (0, 2) in l and (1, 2) in l and (2, 2) in l:
  print("Yes")
elif (0, 0) in l and (0, 1) in l and (0, 2) in l:
  print("Yes")
elif (1, 0) in l and (1, 1) in l and (1, 2) in l:
  print("Yes")
elif (2, 0) in l and (2, 1) in l and (2, 2) in l:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
A = [input().split() for i in range(3)]
N = int(input())
b = list(map(int,input().split()))
A = [[int(v) for v in l] for l in A]
import numpy as np
A = np.array(A)
l = []
for i in range(N):
  if b[i] in A:
    l.append(tuple(nd[0] for nd in np.where(A == b[i])))
if (0, 0) in l and (1, 0) in l and (2, 0) in l:
  print("Yes")
elif (0, 0) in l and (1, 1) in l and (2, 2) in l:
  print("Yes")
elif (0, 1) in l and (1, 1) in l and (2, 1) in l:
  print("Yes")
elif (0, 2) in l and (1, 1) in l and (2, 0) in l:
  print("Yes")
elif (0, 2) in l and (1, 2) in l and (2, 2) in l:
  print("Yes")
elif (0, 0) in l and (0, 1) in l and (0, 2) in l:
  print("Yes")
elif (1, 0) in l and (1, 1) in l and (1, 2) in l:
  print("Yes")
elif (2, 0) in l and (2, 1) in l and (2, 2) in l:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
A = [list(map(int,input().split())) for i in range(3)]
N = int(input())
b = list(map(int,input().split()))
import numpy as np
A = np.array(A)
l = []
for i in range(N):
  if b[i] in A:
    l.append(tuple(nd[0] for nd in np.where(A == b[i])))
if (0, 0) in l and (1, 0) in l and (2, 0) in l:
  print("Yes")
elif (0, 0) in l and (1, 1) in l and (2, 2) in l:
  print("Yes")
elif (0, 1) in l and (1, 1) in l and (2, 1) in l:
  print("Yes")
elif (0, 2) in l and (1, 1) in l and (2, 0) in l:
  print("Yes")
elif (0, 2) in l and (1, 2) in l and (2, 2) in l:
  print("Yes")
elif (0, 0) in l and (0, 1) in l and (0, 2) in l:
  print("Yes")
elif (1, 0) in l and (1, 1) in l and (1, 2) in l:
  print("Yes")
elif (2, 0) in l and (2, 1) in l and (2, 2) in l:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
A = [list(map(int,input().split())) for i in range(3)]
N = int(input())
b = list(map(int(input())))
import numpy as np
A = np.array(A)
l = []
for i in range(N):
  if b[i] in A:
    l.append(tuple(nd[0] for nd in np.where(A == b[i])))
if (0, 0) in l and (1, 0) in l and (2, 0) in l:
  print("Yes")
elif (0, 0) in l and (1, 1) in l and (2, 2) in l:
  print("Yes")
elif (0, 1) in l and (1, 1) in l and (2, 1) in l:
  print("Yes")
elif (0, 2) in l and (1, 1) in l and (2, 0) in l:
  print("Yes")
elif (0, 2) in l and (1, 2) in l and (2, 2) in l:
  print("Yes")
elif (0, 0) in l and (0, 1) in l and (0, 2) in l:
  print("Yes")
elif (1, 0) in l and (1, 1) in l and (1, 2) in l:
  print("Yes")
elif (2, 0) in l and (2, 1) in l and (2, 2) in l:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
A = [list(map(int,input().split(" "))) for i in range(3)]
N = int(input())
b = list(map(int(input())))
import numpy as np
A = np.array(A)
l = []
for i in range(N):
  if b[i] in A:
    l.append(tuple(nd[0] for nd in np.where(A == b[i])))
if (0, 0) in l and (1, 0) in l and (2, 0) in l:
  print("Yes")
elif (0, 0) in l and (1, 1) in l and (2, 2) in l:
  print("Yes")
elif (0, 1) in l and (1, 1) in l and (2, 1) in l:
  print("Yes")
elif (0, 2) in l and (1, 1) in l and (2, 0) in l:
  print("Yes")
elif (0, 2) in l and (1, 2) in l and (2, 2) in l:
  print("Yes")
elif (0, 0) in l and (0, 1) in l and (0, 2) in l:
  print("Yes")
elif (1, 0) in l and (1, 1) in l and (1, 2) in l:
  print("Yes")
elif (2, 0) in l and (2, 1) in l and (2, 2) in l:
  print("Yes")
else:
  print("No")