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):
bingonum=[[0,0,0],[0,0,0],[0,0,0]]
bingo=[["False","False","False"],["False","False","False"],["False","False","False"]]
for i in range(3):
    bingonum[i][0],bingonum[i][1],bingonum[i][2] = map(int,input().split())
N = int(input())
b=[]
for _ in range(N):
    b.append(int(input()))
print(bingonum[0][0])
print(b[0])
for x in range(N):
    for i in range(3):
        for j in range(3):
            if bingonum[i][j]==b[x]:
                bingo[i][j]="True"
IsBingo = "No"
for i in range(3):
    if bingo[i][0]=="True" and bingo[i][1]=="True" and bingo[i][2]=="True":
        IsBingo="Yes"
    if bingo[0][i]=="True" and bingo[1][i]=="True" and bingo[2][i]=="True":
        IsBingo="Yes"
if (bingo[0][0]=="True" and bingo[1][1]=="True" and bingo[2][2]=="True") or (bingo[0][2]=="True" and bingo[1][1]=="True" and bingo[2][0]=="True"):
    IsBingo="Yes"
print(IsBingo)


bingonum=[[0,0,0],[0,0,0],[0,0,0]]
bingo=[["False","False","False"],["False","False","False"],["False","False","False"]]
for i in range(3):
    bingonum[i][0],bingonum[i][1],bingonum[i][2] = map(int,input().split())

N = int(input())
b=[]
for _ in range(N):
    b.append(int(input()))
print(bingonum[0][0])
print(b[0])
for x in range(N):
    for i in range(3):
        for j in range(3):
            if bingonum[i][j]==b[x]:
                bingo[i][j]="True"

IsBingo = "No"
for i in range(3):
    if bingo[i][0]=="True" and bingo[i][1]=="True" and bingo[i][2]=="True":
        IsBingo="Yes"
    elif bingo[0][i]=="True" and bingo[1][i]=="True" and bingo[2][i]=="True":
        IsBingo="Yes"
if (bingo[0][0]=="True" and bingo[1][1]=="True" and bingo[2][2]=="True") or (bingo[0][2]=="True" and bingo[1][1]=="True" and bingo[2][0]=="True"):
    IsBingo="Yes"
print(IsBingo)


bingonum=[[0,0,0],[0,0,0],[0,0,0]]
bingo=[["False","False","False"],["False","False","False"],["False","False","False"]]
for i in range(3):
    bingonum[i][0],bingonum[i][1],bingonum[i][2] = map(int,input().split())

N = int(input())
b=[]
for _ in range(N):
    b.append(int(input()))
print(bingonum[0][0])
print(b[0])
for x in range(N):
    for i in range(3):
        for j in range(3):
            if bingonum[i][j]==b[x]:
                bingo[i][j]="True"

IsBingo = "No"
for i in range(3):
    if bingo[i][0]=="True" and bingo[i][1]=="True" and bingo[i][2]=="True":
        IsBingo="Yes"
    elif bingo[0][i]=="True" and bingo[1][i]=="True" and bingo[2][i]=="True":
        IsBingo="Yes"
if (bingo[0][0]=="True" and bingo[1][1]=="True" and bingo[2][2]=="True") or (bingo[0][2]=="True" and bingo[1][1]=="True" and bingo[2][0]=="True"):
    IsBingo="Yes"
print(IsBingo)


bingonum=[[0,0,0],[0,0,0],[0,0,0]]
bingo=[["False","False","False"],["False","False","False"],["False","False","False"]]
for i in range(3):
    bingonum[i][0],bingonum[i][1],bingonum[i][2] = map(int,input().split())
N = int(input())
b=[]
for _ in range(N):
    b.append(int(input()))
for x in range(N):
    for i in range(3):
        for j in range(3):
            if bingonum[i][j]==b[x]:
                bingo[i][j]="True"
IsBingo = "No"
for i in range(3):
    if bingo[i][0]=="True" and bingo[i][1]=="True" and bingo[i][2]=="True":
        IsBingo="Yes"
    if bingo[0][i]=="True" and bingo[1][i]=="True" and bingo[2][i]=="True":
        IsBingo="Yes"
if (bingo[0][0]=="True" and bingo[1][1]=="True" and bingo[2][2]=="True") or (bingo[0][2]=="True" and bingo[1][1]=="True" and bingo[2][0]=="True"):
    IsBingo="Yes"
print(IsBingo)


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted