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):
def main():
    bingo = []
    for i in range(3):
        a = list(map(int, input().split()))
        bingo.append(a)
    
    n = int(input())
    for j in range(n):
        b = int(input())

        for k in range(3):
            for l in range(3):
                if int(bingo[k][l]) == b:
                    bingo[k][l] = -1
    
    for ii in range(3):
        
        if bingo[ii][0:3] == [-1,-1,-1] or [bingo[0][ii],bingo[1][ii],bingo[2][ii]] == [-1,-1,-1] or [bingo[0][0],bingo[1][1],bingo[2][2]] == [-1,-1,-1] or [bingo[2][0],bingo[1][1],bingo[0][2]] == [-1,-1,-1]:
            
            print('yes')
            break
    else:
        print('No')




if __name__ == '__main__':
    main()



def main():
    bingo = []
    for i in range(3):
        a = list(map(int, input().split()))
        bingo.append(a)
    
    n = int(input())
    for j in range(n):
        b = int(input())

        for k in range(3):
            for l in range(3):
                if int(bingo[k][l]) == b:
                    bingo[k][l] = -1
        
    for ii in range(3):
        if bingo[ii][0:3] == [-1,-1,-1] or bingo[0:3][ii] == [-1,-1,-1] or [bingo[0][0],bingo[1][1],bingo[2][2]] == [-1,-1,-1] or [bingo[2][0],bingo[1][1],bingo[0][2]] == [-1,-1,-1]:
            print('yes')
            break
    else:
        print('No')




if __name__ == '__main__':
    main()



def main():
    bingo = []
    for i in range(3):
        a = list(map(int, input().split()))
        bingo.append(a)
    
    n = int(input())
    for j in range(n):
        b = int(input())

        for k in range(3):
            for l in range(3):
                if int(bingo[k][l]) == b:
                    bingo[k][l] = -1
        
    for ii in range(3):
    
        if bingo[ii][0:3] == [-1,-1,-1] or [bingo[0][ii],bingo[1][ii],bingo[2][ii]] == [-1,-1,-1] or [bingo[0][0],bingo[1][1],bingo[2][2]] == [-1,-1,-1] or [bingo[2][0],bingo[1][1],bingo[0][2]] == [-1,-1,-1]:
            print('yes')
            break
    else:
        print('No')




if __name__ == '__main__':
    main()



def main():
    bingo = []
    for i in range(3):
        a = list(map(int, input().split()))
        bingo.append(a)
    
    n = int(input())
    for j in range(n):
        b = int(input())

        for k in range(3):
            for l in range(3):
                if int(bingo[k][l]) == b:
                    bingo[k][l] = -1
    

    if [bingo[0][0],bingo[1][1],bingo[2][2]] == [-1,-1,-1] or [bingo[2][0],bingo[1][1],bingo[0][2]] == [-1,-1,-1]:
        print('Yes')
    else:
        for ii in range(3):    
            if bingo[ii][0:3] == [-1,-1,-1] or [bingo[0][ii],bingo[1][ii],bingo[2][ii]] == [-1,-1,-1]:
                
                print('Yes')
                break
        else:
            print('No')




if __name__ == '__main__':
    main()



Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted