TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
A1 = list(map(int,input().split()))
A2 = list(map(int,input().split()))
A3 = list(map(int,input().split()))
N = int(input())

for i in range(N):
    b = int(input())
    for t in range(3):
        if A1[t] == b:
            A1[t] = -1
        elif A2[t] == b:
            A2[t] = -1
        elif A3[t] == b:
            A3[t] = -1

if A1 == A2 == A3 == [-1, -1, -1] or A1[1] == A2[1] == A3[1] == -1 or A1[2] == A2[2] == A3[2] == -1　or A1[0] == A2[0] == A3[0] == -1 or A1[0] == A2[1] == A3[2] == -1 or A1[2] == A2[1] == A3[0] == -1:
    print('Yes')
else:
    print('No')


A1 = list(map(int,input().split()))
A2 = list(map(int,input().split()))
A3 = list(map(int,input().split()))
N = int(input())

for i in range(N):
    b = int(input())
    for t in range(3):
        if A1[t] == b:
            A1[t] = -1
        elif A2[t] == b:
            A2[t] = -1
        elif A3[t] == b:
            A3[t] = -1

if A1 == A2 == A3 == [-1, -1, -1] \
        or A1[1] == A2[1] == A3[1] == -1 \
        or A1[2] == A2[2] == A3[2] == -1 \
        or A1[0] == A2[0] == A3[0] == -1 \
        or A1[0] == A2[1] == A3[2] == -1 \
        or A1[2] == A2[1] == A3[0] == -1 \
        or A1[0] == A2[0] == A3[0] == -1 \
        or A1[1] == A2[1] == A3[1] == -1 \
        or A1[2] == A2[2] == A3[2] == -1:
    print('Yes')
else:
    print('No')
print(A1)
print(A2)
print(A3)

A1 = list(map(int,input().split()))
A2 = list(map(int,input().split()))
A3 = list(map(int,input().split()))
N = int(input())

for i in range(N):
    b = int(input())
    for t in range(3):
        if A1[t] == b:
            A1[t] = -1
        elif A2[t] == b:
            A2[t] = -1
        elif A3[t] == b:
            A3[t] = -1

if A1 == [-1, -1, -1] \
        or A2 == [-1, -1, -1] \
        or A3 == [-1, -1, -1] \
        or A1[1] == A2[1] == A3[1] == -1 \
        or A1[2] == A2[2] == A3[2] == -1 \
        or A1[0] == A2[0] == A3[0] == -1 \
        or A1[0] == A2[1] == A3[2] == -1 \
        or A1[2] == A2[1] == A3[0] == -1 \
        or A1[0] == A2[0] == A3[0] == -1 \
        or A1[1] == A2[1] == A3[1] == -1 \
        or A1[2] == A2[2] == A3[2] == -1:
    print('Yes')
else:
    print('No')

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
a = [list(map(int, input().split())) for _ in range(3)]
n = int(input())
b = [int(input()) for _ in range(n)]
a_hash = [[False, False, False] for _ in range(3)]

for i in b:
    for ind, j in enumerate(a):
        if i in j:
            a_hash[ind][j.index(i)] = True

for i in a_hash:
    if all(i):
        print("Yes")
        exit()
for num in range(3):
    if a_hash[num][0] and a_hash[num][1] and a_hash[num][2]:
        print("Yes")
        exit()
print("No")

a = [list(map(int, input().split())) for _ in range(3)]
n = int(input())
b = [int(input()) for _ in range(n)]
a_hash = [[False, False, False] for _ in range(3)]

for i in b:
    for ind, j in enumerate(a):
        if i in j:
            a_hash[ind][j.index(i)] = True

for i in a_hash:
    if all(i):
        print("Yes")
        exit()

if a_hash[0][0] and a_hash[1][1] and a_hash[2][2]:
    print("Yes")
    exit()
elif a_hash[0][2] and a_hash[1][1] and a_hash[2][0]:
    print("Yes")
    exit()

for num in range(3):
    if a_hash[0][num] and a_hash[1][num] and a_hash[2][num]:
        print("Yes")
        exit()
print("No")

Verdicts: Wrong Answer

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
A = []
for _ in range(3):
    a = [int(a) for a in input().split()]
    A.append(a)
N = int(input())
for _ in range(N):
    num = int(input())
    for i in range(3):
        for j in range(3):
            if A[i][j]==num:
                A[i][j] = -1

# Rows
for row in range(3):
    bingo_row = True
    for col in range(3):
        if A[row][col]!=-1:
            bingo_row = False
    if bingo_row:
        print('rows Yes')
        exit()
    
# Columns
for col in range(3):
    bingo_col = True
    for row in range(3):
        if A[row][col]!=-1:
            bingo_col = False
    if bingo_col:
        print('cols Yes')
        exit()

# Naname
bingo_naname = True
for i in range(3):
    col, row = i, i
    if A[row][col] != -1:
        bingo_naname = False
if bingo_naname:
    print('naname1 Yes')
    exit()
bingo_naname = True
for i in range(3):
    col, row = 2-i, i
    if A[row][col] != -1:
        bingo_naname = False
if bingo_naname:
    print('naname2 Yes')
    exit()

print('No')


A = []
for _ in range(3):
    a = [int(a) for a in input().split()]
    A.append(a)
N = int(input())
for _ in range(N):
    num = int(input())
    for i in range(3):
        for j in range(3):
            if A[i][j]==num:
                A[i][j] = -1

