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 = list()
A.extend(A1)
A.extend(A2)
A.extend(A3)
N = int(input())
B = list()
result = list()
for _ in range(N):
    B.append(int(input()))
for e in B:
    if e in A:
        result.append(A.index(e))
loopflag = False
if N >= 3:
    for i in range(len(result)):
        for j in range(len(result)):
            for k in range(len(result)):
                if (i==j or j==k or k==i):
                    break 
                if((result[i] % 3 == result[j] % 3 == result[k] % 3 ) or (result[i] // 3 == result[j] // 3 == result[k] // 3) or (result[i] == 0 and result[j] == 4 and result[k] ==8 ) or (result[i] == 2 and result[j]  == 4 and result[k] == 6 )):
                    loopflag = True
    if loopflag:
        print('Yes')
    else:
        print('No')
else:
    print('No')

A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))
A3 = list(map(int, input().split()))
A = list()
A.extend(A1)
A.extend(A2)
A.extend(A3)
N = int(input())
B = list()
result = list()
for _ in range(N):
    B.append(int(input()))
for e in B:
    if e in A:
        result.append(A.index(e))
loopflag = False
result.sort()
print(result)
if N >= 3:
    for i in range(len(result)):
        for j in range(len(result)):
            for k in range(len(result)):
                if (i==j or j==k or k==i):
                    continue 
                if((result[i] % 3 == result[j] % 3 == result[k] % 3 ) or (result[i] // 3 == result[j] // 3 == result[k] // 3) or (result[i] == 0 and result[j] == 4 and result[k] ==8 ) or (result[i] == 2 and result[j]  == 4 and result[k] == 6 )):
                    loopflag = True
    if loopflag:
        print('Yes')
    else:
        print('No')
else:
    print('No')

A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))
A3 = list(map(int, input().split()))
A = list()
A.extend(A1)
A.extend(A2)
A.extend(A3)
N = int(input())
B = list()
result = list()
for _ in range(N):
    B.append(int(input()))
for e in B:
    if e in A:
        result.append(A.index(e))
loopflag = False
result.sort()
if N >= 3:
    for i in range(len(result)):
        for j in range(len(result)):
            for k in range(len(result)):
                if (i==j or j==k or k==i):
                    break 
                if((result[i] % 3 == result[j] % 3 == result[k] % 3 ) or (result[i] // 3 == result[j] // 3 == result[k] // 3) or (result[i] == 0 and result[j] == 4 and result[k] ==8 ) or (result[i] == 2 and result[j]  == 4 and result[k] == 6 )):
                    loopflag = True
    if loopflag:
        print('Yes')
    else:
        print('No')
else:
    print('No')

A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))
A3 = list(map(int, input().split()))
A = list()
A.extend(A1)
A.extend(A2)
A.extend(A3)
N = int(input())
B = list()
result = list()
for _ in range(N):
    B.append(int(input()))
for e in B:
    if e in A:
        result.append(A.index(e))
print(result)
loopflag = False
if N >= 3:
    for i in range(len(result)):
        for j in range(len(result)):
            for k in range(len(result)):
                if (i==j or j==k or k==i):
                    break 
                if((result[i] % 3 == result[j] % 3 == result[k] % 3 ) or (result[i] // 3 == result[j] // 3 == result[k] // 3) or (result[i] == 0 and result[j] == 4 and result[k] ==8 ) or (result[i] == 2 and result[j]  == 4 and result[k] == 6 )):
                    loopflag = True
    if loopflag:
        print('Yes')
    else:
        print('No')
else:
    print('No')

A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))
A3 = list(map(int, input().split()))
A = list()
A.extend(A1)
A.extend(A2)
A.extend(A3)
N = int(input())
B = list()
result = list()
for _ in range(N):
    B.append(int(input()))
for e in B:
    if e in A:
        result.append(A.index(e))
loopflag = False
result.sort()
print(result)
if N >= 3:
    for i in range(len(result)):
        for j in range(len(result)):
            for k in range(len(result)):
                if (i!=j and j!=k and k!=i):
                    if((result[i] % 3 == result[j] % 3 == result[k] % 3 ) or (result[i] // 3 == result[j] // 3 == result[k] // 3) or (result[i] == 0 and result[j] == 4 and result[k] ==8 ) or (result[i] == 2 and result[j]  == 4 and result[k] == 6 )):
                        loopflag = True
    if loopflag:
        print('Yes')
    else:
        print('No')
else:
    print('No')

A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))
A3 = list(map(int, input().split()))
A = list()
A.extend(A1)
A.extend(A2)
A.extend(A3)
N = int(input())
B = list()
result = list()
for _ in range(N):
    B.append(int(input()))
for e in B:
    if e in A:
        result.append(A.index(e))
loopflag = False
result.sort()
# print(result)
if N >= 3:
    for i in range(len(result)):
        for j in range(len(result)):
            for k in range(len(result)):
                if (i!=j and j!=k and k!=i):
                    if((result[i] % 3 == result[j] % 3 == result[k] % 3 ) or (result[i] // 3 == result[j] // 3 == result[k] // 3) or (result[i] == 0 and result[j] == 4 and result[k] ==8 ) or (result[i] == 2 and result[j]  == 4 and result[k] == 6 )):
                        loopflag = True
    if loopflag:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted