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 _ in range(n)]

print(a,n,b)
for i in range(3):
    for j in range(3):
        if a[i][j] in b:
            a[i][j] = 0

for i in range(3):
    if a[i] == [0,0,0]:
        print('Yes')
        exit()
for j in range(3):
    for i in range(3):
        if a[j][i] == 0 and a[j][i] == 0 and a[j][i] == 0:
            print('Yes')
            exit()
if a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0:
    print('Yes')
    exit()
if a[2][0] == 0 and a[1][1] == 0 and a[0][2] == 0:
    print('Yes')
    exit()
print('No')

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

print(a,n,b)
for i in range(3):
    for j in range(3):
        if a[i][j] in b:
            a[i][j] = 0

for i in range(3):
    if a[i] == [0,0,0]:
        print('Yes')
        exit()
for i in range(3):
    if a[j0][i] == 0 and a[1][i] == 0 and a[2][i] == 0:
        print('Yes')
        exit()
if a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0:
    print('Yes')
    exit()
if a[2][0] == 0 and a[1][1] == 0 and a[0][2] == 0:
    print('Yes')
    exit()
print('No')

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

print(a,n,b)
for i in range(3):
    for j in range(3):
        if a[i][j] in b:
            a[i][j] = 0

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

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

print(a,n,b)
for i in range(3):
    for j in range(3):
        if a[i][j] in b:
            a[i][j] = 0

for i in range(3):
    if a[i] == [0,0,0]:
        print('Yes')
        exit()
for i in range(3):
    if a[0][i] == 0 and a[1][i] == 0 and a[2][i] == 0:
        print('Yes')
        exit()
if a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0:
    print('Yes')
    exit()
if a[2][0] == 0 and a[1][1] == 0 and a[0][2] == 0:
    print('Yes')
    exit()
print('No')

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

for i in range(3):
    for j in range(3):
        if a[i][j] in b:
            a[i][j] = 0

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

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Accepted