# Rows
for row in range(3):
    bingo_row = True
    for col in range(3):
        if A[row][col]!=-1:
            bingo_row = False
    if bingo_row:
        print('Yes')
        exit()
    
# Columns
for col in range(3):
    bingo_col = True
    for row in range(3):
        if A[row][col]!=-1:
            bingo_col = False
    if bingo_col:
        print('Yes')
        exit()

# Naname
bingo_naname = True
for i in range(3):
    col, row = i, i
    if A[row][col] != -1:
        bingo_naname = False
if bingo_naname:
    print('Yes')
    exit()
bingo_naname = True
for i in range(3):
    col, row = 2-i, i
    if A[row][col] != -1:
        bingo_naname = False
if bingo_naname:
    print('Yes')
    exit()

print('No')


Verdicts: Wrong Answer

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
S = [input().split() for i in range(3)]
N = int(input())
b = [int(i) for i in input().split()]
check = 0

for num in b:
    for i in range(3):
        for j in range(3):
            if S[i][j] == num:
                S[i][j] = '*'

if len(set(S[0])) == 1 or len(set(S[1])) == 1 or len(set(S[2])) == 1:
    check = 1

for i in range(3):
    cnt = 0
    for j in range(3):
        if S[j][i] == '*':
            cnt += 1
    if cnt == 3:
        check = 1

if S[0][0] == S[1][1] == S[2][2] == '*' or S[0][2] == S[1][1] == S[2][0] == '*':
    check = 1

if check == 1:
    print('Yes')
else:
    print('No')

S = [input().split() for i in range(3)]
N = int(input())
b = [int(i) for i in input().split()]
check = 0

for num in b:
    for i in range(3):
        for j in range(3):
            if S[i][j] == num:
                S[i][j] = '*'

if len(set(S[0])) == 1 or len(set(S[1])) == 1 or len(set(S[2])) == 1:
    check = 1

for i in range(3):
    cnt = 0
    for j in range(3):
        if S[j][i] == '*':
            cnt += 1
    if cnt == 3:
        check = 1

if S[0][0] == S[1][1] == S[2][2] == '*' or S[0][2] == S[1][1] == S[2][0] == '*':
    check = 1

if check == 1:
    print('Yes')
else:
    print('No')

print(S)

S = [[int(i) for i in input().split()] for i in range(3)]
N = int(input())
b = [int(input()) for i in range(N)]
check = 0

for num in b:
    for i in range(3):
        for j in range(3):
            if S[i][j] == num:
                S[i][j] = '*'

if len(set(S[0])) == 1 or len(set(S[1])) == 1 or len(set(S[2])) == 1:
    check = 1

for i in range(3):
    cnt = 0
    for j in range(3):
        if S[j][i] == '*':
            cnt += 1
    if cnt == 3:
        check = 1

if S[0][0] == S[1][1] == S[2][2] == '*' or S[0][2] == S[1][1] == S[2][0] == '*':
    check = 1

if check == 1:
    print('Yes')
else:
    print('No')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
A1 = list(map(int,input().split()))
A2 = list(map(int,input().split()))
A3 = list(map(int,input().split()))
A = A1 + A2 + A3
N = int(input())
for i in range(N):
  B = int(input())
  if B == A[i]:
    A[i] == 'AC'
if A[0] == A[1] == A[2] == 'AC' or A[3] == A[4] == A[5] == 'AC' or A[6] == A[7] == A[8] == 'AC':
  print('Yes')
elif A[0] == A[3] == A[6] == 'AC' or A[1] == A[4] == A[7] == 'AC' or A[2] == A[5] == A[8] == 'AC':
  print('Yes')
elif A[0] == A[4] == A[8] == 'AC' or A[2] == A[4] == A[6] == 'AC':
  print('Yes')
else:
  print('No')

A1 = list(input().split())
A2 = list(input().split())
A3 = list(input().split())
A = [A1,A2,A3]
N = int(input())
for i in range(N):
  C = input()
  for j in range(3):
    if C == A[0][j]:
      A[0][j] = 'AC'
    if C == A[1][j]:
      A[1][j] = 'AC'
    if C == A[2][j]:
      A[2][j] = 'AC'
for l in range(3):
    if A[l][0] == A[l][1] == A[l][2] == 'AC':
      print('Yes')
      exit()
    if A[0][l] == A[1][l] == A[2][l] == 'AC':
      print('Yes')
      exit()
if A[0][0] == A[1][1] == A[2][2] == 'AC':
  print('Yes')
  exit()
if A[0][2] == A[1][1] == A[2][0] == 'AC':
  print('Yes')
  exit()
print('No')

Verdicts: Runtime Error

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
S = [list(map(int, input().split())) for _ in range(3)]
s = []
for i in range(3):
    for j in range(3):
        s.append(S[i][j])
n = int(input())
a = [int(input()) for i in range(n)]
print(s[0]in a and s[1] in a and s[2] in a)
if (s[0]in a and s[1] in a and s[2] in a)or(s[3]in a and s[4] in a and s[5] in a)or(s[6]in a and s[7] in a and s[8] in a)or(s[0]in a and s[3] in a and s[6] in a)or(s[4]in a and s[1] in a and s[7] in a)or(s[2]in a and s[5] in a and s[8] in a)or(s[0]in a and s[4] in a and s[8] in a)or(s[2]in a and s[4] in a and s[6] in a):
    print("Yes")
else:
    print("No")

