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):
Aij= [input().split() for l in range(3)]
N=int(input())
b= [int(input()) for i in range(N)]
for j in range(3):
    for k in range(3):
        for n in range(N):
            if int(Aij[j][k])==b[n]:
                Aij[j][k]=0


if (Aij[0][0] == Aij[0][1] == Aij[0][2] == "0") or (Aij[1][0] == Aij[1][1] == Aij[1][2] == "0") or (Aij[2][0] == Aij[2][1] == Aij[2][2] == "0"):
    print('Yes')
elif Aij[0][0]=='0' and Aij[0][1]=='0' and Aij[0][2]=='0':
    print('Yes')
elif Aij[1][0]=='0' and Aij[1][1]=='0' and Aij[1][2]=='0':
    print('Yes')
elif Aij[2][0]=='0' and Aij[2][1]=='0' and Aij[2][2]=='0':
    print('Yes')
elif Aij[0][0]=='0'and Aij[1][1]=='0'and Aij[2][2]=='0':
    print('Yes')
elif Aij[0][2]=='0' and Aij[1][1]=='0'and Aij[2][0]=='0':
    print('Yes')
else:
    print('No')

Aij= [input().split() for l in range(3)]
N=int(input())
b= [int(input()) for i in range(N)]
for j in range(3):
    for k in range(3):
        for n in range(N):
            if int(Aij[j][k])==b:
                Aij[j][k]='0'


if (Aij[0][0] == Aij[0][1] == Aij[0][2] == 0) or (Aij[1][0] == Aij[1][1] == Aij[1][2] == 0) or (Aij[2][0] == Aij[2][1] == Aij[2][2] == 0):
    print('Yes')
elif Aij[0][0]=='0' and Aij[0][1]=='0' and Aij[0][2]=='0':
    print('Yes')
elif Aij[1][0]=='0' and Aij[1][1]=='0' and Aij[1][2]=='0':
    print('Yes')
elif Aij[2][0]=='0' and Aij[2][1]=='0' and Aij[2][2]=='0':
    print('Yes')
elif Aij[0][0]=='0'and Aij[1][1]=='0'and Aij[2][2]=='0':
    print('Yes')
elif Aij[0][2]=='0' and Aij[1][1]=='0'and Aij[2][0]=='0':
    print('Yes')
else:
    print('No')

Aij= [int(input().split()) for l in range(3)]
N=int(input())
b= [int(input()) for i in range(N)]
for j in range(3):
    for k in range(3):
        for n in range(N):
            if int(Aij[j][k])==b[n]:
                Aij[j][k]="0"


if (Aij[0][0] == Aij[0][1] == Aij[0][2] == "0") or (Aij[1][0] == Aij[1][1] == Aij[1][2] == "0") or (Aij[2][0] == Aij[2][1] == Aij[2][2] == "0"):
    print('Yes')
elif Aij[0][0]=='0' and Aij[0][1]=='0' and Aij[0][2]=='0':
    print('Yes')
elif Aij[1][0]=='0' and Aij[1][1]=='0' and Aij[1][2]=='0':
    print('Yes')
elif Aij[2][0]=='0' and Aij[2][1]=='0' and Aij[2][2]=='0':
    print('Yes')
elif Aij[0][0]=='0'and Aij[1][1]=='0'and Aij[2][2]=='0':
    print('Yes')
elif Aij[0][2]=='0' and Aij[1][1]=='0'and Aij[2][0]=='0':
    print('Yes')
else:
    print('No')

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

for k in range(N):
    B = int(input())
    for l in range(3):
        for m in range(3):
            if A[l][m] == B:
                A[l][m] = 0

if (A[0][0] == A[0][1] == A[0][2] == 0) or (A[1][0] == A[1][1] == A[1][2] == 0) or (A[2][0] == A[2][1] == A[2][2] == 0):
    print ("Yes")
elif (A[0][0] == A[1][0] == A[2][0] == 0) or (A[0][1] == A[1][1] == A[2][1] == 0) or (A[0][2] == A[1][2] == A[2][2] == 0):
    print ("Yes")
elif (A[0][0] == A[1][1] == A[2][2] == 0) or (A[0][2] == A[1][1] == A[2][0] == 0):
    print ("Yes")
else:
    print ("No")

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted