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):
import numpy as np
import sys

A = []
for i in range(3):
    row = list(map(int, input().split()))
    A.append(row)
N = int(input())
b = []
for i in range(N):
    k = int(input())
    b.append(k)

for k in b:
    for row in A:
        for elem in row:
            if k == elem:
                elem = 0


s_row = np.sum(A, axis=1)
for i in range(3):
    if s_row[i] == 0:
        print('Yes')
        sys.exit()


s_col = np.sum(A, axis=0)
for i in range(3):
    if s_col[i] == 0:
        print('Yes')
        sys.exit()

c = 0
for i in range(3):
    c += A[i][i]
if c == 0:
    print('Yes')
    sys.exit()

c = 0
for i in range(3):
    c += A[3-i-1][i]
if c == 0:
    print('Yes')
    sys.exit()

print('No')

import numpy as np
import sys

for i in range(3):
    A = list(map(int, input().split()))
N = int(input())
b = []
for i in range(N):
    k = int(input())
    b.append(k)
for k in b:
    for row in A:
        for elem in row:
            if k == elem:
                elem = 0


row = np.sum(A, axis=1)
for i in range(3):
    if row[i] == 0:
        print('Yes')
        sys.exit()


col = np.sum(A, axis=0)
for i in range(3):
    if col[i] == 0:
        print('Yes')
        sys.exit()

c = 0
for i in range(3):
    c += A[i][i]
if c == 0:
    print('Yes')
    sys.exit()

c = 0
for i in range(3):
    c += A[3-i-1][i]
if c == 0:
    print('Yes')
    sys.exit()

print('No')

import numpy as np
import sys
 
A = []
for i in range(3):
    array = list(map(int, input().split()))
    A.append(array)
N = int(input())
b = []
for i in range(N):
    k = int(input())
    b.append(k)
for k in b:
    for row in A:
        for elem in row:
            if k == elem:
                elem = 0
 
 
row = np.sum(A, axis=1)
for i in range(3):
    if row[i] == 0:
        print('Yes')
        sys.exit()
 
 
col = np.sum(A, axis=0)
for i in range(3):
    if col[i] == 0:
        print('Yes')
        sys.exit()
 
c = 0
for i in range(3):
    c += A[i][i]
if c == 0:
    print('Yes')
    sys.exit()
 
c = 0
for i in range(3):
    c += A[3-i-1][i]
if c == 0:
    print('Yes')
    sys.exit()
 
print('No')

import numpy as np
import sys

A = []
for i in range(3):
    array = list(map(int, input().split()))
    A.append(array)
N = int(input())
b = []
for i in range(N):
    k = int(input())
    b.append(k)

for k in b:
    for row in A:
        for elem in row:
            if k == elem:
                elem = 0


s_row = np.sum(A, axis=1)
for i in range(3):
    if s_row[i] == 0:
        print('Yes')
        sys.exit()


s_col = np.sum(A, axis=0)
for i in range(3):
    if s_col[i] == 0:
        print('Yes')
        sys.exit()

c = 0
for i in range(3):
    c += A[i][i]
if c == 0:
    print('Yes')
    sys.exit()

c = 0
for i in range(3):
    c += A[3-i-1][i]
if c == 0:
    print('Yes')
    sys.exit()

print('No')

import numpy as np
import sys

A = []
for i in range(3):
    array = list(map(int, input().split()))
    A.append(array)
N = int(input())
b = []
for i in range(N):
    k = int(input())
    b.append(k)

for k in range(len(b)):
    for i in range(len(A)):
        for j in range(len(A[i])):
            if b[k] == A[i][j]:
                A[i][j] = 0


s_row = np.sum(A, axis=1)
for i in range(3):
    if s_row[i] == 0:
        print('Yes')
        sys.exit()


s_col = np.sum(A, axis=0)
for i in range(3):
    if s_col[i] == 0:
        print('Yes')
        sys.exit()

c = 0
for i in range(3):
    c += A[i][i]
if c == 0:
    print('Yes')
    sys.exit()

c = 0
for i in range(3):
    c += A[3-i-1][i]
if c == 0:
    print('Yes')
    sys.exit()

print('No')

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Accepted