S = [list(map(int, input().split())) for _ in range(3)]
s = []
for i in range(3):
    for j in range(3):
        s.append(S[i][j])
n = int(input())
a = [int(input()) for i in range(n)]
if (s[0]in a and s[1] in a and s[2] in a)or(s[3]in a and s[4] in a and s[5] in a)or(s[6]in a and s[7] in a and s[8] in a)or(s[0]in a and s[3] in a and s[6] in a)or(s[4]in a and s[1] in a and s[7] in a)or(s[2]in a and s[5] in a and s[8] in a)or(s[0]in a and s[4] in a and s[8] in a)or(s[2]in a and s[4] in a and s[6] in a):
    print("Yes")
else:
    print("No")


Verdicts: Wrong Answer

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
def contains(lista, n):
    for i in range(3):
        for j in range(3):
            if lista[i][j] == n:
                lista[i][j] = "x"

def busca(lista):
    for i in range(3):
        if(lista[i][0] == "x" and lista[i][1] == "x" and lista[i][2] == "x"):
           return "Yes"
    for i in range(3):
        if(lista[0][i] == "x" and lista[1][i] == "x" and lista[2][i] == "x"):
           return "Yes"
    if(lista[0][0] == "x" and lista[1][1] == "x" and lista[2][2] == "x"):
       return "Yes"
    if(lista[0][2] == "x" and lista[1][1] == "x" and lista[2][0] == "x"):
       return "Yes"
    return "No"

    
lista = []
for i in range(3):
    x = list(map(float,input().split()))
    lista.append(x)
for i in range(int(input())):
    b = float(input())
    contains(lista,b)
print(busca(lista))
print(lista)
    


def contains(lista, n):
    for i in range(3):
        for j in range(3):
            if lista[i][j] == n:
                lista[i][j] = "x"

def busca(lista):
    for l in lista:
        if l == ["x","x","x"]:
            return "yes"
    for i in range(3):
        if(lista[0][i] == "x" and lista[1][i] == "x" and lista[2][i] == "x"):
           return "yes"
    if(lista[0][0] == "x" and lista[1][1] == "x" and lista[2][2] == "x"):
       return "yes"
    if(lista[0][2] == "x" and lista[1][1] == "x" and lista[2][0] == "x"):
       return "yes"
    return "no"

    
lista = []
for i in range(3):
    x = list(map(float,input().split()))
    lista.append(x)
for i in range(int(input())):
    b = float(input())
    contains(lista,b)
print(busca(lista))
    


def contains(lista, n):
    for i in range(3):
        for j in range(3):
            if lista[i][j] == n:
                lista[i][j] = "x"

def busca(lista):
    for i in range(3):
        if(lista[i][0] == "x" and lista[i][1] == "x" and lista[i][2] == "x"):
           return "Yes"
    for i in range(3):
        if(lista[0][i] == "x" and lista[1][i] == "x" and lista[2][i] == "x"):
           return "Yes"
    if(lista[0][0] == "x" and lista[1][1] == "x" and lista[2][2] == "x"):
       return "Yes"
    if(lista[0][2] == "x" and lista[1][1] == "x" and lista[2][0] == "x"):
       return "Yes"
    return "No"

    
lista = []
for i in range(3):
    x = list(map(float,input().split()))
    lista.append(x)
for i in range(int(input())):
    b = float(input())
    contains(lista,b)
print(busca(lista))

    


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
a = []
b = []
for i in range(3):
    ai = list(map(int, input().split()))
    a.append(ai)
n = int(input())
for i in range(n):
    b = int(input())
    for j in range(3):
        for k in range(3):
            if a[j][k] == b:
                a[j][k] = 0

for i in range(3):
    if a[i][0] == 0 and a[i][1] == 0 and a[i][2] == 0:
        print("Yes")
        break
else:
    for i in range(3):
        if a[0][i] == 0 and a[1][i] == 0 and a[2][i] == 0:
            print("Yes")
            break
    else:
        if c[0][0] == 0 and c[1][1] == 0 and c[2][2] == 0:
            print("Yes")
        elif a[0][2] == 0 and a[1][1] == 0 and a[2][0] == 0:
            print("Yes")
        else:
            print("No")

a = []
for i in range(3):
    ai = list(map(int, input().split()))
    a.append(ai)
n = int(input())
for i in range(n):
    b = int(input())
    for j in range(3):
        for k in range(3):
            if a[j][k] == b:
                a[j][k] = 0

ans = "No"
if sum(a[0]) == 0:
    ans = "Yes"
elif sum(a[1]) == 0:
    ans = "Yes"
elif sum(a[2]) == 0:
    ans = "Yes"
elif a[0][0] + a[1][0] + a[2][0] == 0:
    ans = "Yes"
elif a[0][1] + a[1][1] + a[2][1] == 0:
    ans = "Yes"
elif a[0][2] + a[1][2] + a[2][2] == 0:
    ans = "Yes"
elif a[0][0] + a[1][1] + a[2][2] == 0:
    ans = "Yes"
elif a[0][2] + a[1][1] + a[2][0] == 0:
    ans = "Yes"
print(ans)


Verdicts: Runtime Error

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
card = []

for _ in range(3):
    card.extend(map(int, input().split(' ')))

jadge = [0] * 9
N = int(input())

for _ in range(N):
    n = int(input())
    if n in card:
        jadge[card.index(n)] = 1

print(jadge)

