Problem p02760 (python)

Fixed submission:
A = []
A_1 = list(map(int,input().split()))
A_2 = list(map(int,input().split()))
A_3 = list(map(int,input().split()))
A.append(A_1)
A.append(A_2)
A.append(A_3)
B = []
check=0
BingocountR=0
BingocountG=0
N = int(input())
ArrayBingo =[[0,0,0],[0,0,0],[0,0,0]]
for i in range(N):
    B.append(int(input()))
for j in range (3):
    for k in range (3):
        for l in range (N):
            if A[j][k]==B[l]:
                ArrayBingo[j][k]=1
for i in range(3):
    for j in range(3):
        if ArrayBingo[j][i]==1:
            BingocountR+=1
            if BingocountR ==3:
                check+=1
    BingocountR = 0
for i in range(3):
    for j in range(3):
        if ArrayBingo[i][j]==1:
            BingocountG+=1
            if BingocountG ==3:
                check+=1
    BingocountG = 0
if (ArrayBingo[0][0] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][2] == 1) or (ArrayBingo[0][2] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][0] == 1):
    check += 1
if check>0:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
Array = [list(map(int,input().split())) for _ in range(3)]
ArrayBingo = [[0,0,0],[0,0,0,],[0,0,0]]
N = int(input())
B = []
checkR = 0
checkG = 0
checkN = 0
for i in range (N):
    B.append(int(input()))
for l in range (N):
    for j in range (3):
        for k in range (3):
            if Array[j][k]==B[l]:
                ArrayBingo[j][k]=1
for i in range (3): 
    if (ArrayBingo[i][0] == 1):
        checkR+=1
if checkR ==3:
    print('Yes')
    checkR=4
    if checkR !=4:
        checkR=0
for i in range (3): 
    if (ArrayBingo[i][1] == 1):
        checkR+=1
if checkR ==3:
    print('Yes')
    checkR=4
if checkR!=4    
    checkR=0
for i in range (3): 
    if (ArrayBingo[i][2] == 1):
        checkR+=1
if checkR ==3:
    print('Yes')
    checkR =4
else:
    checkR=0
for j in range (3):
    if (ArrayBingo[0][j] == 1):
        checkG+=1
if checkG ==3:
    print('Yes')
    checkG =4
if checkG !=4:
    checkG=0
for j in range (3):
    if (ArrayBingo[1][j] == 1):
        checkG+=1
if checkG ==3:
    print('Yes')
    checkG =4
if checkG !=4:
    checkG=0
for j in range (3):    
    if (ArrayBingo[2][j] == 1):
        checkG+=1
if checkG ==3:
    print('Yes')
    checkG =4
else:
    checkG=0
if (ArrayBingo[0][0] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][2] == 1) or (ArrayBingo[0][2] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][0] == 1):
    checkN = 1
else:
    checkN = 0
if checkR != 4 and checkG !=4 and checkN==1:
    print('Yes')
if checkR == 0 and checkG ==0 and checkN==0:
    print('No')

Buggy submission (verdict: Runtime Error):
Array = [list(map(int,input().split())) for _ in range(3)]
ArrayBingo = [[0,0,0],[0,0,0,],[0,0,0]]
N = int(input())
B = []
checkR = 0
checkG = 0
checkN = 0
for i in range (N):
    B.append(int(input()))
for l in range (N):
    for j in range (3):
        for k in range (3):
            if Array[j][k]==B[l]:
                ArrayBingo[j][k]=1
for i in range (3): 
    if (ArrayBingo[i][0] == 1):
        checkR+=1
if checkG ==3:
    print(Yes)
checkR=0
for i in range (3): 
    if (ArrayBingo[i][1] == 1):
        checkR+=1
if checkG ==3:
    print(Yes)
checkR=0
for i in range (3): 
    if (ArrayBingo[i][2] == 1):
        checkR+=1
if checkG ==3:
    print(Yes)
else:
    checkR=0
for j in range (3):
    if (ArrayBingo[0][j] == 1):
        checkG+=1
if checkG ==3:
    print(Yes)
checkG=0
for j in range (3):
    if (ArrayBingo[1][j] == 1):
        checkG+=1
if checkG ==3:
    print(Yes)
