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(list(map(int, input().split())) for i in range(3))
N = int(input())
B = [int(input()) for i in range(N)]
result = [[0]*3 for i in range(3)]
print(A,N,B,result)

for i in range(3):
    for j in range(3):
        for k in range(N):
            if A[i][j] == B[k]:
                result[i][j] = 1
                break
            else:
                result[i][j] = 0


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


A = list(list(map(int, input().split())) for i in range(3))
N = int(input())
B = [int(input()) for i in range(N)]
result = [[0]*3 for i in range(3)]
print(A,N,B,result)

for i in range(3):
    for j in range(3):
        for k in range(N):
            if A[i][j] == B[k]:
                result[i][j] = 1
                break
            else:
                result[i][j] = 0


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



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

for i in range(3):
    for j in range(3):
        for k in range(N):
            if A[i][j] == B[k]:
                result[i][j] = 1
                break
            else:
                result[i][j] = 0

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


Verdicts: Wrong Answer

Wrong Answer

Accepted