bingo = False
for i in range(3):
    if (jadge[3 * i] + jadge[3 * i+1] + jadge[3 * i+2]) == 3:
        bingo = True
        break
    if (jadge[i] + jadge[3 + i] + jadge[6 + i]) == 3:
        bingo = True
        break
    if (jadge[i] + jadge[4] + jadge[8-i]) == 3:
        bingo = True
        break

if bingo:
    print('Yes')
else:
    print('No')



card = []

for _ in range(3):
    card.extend(map(int, input().split(' ')))

jadge = [0] * 9
N = int(input())

for _ in range(N):
    n = int(input())
    if n in card:
        jadge[card.index(n)] = 1

bingo = False
for i in range(3):
    if (jadge[3 * i] + jadge[3 * i+1] + jadge[3 * i+2]) == 3:
        bingo = True
        break
    if (jadge[i] + jadge[3 + i] + jadge[6 + i]) == 3:
        bingo = True
        break
    if (jadge[i] + jadge[4] + jadge[8-i]) == 3:
        bingo = True
        break

if bingo:
    print('Yes')
else:
    print('No')



Verdicts: Wrong Answer

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
a,b,c = map(int, input().split())
d,e,f = map(int, input().split())
l,m,k = map(int, input().split())
g = [a, b, c, d, e, f, l, m, k]
lis1 = []
n = int(input())
for i in range(n):
    op = int(input())
    lis1.append(op)
    
if lis1 == [a,b,c] or lis1 == [d,e,f] or lis1 == [l,m,k] or lis1 == [a,d,l] or lis1 == [b,e,m] or lis1 == [c,f,k] or lis1 == [a,e,k] or lis1 == [c,e,l]:
    print('Yes')
else:
    print('No')

a,b,c = map(int, input().split())
d,e,f = map(int, input().split())
l,m,k = map(int, input().split())
g = [a, b, c, d, e, f, l, m, k]
a1 = [a, b, c]
a2 = [d, e, f]
a3 = [l, m, k]
a4 = [a, d, l]
a5 = [b, e, m]
a6 = [c, f, k]
a7 = [a, e, k]
a8 = [c, e, l]
lis1 = []
n = int(input())
for i in range(n):
    op = int(input())
    lis1.append(op)
    
if set(a1) <= set(lis1) or set(a2) <= set(lis1) or set(a3) <= set(lis1) or set(a4) <= set(lis1) or set(a5) <= set(lis1) or set(a6) <= set(lis1) or set(a7) <= set(lis1) or set(a8) <= set(lis1):
    print('Yes')
else:
    print('No')

Verdicts: Wrong Answer

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
N = 3
S = [list(map(int, input().split())) for _ in range(N)]
n_guess = int(input())
guesses = set([int(input()) for _ in range(n_guess)])
dic = {}
for r in range(N):
  for c in range(N):
    dic[S[r][c]]=(r,c)

for g in guesses:
  if g in dic:
    (r, c) = dic[g]
    S[r][c] = -1
print(S)
if all([S[i][0]==-1 for i in range(N)]) or \
   all([S[0][i]==-1 for i in range(N)]) or \
   all([S[i][N-i-1]==-1 for i in range(N)]) or \
   all([S[i][i]==-1 for i in range(N)]):
   	print('Yes')
else:
	print('No')

N = 3
S = [list(map(int, input().split())) for _ in range(N)]
n_guess = int(input())
guesses = set([int(input()) for _ in range(n_guess)])
dic = {}
for r in range(N):
  for c in range(N):
    dic[S[r][c]]=(r,c)

for g in guesses:
  if g in dic:
    (r, c) = dic[g]
    S[r][c] = -1

ans = 'No'
for i in range(N):
  if sum(S[i]) == -3:
    ans='Yes'
    
for i in range(N):
  if sum([S[_][i] for _ in range(N)]) == -3:
    ans='Yes'
    
if all([S[i][N-i-1]==-1 for i in range(N)]) or \
   all([S[i][i]==-1 for i in range(N)]):
   	ans = 'Yes'
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
import numpy as np
A = np.array([])
for i in range(3):
    A.append(list(map(int, input().split())))

N = int(input())

for n in range(N):
    called_num = int(input())
    called_row = [called_num in A[i] for i in range(3)].index(True)
    
    A[called_row] = [0 if x==called_num else x for x in A[called_row]]
    
sum_row = np.sum(A, axis=1)
sum_col = np.sum(A, axis=0)
sum_diag1 = np.diag(A).sum()
sum_diag2 = A[0][2] + A[1][1] + A[2][0] 

if 0 in sum_row or 0 in sum_col or 0 in [sum_diag1, sum_diag2]: 
    print('Yes')
else:
    print('No')

import numpy as np
A = []
for i in range(3):
    A.append(list(map(int, input().split())))
A = np.array(A)

N = int(input())
 
for n in range(N):
    called_num = int(input())
    exist_list = [called_num in A[i] for i in range(3)]
    if True in exist_list:
      	called_row = exist_list.index(True)
       	A[called_row] = [0 if x==called_num else x for x in A[called_row]]
    
sum_row = np.sum(A, axis=1)
sum_col = np.sum(A, axis=0)
sum_diag1 = np.diag(A).sum()
sum_diag2 = A[0][2] + A[1][1] + A[2][0] 
 
if 0 in sum_row or 0 in sum_col or 0 in [sum_diag1, sum_diag2]: 
    print('Yes')
