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
N_1=[46, 70, 98]
N_2=[5, 39, 99]
N_3=[34, 84, 8]

N=int(7)
a=[75,12,22,8,99,34,10]

n=np.array([N_1,N_2,N_3])

for a_n in a:
    if a_n in n:
        n[n==a_n]=0
    else:
        pass
i=0
    
if np.all(n[0:,0]==0)==True:
    i=+1
    
elif np.all(n[0:,1]==0)==True:
    i+=1
    
elif np.all(n[0:,2]==0)==True:
    i+=1
    
elif np.all(n[0,0:]==0)==True:
    i+=1
    
elif np.all(n[1,0:]==0)==True:
    i+=1

elif np.all(n[2,0:]==0)==True:
    i+=1

elif n[0,0]==0 and n[1,1]==0  and n[2,2] ==0:
    i+=1
    
elif n[0,2]==0 and n[1,1]==0 and n[2,0] ==0:
    i+=1
    print(i)
if i>0:
    print("Yes")
else:
    print("No")

print(n)

a_1=list(map(int, input().split()))
a_2=list(map(int, input().split()))
a_3=list(map(int, input().split()))

c=[a_1,a_2,a_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
            
            
i=0
if a[0][0]==0 and a[0][1]==0 and a[0][2]:
    i+=1
if a[1][0]==0 and a[1][1]==0 and a[1][2]:
    i+=1
if a[2][0]==0 and a[2][1]==0 and a[2][2]:
    i+=1
if a[0][0]==0 and a[1][0]==0 and a[2][0]:
    i+=1
if a[0][1]==0 and a[1][1]==0 and a[2][1]:
    i+=1
if a[0][2]==0 and a[1][2]==0 and a[2][2]:
    i+=1
if a[0][0]==0 and a[1][1]==0 and a[2][2]:
    i+=1
if a[0][2]==0 and a[1][1]==0 and a[2][0]:
    i+=1
    
if i>0:
    print("Yes")
elif i==0:
    print("No")

a,b,c=int(input()).split()
d,e,f=int(input()).split()
g,h,i=int(input()).split()

x=[[a,b,c],[d,e,f],[g,h,i]]
while True:
    b_i=int(input())
    if b_i in x:
        x[b_i]=0
if x[:,0]==0:
    print(“Yes”)
if x[:,1]==0:
    print(“Yes”)
if x[:,2]==0:
    print(“Yes”)
if x[0,:]==0:
    print(“Yes”)
if x[1,:]==0:
    print(“Yes”)
if x[2:,]==0:
    print(“Yes”)
if x[0,0] and x[1,1] and x[2,2]==0:
    print(“Yes”)
if x[0,2] and x[1,1] and x[2,0]==0:
    print(“Yes”)
else:
    print(“No”)

import numpy as np
N_1=list(map(int, input().split()))
N_2=list(map(int, input().split()))
N_3=list(map(int, input().split()))
N=int(input())
a=[int(input()) for i in range(N)]
 
n=np.array([N_1,N_2,N_3])

for a_n in a:
    if a_n in n:
        n[n==a_n]=0
    else:
        pass
i=0


    
if np.all(n[0:,0]==0)==True:
    i=+1
    
elif np.all(n[0:,1]==0)==True:
    i+=1
    
elif np.all(n[0:,2]==0)==True:
    i+=1
    
elif np.all(n[0,0:]==0)==True:
    i+=1
    
elif np.all(n[1,0:]==0)==True:
    i+=1
    
elif np.all(n[2,0:]==0)==True:
    i+=1
    
elif n[0,0] and n[1,1] and n[2,2] ==0:
    i+=1

elif n[0,2] and n[1,1] and n[2,0] ==0:
    i+=1

if i>0:
    print("Yes")
else:
    print("No")


import numpy as np
N_1=list(map(int, input().split()))
N_2=list(map(int, input().split()))
N_3=list(map(int, input().split()))
N=int(input())
a=[int(input()) for i in range(N)]

n=np.array([N_1,N_2,N_3])


for a_n in a:
    if a_n in n:
        n[n==a_n]=0
    else:
        pass
i=0

print(n)
    
if np.all(n[0:,0]==0):
    i=+1
    
elif np.all(n[0:,1]==0):
    i+=1
    
elif np.all(n[0:,2]==0):
    i+=1
    
elif np.all(n[0,0:]==0):
    i+=1
    
elif np.all(n[1,0:]==0):
    i+=1
    
elif np.all(n[2,0:]==0):
    i+=1
    
elif n[0,0] and n[1,1] and n[2,2] ==0:
    i+=1

elif n[0,2] and n[1,1] and n[2,0] ==0:
    i+=1

if i>0:
    print("Yes")
else:
    print("No")


a_1=list(map(int, input().split()))
a_2=list(map(int, input().split()))
a_3=list(map(int, input().split()))

c=[a_1,a_2,a_3]

N=int(input())

b=[int(input()) for _ in range(N)]

for i in range(3):
    for j in range(3):
        if c[i][j] in b:
            c[i][j]=0
            
            
i=0
if c[0][0]==0 and c[0][1]==0 and c[0][2]==0:
    i+=1
if c[1][0]==0 and c[1][1]==0 and c[1][2]==0:
    i+=1
if c[2][0]==0 and c[2][1]==0 and c[2][2]==0:
    i+=1
if c[0][0]==0 and c[1][0]==0 and c[2][0]==0:
    i+=1
if c[0][1]==0 and c[1][1]==0 and c[2][1]==0:
    i+=1
if c[0][2]==0 and c[1][2]==0 and c[2][2]==0:
    i+=1
if c[0][0]==0 and c[1][1]==0 and c[2][2]==0:
    i+=1
if c[0][2]==0 and c[1][1]==0 and c[2][0]==0:
    i+=1
    
if i>0:
    print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Accepted