checkG=0
for j in range (3):    
    if (ArrayBingo[2][j] == 1):
        checkG+=1
if checkG ==3:
    print(Yes)
else:
    checkG=0
if (ArrayBingo[0][0] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][2] == 1) or (ArrayBingo[0][2] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][0] == 1):
    checkN = 1
else:
    checkN = 0
if checkN == 1:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
Array = [list(map(int,input().split())) for _ in range(3)]
ArrayBingo = [[0,0,0],[0,0,0,],[0,0,0]]
N = int(input())
B = []
checkR = 0
checkG = 0
checkN = 0
for i in range (N):
    B.append(int(input()))
for l in range (N):
    for j in range (3):
        for k in range (3):
            if Array[j][k]==B[l]:
                ArrayBingo[j][k]=1
for i in range (3): 
    if (ArrayBingo[i][0] == 1):
        checkR+=1
if checkG ==3:
    print(Yes)
checkR=0
for i in range (3): 
    if (ArrayBingo[i][1] == 1):
        checkR+=1
if checkG ==3:
    print(Yes)
checkR=0
for i in range (3): 
    if (ArrayBingo[i][2] == 1):
        checkR+=1
if checkG ==3:
    print(Yes)
    else:
        checkR=0
for j in range (3):
    if (ArrayBingo[0][j] == 1):
        checkG+=1
if checkG ==3:
    print(Yes)
checkG=0
for j in range (3):
    if (ArrayBingo[1][j] == 1):
        checkG+=1
if checkG ==3:
    print(Yes)
checkG=0
for j in range (3):    
    if (ArrayBingo[2][j] == 1):
        checkG+=1
if checkG ==3:
    print(Yes)
    else:
        checkG=0
if (ArrayBingo[0][0] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][2] == 1) or (ArrayBingo[0][2] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][0] == 1):
    checkN = 1
else:
    checkN = 0
if checkN == 1:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
Array = [list(map(int,input().split())) for _ in range(3)]
ArrayBingo = [[0,0,0],[0,0,0,],[0,0,0]]
N = int(input())
B = []
checkR = 0
checkG = 0
checkN = 0
for i in range (N):
    B.append(int(input()))
for l in range (N):
    for j in range (3):
        for k in range (3):
            if Array[j][k]==B[l]:
                ArrayBingo[j][k]=1
i=0
for i in range (3): 
    if ArrayBingo[i][0] == 1 and ArrayBingo[i][1] == 1 and ArrayBingo[i][2] == 1:
        checkR=1
    else:
        checkR=0
j=0
for j in range (3):
    if ArrayBingo[0][j] == 1 and ArrayBingo[1][j] == 1 and ArrayBingo[2][j] == 1:
        checkG=1
    else:
        checkG=0
if (ArrayBingo[0][0] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][2] == 1) or (ArrayBingo[0][2] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][0] == 1):
    checkN = 1
else:
    checkN = 0
if checkR==1:
    print('Yes')
    break
elif checkG == 1:
    print('Yes')
    break
elif checkN == 1:
    print('Yes')
    break
else:
    print('No')

Buggy submission (verdict: Runtime Error):
Array = [list(map(str,input().split())) for _ in range(3)]
ArrayBingo = [[0,0,0][0,0,0,][0,0,0]]
N = int(input())
B = []
checkR = 0
checkG = 0
checkN = 0
for i in range (N):
    B.append(int(input()))
for j in range (3):
    for k in range (3):
        for l in range (N):
            if Array[j][k]==B[l]:
                ArrayBingo[j][k]=1
for i in range (3): 
    if [line[i] for line in ArrayBingo] != [1,1,1]:
        checkR=0
    else:
        checkR=1
for i in range (3):
    if [row[i] for row in ArrayBingo] != [1,1,1]:
        checkG=0
    else:
        checkG=1
if (ArrayBingo[1][1] == 1 and ArrayBingo[2][2] == 1 and ArrayBingo [3][3] == 1) or (ArrayBingo[1][3] == 1 and ArrayBingo[2][2] == 1 and ArrayBingo [3][1] == 1):
    checkN = 1
else:
    checkN = 0
if checkR==1 or checkG == 1 or checkN == 1:
    print(Yes)
else:
    print(No)