else:
    print('No')

import numpy as np
A = []
for i in range(3):
    A.append(list(map(int, input().split())))
A = np.array(A)

N = int(input())

for n in range(N):
    called_num = int(input())
    exist_list = [called_num in A[i] for i in range(3)]
    if True in exist_list:
        called_row = exist_list.index(True)
        A[called_row] = [0 if x==called_num else x for x in A[called_row]]
        
sum_row = np.sum(A, axis=1)
sum_col = np.sum(A, axis=0)
sum_diag1 = np.diag(A).sum()
sum_diag2 = A[0][2] + A[1][1] + A[2][0] 

if 0 in sum_row or 0 in sum_col or 0 in [sum_diag1, sum_diag2]: 
    print('Yes')
else:
    print('No')

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
lst = [ [ int(i) for i in input().split() ] for j in range(3) ]

n = int(input())

for _ in range(n):
  x = int(input())
  for d in lst:
    if d[0] == x:
      d[0] = -1
    elif d[1] == x:
      d[1] = -1
    elif d[2] == x:
      d[2] = -1
print(lst)
for d in lst:
  if d[0] == d[1] == d[2] == -1:
    print('Yes')
    exit()
for i in range(3):
  if lst[0][i] == lst[1][i] == lst[2][i] == -1:
    print('Yes')
    exit()
for i in range(3):
  if lst[i][0] == lst[i][1] == lst[i][2] == -1:
    print('Yes')
    exit()
if lst[0][0] == lst[1][1] == lst[2][2] == -1:
  print('Yes')
  exit()
if lst[0][2] == lst[1][1] == lst[2][0] == -1:
  print('Yes')
  exit()
print('No')


lst = [ [ int(i) for i in input().split() ] for j in range(3) ]

n = int(input())

for _ in range(n):
  x = int(input())
  for d in lst:
    if d[0] == x:
      d[0] = -1
    elif d[1] == x:
      d[1] = -1
    elif d[2] == x:
      d[2] = -1

for d in lst:
  if d[0] == d[1] == d[2] == -1:
    print('Yes')
    exit()
for i in range(3):
  if lst[0][i] == lst[1][i] == lst[2][i] == -1:
    print('Yes')
    exit()
for i in range(3):
  if lst[i][0] == lst[i][1] == lst[i][2] == -1:
    print('Yes')
    exit()
if lst[0][0] == lst[1][1] == lst[2][2] == -1:
  print('Yes')
  exit()
if lst[0][2] == lst[1][1] == lst[2][0] == -1:
  print('Yes')
  exit()
print('No')


Verdicts: Wrong Answer

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
A11,A12,A13 = list(map(int, input().split()))
A21,A22,A23 = list(map(int, input().split()))
A31,A32,A33 = list(map(int, input().split()))
l=[[A11,A12,A13],[A21,A22,A23],[A31,A32,A33],[A11,A22,A33],[A13,A22,A11],[A11,A21,A31],[A12,A22,A32],[A13,A23,A33]]
N = int(input())
b = []
for i in range(N):
    b = int(input())
    for j in range(8):
        if b in l[j]:
            l[j].remove(b)
f=1
print(l)
for i in range(8):
    if l[i]==[]:
        print('Yes')
        f-=1
        break
if f==1:
    print('No')

A11,A12,A13 = list(map(int, input().split()))
A21,A22,A23 = list(map(int, input().split()))
A31,A32,A33 = list(map(int, input().split()))
l=[[A11,A12,A13],[A21,A22,A23],[A31,A32,A33],[A11,A22,A33],[A13,A22,A31],[A11,A21,A31],[A12,A22,A32],[A13,A23,A33]]
N = int(input())
for i in range(N):
    b = int(input())
    for j in range(8):
        if b in l[j]:
            l[j].remove(b)
f=1
for i in range(8):
    if l[i]==[]:
        print('Yes')
        f-=1
        break
if f==1:
    print('No')

Verdicts: Wrong Answer

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
def main():
  data = []
  for _ in range(3):
    data.append(list(map(int, input().split())))
  n = int(input())

  data_map = []
  for _ in range(3):
    data_map.append([0, 0, 0])

  for _ in range(n):
    x = int(input())
    if x == data[0][0]:
      data_map[0][0] = 1
    if x == data[0][1]:
      data_map[0][1] = 1
    if x == data[0][2]:
      data_map[0][2] = 1
    if x == data[1][0]:
      data_map[1][0] = 1
    if x == data[1][1]:
      data_map[1][1] = 1
    if x == data[1][2]:
      data_map[1][2] = 1
    if x == data[2][0]:
      data_map[2][0] = 1
    if x == data[2][1]:
      data_map[2][1] = 1
    if x == data[2][2]:
      data_map[2][2] = 1

  for i in range(3):
    print(*data_map[i])

  
  if sum(data_map[0]) == 3 or sum(data_map[1]) == 3 or sum(data_map[0]) == 3:
    print("Yes")
    return
  
  
  if data_map[0][0] + data_map[1][1] + data_map[2][2] == 3:
    print("Yes")
    return

  
  if data_map[0][2] + data_map[1][1] + data_map[2][0] == 3:
    print("Yes")
    return

  
  if data_map[0][0] + data_map[1][0] + data_map[2][0] == 3:
    print("Yes")
    return
  if data_map[0][1] + data_map[1][1] + data_map[2][1] == 3:
    print("Yes")
    return
  if data_map[0][2] + data_map[1][2] + data_map[2][2] == 3:
    print("Yes")
    return

  print("No")

if __name__ == "__main__":
  main()


def main():
  data = []
  for _ in range(3):
    data.append(list(map(int, input().split())))

  n = int(input())

  data_map = []
  for _ in range(3):
    data_map.append([0, 0, 0])

  for _ in range(n):
    x = int(input())
    if x == data[0][0]:
      data_map[0][0] = 1
    if x == data[0][1]:
      data_map[0][1] = 1
    if x == data[0][2]:
      data_map[0][2] = 1
    if x == data[1][0]:
      data_map[1][0] = 1
    if x == data[1][1]:
      data_map[1][1] = 1
    if x == data[1][2]:
      data_map[1][2] = 1
    if x == data[2][0]:
      data_map[2][0] = 1
    if x == data[2][1]:
      data_map[2][1] = 1
    if x == data[2][2]:
      data_map[2][2] = 1

  
  #   print(*data_map[i])

  
  if sum(data_map[0]) == 3 or sum(data_map[1]) == 3 or sum(data_map[2]) == 3:
    print("Yes")
    return
  
  
  if data_map[0][0] + data_map[1][1] + data_map[2][2] == 3:
    print("Yes")
    return
  
  if data_map[0][2] + data_map[1][1] + data_map[2][0] == 3:
    print("Yes")
    return

  
  if data_map[0][0] + data_map[1][0] + data_map[2][0] == 3:
    print("Yes")
    return
  if data_map[0][1] + data_map[1][1] + data_map[2][1] == 3:
    print("Yes")
    return
  if data_map[0][2] + data_map[1][2] + data_map[2][2] == 3:
    print("Yes")
    return

  print("No")

if __name__ == "__main__":
  main()


Verdicts: Wrong Answer

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
L = ()
L.append(set(map(int, input().split())))
L.append(set(map(int, input().split())))
L.append(set(map(int, input().split())))
L.append((L[0][0], L[1][0], L[2][0]))
L.append((L[0][1], L[1][1], L[2][1]))
L.append((L[0][2], L[1][2], L[2][2]))
L.append((L[0][0], L[1][1], L[2][2]))
L.append((L[0][2], L[1][1], L[2][0]))
N = int(input())
B = (int(input()) for i in range(N))
if any(B >= l for l in L):
  print("Yes")
else:
  print("No")

L = []
L.append(list(map(int, input().split())))
L.append(list(map(int, input().split())))
L.append(list(map(int, input().split())))
L.append([L[0][0], L[1][0], L[2][0]])
L.append([L[0][1], L[1][1], L[2][1]])
L.append([L[0][2], L[1][2], L[2][2]])
L.append([L[0][0], L[1][1], L[2][2]])
L.append([L[0][2], L[1][1], L[2][0]])
N = int(input())
B = [int(input()) for i in range(N)]
if any(l in B for l in L):
  print("Yes")
else:
  print("No")

a, b, c = map(int, input().split())
d, e, f = map(int, input().split())
g, h, i = map(int, input().split())
L = []
L.append({a, b, c})
L.append({d, e, f})
L.append({g, h, i})
L.append({a, d, g})
L.append({b, e, h})
L.append({c, f, i})
L.append({a, e, i})
L.append({c, e, g})
N = int(input())
B = {int(input()) for i in range(N)}
if any(l <= B for l in L):
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
import numpy as np
bingo = np.array([list(map(int,input().split())) for i in range(3)])
n = int(input())
num = np.array([int(input()) for i in range(n)])

  
  


bingo = [list(map(int,input().split())) for i in range(3)]
n = int(input())
num = [int(input()) for i in range(n)]
for i in num:
  for row in range(3):
    for col in range(3):
      if bingo[row][col] == i:
        bingo[row][col] = 0
if sum(bingo[0]) == 0 or sum(bingo[1]) == 0 or sum(bingo[2]) == 0 or sum([hoge[0] for hoge in bingo]) == 0 or sum([hoge[1] for hoge in bingo]) == 0 or sum([hoge[2] for hoge in bingo]) == 0 or sum([bingo[i][i] for i in range(3)]) == 0 or sum([bingo[i][2-i] for i in range(3)]) == 0:
  print('Yes')
else:
  print('No')
      

Verdicts: Wrong Answer

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
a = []
a.append(input().split())
a.append(input().split())
a.append(input().split())
n = int(input())

for i in range(n):
  b = input()
  for j in range(3):
    for k in range(3):
      if a[j][k] == b:
        a[j][k] = "0"
        break
    else:
      continue
    break
print(a)

for i in range(3):
  if a[i][0] == a[i][1] == a[i][2] == "0":
    print("Yes")
    exit()
  if a[0][i] == a[1][i] == a[2][i] == "0":
    print("Yes")
    exit()

if a[0][0] == a[1][1] == a[2][2] == "0":
  print("Yes")
  exit()
if a[0][2] == a[1][1] == a[2][0] == "0":
  print("Yes")
  exit()

print("No")

a = []
a.append(input().split())
a.append(input().split())
a.append(input().split())
n = int(input())

for i in range(n):
  b = input()
  for j in range(3):
    for k in range(3):
      if a[j][k] == b:
        a[j][k] = "0"
        break
    else:
      continue
    break

for i in range(3):
  if a[i][0] == a[i][1] == a[i][2] == "0":
    print("Yes")
    exit()
  if a[0][i] == a[1][i] == a[2][i] == "0":
    print("Yes")
    exit()

if a[0][0] == a[1][1] == a[2][2] == "0":
  print("Yes")
  exit()
if a[0][2] == a[1][1] == a[2][0] == "0":
  print("Yes")
  exit()

print("No")

Verdicts: Wrong Answer

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
bingo = [input().split() for _ in range(3)]

n = int(input())

nums = [[] for _ in range(3)]

check = list()

for i in range(3):
    for j in range(3):
        check[i].append(False)
        if bingo[i][j] in nums:
            check[i][j] = True

ANS = "No"

for i in range(3):
    if (check[i][0]) and (check[i][1]) and (check[i][2]):
        ANS = "Yes"
for i in range(3):
    if (check[0][i]) and (check[1][i]) and (check[2][i]):
        ANS = "Yes"
if (check[0][0]) and (check[1][1]) and (check[2][2]):
    ANS = "Yes"
if (check[0][2]) and (check[1][1]) and (check[2][0]):
    ANS = "Yes"

print(ANS)


bingo = [input().split() for _ in range(3)]

n = int(input())

nums = [[] for _ in range(3)]

check = [[] for _ in range(3)]

for i in range(3):
    for j in range(3):
        check[i].append(False)
        if bingo[i][j] in nums:
            check[i][j] = True

ANS = "No"

for i in range(3):
    if (check[i][0]) and (check[i][1]) and (check[i][2]):
        ANS = "Yes"
for i in range(3):
    if (check[0][i]) and (check[1][i]) and (check[2][i]):
        ANS = "Yes"
if (check[0][0]) and (check[1][1]) and (check[2][2]):
    ANS = "Yes"
if (check[0][2]) and (check[1][1]) and (check[2][0]):
    ANS = "Yes"

print(ANS)

bingo = [input().split() for _ in range(3)]

n = int(input())

nums = [input() for _ in range(n)]

check = [[] for _ in range(3)]

for i in range(3):
    for j in range(3):
        if bingo[i][j] in nums:
            check[i].append(True)
        else:
            check[i].append(False)

ANS = "No"

for i in range(3):
    if (check[i][0]) and (check[i][1]) and (check[i][2]):
        ANS = "Yes"
for i in range(3):
    if (check[0][i]) and (check[1][i]) and (check[2][i]):
        ANS = "Yes"
if (check[0][0]) and (check[1][1]) and (check[2][2]):
    ANS = "Yes"
if (check[0][2]) and (check[1][1]) and (check[2][0]):
    ANS = "Yes"

print(ANS)


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
A = [list(map(int,input().split())) for i in range(3)]
N = int(input())
b = [int(input()) for i in range(N)]
for i in range(N):
    for h in range(3):
        for w in range(3):
            if b[i] == A[h][w]:
                A[h][w] = 0
if [0,0,0] in A:
    print('Yes')
else:
    ans = 'No'
    for i in zip(*A):
        if i == (0,0,0):
            ans = 'Yes'
            break
    print(ans)

A = [list(map(int,input().split())) for i in range(3)]
N = int(input())
b = [int(input()) for i in range(N)]

for h in range(3):
    for w in range(3):
        for i in range(N):
            if b[i] == A[h][w]:
                A[h][w] = 0
if [0,0,0] in A:
    print('Yes')
else:
    ans = 'No'
    for i in zip(*A):
        if i == (0,0,0):
            ans = 'Yes'
            break
    print(ans)

A = [list(map(int,input().split())) for i in range(3)]
N = int(input())
b = [int(input()) for i in range(N)]
for i in range(N):
    for h in range(3):
        for w in range(3):
            if b[i] == A[h][w]:
                A[h][w] = 0
if [0,0,0] in A:
    print('Yes')
else:
    ans = 'No'
    for i in zip(*A):
        if i == [0,0,0]:
            ans = 'Yes'
            break
    print(ans)

A = [list(map(int,input().split())) for i in range(3)]
N = int(input())
b = [int(input()) for i in range(N)]

for h in range(3):
    for w in range(3):
        for i in range(N):
            if b[i] == A[h][w]:
                A[h][w] = 0
if [0,0,0] in A:
    print('Yes')
elif A[0][0] == 0 and A[1][1] == 0 and A[2][2] == 0:
    print('Yes')
elif A[0][2] == 0 and A[1][1] == 0 and A[2][0] == 0:
    print('Yes')
else:
    ans = 'No'
    for i in zip(*A):
        if i == (0,0,0):
            ans = 'Yes'
            break
    print(ans)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
a = [list(map(int, input().split())) for i in range(3)]
n = int(input())
b = [int(input()) for i in range(n)]
for i in range(3):
  for j in range(3):
    for k in b:
      if a[j][i] == k:
            a[j][i] = 'o'
a1 = list(set(a[0]))
a2 = list(set(a[1]))
a3 = list(set(a[2]))
a4 = list(set((a[0][0],a[1][1],a[2][2])))
a5 = list(set((a[0][2],a[1][1],a[2][0])))
a6 = list(set((a[0][0],a[1][0],a[2][0])))
a7 = list(set((a[0][1],a[1][1],a[2][1])))
a8 = list(set((a[0][2],a[1][2],a[2][2])))
p = ['o']
A = [a1,a2,a3,a4,a5,a6,a7,a8]
for i in A:
    ans = 'No'
    if i == p:
        ans = 'Yes'
        break
print(ans)
print(A)

a = [list(map(int, input().split())) for i in range(3)]
n = int(input())
b = [int(input()) for i in range(n)]
for i in range(3):
  for j in range(3):
    for k in b:
      if a[j][i] == k:
            a[j][i] = 'o'
a1 = list(set(a[0]))
a2 = list(set(a[1]))
a3 = list(set(a[2]))
a4 = list(set((a[0][0],a[1][1],a[2][2])))
a5 = list(set((a[0][2],a[1][1],a[2][0])))
a6 = list(set((a[0][0],a[1][0],a[2][0])))
a7 = list(set((a[0][1],a[1][1],a[2][1])))
a8 = list(set((a[0][2],a[1][2],a[2][2])))
p = ['o']
A = [a1,a2,a3,a4,a5,a6,a7,a8]
for i in A:
    ans = 'No'
    if i == p:
        ans = 'Yes'
        break
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
bingo = [list(map(int,input().split())) for i in range(3)]
n= int(input())
bs = [int(input()) for i in range(n)]

bingo.append([bingo[0][0], bingo[1][1], bingo[2][2]])
bingo.append([bingo[0][2], bingo[1][1], bingo[2][0]])
bingo.append([bingo[0][0], bingo[1][0], bingo[2][0]])
bingo.append([bingo[0][1], bingo[1][1], bingo[2][1]])
bingo.append([bingo[0][2], bingo[1][2], bingo[2][2]])


print(any([len([j for j in k if j in bs])==3 for k in bingo]))

bingo = [list(map(int,input().split())) for i in range(3)]
n= int(input())
bs = [int(input()) for i in range(n)]

bingo.append([bingo[0][0], bingo[1][1], bingo[2][2]])
bingo.append([bingo[0][2], bingo[1][1], bingo[2][0]])
bingo.append([bingo[0][0], bingo[1][0], bingo[2][0]])
bingo.append([bingo[0][1], bingo[1][1], bingo[2][1]])
bingo.append([bingo[0][2], bingo[1][2], bingo[2][2]])


print("Yes" if any([len([j for j in k if j in bs])==3 for k in bingo]) else "No")

Verdicts: Wrong Answer

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
a = []
for i in range(3):
    a.append(list(map(int, input().split())))

n = int(input())
for i in range(n):
    b = int(input())
    for j in a:
        if b in j:
            a[a.index(j)][j.index(b)] = 0

ans = 0
for i in range(3):
    if a[0][i] == a[1][i] == a[2][i] == 0:
        ans = 1
    elif a[i][0] == a[i][1] == a[i][2] == 0:
        ans = 1
if a[0][0] == a[1][1] == a[2][2] == 0:
    ans = 1
if a[0][3] == a[1][1] == a[2][0] == 0:
    ans = 1
if ans == 1:
    print("Yes")
else:
    print("No")


a = []
for i in range(3):
    a.append(list(map(int, input().split())))

n = int(input())
for i in range(n):
    b = int(input())
    for j in a:
        if b in j:
            a[a.index(j)][j.index(b)] = 0

ans = 0
for i in range(3):
    if a[0][i] == a[1][i] == a[2][i] == 0:
        ans = 1
    elif a[i][0] == a[i][1] == a[i][2] == 0:
        ans = 1
if a[0][0] == a[1][1] == a[2][2] == 0:
    ans = 1
if a[0][2] == a[1][1] == a[2][0] == 0:
    ans = 1

if ans == 1:
    print("Yes")
else:
    print("No")


Verdicts: Runtime Error

Accepted
Problem: We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet.  Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.

Submission attempts (in order):
import numpy as np

def check(A):
    for i in range(3):
        if A[i,0] == 0 and A[i,1] == 0 and A[i,2] == 0:
            return True
        if A[0,i] == 0 and A[1,i] == 0 and A[2,i] == 0:
            return True
    if A[0,0] == 0 and A[1,1] == 0 and A[2,2] == 0:
        return True
    if A[0,2] == 0 and A[1,1] == 0 and A[2,0] == 0:
        return True

    return False



a = list(map(int, input().split()))
A = a
a = list(map(int, input().split()))
A = np.vstack((A, a))
a = list(map(int, input().split()))
A = np.vstack((A, a))
N = int(input())
b = []
for i in range(N):
    b.append(int(input()))

for i in range(N):
    for m in range(3):
        for n in range(3):
            if b[i] == A[m,n]:
                A[m,n] = 0

if check(A):
    print("yes")
else:
    print("no")


import numpy as np

def check(A):
    for i in range(3):
        if A[i,0] == 0 and A[i,1] == 0 and A[i,2] == 0:
            return True
        if A[0,i] == 0 and A[1,i] == 0 and A[2,i] == 0:
            return True
    if A[0,0] == 0 and A[1,1] == 0 and A[2,2] == 0:
        return True
    if A[0,2] == 0 and A[1,1] == 0 and A[2,0] == 0:
        return True

    return False



a = list(map(int, input().split()))
A = a
a = list(map(int, input().split()))
A = np.vstack((A, a))
a = list(map(int, input().split()))
A = np.vstack((A, a))
N = int(input())
b = []
for i in range(N):
    b.append(int(input()))

for i in range(N):
    for m in range(3):
        for n in range(3):
            if b[i] == A[m,n]:
                A[m,n] = 0

if check(A):
    print("Yes")
else:
    print("No")


Verdicts: Wrong Answer

Accepted