Datasets:

problem_id
stringlengths
6
6
buggy_code
stringlengths
8
526k
fixed_code
stringlengths
12
526k
labels
listlengths
0
15
buggy_submission_id
int64
1
1.54M
fixed_submission_id
int64
2
1.54M
user_id
stringlengths
10
10
language
stringclasses
8 values
p02760
al = [list(map(int, input().split())) for i in range(3)] al = sum(al, []) n = int(input()) bl = [int(input()) for i in range(n)] check = [0 for i in range(9)] for b in bl: if b in al: check[al.index(b)] = 1 if [1,1,1] in [check[:3], check[3:6], check[6:], check[0:7:3], check[1:8:3], check[2:9:3], check[0:9:4], check[3:8:2]]: print("Yes") else: print("No")
al = [list(map(int, input().split())) for i in range(3)] al = sum(al, []) n = int(input()) bl = [int(input()) for i in range(n)] check = [0 for i in range(9)] for b in bl: if b in al: check[al.index(b)] = 1 if [1,1,1] in [check[:3], check[3:6], check[6:], check[0:7:3], check[1:8:3], check[2:9:3], check[0:9:4], check[2:8:2]]: print("Yes") else: print("No")
[ "literal.number.integer.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
546,799
546,800
u075401284
python
p02760
al = [list(map(int, input().split())) for i in range(3)] al = sum(a, []) n = int(input()) bl = [int(input()) for i in range(n)] check = [0 for i in range(9)] for b in bl: if b in al: check[al.index(b)] = 1 if [1,1,1] in [check[:3], check[3:6], check[6:], check[0:7:3], check[1:8:3], check[2:9:3], check[0:9:4], check[3:8:2]]: print("Yes") else: print("No")
al = [list(map(int, input().split())) for i in range(3)] al = sum(al, []) n = int(input()) bl = [int(input()) for i in range(n)] check = [0 for i in range(9)] for b in bl: if b in al: check[al.index(b)] = 1 if [1,1,1] in [check[:3], check[3:6], check[6:], check[0:7:3], check[1:8:3], check[2:9:3], check[0:9:4], check[2:8:2]]: print("Yes") else: print("No")
[ "assignment.value.change", "identifier.change", "call.arguments.change", "literal.number.integer.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
546,802
546,800
u075401284
python
p02760
a = [list(map(int, input().split())) for _ in range(3)] N = int(input()) b = [int(input()) for _ in range(10)] c = [[0 for _ in range(3)] for _ in range(3)] result = "" for i in range(3): for j in range(3): if a[j][i] in b: c[j][i] = 1 for i in range(3): if c[i][0] == c[i][1] == c[i][2] == 1: result = "Yes" break elif c[0][i] == c[1][i] == c[2][i] == 1: result = "Yes" break if c[0][0] == c[1][1] == c[2][2] == 1: result = "Yes" elif c[0][2] == c[1][1] == c[2][0] == 1: result = "Yes" if result == "": result ="No" print(result)
a = [list(map(int, input().split())) for _ in range(3)] N = int(input()) b = [int(input()) for _ in range(N)] c = [[0 for _ in range(3)] for _ in range(3)] result = "" for i in range(3): for j in range(3): if a[j][i] in b: c[j][i] = 1 for i in range(3): if c[i][0] == c[i][1] == c[i][2] == 1: result = "Yes" break elif c[0][i] == c[1][i] == c[2][i] == 1: result = "Yes" break if c[0][0] == c[1][1] == c[2][2] == 1: result = "Yes" elif c[0][2] == c[1][1] == c[2][0] == 1: result = "Yes" if result == "": result ="No" print(result)
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
546,803
546,804
u163421511
python
p02760
a = [list(map(int, input().split())) for _ in range(3)] N = int(input()) b = [int(input()) for _ in range(10)] c = [[0 for _ in range(3)] for _ in range(3)] result = "" for i in range(3): for j in range(3): if a[j][i] in b: c[j][i] = 1 for i in range(3): if c[i][0] == c[i][1] == c[i][2] == 1: result = "Yes" break elif c[0][i] == c[1][i] == c[2][i] == 1: result = "Yes" break if c[0][0] == c[1][1] == c[2][2] == 1: result = "Yes" elif c[0][2] == c[1][1] == c[2][0] == 1: result = "Yes" if result is None: result ="No" print(result)
a = [list(map(int, input().split())) for _ in range(3)] N = int(input()) b = [int(input()) for _ in range(N)] c = [[0 for _ in range(3)] for _ in range(3)] result = "" for i in range(3): for j in range(3): if a[j][i] in b: c[j][i] = 1 for i in range(3): if c[i][0] == c[i][1] == c[i][2] == 1: result = "Yes" break elif c[0][i] == c[1][i] == c[2][i] == 1: result = "Yes" break if c[0][0] == c[1][1] == c[2][2] == 1: result = "Yes" elif c[0][2] == c[1][1] == c[2][0] == 1: result = "Yes" if result == "": result ="No" print(result)
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "control_flow.branch.if.condition.change" ]
546,805
546,804
u163421511
python
p02760
a = list(map(int, input().split())) b = list(map(int, input().split())) c = list(map(int, input().split())) ka = a + b + c x = int() n = int(input()) for i in range(n): k = int(input()) if k in ka: ka[ka.index(k)] = x print(ka) ans = "No" if ka[0] == x and ka[1] == x and ka[2] == x:ans = "Yes" elif ka[3] == x and ka[4] == x and ka[5] == x:ans = "Yes" elif ka[6] == x and ka[7] == x and ka[8] == x:ans = "Yes" elif ka[0] == x and ka[3] == x and ka[6] == x:ans = "Yes" elif ka[1] == x and ka[4] == x and ka[7] == x:ans = "Yes" elif ka[2] == x and ka[5] == x and ka[8] == x:ans = "Yes" elif ka[0] == x and ka[4] == x and ka[8] == x:ans = "Yes" elif ka[2] == x and ka[4] == x and ka[6] == x:ans = "Yes" print(ans)
a = list(map(int, input().split())) b = list(map(int, input().split())) c = list(map(int, input().split())) ka = a + b + c x = int() n = int(input()) for i in range(n): k = int(input()) if k in ka: ka[ka.index(k)] = x ans = "No" if ka[0] == x and ka[1] == x and ka[2] == x:ans = "Yes" elif ka[3] == x and ka[4] == x and ka[5] == x:ans = "Yes" elif ka[6] == x and ka[7] == x and ka[8] == x:ans = "Yes" elif ka[0] == x and ka[3] == x and ka[6] == x:ans = "Yes" elif ka[1] == x and ka[4] == x and ka[7] == x:ans = "Yes" elif ka[2] == x and ka[5] == x and ka[8] == x:ans = "Yes" elif ka[0] == x and ka[4] == x and ka[8] == x:ans = "Yes" elif ka[2] == x and ka[4] == x and ka[6] == x:ans = "Yes" print(ans)
[ "call.remove" ]
546,817
546,818
u809819902
python
p02760
A=[] for _ in range(3): A.append(list(map(int,input().split()))) C=[[False]*3 for _ in range(3)] D=[(0,0),(0,1),(0,2),(1,0),(1,1),(1,2),(2,0),(2,1),(2,2)] N=int(input()) for _ in range(N): b=int(input()) for (p,q) in D: if A[p][q]==b: C[p][q]=1 T=False for i in range(3): U=True for j in range(3): U&=C[i][j] T|=U for j in range(3): U=True for i in range(3): U&=C[i][j] T|=U U=True for i in range(3): U&=C[i][i] T|=U U=True for i in range(3): U&=C[i][2-j] T|=U if T: print("Yes") else: print("No")
A=[] for _ in range(3): A.append(list(map(int,input().split()))) C=[[False]*3 for _ in range(3)] D=[(0,0),(0,1),(0,2),(1,0),(1,1),(1,2),(2,0),(2,1),(2,2)] N=int(input()) for _ in range(N): b=int(input()) for (p,q) in D: if A[p][q]==b: C[p][q]=True T=False for i in range(3): U=True for j in range(3): U&=C[i][j] T|=U for j in range(3): U=True for i in range(3): U&=C[i][j] T|=U U=True for i in range(3): U&=C[i][i] T|=U U=True for i in range(3): U&=C[i][2-i] T|=U if T: print("Yes") else: print("No")
[ "assignment.value.change", "identifier.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
546,821
546,822
u779805689
python
p02760
A=[] for _ in range(3): A.append(list(map(int,input().split()))) C=[[False]*3 for _ in range(3)] D=[(0,0),(0,1),(0,2),(1,0),(1,1),(1,2),(2,0),(2,1),(2,2)] N=int(input()) for _ in range(N): b=int(input()) for (p,q) in D: if A[p][q]==b: C[p][q]=1 T=False for i in range(3): U=True for j in range(3): U&=C[i][j] T|=U for j in range(3): U=True for i in range(3): U&=C[i][j] T|=U U=True for i in range(3): U&=C[i][i] T|=U for i in range(3): U&=C[i][2-j] T|=U if T: print("Yes") else: print("No")
A=[] for _ in range(3): A.append(list(map(int,input().split()))) C=[[False]*3 for _ in range(3)] D=[(0,0),(0,1),(0,2),(1,0),(1,1),(1,2),(2,0),(2,1),(2,2)] N=int(input()) for _ in range(N): b=int(input()) for (p,q) in D: if A[p][q]==b: C[p][q]=True T=False for i in range(3): U=True for j in range(3): U&=C[i][j] T|=U for j in range(3): U=True for i in range(3): U&=C[i][j] T|=U U=True for i in range(3): U&=C[i][i] T|=U U=True for i in range(3): U&=C[i][2-i] T|=U if T: print("Yes") else: print("No")
[ "assignment.value.change", "identifier.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
546,823
546,822
u779805689
python
p02760
row1 = list(map(int,input().split())) row2 = list(map(int,input().split())) row3 = list(map(int,input().split())) n = int(input()) nums = [] ans = "No" for i in range(0, n): nums.append(int(input())) for i in range(0,3): if row1[i] in nums: row1[i] == "O" if row2[i] in nums: row2[i] == "O" if row3[i] in nums: row3[i] == "O" #Columns for i in range(0,3): if row1[i] == row2[i] == row3[i]: ans = "Yes" #Rows if row1 == ["O","O","O"] or row2 == ["O","O","O"] or row3 == ["O","O","O"]: ans = "Yes" #Diagonals if row1[0] == row2[1] == row3[2] or row1[2] == row2[1] == row3[0]: ans = "Yes" print(ans)
row1 = list(map(int,input().split())) row2 = list(map(int,input().split())) row3 = list(map(int,input().split())) n = int(input()) nums = [] ans = "No" for i in range(0, n): nums.append(int(input())) for i in range(0,3): if row1[i] in nums: row1[i] = "O" if row2[i] in nums: row2[i] = "O" if row3[i] in nums: row3[i] = "O" #Columns for i in range(0,3): if row1[i] == row2[i] == row3[i]: ans = "Yes" #Rows if row1 == ["O","O","O"] or row2 == ["O","O","O"] or row3 == ["O","O","O"]: ans = "Yes" #Diagonals if row1[0] == row2[1] == row3[2] or row1[2] == row2[1] == row3[0]: ans = "Yes" print(ans)
[ "expression.operation.compare.replace.remove", "assignment.replace.add", "misc.typo" ]
546,829
546,830
u276686572
python
p02760
row1 = list(map(int,input().split())) row2 = list(map(int,input().split())) row3 = list(map(int,input().split())) n = int(input()) nums = [] ans = "No" for i in range(0, n): nums.append(int(input())) for i in range(0,3): if row1[i] in nums: row1[i] == "O" if row2[i] in nums: row2[i] == "O" if row3[i] in nums: row3[i] == "O" #Columns for i in range(0,3): if row1[i] == row2[i] == row3[i]: ans = "Yes" #Rows if row1 == ["O","O","O"] or row2 == ["O","O","O"] or row3 == ["O","O","O"]: ans = "Yes" #Diagonals if row1[0] == row2[1] == row3[2] or row1[2] == row2[1] == row3[0]: ans = "Yes" print(ans)
row1 = list(map(int,input().split())) row2 = list(map(int,input().split())) row3 = list(map(int,input().split())) n = int(input()) nums = [] ans = "No" for i in range(0, n): nums.append(int(input())) for i in range(0,3): if row1[i] in nums: row1[i] = "O" if row2[i] in nums: row2[i] = "O" if row3[i] in nums: row3[i] = "O" #Columns for i in range(0,3): if row1[i] == row2[i] == row3[i]: ans = "Yes" #Rows if row1 == ["O","O","O"] or row2 == ["O","O","O"] or row3 == ["O","O","O"]: ans = "Yes" #Diagonals if row1[0] == row2[1] == row3[2] or row1[2] == row2[1] == row3[0]: ans = "Yes" print(ans)
[ "expression.operation.compare.replace.remove", "assignment.replace.add", "misc.typo" ]
546,831
546,830
u276686572
python
p02760
a = [] a.append(input().split()) a.append(input().split()) a.append(input().split()) n = int(input()) for i in range(n): b = input() for j in range(3): for k in range(3): if a[j][k] == b: a[j][k] = "0" break else: continue break print(a) for i in range(3): if a[i][0] == a[i][1] == a[i][2] == "0": print("Yes") exit() if a[0][i] == a[1][i] == a[2][i] == "0": print("Yes") exit() if a[0][0] == a[1][1] == a[2][2] == "0": print("Yes") exit() if a[0][2] == a[1][1] == a[2][0] == "0": print("Yes") exit() print("No")
a = [] a.append(input().split()) a.append(input().split()) a.append(input().split()) n = int(input()) for i in range(n): b = input() for j in range(3): for k in range(3): if a[j][k] == b: a[j][k] = "0" break else: continue break for i in range(3): if a[i][0] == a[i][1] == a[i][2] == "0": print("Yes") exit() if a[0][i] == a[1][i] == a[2][i] == "0": print("Yes") exit() if a[0][0] == a[1][1] == a[2][2] == "0": print("Yes") exit() if a[0][2] == a[1][1] == a[2][0] == "0": print("Yes") exit() print("No")
[ "call.remove" ]
546,832
546,833
u537722973
python
p02760
A = [] for _ in range(3): A += list(map(int, input().split())) N = int(input()) res = "No" for _ in range(N): b = int(input()) if b in A: ind = A.index(b) A[ind] = -1 if any(all(a==-1 for a in A[3*i:i+3])for i in range(3)): res = "Yes" if any(all(a==-1 for a in A[i::3])for i in range(3)): res = "Yes" if any(all(A[i]==-1 for i in a)for a in [[0,4,8],[2,4,6]]): res = "Yes" print(res)
A = [] for _ in range(3): A += list(map(int, input().split())) N = int(input()) res = "No" for _ in range(N): b = int(input()) if b in A: ind = A.index(b) A[ind] = -1 if any(all(a==-1 for a in A[3*i:3*i+3])for i in range(3)): res = "Yes" if any(all(a==-1 for a in A[i::3])for i in range(3)): res = "Yes" if any(all(A[i]==-1 for i in a)for a in [[0,4,8],[2,4,6]]): res = "Yes" print(res)
[ "control_flow.branch.if.condition.change" ]
546,834
546,835
u450983668
python
p02760
A = [] for _ in range(3): A += list(map(int, input().split())) N = int(input()) res = "No" for _ in range(N): b = int(input()) if b in A: ind = A.index(b) A[ind] = -1 if any(all(a==-1 for a in A[i:i+3])for i in range(3)): res = "Yes" if any(all(a==-1 for a in A[i::3])for i in range(3)): res = "Yes" if any(all(A[i]==-1 for i in a)for a in [[0,4,8],[2,4,6]]): res = "Yes" print(res)
A = [] for _ in range(3): A += list(map(int, input().split())) N = int(input()) res = "No" for _ in range(N): b = int(input()) if b in A: ind = A.index(b) A[ind] = -1 if any(all(a==-1 for a in A[3*i:3*i+3])for i in range(3)): res = "Yes" if any(all(a==-1 for a in A[i::3])for i in range(3)): res = "Yes" if any(all(A[i]==-1 for i in a)for a in [[0,4,8],[2,4,6]]): res = "Yes" print(res)
[ "control_flow.branch.if.condition.change" ]
546,836
546,835
u450983668
python
p02760
import sys import itertools # import numpy as np import time import math sys.setrecursionlimit(10 ** 7) from collections import defaultdict read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines A = [[0 for _ in range(3)] for _ in range(3)] for i in range(3): A[i] = list(map(int, input().split())) n = int(input()) for i in range(n): b = int(input()) for j in range(3): for k in range(3): if A[j][k] == b: A[j][k] = - 1 for i in range(3): if A[i][0] == A[i][1] == A[i][2] == -1: print("Yes") exit() for i in range(3): if A[0][1] == A[1][i] == A[2][i] == -1: print("Yes") exit() if A[0][0] == A[1][1] == A[2][2] == -1: print("Yes") exit() if A[0][2] == A[1][1] == A[2][0] == -1: print("Yes") exit() print("No")
import sys import itertools # import numpy as np import time import math sys.setrecursionlimit(10 ** 7) from collections import defaultdict read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines A = [[0 for _ in range(3)] for _ in range(3)] for i in range(3): A[i] = list(map(int, input().split())) n = int(input()) for i in range(n): b = int(input()) for j in range(3): for k in range(3): if A[j][k] == b: A[j][k] = - 1 for i in range(3): if A[i][0] == A[i][1] == A[i][2] == -1: print("Yes") exit() for i in range(3): if A[0][i] == A[1][i] == A[2][i] == -1: print("Yes") exit() if A[0][0] == A[1][1] == A[2][2] == -1: print("Yes") exit() if A[0][2] == A[1][1] == A[2][0] == -1: print("Yes") exit() print("No")
[ "identifier.replace.add", "literal.replace.remove", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
546,837
546,838
u036104576
python
p02760
a = [list(map(int, input().split())) for _ in range(3)] n = int(input()) B = [int(input()) for _ in range(n)] c = [[0, 0, 0], [0, 0, 0], [0, 0, 0]] for b in B: for i in range(3): for j in range(3): if b == a[i][j]: c[i][j] += 1 cnt = 0 for i in range(3): if c[i][i] == 1: cnt += 1 if cnt == 3: print('Yes') exit() for i in range(3): if sum(c[i]) == 3: print('Yes') exit() cnt = 0 for i in range(3): for j in range(3): if c[j][i] == 1: cnt += 1 if cnt == 3: print('Yes') exit() cnt = 0 for i in range(3): if c[i][2 - i] == 1: cnt += 1 if cnt == 3: print('Yes') exit() print('No')
a = [list(map(int, input().split())) for _ in range(3)] n = int(input()) B = [int(input()) for _ in range(n)] c = [[0, 0, 0], [0, 0, 0], [0, 0, 0]] for b in B: for i in range(3): for j in range(3): if b == a[i][j]: c[i][j] += 1 cnt = 0 for i in range(3): if c[i][i] == 1: cnt += 1 if cnt == 3: print('Yes') exit() for i in range(3): if sum(c[i]) == 3: print('Yes') exit() for i in range(3): cnt = 0 for j in range(3): if c[j][i] == 1: cnt += 1 if cnt == 3: print('Yes') exit() cnt = 0 for i in range(3): if c[i][2 - i] == 1: cnt += 1 if cnt == 3: print('Yes') exit() print('No')
[ "assignment.remove", "assignment.add" ]
546,839
546,840
u970267139
python
p02760
A = list(map(int, input().split())) B = list(map(int, input().split())) C = list(map(int, input().split())) X = A + B + C N = int(input()) L = [] for i in range (N): K = int(input()) L.append(K) ck = 'No' if A[0] in L and A[1]in L and A[2] in L: ck == 'Yes' elif B[0] in L and B[1]in L and B[2] in L: ck == 'Yes' elif C[0] in L and C[1]in L and C[2] in L: ck == 'Yes' elif A[0] in L and B[0]in L and C[0] in L: ck == 'Yes' elif A[1] in L and B[1]in L and C[1] in L: ck == 'Yes' elif A[2] in L and B[2]in L and C[2] in L: ck == 'Yes' elif A[0] in L and B[1] in L and C[2] in L: ck = 'Yes' elif A[2] in L and B[1] in L and C[0] in L: ck = 'Yes' print(ck)
A = list(map(int, input().split())) B = list(map(int, input().split())) C = list(map(int, input().split())) X = A + B + C N = int(input()) L = [] for i in range (N): K = int(input()) L.append(K) ck = 'No' if A[0] in L and A[1]in L and A[2] in L: ck = 'Yes' elif B[0] in L and B[1]in L and B[2] in L: ck = 'Yes' elif C[0] in L and C[1]in L and C[2] in L: ck = 'Yes' elif A[0] in L and B[0]in L and C[0] in L: ck = 'Yes' elif A[1] in L and B[1]in L and C[1] in L: ck = 'Yes' elif A[2] in L and B[2]in L and C[2] in L: ck = 'Yes' elif A[0] in L and B[1] in L and C[2] in L: ck = 'Yes' elif A[2] in L and B[1] in L and C[0] in L: ck = 'Yes' print(ck)
[ "expression.operation.compare.replace.remove", "assignment.replace.add", "misc.typo" ]
546,841
546,842
u864276028
python
p02760
A=list(map(int,input().split())) B=list(map(int,input().split())) C=list(map(int,input().split())) x=A+B+C n=int(input()) for i in range (n): y=int(input()) x=['X' if j==y else j for j in x] if X[0]==X[3]==X[6]=='X': print('Yes') elif X[1]==X[4]==X[7]=='X': print('Yes') elif X[2]==X[5]==X[8]=='X': print('Yes') elif X[0]==X[1]==X[2]=='X': print('Yes') elif X[3]==X[4]==X[5]=='X': print('Yes') elif X[6]==X[7]==X[8]=='X': print('Yes') elif X[0]==X[4]==X[8]=='X': print('Yes') elif X[2]==X[4]==X[6]=='X': print('Yes') else: print('No')
A=list(map(int,input().split())) B=list(map(int,input().split())) C=list(map(int,input().split())) X=A+B+C n=int(input()) for i in range (n): y=int(input()) X=['X' if j==y else j for j in X] if X[0]==X[3]==X[6]=='X': print('Yes') elif X[1]==X[4]==X[7]=='X': print('Yes') elif X[2]==X[5]==X[8]=='X': print('Yes') elif X[0]==X[1]==X[2]=='X': print('Yes') elif X[3]==X[4]==X[5]=='X': print('Yes') elif X[6]==X[7]==X[8]=='X': print('Yes') elif X[0]==X[4]==X[8]=='X': print('Yes') elif X[2]==X[4]==X[6]=='X': print('Yes') else: print('No')
[ "assignment.variable.change", "identifier.change", "assignment.value.change" ]
546,848
546,847
u455642216
python
p02760
a=list(map(int,input().split())) b=list(map(int,input().split())) c=list(map(int,input().split())) x=a+b+c n=int(input()) ans='No' for _ in range(n): s=int(input()) x=['x' if i==s else i for i in x] if x[0]==x[3]==x[6]=='x':ans='Yes' elif x[1]==x[4]==x[7]=='x':ans='Yes' elif x[2]==x[5]==x[8]=='x':ans='Yes' elif x[0]==x[1]==x[2]=='x':ans='Yes' elif x[3]==x[4]==x[5]=='x':ans='Yes' elif x[6]==x[7]==x[8]=='x':ans='Yes' elif x[0]==x[4]==x[8]=='x':ans='Yes' elif x[2]==x[4]==x[7]=='x':ans='Yes' print(ans)
a=list(map(int,input().split())) b=list(map(int,input().split())) c=list(map(int,input().split())) x=a+b+c n=int(input()) ans='No' for _ in range(n): s=int(input()) x=['x' if i==s else i for i in x] if x[0]==x[3]==x[6]=='x':ans='Yes' elif x[1]==x[4]==x[7]=='x':ans='Yes' elif x[2]==x[5]==x[8]=='x':ans='Yes' elif x[0]==x[1]==x[2]=='x':ans='Yes' elif x[3]==x[4]==x[5]=='x':ans='Yes' elif x[6]==x[7]==x[8]=='x':ans='Yes' elif x[0]==x[4]==x[8]=='x':ans='Yes' elif x[2]==x[4]==x[6]=='x':ans='Yes' print(ans)
[ "literal.number.integer.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
546,853
546,854
u350093546
python
p02760
M=[] for _i in range(3): M.append(list(map(int,input().split()))) n= int(input()) cont_lin = [0,0,0] cont_col = [0,0,0] contdp = contds = 0 for a in range(n): b= int(input()) for i in range(3): for j in range(3): if M[i][j]==b: cont_lin[i]+=1 cont_lin[j]+=1 if i==j: contdp+=1 if i==2-j: contds+=1 achou = False if (contdp == 3) or (contds==3): achou=True elif (cont_lin[0]==3) or (cont_lin[1]==3) or (cont_lin[2]==3) : achou=True elif (cont_col[0]==3) or (cont_col[1]==3) or (cont_col[2]==3) : achou=True print('Yes' if achou else 'No')
M=[] for _i in range(3): M.append(list(map(int,input().split()))) n= int(input()) cont_lin = [0,0,0] cont_col = [0,0,0] contdp = contds = 0 for a in range(n): b= int(input()) for i in range(3): for j in range(3): if M[i][j]==b: cont_lin[i]+=1 cont_col[j]+=1 if i==j: contdp+=1 if i==2-j: contds+=1 achou = False if (contdp == 3) or (contds==3): achou=True elif (cont_lin[0]==3) or (cont_lin[1]==3) or (cont_lin[2]==3) : achou=True elif (cont_col[0]==3) or (cont_col[1]==3) or (cont_col[2]==3) : achou=True print('Yes' if achou else 'No')
[ "identifier.change" ]
546,862
546,863
u388030693
python
p02760
num = [] for i in range(3): num.append([int(i) for i in input().split()]) q = int(input()) val=[] for i in range(q): val.append(int(input())) for p in val: for i in range(3): for j in range(3): if p == num[i][j]: num[i][j]=-1 ans='No' for i in range(3): #colunas if(num[0][j] == -1 and num[1][j] == -1 and num[2][j] ==-1): ans='Yes' if(num[j][0] == -1 and num[j][1] == -1 and num[j][2] ==-1): ans='Yes' if(num[0][0] == -1 and num[1][1] == -1 and num[2][2] ==-1): ans='Yes' if(num[0][2] == -1 and num[1][1] == -1 and num[2][0] ==-1): ans='Yes' print(ans)
num = [] for i in range(3): num.append([int(i) for i in input().split()]) q = int(input()) val=[] for i in range(q): val.append(int(input())) for p in val: for i in range(3): for j in range(3): if p == num[i][j]: num[i][j]=-1 ans='No' for j in range(3): #colunas if(num[0][j] == -1 and num[1][j] == -1 and num[2][j] ==-1): ans='Yes' if(num[j][0] == -1 and num[j][1] == -1 and num[j][2] ==-1): ans='Yes' if(num[0][0] == -1 and num[1][1] == -1 and num[2][2] ==-1): ans='Yes' if(num[0][2] == -1 and num[1][1] == -1 and num[2][0] ==-1): ans='Yes' print(ans)
[ "identifier.change" ]
546,864
546,865
u259975636
python
p02760
import sys def getInput(): return [int(i) for i in input().rstrip().split(' ')] def checkBingo(holes): holes_x = [list(x) for x in zip(*holes)] _a,_b = True,True for i in range(3): if not None in holes[i] or not None in holes_x[i]:# 縦横 return True #斜め if None is holes[i][i]:_a=False if None is holes[i][-i]: _b=False return (_a ==True or _b == True) bingo = [] holes = [] for i in range(3): bingo += [getInput()] for i in bingo: holes += [[None for n in i]] N = getInput()[0] for i in range(N): num = getInput()[0] for h in range(3): for w in range(3): if num == bingo[h][w]: holes[h][w] = 1 break if checkBingo(holes): print('Yes') sys.exit() print('No')
import sys def getInput(): return [int(i) for i in input().rstrip().split(' ')] def checkBingo(holes): holes_x = [list(x) for x in zip(*holes)] _a,_b = True,True for i in range(3): if not None in holes[i] or not None in holes_x[i]:# 縦横 return True #斜め if None is holes[i][i]:_a=False if None is holes[i][2-i]: _b=False return (_a ==True or _b == True) bingo = [] holes = [] for i in range(3): bingo += [getInput()] for i in bingo: holes += [[None for n in i]] N = getInput()[0] for i in range(N): num = getInput()[0] for h in range(3): for w in range(3): if num == bingo[h][w]: holes[h][w] = 1 break if checkBingo(holes): print('Yes') sys.exit() print('No')
[ "control_flow.branch.if.condition.change" ]
546,875
546,876
u199290844
python
p02760
import sys def getInput(): return [int(i) for i in input().rstrip().split(' ')] def checkBingo(holes): holes_x = [list(x) for x in zip(*holes)] _a,_b = True,True for i in range(3): if not None in holes[i] or not None in holes_x[i]:# 縦横 return True #斜め if None is holes[i][i]:_a=False if None is holes[-i][-i]: _b=False return (_a ==True or _b == True) bingo = [] holes = [] for i in range(3): bingo += [getInput()] for i in bingo: holes += [[None for n in i]] N = getInput()[0] for i in range(N): num = getInput()[0] for h in range(3): for w in range(3): # print("h:", h, ", w:", w) if num == bingo[h][w]: holes[h][w] = 1 break if checkBingo(holes): print('Yes') sys.exit() print('No')
import sys def getInput(): return [int(i) for i in input().rstrip().split(' ')] def checkBingo(holes): holes_x = [list(x) for x in zip(*holes)] _a,_b = True,True for i in range(3): if not None in holes[i] or not None in holes_x[i]:# 縦横 return True #斜め if None is holes[i][i]:_a=False if None is holes[i][2-i]: _b=False return (_a ==True or _b == True) bingo = [] holes = [] for i in range(3): bingo += [getInput()] for i in bingo: holes += [[None for n in i]] N = getInput()[0] for i in range(N): num = getInput()[0] for h in range(3): for w in range(3): if num == bingo[h][w]: holes[h][w] = 1 break if checkBingo(holes): print('Yes') sys.exit() print('No')
[ "expression.operation.unary.arithmetic.remove", "control_flow.branch.if.condition.change" ]
546,877
546,876
u199290844
python
p02760
a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] c = [int(x) for x in input().split()] n = int(input()) for _ in range(n): x = int(input()) for i in range(3): if(a[i] == x): a[i] = 0 elif(b[i] == x): b[i] = 0 elif(c[i] == x): c[i] = 0 if(a[0] == 0 and a[1] == 0 and a[2] == 0): print('Yes') elif(b[0] == 0 and b[1] == 0 and b[2] == 0): print('Yes') elif(c[0] == 0 and c[1] == 0 and c[2] == 0): print('Yes') elif(a[0] == 0 and b[0] == 0 and c[0] == 0): print('Yes') elif(a[1] == 0 and b[1] == 0 and c[1] == 0): print('Yes') elif(a[2] == 0 and b[2] == 0 and c[2] == 0): print('Yes') elif(a[0] == 0 and b[1] == 0 and c[2] == 0): print('Yes') elif(a[2] == 0 and b[1] == 0 and c[2] == 0): print('Yes') else: print('No')
a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] c = [int(x) for x in input().split()] n = int(input()) for _ in range(n): x = int(input()) for i in range(3): if(a[i] == x): a[i] = 0 elif(b[i] == x): b[i] = 0 elif(c[i] == x): c[i] = 0 if(a[0] == 0 and a[1] == 0 and a[2] == 0): print('Yes') elif(b[0] == 0 and b[1] == 0 and b[2] == 0): print('Yes') elif(c[0] == 0 and c[1] == 0 and c[2] == 0): print('Yes') elif(a[0] == 0 and b[0] == 0 and c[0] == 0): print('Yes') elif(a[1] == 0 and b[1] == 0 and c[1] == 0): print('Yes') elif(a[2] == 0 and b[2] == 0 and c[2] == 0): print('Yes') elif(a[0] == 0 and b[1] == 0 and c[2] == 0): print('Yes') elif(a[2] == 0 and b[1] == 0 and c[0] == 0): print('Yes') else: print('No')
[ "literal.number.integer.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
546,884
546,885
u688281605
python
p02760
import sys a = [list(map(int, input().split())) for i in range(3)] n = int(input()) b = [int(input()) for i in range(n)] for i in range(3): ans = True for j in range(3): if a[i][j] not in b: ans = False if ans: print("Yes") sys.exit() for j in range(3): ans = True for i in range(3): if a[i][j] not in b: ans = False if ans: print("Yes") sys.exit() if all([a[0][2] in b, a[1][1] in b, a[2][2] in b]) or all([a[0][2] in b, a[1][1] in b, a[2][0] in b]): print("Yes") sys.exit() print("No")
import sys a = [list(map(int, input().split())) for i in range(3)] n = int(input()) b = [int(input()) for i in range(n)] for i in range(3): ans = True for j in range(3): if a[i][j] not in b: ans = False if ans: print("Yes") sys.exit() for j in range(3): ans = True for i in range(3): if a[i][j] not in b: ans = False if ans: print("Yes") sys.exit() if all([a[0][0] in b, a[1][1] in b, a[2][2] in b]) or all([a[0][2] in b, a[1][1] in b, a[2][0] in b]): print("Yes") sys.exit() print("No")
[ "literal.number.integer.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
546,888
546,889
u274758786
python
p02760
a = [list(map(int, input().split())) for _ in range(3)] n = int(input()) b = [int(input()) for _ in range(n)] for num in b: for x in range(3): for y in range(3): if a[x][y] == num: a[x][y] = 0 if sum(a[0]) == 0 or sum(a[1]) == 0 or sum(a[2]) == 0: print("Yes") elif sum([a[0][0],a[1][1],a[2][2]]) == 0 or sum([a[2][0],a[1][1],a[0][2]]): print("Yes") elif sum([a[0][0],a[1][0],a[2][0]]) == 0 or sum([a[0][1],a[1][1],a[2][1]]) == 0 or sum([a[0][2],a[1][2],a[2][2]]) == 0: print("Yes") else: print("No")
a = [list(map(int, input().split())) for _ in range(3)] n = int(input()) b = [int(input()) for _ in range(n)] for num in b: for x in range(3): for y in range(3): if a[x][y] == num: a[x][y] = 0 if sum(a[0]) == 0 or sum(a[1]) == 0 or sum(a[2]) == 0: print("Yes") elif sum([a[0][0],a[1][1],a[2][2]]) == 0 or sum([a[2][0],a[1][1],a[0][2]]) == 0: print("Yes") elif sum([a[0][0],a[1][0],a[2][0]]) == 0 or sum([a[0][1],a[1][1],a[2][1]]) == 0 or sum([a[0][2],a[1][2],a[2][2]]) == 0: print("Yes") else: print("No")
[ "control_flow.branch.if.condition.change" ]
546,898
546,899
u791110052
python
p02760
a = [list(map(int, input().split())) for _ in range(3)] n = int(input()) b = [int(input()) for _ in range(n)] for num in b: for x in range(3): for y in range(3): if a[x][y] == num: a[x][y] = 0 if sum(a[0]) == 0 or sum(a[1]) == 0 or sum(a[3]) == 0: print("Yes") elif sum([a[0][0],a[1][1],a[2][2]]) == 0 or sum([a[2][0],a[1][1],a[0][2]]): print("Yes") elif sum([a[0][0],a[1][0],a[2][0]]) == 0 or sum([a[0][1],a[1][1],a[2][1]]) == 0 or sum([a[0][2],a[1][2],a[2][2]]) == 0: print("Yes") else: print("No")
a = [list(map(int, input().split())) for _ in range(3)] n = int(input()) b = [int(input()) for _ in range(n)] for num in b: for x in range(3): for y in range(3): if a[x][y] == num: a[x][y] = 0 if sum(a[0]) == 0 or sum(a[1]) == 0 or sum(a[2]) == 0: print("Yes") elif sum([a[0][0],a[1][1],a[2][2]]) == 0 or sum([a[2][0],a[1][1],a[0][2]]) == 0: print("Yes") elif sum([a[0][0],a[1][0],a[2][0]]) == 0 or sum([a[0][1],a[1][1],a[2][1]]) == 0 or sum([a[0][2],a[1][2],a[2][2]]) == 0: print("Yes") else: print("No")
[ "literal.number.integer.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
546,900
546,899
u791110052
python
p02760
import numpy as np A = [] for _ in range(3): A.append([int(x) for x in input().split()]) A = np.array(A) R = np.zeros((3,3)) N = int(input()) B = [] for _ in range(N): b = int(input()) x, y = np.where(A == b) if len(x) > 0: for i in range(len(x)): R[x[i], y[i]] = 1 #列 row1 = (np.sum(R, axis=1) > 3).sum() row2 = (np.sum(R, axis=0) > 3).sum() c1 = R[0][0] + R[1][1] + R[2][2] c2 = R[0][2] + R[1][1] + R[2][0] if row1 > 0 or row2 > 0 or c1 >= 3 or c2 >= 3: print('Yes') else: print('No')
import numpy as np A = [] for _ in range(3): A.append([int(x) for x in input().split()]) A = np.array(A) R = np.zeros((3,3)) N = int(input()) B = [] for _ in range(N): b = int(input()) x, y = np.where(A == b) if len(x) > 0: for i in range(len(x)): R[x[i], y[i]] = 1 #列 row1 = (np.sum(R, axis=1) >= 3).sum() row2 = (np.sum(R, axis=0) >= 3).sum() c1 = R[0][0] + R[1][1] + R[2][2] c2 = R[0][2] + R[1][1] + R[2][0] if row1 > 0 or row2 > 0 or c1 >= 3 or c2 >= 3: print('Yes') else: print('No')
[ "expression.operator.compare.change", "assignment.value.change" ]
546,918
546,919
u871867619
python
p02760
import numpy as np A = [] for _ in range(3): A.append([int(x) for x in input().split()]) A = np.array(A) R = np.zeros((3,3)) N = int(input()) B = [] for _ in range(N): b = int(input()) x, y = np.where(A == b) if len(x) > 0: for i in range(len(x)): R[x[i], y[i]] = 1 #列 row1 = (np.sum(R, axis=1) > 3).sum() row2 = (np.sum(R, axis=0) > 3).sum() #斜め c1 = R[0][0] + R[1][1] + R[2][2] c2 = R[0][2] + R[1][1] + R[2][0] if row1 > 0 or row2 > 0 or c1 > 3 or c2 > 3: print('Yes') else: print('No')
import numpy as np A = [] for _ in range(3): A.append([int(x) for x in input().split()]) A = np.array(A) R = np.zeros((3,3)) N = int(input()) B = [] for _ in range(N): b = int(input()) x, y = np.where(A == b) if len(x) > 0: for i in range(len(x)): R[x[i], y[i]] = 1 #列 row1 = (np.sum(R, axis=1) >= 3).sum() row2 = (np.sum(R, axis=0) >= 3).sum() c1 = R[0][0] + R[1][1] + R[2][2] c2 = R[0][2] + R[1][1] + R[2][0] if row1 > 0 or row2 > 0 or c1 >= 3 or c2 >= 3: print('Yes') else: print('No')
[ "expression.operator.compare.change", "assignment.value.change", "control_flow.branch.if.condition.change" ]
546,920
546,919
u871867619
python
p02760
def resolve(): A = [] ans = "No" for i in range(3): A.append(list(map(int, input().split()))) n = int(input()) b = 0 for j in range(n): b = int(input()) for p in range(3): for q in range(3): if A[p][q] == b: A[p][q] = 0 for g in range(3): if A[g][g]+A[g][1]+A[g][2] == 0 or A[0][g]+A[1][g]+A[2][g] == 0 or A[0][0]+A[1][1]+A[2][2] == 0 or A[0][2]+A[1][1]+A[2][0] == 0: ans ="Yes" print(ans) resolve()
def resolve(): A = [] ans = "No" for i in range(3): A.append(list(map(int, input().split()))) n = int(input()) b = 0 for j in range(n): b = int(input()) for p in range(3): for q in range(3): if A[p][q] == b: A[p][q] = 0 for g in range(3): if A[g][0]+A[g][1]+A[g][2] == 0 or A[0][g]+A[1][g]+A[2][g] == 0 or A[0][0]+A[1][1]+A[2][2] == 0 or A[0][2]+A[1][1]+A[2][0] == 0: ans ="Yes" print(ans) resolve()
[ "identifier.replace.remove", "literal.replace.add", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
546,930
546,931
u600261652
python
p02760
def IsBingo(arr_9): BINGO=['x','x','x'] C1=arr_9[0::2] C2=arr_9[1::2] C3=arr_9[2::2] X1=[arr_9[0],arr_9[4],arr_9[8]] X2=[arr_9[2],arr_9[4],arr_9[6]] if arr_9[:3]==BINGO or arr_9[3:6]==BINGO or arr_9[6:]==BINGO or C1==BINGO or C2==BINGO or C3==BINGO or X1==BINGO or X2==BINGO: return 'BINGO' A1=list(input().split()) A2=list(input().split()) A3=list(input().split()) A=A1+A2+A3 N=int(input()) for _ in range(N): n=input() if A.count(n)==1: A[A.index(n)]="x" # A1=A[:3] # A2=A[3:6] # A3=A[6:] # print(A1,A2,A3) if IsBingo(A)=='BINGO': print('Yes') else: print('No')
def IsBingo(arr_9): BINGO=['x','x','x'] C1=arr_9[0::3] C2=arr_9[1::3] C3=arr_9[2::3] X1=[arr_9[0],arr_9[4],arr_9[8]] X2=[arr_9[2],arr_9[4],arr_9[6]] if arr_9[:3]==BINGO or arr_9[3:6]==BINGO or arr_9[6:]==BINGO or C1==BINGO or C2==BINGO or C3==BINGO or X1==BINGO or X2==BINGO: return 'BINGO' A1=list(input().split()) A2=list(input().split()) A3=list(input().split()) A=A1+A2+A3 N=int(input()) for _ in range(N): n=input() if A.count(n)==1: A[A.index(n)]="x" # A1=A[:3] # A2=A[3:6] # A3=A[6:] # print(A1,A2,A3) if IsBingo(A)=='BINGO': print('Yes') else: print('No')
[ "literal.number.integer.change", "assignment.value.change", "variable_access.subscript.index.change" ]
546,939
546,940
u674588203
python
p02760
import itertools A = list(itertools.chain.from_iterable([list(map(int, input().split())) for _ in range(3)])) bingo = [0 for _ in range(9)] N = int(input()) for i in range(N): b = int(input()) for j in range(9): if b == A[j]: bingo[j] = 1 f = 0 for i in range(3): if sum(bingo[i:i+3]) == 3: f = 1 break if sum(bingo[i::3]) == 3: f = 1 break if sum(bingo[0::4]) == 3: f = 1 if sum(bingo[2:7:2]) == 3: f = 1 if f: print("Yes") else: print("No") ''' 1 2 3 4 5 6 7 8 9 3 1 4 7 '''
import itertools A = list(itertools.chain.from_iterable([list(map(int, input().split())) for _ in range(3)])) bingo = [0 for _ in range(10)] N = int(input()) for i in range(N): b = int(input()) for j in range(9): if b == A[j]: bingo[j] = 1 f = 0 for i in range(3): if sum(bingo[i*3:i*3+3]) == 3: f = 1 break if sum(bingo[i::3]) == 3: f = 1 break if sum(bingo[0::4]) == 3: f = 1 if sum(bingo[2:7:2]) == 3: f = 1 if f: print("Yes") else: print("No") ''' 1 2 3 4 5 6 7 8 9 3 1 4 7 '''
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
546,953
546,954
u830054172
python
p02760
import sys def input(): return sys.stdin.readline().strip() def main(): a = [[0]*3 for i in range(3)] for i in range(3): a[i] = list(map(int, input().split())) n = int(input()) b = [0]*n bingo = "No" for i in range(n): b[i] = int(input()) for k in range(3): if a[k][0] == b[i]: a[k][0] = 0 if a[k][1] == b[i]: a[k][1] = 0 if a[k][2] == b[i]: a[k][2] = 0 for i in range(3): if a[i][0]+a[i][1]+a[i][2] == 0: bingo = "Yes" for i in range(3): if a[0][i]+a[1][i]+a[2][i] == 0: bingo = "Yes" if a[0][0]+a[1][1]+a[2][2] == 0: bingo = "Yes" if a[2][0]+a[1][1]+a[0][2] == 0: bingo = "Yes" print(bingo)
import sys def input(): return sys.stdin.readline().strip() a = [[0]*3 for i in range(3)] for i in range(3): a[i] = list(map(int, input().split())) n = int(input()) b = [0]*n bingo = "No" for i in range(n): b[i] = int(input()) for k in range(3): if a[k][0] == b[i]: a[k][0] = 0 if a[k][1] == b[i]: a[k][1] = 0 if a[k][2] == b[i]: a[k][2] = 0 for i in range(3): if a[i][0]+a[i][1]+a[i][2] == 0: bingo = "Yes" for i in range(3): if a[0][i]+a[1][i]+a[2][i] == 0: bingo = "Yes" if a[0][0]+a[1][1]+a[2][2] == 0: bingo = "Yes" if a[2][0]+a[1][1]+a[0][2] == 0: bingo = "Yes" print(bingo)
[]
546,959
546,960
u946346344
python
p02760
import sys def input(): return sys.stdin.readline().strip() def main(): a = [[0]*3 for i in range(3)] for i in range(3): a[i] = list(map(int, input().split())) n = int(input()) b = [0]*n bingo = "No" for i in range(n): b[i] = int(input()) for k in range(3): if a[k][0] == b[i]: a[k][0] = 0 if a[k][1] == b[i]: a[k][1] = 0 if a[k][2] == b[i]: a[k][2] = 0 for i in range(3): if a[i][0]+a[i][1]+a[i][2] == 0: bingo = "Yes" for i in range(3): if a[0][i]+a[1][i]+a[2][i] == 0: bingo = "Yes" if a[0][0]+a[1][1]+a[2][2] == 0: bingo = "Yes" if a[2][0]+a[1][1]+a[0][2] == 0: bingo = "Yes" print(bingo)
import sys def input(): return sys.stdin.readline().strip() def main(): a = [[0]*3 for i in range(3)] for i in range(3): a[i] = list(map(int, input().split())) n = int(input()) b = [0]*n bingo = "No" for i in range(n): b[i] = int(input()) for k in range(3): if a[k][0] == b[i]: a[k][0] = 0 if a[k][1] == b[i]: a[k][1] = 0 if a[k][2] == b[i]: a[k][2] = 0 for i in range(3): if a[i][0]+a[i][1]+a[i][2] == 0: bingo = "Yes" for i in range(3): if a[0][i]+a[1][i]+a[2][i] == 0: bingo = "Yes" if a[0][0]+a[1][1]+a[2][2] == 0: bingo = "Yes" if a[2][0]+a[1][1]+a[0][2] == 0: bingo = "Yes" print(bingo) main()
[ "call.add" ]
546,959
546,961
u946346344
python
p02760
A = [] ans = 'No' for i in range(3): A.append(list(map(int,input().split()))) n = int(input()) b = 0 for i in range(n): b = int(input()) for j in range(3): for k in range(3): if A[j][k] == b: A[j][k] = 0 for i in range(3): if A[i][0]+A[i][1]+A[i][2] == 0 or A[0][i]+A[1][i]+A[2][i] == 0 or A[0][0]+A[1][1]+A[2][2] == 0 or A[2][2]+A[1][1]+ A[0][0] == 0: ans ='Yes' print(ans)
A = [] ans = 'No' for i in range(3): A.append(list(map(int,input().split()))) n = int(input()) b = 0 for i in range(n): b = int(input()) for j in range(3): for k in range(3): if A[j][k] == b: A[j][k] = 0 for i in range(3): if A[i][0]+A[i][1]+A[i][2] == 0 or A[0][i]+A[1][i]+A[2][i] == 0 or A[0][0]+A[1][1]+A[2][2] == 0 or A[0][2]+A[1][1]+A[2][0] == 0: ans ='Yes' print(ans)
[ "literal.number.integer.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
546,962
546,963
u751077930
python
p02760
a = [[0]*3]*3 for i in range(3): a[i] = list(map(int,input().split())) def isInList(b,a): for i in range(len(a)): for j in range(len(a[i])): if a[i][j] == b: return i,j return 0,0 N = int(input()) for i in range(N): b = int(input()) I,J = isInList(b,a) if I != 0: a[I][J] = -1 def judge(a): for i in range(3): if a[i][0] == -1 and a[i][1] == -1 and a[i][2] == -1: return True for i in range(3): if a[0][i] == -1 and a[1][i] == -1 and a[2][i] == -1: return True tmp = [a[i][i] for i in range(3)] if tmp == [-1,-1,-1]: return True tmp = [a[i][2-i] for i in range(3)] if tmp == [-1,-1,-1]: return True return False ans = "Yes" if judge(a) else "No" print(ans)
a = [[0]*3]*3 for i in range(3): a[i] = list(map(int,input().split())) def isInList(b,a): for i in range(len(a)): for j in range(len(a[i])): if a[i][j] == b: return i,j return -1,-1 N = int(input()) for i in range(N): b = int(input()) I,J = isInList(b,a) if I != -1: a[I][J] = -1 def judge(a): for i in range(3): if a[i][0] == -1 and a[i][1] == -1 and a[i][2] == -1: return True for i in range(3): if a[0][i] == -1 and a[1][i] == -1 and a[2][i] == -1: return True tmp = [a[i][i] for i in range(3)] if tmp == [-1,-1,-1]: return True tmp = [a[i][2-i] for i in range(3)] if tmp == [-1,-1,-1]: return True return False ans = "Yes" if judge(a) else "No" print(ans)
[ "function.return_value.change", "expression.operation.unary.add", "control_flow.branch.if.condition.change" ]
546,966
546,967
u425762225
python
p02760
bingo = [] a = list(map(int,input().split())) b = list(map(int,input().split())) c = list(map(int,input().split())) N = int(input()) for i in range(N): n = int(input()) if n in a: a[a.index(n)] = 0 elif n in b: b[b.index(n)] = 0 elif n in c: c[c.index(n)] = 0 if sum(a) == 0 or sum(b) == 0 or sum(c) == 0 or a[0]+ b[1] + c[2] == 0 or a[2] + b[1] + c[0] == 0 : print("Yes") elif a[0] + b[0]+ c[0] ==0 or a[1] + b[1]+ c[1] or a[2] + b[2]+ c[2] : print("Yes") else:print("No")
bingo = [] a = list(map(int,input().split())) b = list(map(int,input().split())) c = list(map(int,input().split())) N = int(input()) for i in range(N): n = int(input()) if n in a: a[a.index(n)] = 0 elif n in b: b[b.index(n)] = 0 elif n in c: c[c.index(n)] = 0 if sum(a) == 0 or sum(b) == 0 or sum(c) == 0 or a[0]+ b[1] + c[2] == 0 or a[2] + b[1] + c[0] == 0 : print("Yes") elif a[0] + b[0]+ c[0] ==0 or a[1] + b[1]+ c[1] == 0 or a[2] + b[2]+ c[2] == 0 : print("Yes") else:print("No")
[ "control_flow.branch.if.condition.change" ]
546,968
546,969
u767821815
python
p02760
A = [list(map(int, input().split())) for _ in range(3)] N = int(input()) b_i = list([int(input()) for _ in range(N)]) ans = "No" for bi in b_i: for i in range(3): for j in range(3): if A[i][j] == bi: A[i][j] = "hole" for i in range(3): if A[i][0] == "hole": if A[i][1] == "hole" and A[i][1] == "hole": ans = "Yes" for i in range(3): if A[0][i] == "hole": if A[1][i] == "hole" and A[2][i] == "hole": ans = "Yes" if A[0][0] == "hole" and A[1][1] == "hole" and A[2][2] == "hole": ans = "Yes" if A[0][2] == "hole" and A[1][1] == "hole" and A[2][0] == "hole": ans = "Yes" print(ans)
A = [list(map(int, input().split())) for _ in range(3)] N = int(input()) b_i = list([int(input()) for _ in range(N)]) ans = "No" for bi in b_i: for i in range(3): for j in range(3): if A[i][j] == bi: A[i][j] = "hole" # 横 for i in range(3): if A[i][0] == "hole": if A[i][1] == "hole" and A[i][2] == "hole": ans = "Yes" # 縦 for i in range(3): if A[0][i] == "hole": if A[1][i] == "hole" and A[2][i] == "hole": ans = "Yes" if A[0][0] == "hole" and A[1][1] == "hole" and A[2][2] == "hole": ans = "Yes" if A[0][2] == "hole" and A[1][1] == "hole" and A[2][0] == "hole": ans = "Yes" print(ans)
[ "literal.number.integer.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
546,970
546,971
u220394041
python
p02760
al = [] ans = 'No' for i in range(3): al.append(list(map(int, input().split()))) n = int(input()) bl = [int(input()) for i in range(n)] for i in bl: for a in al: if i in a: a[a.index(i)]=0 t1 = al[0][0]+al[1][1]+al[2][2] t2 = al[0][2]+al[1][1]+al[2][0] if t1 ==0 or t2==0: ans = 'Yes' else: for a in al: if sum(a)==0: ans = 'Yes' break else: for va in zip(*al): if sum(va)==0: ans = 'Yes' break print('Yes')
al = [] ans = 'No' for i in range(3): al.append(list(map(int, input().split()))) n = int(input()) bl = [int(input()) for i in range(n)] for i in bl: for a in al: if i in a: a[a.index(i)]=0 t1 = al[0][0]+al[1][1]+al[2][2] t2 = al[0][2]+al[1][1]+al[2][0] if t1 ==0 or t2==0: ans = 'Yes' else: for a in al: if sum(a)==0: ans = 'Yes' break else: for va in zip(*al): if sum(va)==0: ans = 'Yes' break print(ans)
[ "call.arguments.change", "io.output.change" ]
546,972
546,973
u810288681
python
p02760
import itertools def judge(): for i in range(3): if A[i*3 + 0] + A[i*3 + 1] + A[i*3 + 2] == 0 or A[0 + i] + A[1 + i] + A[2 + i] == 0: return True if A[0*3 + 0] + A[1*3 + 1] + A[2*3 + 2] == 0 or A[2*3 + 0] + A[1*3 + 1] + A[0*3 + 2] == 0: return True return False A_2d=[list(map(int,list(input().split()))) for i in range(3)] A=list(itertools.chain.from_iterable(A_2d)) # A_1d N = int(input()) for _ in range(N): b = int(input()) A = [0 if i == b else i for i in A] if judge(): print("Yes") else: print("No")
import itertools def judge(): for i in range(3): if A[i*3 + 0] + A[i*3 + 1] + A[i*3 + 2] == 0 or A[0*3 + i] + A[1*3 + i] + A[2*3 + i] == 0: return True if A[0*3 + 0] + A[1*3 + 1] + A[2*3 + 2] == 0 or A[2*3 + 0] + A[1*3 + 1] + A[0*3 + 2] == 0: return True return False A_2d=[list(map(int,list(input().split()))) for i in range(3)] A=list(itertools.chain.from_iterable(A_2d)) # A_1d N = int(input()) for _ in range(N): b = int(input()) A = [0 if i == b else i for i in A] if judge(): print("Yes") else: print("No")
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
546,978
546,979
u555688810
python
p02760
card = [list(map(int,input().split())) for i in range(3)] n = int(input()) for i in range(n): num = int(input()) for i in range(3): for j in range(3): if card[i][j] == num: card[i][j] = 0 print(card) for i in range(3): if (card[0][i] == 0 and card[1][i] == 0 and card[2][i] == 0) or\ (card[i][0] == 0 and card[i][1] == 0 and card[i][2] == 0): print("Yes") exit() if (card[0][0] == 0 and card[1][1] == 0 and card[2][2] == 0) or\ (card[0][2] == 0 and card[1][1] == 0 and card[2][0] == 0): print("Yes") exit() print("No")
card = [list(map(int,input().split())) for i in range(3)] n = int(input()) for i in range(n): num = int(input()) for i in range(3): for j in range(3): if card[i][j] == num: card[i][j] = 0 for i in range(3): if (card[0][i] == 0 and card[1][i] == 0 and card[2][i] == 0) or\ (card[i][0] == 0 and card[i][1] == 0 and card[i][2] == 0): print("Yes") exit() if (card[0][0] == 0 and card[1][1] == 0 and card[2][2] == 0) or\ (card[0][2] == 0 and card[1][1] == 0 and card[2][0] == 0): print("Yes") exit() print("No")
[ "call.remove" ]
546,983
546,984
u135346354
python
p02760
card = [0]*3 for i in range(3): a = input().split() card[i] = [int(s) for s in a] for i in range(int(input())): b = int(input()) for j in range(3): for k in range(3): if b == card[j][k]: card[j][k] = 0 if (card[0][0] == 0 and card[1][0] == 0 and card[2][0] == 0) or (card[0][1] == 0 and card[1][1] == 0 and card[2][1] == 0) or (card[0][2] == 0 and card[1][2] == 0 and card[2][2] == 0) or(card[0][0] == 0 and card[0][1] == 0 and card[0][2] == 0) or (card[1][0] == 0 and card[1][1] == 0 and card[1][2] == 0) or (card[2][0] == 0 and card[2][1] == 0 and card[2][2] == 0) or (card[0][0] == 0 and card[1][1] == 0 and card[2][2] == 0) or (card[0][2] == 0 and card[1][1] == 0 and card[2][0] == 0): print("Yes") else: ("No")
card = [0]*3 for i in range(3): a = input().split() card[i] = [int(s) for s in a] for i in range(int(input())): b = int(input()) for j in range(3): for k in range(3): if b == card[j][k]: card[j][k] = 0 if (card[0][0] == 0 and card[1][0] == 0 and card[2][0] == 0) or (card[0][1] == 0 and card[1][1] == 0 and card[2][1] == 0) or (card[0][2] == 0 and card[1][2] == 0 and card[2][2] == 0) or(card[0][0] == 0 and card[0][1] == 0 and card[0][2] == 0) or (card[1][0] == 0 and card[1][1] == 0 and card[1][2] == 0) or (card[2][0] == 0 and card[2][1] == 0 and card[2][2] == 0) or (card[0][0] == 0 and card[1][1] == 0 and card[2][2] == 0) or (card[0][2] == 0 and card[1][1] == 0 and card[2][0] == 0): print("Yes") else: print("No")
[ "io.output.change", "call.add" ]
546,985
546,986
u209275335
python
p02760
a = [list(int(i) for i in input().split()) for i in range(3)] f = [[0 for i in range(3)] for i in range(3)] n = int(input()) b = [] flag = False for i in range(n): b.append(int(input())) for i in b: for j in range(3): for k in range(3): if i == a[j][k]: f[j][k] = 1 if sum(f[0]) == 3 or sum(f[1]) == 3 or sum(f[2]) == 3: flag = True for i in range(3): tmp = [] for j in range(3): tmp.append(f[j][i]) if sum(tmp) == 3: flag == True if f[0][0] == 1 and f[1][1] == 1 and f[2][2] == 1: flag = True if f[0][2] == 1 and f[1][1] == 1 and f[2][0] == 1: flag = True if flag == True: print("Yes") else: print("No")
a = [list(int(i) for i in input().split()) for i in range(3)] f = [[0 for i in range(3)] for i in range(3)] n = int(input()) b = [] flag = False for i in range(n): b.append(int(input())) for i in b: for j in range(3): for k in range(3): if i == a[j][k]: f[j][k] = 1 if sum(f[0]) == 3 or sum(f[1]) == 3 or sum(f[2]) == 3: flag = True for i in range(3): tmp = [] for j in range(3): tmp.append(f[j][i]) if sum(tmp) == 3: flag = True if f[0][0] == 1 and f[1][1] == 1 and f[2][2] == 1: flag = True if f[0][2] == 1 and f[1][1] == 1 and f[2][0] == 1: flag = True if flag == True: print("Yes") else: print("No")
[ "expression.operation.compare.replace.remove", "assignment.replace.add", "misc.typo" ]
546,993
546,994
u821989875
python
p02760
a,b,c=map(int,input().split()) d,e,f=map(int,input().split()) g,h,i=map(int,inout().split()) N=int(input()) L=[int(input()) for i in range(N)] if a in L and b in L and c in L: print('Yes') elif d in L and e in L and f in L: print('Yes') elif g in L and h in L and i in L: print('Yes') elif a in L and d in L and g in L: print('Yes') elif b in L and e in L and h in L: print('Yes') elif c in L and f in L and i in L: print('Yes') elif a in L and e in L and i in L: print('Yes') elif c in L and e in L and g in L: print('Yes') else: print('No')
a,b,c=map(int,input().split()) d,e,f=map(int,input().split()) g,h,i=map(int,input().split()) N=int(input()) L=[int(input()) for i in range(N)] if a in L and b in L and c in L: print('Yes') elif d in L and e in L and f in L: print('Yes') elif g in L and h in L and i in L: print('Yes') elif a in L and d in L and g in L: print('Yes') elif b in L and e in L and h in L: print('Yes') elif c in L and f in L and i in L: print('Yes') elif a in L and e in L and i in L: print('Yes') elif c in L and e in L and g in L: print('Yes') else: print('No')
[ "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.change" ]
546,999
547,000
u830162518
python
p02760
a = [list(map(int, input().split())) for _ in range(3)] n = int(input9()) r = [] for _ in range(3): b = int(input()) for i in range(3): for j in range(3): if a[i][j] == b: a[i][j] = 0 ans = 'No' for i in range(3): if a[i][0] + a[i][1] + a[i][2] == 0: ans = 'Yes' if a[0][i] + a[1][i] + a[2][i] == 0: ans = 'Yes' if a[0][0] + a[1][1] + a[2][2] == 0: ans = 'Yes' if a[0][2] + a[1][1] + a[2][0] == 0: ans = 'Yes' print(ans)
a = [list(map(int, input().split())) for _ in range(3)] n = int(input()) for _ in range(n): b = int(input()) for i in range(3): for j in range(3): if a[i][j] == b: a[i][j] = 0 ans = 'No' for i in range(3): if a[i][0] + a[i][1] + a[i][2] == 0: ans = 'Yes' if a[0][i] + a[1][i] + a[2][i] == 0: ans = 'Yes' if a[0][0] + a[1][1] + a[2][2] == 0: ans = 'Yes' if a[0][2] + a[1][1] + a[2][0] == 0: ans = 'Yes' print(ans)
[ "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.change", "identifier.replace.add", "literal.replace.remove", "control_flow.loop.range.bounds.upper.change" ]
547,001
547,002
u830881690
python
p02760
def solve(): A = [list(map(int, input().split())) for _ in range(3)] N = int(input()) for _ in range(N): b = int(input()) for i in range(3): for j in range(3): if A[i][j] == b: A[i][j] = -1 for i in range(3): if A[i][0] == -1 and A[i][1] == -1 and A[i][2] == -1: return "Yes" for j in range(3): if A[0][j] == -1 and A[0][j] == -1 and A[0][j] == -1: return "Yes" if A[0][0] == -1 and A[1][1] == -1 and A[2][2] == -1: return "Yes" if A[0][2] == -1 and A[1][1] == -1 and A[2][0] == -1: return "Yes" return "No" print(solve())
def solve(): A = [list(map(int, input().split())) for _ in range(3)] N = int(input()) for _ in range(N): b = int(input()) for i in range(3): for j in range(3): if A[i][j] == b: A[i][j] = -1 for i in range(3): if A[i][0] == -1 and A[i][1] == -1 and A[i][2] == -1: return "Yes" for j in range(3): if A[0][j] == -1 and A[1][j] == -1 and A[2][j] == -1: return "Yes" if A[0][0] == -1 and A[1][1] == -1 and A[2][2] == -1: return "Yes" if A[0][2] == -1 and A[1][1] == -1 and A[2][0] == -1: return "Yes" return "No" print(solve())
[ "literal.number.integer.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
547,013
547,014
u491550356
python
p02760
def myAnswer(A:list,B:list,N:int) -> str: bingo=[[0,0,0] for i in range(3)] for b in B: for i,a in enumerate(A): if(b in a): bingo[i][a.index(b)] = 1 break tate=[0,0,0] for n,b in enumerate(bingo): if(sum(b) == 3): return "Yes" for i in range(3): tate[i] = b[i] if(3 in tate): return "Yes" if(bingo[1][1] == 1): if((bingo[0][0] == 1 and bingo[2][2] == 1) or (bingo[0][2]==1 and bingo[2][0]==1)): return "Yes" return "No" def modelAnswer(): tmp=1 def main(): A=[] B=[] for _ in range(3): A.append(list(map(int,input().split()))) N = int(input()) for _ in range(N): B.append(int(input())) print(myAnswer(A[:],B[:],N)) if __name__ == '__main__': main()
def myAnswer(A:list,B:list,N:int) -> str: bingo=[[0,0,0] for i in range(3)] for b in B: for i,a in enumerate(A): if(b in a): bingo[i][a.index(b)] = 1 break tate=[0,0,0] for n,b in enumerate(bingo): if(sum(b) == 3): return "Yes" for i in range(3): tate[i] += b[i] if(3 in tate): return "Yes" if(bingo[1][1] == 1): if((bingo[0][0] == 1 and bingo[2][2] == 1) or (bingo[0][2]==1 and bingo[2][0]==1)): return "Yes" return "No" def modelAnswer(): tmp=1 def main(): A=[] B=[] for _ in range(3): A.append(list(map(int,input().split()))) N = int(input()) for _ in range(N): B.append(int(input())) print(myAnswer(A[:],B[:],N)) if __name__ == '__main__': main()
[ "assignment.value.change" ]
547,015
547,016
u301624971
python
p02760
import numpy as np A1 = list(map(int, input().split())) A2 = list(map(int, input().split())) A3 = list(map(int, input().split())) N = int(input()) bs = [int(input()) for _ in range(N)] A = np.array([A1, A2, A3]) mask = np.zeros_like(A) for b in bs: mask += (A==b).astype(int) mask = mask>0 if np.any(np.all(mask, axis=0)): print('Yes') elif np.any(np.all(mask, axis=1)): print('Yes') elif np.all(np.diag(mask)): print('Yes') elif np.all(np.diag(mask.T)): print('Yes') else: print('No')
import numpy as np A1 = list(map(int, input().split())) A2 = list(map(int, input().split())) A3 = list(map(int, input().split())) N = int(input()) bs = [int(input()) for _ in range(N)] A = np.array([A1, A2, A3]) mask = np.zeros_like(A) for b in bs: mask += (A==b).astype(int) mask = mask>0 if np.any(np.all(mask, axis=0)): print('Yes') elif np.any(np.all(mask, axis=1)): print('Yes') elif np.all(np.diag(mask)): print('Yes') elif np.all(np.diag(mask[::-1])): print('Yes') else: print('No')
[ "control_flow.branch.if.condition.change" ]
547,025
547,026
u758411830
python
p02760
A = [[0 for _ in range(3)] for _ in range(3)] B = [[False for _ in range(3)] for _ in range(3)] b = [] for i in range(3): A[i][0],A[i][1],A[i][2] = map(int,input().split()) N = int(input()) for i in range(N): b.append(int(input())) for i in range(3): for j in range(3): for k in range(N): if b[k]==A[i][j]: B[i][j]=True judge = False count3=0 count4=0 for i in range(3): count1=0 count2=0 if B[i][i]==True: count3 += 1 if count3==3: judge=True break elif B[2-i][i]==True: count4 +=1 if count4==3: judge=True break for j in range(3): if B[i][j]==True: count1 += 1 if count1 == 3: judge = True break elif B[j][i]==True: count2 += 1 if count2 == 3: judge = True break if judge==True: print("Yes") else: print("No")
A = [[0 for _ in range(3)] for _ in range(3)] B = [[False for _ in range(3)] for _ in range(3)] b = [] for i in range(3): A[i][0],A[i][1],A[i][2] = map(int,input().split()) N = int(input()) for i in range(N): b.append(int(input())) for i in range(3): for j in range(3): for k in range(N): if b[k]==A[i][j]: B[i][j]=True judge = False count3=0 count4=0 for i in range(3): count1=0 count2=0 if B[i][i]==True: count3 += 1 if count3==3: judge=True break if B[2-i][i]==True: count4 +=1 if count4==3: judge=True break for j in range(3): if B[i][j]==True: count1 += 1 if count1 == 3: judge = True break if B[j][i]==True: count2 += 1 if count2 == 3: judge = True break if judge==True: print("Yes") else: print("No")
[ "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
547,032
547,033
u572343785
python
p02760
A = [[0 for _ in range(3)] for _ in range(3)] B = [[False for _ in range(3)] for _ in range(3)] b = [] for i in range(3): A[i][0],A[i][1],A[i][2] = map(int,input().split()) N = int(input()) for i in range(N): b.append(int(input())) for i in range(3): for j in range(3): for k in range(N): if b[k]==A[i][j]: B[i][j]=True judge = False count3=0 count4=0 for i in range(3): count1=0 count2=0 if B[i][i]==True: count3 += 1 if count3==3: judge=True elif B[2-i][i]==True: count4 +=1 if count4==3: judge=True for j in range(3): if B[i][j]==True: count1 += 1 if count1 == 3: judge = True break elif B[j][i]==True: count2 += 1 if count2 == 3: judge = True break if judge==True: print("Yes") else: print("No")
A = [[0 for _ in range(3)] for _ in range(3)] B = [[False for _ in range(3)] for _ in range(3)] b = [] for i in range(3): A[i][0],A[i][1],A[i][2] = map(int,input().split()) N = int(input()) for i in range(N): b.append(int(input())) for i in range(3): for j in range(3): for k in range(N): if b[k]==A[i][j]: B[i][j]=True judge = False count3=0 count4=0 for i in range(3): count1=0 count2=0 if B[i][i]==True: count3 += 1 if count3==3: judge=True break if B[2-i][i]==True: count4 +=1 if count4==3: judge=True break for j in range(3): if B[i][j]==True: count1 += 1 if count1 == 3: judge = True break if B[j][i]==True: count2 += 1 if count2 == 3: judge = True break if judge==True: print("Yes") else: print("No")
[ "control_flow.break.add", "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
547,034
547,033
u572343785
python
p02760
bingo = [list(map(int, input().split())) for _ in range(3)] N = int(input()) number = [int(input()) for _ in range(N)] check = [[0 for _ in range(3)] for _ in range(3)] for i in range(N): for j in range(3): for k in range(3): if bingo[j][k] == N[i]: check[j][k] = 1 ans = 'No' for i in range(3): if check[i][0] == 1 and check[i][1] == 1 and check[i][2] == 1: ans = 'Yes' for i in range(3): if check[0][i] == 1 and check[1][i] == 1 and check[2][i] == 1: ans = 'Yes' if check[0][0] == 1 and check[1][1] == 1 and check[2][2] == 1: ans = 'Yes' if check[0][2] == 1 and check[1][1] == 1 and check[2][0] == 1: ans = 'Yes' print(ans)
bingo = [list(map(int, input().split())) for _ in range(3)] N = int(input()) number = [int(input()) for _ in range(N)] check = [[0 for _ in range(3)] for _ in range(3)] for i in range(N): for j in range(3): for k in range(3): if bingo[j][k] == number[i]: check[j][k] = 1 ans = 'No' for i in range(3): if check[i][0] == 1 and check[i][1] == 1 and check[i][2] == 1: ans = 'Yes' for i in range(3): if check[0][i] == 1 and check[1][i] == 1 and check[2][i] == 1: ans = 'Yes' if check[0][0] == 1 and check[1][1] == 1 and check[2][2] == 1: ans = 'Yes' if check[0][2] == 1 and check[1][1] == 1 and check[2][0] == 1: ans = 'Yes' print(ans)
[ "identifier.change", "control_flow.branch.if.condition.change" ]
547,044
547,045
u411858517
python
p02760
a_1 = list(map(int,input().split(" "))) a_2 = list(map(int,input().split(" "))) a_3 = list(map(int,input().split(" "))) n = int(input()) open_number =[] for i in range(3): open_number.append([0,0,0]) for i in range(n): number = int(input()) for j in range(3): if number == a_1[j]: open_number[0][j] = 1 if number == a_2[j]: open_number[1][j] = 1 if number == a_3[j]: open_number[2][j] = 1 bingo = False line_1 = 0 line_2 = 0 line_3 = 0 cross_1 = 0 cross_2 = 0 for i in range(3): if not 0 in open_number[i]: bingo = True if open_number[0][i] == 1: line_1 += 1 if open_number[1][i] == 1: line_2 += 1 if open_number[2][i] == 1: line_3 += 1 if open_number[i][i] == 1: cross_1 += 1 if open_number[2-i][i] == 1: cross_2 += 1 if line_1 == 3: bingo = True if line_2 == 3: bingo = True if line_3 == 3: bingo = True if cross_1 == 3: bingo = True if cross_2 == 3: bingo = True if bingo: 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(" "))) n = int(input()) open_number =[] for i in range(3): open_number.append([0,0,0]) for i in range(n): number = int(input()) for j in range(3): if number == a_1[j]: open_number[0][j] = 1 if number == a_2[j]: open_number[1][j] = 1 if number == a_3[j]: open_number[2][j] = 1 bingo = False line_1 = 0 line_2 = 0 line_3 = 0 cross_1 = 0 cross_2 = 0 for i in range(3): if not 0 in open_number[i]: bingo = True if open_number[i][0] == 1: line_1 += 1 if open_number[i][1] == 1: line_2 += 1 if open_number[i][2] == 1: line_3 += 1 if open_number[i][i] == 1: cross_1 += 1 if open_number[2-i][i] == 1: cross_2 += 1 if line_1 == 3: bingo = True if line_2 == 3: bingo = True if line_3 == 3: bingo = True if cross_1 == 3: bingo = True if cross_2 == 3: bingo = True if bingo: print("Yes") else: print("No")
[ "identifier.replace.add", "literal.replace.remove", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change", "identifier.replace.remove", "literal.replace.add" ]
547,056
547,057
u505181116
python
p02760
import sys a = [] for _ in range(3): a.append(list(map(int,input().split()))) n = int(input()) a2 = [[0 for _ in range(3)]for _ in range(3)] for i in range(n): b = int(input()) for j in range(3): for k in range(3): if a[j][k] == b: a2[j][k] = 1 for i in range(3): if sum(a2[i]) == 3: print('Yes') sys.exit() tate = 0 for i in range(3): for j in range(3): if a2[i][j] == 1: tate += 1 if tate == 3: print('Yes') sys.exit() tate = 0 naname = 0 for i in range(3): if a2[i][i] == 1: naname += 1 if naname == 3: print('Yes') sys.exit() naname = 0 for i in range(3): if a2[i][-i-1] == 1: naname += 1 if naname == 3: print('Yes') sys.exit() print('No')
import sys a = [] for _ in range(3): a.append(list(map(int,input().split()))) n = int(input()) a2 = [[0 for _ in range(3)]for _ in range(3)] for i in range(n): b = int(input()) for j in range(3): for k in range(3): if a[j][k] == b: a2[j][k] = 1 for i in range(3): if sum(a2[i]) == 3: print('Yes') sys.exit() tate = 0 for i in range(3): for j in range(3): if a2[j][i] == 1: tate += 1 if tate == 3: print('Yes') sys.exit() tate = 0 naname = 0 for i in range(3): if a2[i][i] == 1: naname += 1 if naname == 3: print('Yes') sys.exit() naname = 0 for i in range(3): if a2[i][-i-1] == 1: naname += 1 if naname == 3: print('Yes') sys.exit() print('No')
[ "identifier.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
547,060
547,061
u773265208
python
p02760
mat = [] for _ in range(3): mat.append(list(map(int, input().split()))) N = int(input()) nums = set() for _ in range(N): nums.add(int(input())) rows = [3] * 3 cols = [3] * 3 diags = [3] * 2 for i in range(3): for j in range(3): if mat[i][j] in nums: rows[i] -= 1 cols[j] -= 1 if i == j: diags[0] -= 1 elif i == 2 - j: diags[1] -= 1 print(["No", "Yes"][0 in (rows + cols + diags)])
mat = [] for _ in range(3): mat.append(list(map(int, input().split()))) N = int(input()) nums = set() for _ in range(N): nums.add(int(input())) rows = [3] * 3 cols = [3] * 3 diags = [3] * 2 for i in range(3): for j in range(3): if mat[i][j] in nums: rows[i] -= 1 cols[j] -= 1 if i == j: diags[0] -= 1 if i + j == 2: diags[1] -= 1 print(["No", "Yes"][0 in (rows + cols + diags)])
[ "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
547,064
547,065
u794145298
python
p02760
a = [] for i in range(3): val = list(map(int, input().split())) a.append(val) n = int(input()) v = [] for j in range(n): v.append(int(input())) for k in v: for i in range(3): for j in range(3): if a[i][j] == k: a[i][j] = -1 bingo = False for i in range(3): if a[i][0] == -1 and a[i][0] == -1 and a[i][0] == -1: bingo = True if a[0][i] == -1 and a[0][i] == -1 and a[0][i] == -1: bingo = True if a[0][0] == -1 and a[1][1] == -1 and a[2][2] == -1: bingo = True elif a[0][2] == -1 and a[1][1] == -1 and a[2][0] == -1: bingo = True if bingo: print('Yes') else: print('No')
a = [] for i in range(3): val = list(map(int, input().split())) a.append(val) n = int(input()) v = [] for j in range(n): v.append(int(input())) for k in v: for i in range(3): for j in range(3): if a[i][j] == k: a[i][j] = -1 bingo = False for i in range(3): if a[i][0] == -1 and a[i][1] == -1 and a[i][2] == -1: bingo = True if a[0][i] == -1 and a[1][i] == -1 and a[2][i] == -1: bingo = True if a[0][0] == -1 and a[1][1] == -1 and a[2][2] == -1: bingo = True elif a[0][2] == -1 and a[1][1] == -1 and a[2][0] == -1: bingo = True if bingo: print('Yes') else: print('No')
[ "literal.number.integer.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
547,073
547,074
u501163846
python
p02760
A = [list(map(int,input().split())) for i in range(3)] N = int(input()) b = [int(input()) for i in range(N)] for i in b: for j in range(3): if i in A[j]: A[j][A[j].index(i)] = 0 else: for i in range(3): if (A[0][j] + A[1][j] + A[2][j] == 0) or (A[j][0] + A[j][1] + A[j][2] == 0): print('Yes') break else: if (A[0][0] + A[1][1] + A[2][2] == 0) or (A[0][2] + A[1][1] + A[2][0] == 0): print('Yes') else: print('No')
A = [list(map(int,input().split())) for i in range(3)] N = int(input()) b = [int(input()) for i in range(N)] for i in b: for j in range(3): if i in A[j]: A[j][A[j].index(i)] = 0 else: for i in range(3): if (A[0][i] + A[1][i] + A[2][i] == 0) or (A[i][0] + A[i][1] + A[i][2] == 0): print('Yes') break else: if (A[0][0] + A[1][1] + A[2][2] == 0) or (A[0][2] + A[1][1] + A[2][0] == 0): print('Yes') else: print('No')
[ "identifier.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
547,078
547,079
u874333466
python
p02760
import sys bingo = [[int(c) for c in input().split()] for _ in range(3)] n = int(input()) a = [int(input()) for _ in range(n)] ans = [[0,0,0],[0,0,0],[0,0,0]] num =0 for i in range(n): for j in range(3): for k in range(3): if a[i] == bingo[j][k]: ans[j][k] = 1 num += 1 if num < 3: print("No") exit() if ans[1][1] == 1: if (ans[0][0] == 1 and ans[2][2]==1) or ( ans[0][2] == 1 and ans[2][0] == 1): print("Yes") exit() for i in range(3): if ans[i][0] == 1 and ans[i][1] == 1 and ans[i][2] == 1: print("Yes") exit() elif ans[0][i] == 1 and ans[1][i] == 1 and ans[2][i] == 1: print("Yes") exit() else: print("No") exit()
import sys bingo = [[int(c) for c in input().split()] for _ in range(3)] n = int(input()) a = [int(input()) for _ in range(n)] ans = [[0,0,0],[0,0,0],[0,0,0]] num =0 for i in range(n): for j in range(3): for k in range(3): if a[i] == bingo[j][k]: ans[j][k] = 1 num += 1 if num < 3: print("No") exit() if ans[1][1] == 1: if (ans[0][0] == 1 and ans[2][2]==1) or ( ans[0][2] == 1 and ans[2][0] == 1): print("Yes") exit() for i in range(3): if ans[i][0] == 1 and ans[i][1] == 1 and ans[i][2] == 1: print("Yes") exit() elif ans[0][i] == 1 and ans[1][i] == 1 and ans[2][i] == 1: print("Yes") exit() print("No")
[ "call.remove" ]
547,080
547,081
u312158169
python
p02760
a1= list(map(int,input().solit())) a2= list(map(int,input().solit())) a3= list(map(int,input().solit())) a = a1 + a2 + a3 n = int(input()) #bがaにあるか確認して0へ for _ in range(n): b = int(input()) if b in a: a[a.index(b)]=0 check = 0 for i in range(3): #縦横のbingo検索 if (a[3*i]==a[3*i+1] and a[3*i+1]==a[3*i+2]) or (a[i]==a[i+3] and a[i+3]==a[i+6]): check+=1 #ななめ if (a[0]==a[4] and a[4]==a[8]) or (a[2]==a[4] and a[4]==a[6]): check+=1 if check>0: print("Yes") else: print("No")
a1= list(map(int,input().split())) a2= list(map(int,input().split())) a3= list(map(int,input().split())) a = a1 + a2 + a3 n = int(input()) #bがaにあるか確認して0へ for _ in range(n): b = int(input()) if b in a: a[a.index(b)]=0 check = 0 for i in range(3): #縦横のbingo検索 if (a[3*i]==a[3*i+1] and a[3*i+1]==a[3*i+2]) or (a[i]==a[i+3] and a[i+3]==a[i+6]): check+=1 #ななめ if (a[0]==a[4] and a[4]==a[8]) or (a[2]==a[4] and a[4]==a[6]): check+=1 if check>0: print("Yes") else: print("No")
[ "assignment.value.change", "identifier.change", "call.arguments.change" ]
547,082
547,083
u798260206
python
p02760
A1 = list(map(int,input().split())) A2 = list(map(int,input().split())) A3 = list(map(int,input().split())) N = int(input()) listb = [input() for i in range(N)] for item in listb: for i in range(3): if A1[i] == item: A1[i] = 0 for j in range(3): if A2[j] == item: A2[j] = 0 for k in range(3): if A3[k] == item: A3[k] = 0 if sum(A1) == 0 or sum(A2) == 0 or sum(A3) == 0: print('Yes') exit() for i in range(3): if A1[i] == A2[i] and A2[i] == A3[i]: print('Yes') exit() if A1[0] == A2[1] == A3[2] or A1[2] == A2[1] == A3[0]: print('Yes') exit() print('No')
A1 = list(map(int,input().split())) A2 = list(map(int,input().split())) A3 = list(map(int,input().split())) N = int(input()) listb = [int(input()) for i in range(N)] for item in listb: for i in range(3): if A1[i] == item: A1[i] = 0 for j in range(3): if A2[j] == item: A2[j] = 0 for k in range(3): if A3[k] == item: A3[k] = 0 if sum(A1) == 0 or sum(A2) == 0 or sum(A3) == 0: print('Yes') exit() for i in range(3): if A1[i] == A2[i] and A2[i] == A3[i]: print('Yes') exit() if A1[0] == A2[1] == A3[2] or A1[2] == A2[1] == A3[0]: print('Yes') exit() print('No')
[ "call.add", "call.arguments.change" ]
547,098
547,099
u254221913
python
p02760
a = [list(map(int, input().split())) for _ in range(3)] n = int(input()) b = [int(input()) for _ in range(n)] for i in range(3): for j in range(3): for k in range(n): if a[i][j] == b[k]: a[i][j] = 0 ans = "No" for i in range(3): if a[i][0] + a[i][1] + a[i][2] == 0: ans = "Yes" if a[0][i] + a[1][i] + a[2][i] == 0: ans = "Yes" if a[0][0] == a[1][1] == a[2][2] == 0 or a[0][2] == a[1][1] == a[2][0] == 0: print("Yes") print(ans)
a = [list(map(int, input().split())) for _ in range(3)] n = int(input()) b = [int(input()) for _ in range(n)] for i in range(3): for j in range(3): for k in range(n): if a[i][j] == b[k]: a[i][j] = 0 ans = "No" for i in range(3): if a[i][0] + a[i][1] + a[i][2] == 0: ans = "Yes" if a[0][i] + a[1][i] + a[2][i] == 0: ans = "Yes" if a[0][0] == a[1][1] == a[2][2] == 0 or a[0][2] == a[1][1] == a[2][0] == 0: ans = "Yes" print(ans)
[ "call.arguments.change" ]
547,102
547,101
u624613992
python
p02760
a = [list(map(int, input().split())) for i in range(3)] n = int(input()) b = [int(input()) for i in range(n)] for i in range(3): for j in range(3): for k in b: if a[j][i] == k: a[j][i] = 'o' a1 = list(set(a[0])) a2 = list(set(a[1])) a3 = list(set(a[2])) a4 = list(set((a[0][0],a[1][1],a[2][2]))) a5 = list(set((a[0][2],a[1][1],a[2][0]))) a6 = list(set((a[0][0],a[1][0],a[2][0]))) a7 = list(set((a[0][1],a[1][1],a[2][1]))) a8 = list(set((a[0][2],a[1][2],a[2][2]))) p = ['o'] A = [a1,a2,a3,a4,a5,a6,a7,a8] for i in A: ans = 'No' if i == p: ans = 'Yes' break print(ans) print(A)
a = [list(map(int, input().split())) for i in range(3)] n = int(input()) b = [int(input()) for i in range(n)] for i in range(3): for j in range(3): for k in b: if a[j][i] == k: a[j][i] = 'o' a1 = list(set(a[0])) a2 = list(set(a[1])) a3 = list(set(a[2])) a4 = list(set((a[0][0],a[1][1],a[2][2]))) a5 = list(set((a[0][2],a[1][1],a[2][0]))) a6 = list(set((a[0][0],a[1][0],a[2][0]))) a7 = list(set((a[0][1],a[1][1],a[2][1]))) a8 = list(set((a[0][2],a[1][2],a[2][2]))) p = ['o'] A = [a1,a2,a3,a4,a5,a6,a7,a8] for i in A: ans = 'No' if i == p: ans = 'Yes' break print(ans)
[ "call.remove" ]
547,118
547,119
u548093253
python
p02760
A = [list(map(int, input().split())) for i in range(3)] N = int(input()) B = [int(input()) for i in range(N)] for i in range(3): for j in range(3): for k in(B): if A[j][i] == k: A[i][j] = 1 break elif k == B[-1]: A[i][j] = 0 if sum(A[0]) == 3 or sum(A[1]) == 3 or sum(A[2]) == 3: print('Yes') elif sum([row[0] for row in A]) == 3 or sum([row[1] for row in A]) == 3 or sum([row[2] for row in A]) == 3: print('Yes') elif A[0][0] + A[1][1] + A[2][2] == 3 or A[2][0] + A[1][1] + A[0][2] == 3: print('Yes') else: print('No')
A = [list(map(int, input().split())) for i in range(3)] N = int(input()) B = [int(input()) for i in range(N)] for i in range(3): for j in range(3): for k in(B): if A[j][i] == k: A[j][i] = 1 break elif k == B[-1]: A[j][i] = 0 if sum(A[0]) == 3 or sum(A[1]) == 3 or sum(A[2]) == 3: print('Yes') elif sum([row[0] for row in A]) == 3 or sum([row[1] for row in A]) == 3 or sum([row[2] for row in A]) == 3: print('Yes') elif A[0][0] + A[1][1] + A[2][2] == 3 or A[2][0] + A[1][1] + A[0][2] == 3: print('Yes') else: print('No')
[ "assignment.variable.change", "identifier.change", "variable_access.subscript.index.change" ]
547,120
547,121
u331997680
python
p02760
A = [list(map(int, input().split())) for i in range(3)] N = int(input()) B = [int(input()) for i in range(N)] for i in range(3): for j in range(3): for k in(B): if A[j][i] == k: A[i][j] = 1 break elif k == B[-1]: A[i][j] = 0 if sum(A[0]) == 3 or sum(A[1]) == 3 or sum(A[2]) == 3: print('Yes') elif sum([row[0] for row in A]) == 3 or sum([row[1] for row in A]) == 3 or sum([row[2] for row in A]) == 3: print('Yes') elif A[0][0] + A[1][1] + A[2][2] == 3 or A[2][0] + A[1][1] + A[1][2] == 3: print('Yes') else: print('No')
A = [list(map(int, input().split())) for i in range(3)] N = int(input()) B = [int(input()) for i in range(N)] for i in range(3): for j in range(3): for k in(B): if A[j][i] == k: A[j][i] = 1 break elif k == B[-1]: A[j][i] = 0 if sum(A[0]) == 3 or sum(A[1]) == 3 or sum(A[2]) == 3: print('Yes') elif sum([row[0] for row in A]) == 3 or sum([row[1] for row in A]) == 3 or sum([row[2] for row in A]) == 3: print('Yes') elif A[0][0] + A[1][1] + A[2][2] == 3 or A[2][0] + A[1][1] + A[0][2] == 3: print('Yes') else: print('No')
[ "assignment.variable.change", "identifier.change", "variable_access.subscript.index.change", "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
547,122
547,121
u331997680
python
p02760
x = [] b = [] for i in range(3): s = list(map(int,input().split())) x.append(s) N = int(input()) for j in range(N): b.append(int(input())) temp =0 for j in range(3): if x[0][j] in b and x[1][j] in b and x[2][j] in b: temp = 1 break for j in range(3): if x[j][0] in b and x[j][1] in b and x[j][2] in b: temp = 1 break if x[0][0] in b and x[1][1] in b and x[2][2] in b: temp = 1 elif x[1][2] in b and x[1][1] in b and x[2][0] in b: temp = 1 if temp ==1: print("Yes") else:print("No")
x = [] b = [] for i in range(3): s = list(map(int,input().split())) x.append(s) N = int(input()) for j in range(N): b.append(int(input())) temp =0 for j in range(3): if x[0][j] in b and x[1][j] in b and x[2][j] in b: temp = 1 break for j in range(3): if x[j][0] in b and x[j][1] in b and x[j][2] in b: temp = 1 break if x[0][0] in b and x[1][1] in b and x[2][2] in b: temp = 1 elif x[0][2] in b and x[1][1] in b and x[2][0] in b: temp = 1 if temp ==1: print("Yes") else:print("No")
[ "literal.number.integer.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
547,129
547,130
u886907961
python
p02760
if __name__ == '__main__': m = [input() for _ in range(3)] n = input() a = [int(input()) for _ in range(int(n))] c =[] for i in m: b = [int(j) for j in i.split()] c.append(b) for n,i in enumerate(c): for m,j in enumerate(i): if j in a: print("A") c[n][m] = -1 re = [] for i in range(3): tmp = [] tmp2 = [] for j in range(3): tmp.append([i,j]) tmp2.append([j,i]) re.append(tmp) re.append(tmp2) re.append([[0,2],[1,1],[2,0]]) re.append([[0,0],[1,1],[2,2]]) f = 0 for i in re: flg =[] for n,j in enumerate(i): if c[j[0]][j[1]] == -1: flg.append(1) else: flg.append(0) if flg == [1,1,1]: f = 1 if f == 1: print('Yes') else: print('No')
if __name__ == '__main__': m = [input() for _ in range(3)] n = input() a = [int(input()) for _ in range(int(n))] c =[] for i in m: b = [int(j) for j in i.split()] c.append(b) for n,i in enumerate(c): for m,j in enumerate(i): if j in a: c[n][m] = -1 re = [] for i in range(3): tmp = [] tmp2 = [] for j in range(3): tmp.append([i,j]) tmp2.append([j,i]) re.append(tmp) re.append(tmp2) re.append([[0,2],[1,1],[2,0]]) re.append([[0,0],[1,1],[2,2]]) f = 0 for i in re: flg =[] for n,j in enumerate(i): if c[j[0]][j[1]] == -1: flg.append(1) else: flg.append(0) if flg == [1,1,1]: f = 1 if f == 1: print('Yes') else: print('No')
[ "call.remove" ]
547,133
547,134
u619144316
python
p02760
a = [list(map(int,input().split())) for i in range(3)] n = int(input()) b = [int(input()) for i in range(n)] for i in range(3): for j in range(3): for k in range(n): if a[i][j] == b[k]: a[i][j] = 0 ans = "No" for i in range(3): if a[i][0] + a[i][1] + a[i][2] == 0: print("Yes") exit() if a[0][i] + a[1][i] + a[2][0] == 0: print("Yes") exit() if a[0][0] + a[1][1] + a[2][2] == 0: print("Yes") exit() if a[2][0] + a[1][1] + a[0][2] == 0: print("Yes") exit() print(ans)
a = [list(map(int,input().split())) for i in range(3)] n = int(input()) b = [int(input()) for i in range(n)] for i in range(3): for j in range(3): for k in range(n): if a[i][j] == b[k]: a[i][j] = 0 ans = "No" for i in range(3): if a[i][0] + a[i][1] + a[i][2] == 0: print("Yes") exit() if a[0][i] + a[1][i] + a[2][i] == 0: print("Yes") exit() if a[0][0] + a[1][1] + a[2][2] == 0: print("Yes") exit() if a[2][0] + a[1][1] + a[0][2] == 0: print("Yes") exit() print(ans)
[ "identifier.replace.add", "literal.replace.remove", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
547,139
547,140
u208464243
python
p02760
import numpy as np A = [list(map(int,input().split())) for _ in range(3)] N = int(input()) B = [int(input()) for _ in range(N)] BINGO = np.array([[False for i in range(3)]for j in range(3)]) for i in range(3): for j in range(3): if A[i][j] in B: BINGO[i][j] = True #横確認 for i in BINGO: if False not in i: print("Yes") exit() BINGO = BINGO.T # 縦横を入れ替えTはnumpyの関数 #縦確認 for i in BINGO: if False not in i: print("Yes") exit() #斜め確認 cross = [BINGO[i][i] for i in range(3)] cross_re = [BINGO[i][2-i] for i in range(3)] if False not in (cross or cross_re): print("Yes") exit() print("No")
import numpy as np A = [list(map(int,input().split())) for _ in range(3)] N = int(input()) B = [int(input()) for _ in range(N)] BINGO = np.array([[False for i in range(3)]for j in range(3)]) for i in range(3): for j in range(3): if A[i][j] in B: BINGO[i][j] = True #横確認 for i in BINGO: if False not in i: print("Yes") exit() BINGO = BINGO.T # 縦横を入れ替えTはnumpyの関数 #縦確認 for i in BINGO: if False not in i: print("Yes") exit() #斜め確認 cross = [BINGO[i][i] for i in range(3)] cross_re = [BINGO[i][2-i] for i in range(3)] if False not in cross or False not in cross_re: print("Yes") exit() print("No")
[ "control_flow.branch.if.condition.change" ]
547,141
547,142
u987164499
python
p02760
A = [list(map(int, input().split())) for _ in range(3)] N = int(input()) B = [int(input(_)) for _ in range(N)] X = [[0 for _ in range(3)] for _ in range(3)] for n in range(N): for i in range(3): for j in range(3): if A[i][j] == B[n]: X[i][j] = 1 tate = any([all([X[i][j] for j in range(3)]) for i in range(3)]) yoko = any([all([X[i][j] for i in range(3)]) for j in range(3)]) nana = all([X[i][i] for i in range(3)]) or all([X[i][2 - i] for i in range(3)]) if tate or yoko or nana: print('Yes') else: print('No')
A = [list(map(int, input().split())) for _ in range(3)] N = int(input()) B = [int(input()) for _ in range(N)] X = [[0 for _ in range(3)] for _ in range(3)] for n in range(N): for i in range(3): for j in range(3): if A[i][j] == B[n]: X[i][j] = 1 tate = any([all([X[i][j] for j in range(3)]) for i in range(3)]) yoko = any([all([X[i][j] for i in range(3)]) for j in range(3)]) nana = all([X[i][i] for i in range(3)]) or all([X[i][2 - i] for i in range(3)]) if tate or yoko or nana: print('Yes') else: print('No')
[ "call.arguments.change" ]
547,145
547,146
u997641430
python
p02757
from collections import Counter n, p = map(int, input().split( )) s = input() #n,p = 10000,7 #s = "1"*10000 #p=2,5は例外 #例外でなければ累積和 if p==2: ans = 0 for i in range(n): if int(s[i])%2==0: ans += i+1 print(ans) exit() if p==5: for i in range(n): if int(s[i])%5==0: ans += i+1 print(ans) exit() accm = [0] s = s[::-1] sm = 0 beki_p = 1 for i in range(n): sm += int(s[i])*beki_p sm %=p accm.append(sm) beki_p *=10 beki_p%=p aC = Counter(accm) ans = 0 for k in aC: ans += aC[k]*(aC[k]-1)//2 print(ans)
from collections import Counter n, p = map(int, input().split( )) s = input() #n,p = 10000,5 #s = "7"*10000 #p=2,5は例外 #例外でなければ累積和 if p==2: ans = 0 for i in range(n): if int(s[i])%2==0: ans += i+1 print(ans) exit() if p==5: ans=0### for i in range(n): if int(s[i])%5==0: ans += i+1 print(ans) exit() accm = [0] s = s[::-1] #print(s) sm = 0 beki_p = 1 for i in range(n): sm += int(s[i])*beki_p sm %=p accm.append(sm) beki_p *=10 beki_p%=p aC = Counter(accm) ans = 0 for k in aC: ans += aC[k]*(aC[k]-1)//2 print(ans)
[ "assignment.add" ]
547,151
547,152
u520276780
python
p02757
from collections import Counter from itertools import accumulate import sys input = sys.stdin.readline n,p = map(int,input().split()) s = input().rstrip() if p == 2: ans = 0 for i in range(n): if int(s[i])%2 == 0: ans += i+1 print(ans) elif p == 5: for i in range(n): if int(s[i])%5 == 0: ans += i+1 print(ans) else: ls = [0] prev = 0 for i in range(n): x = int(s[n-i-1]) y = (prev+x*pow(10,i,p))%p ls.append(y) prev = y c = Counter(ls) ans = 0 for x in c.values(): ans += x*(x-1)//2 print(ans)
from collections import Counter from itertools import accumulate import sys input = sys.stdin.readline n,p = map(int,input().split()) s = input().rstrip() if p == 2: ans = 0 for i in range(n): if int(s[i])%2 == 0: ans += i+1 print(ans) elif p == 5: ans = 0 for i in range(n): if int(s[i])%5 == 0: ans += i+1 print(ans) else: ls = [0] prev = 0 for i in range(n): x = int(s[n-i-1]) y = (prev+x*pow(10,i,p))%p ls.append(y) prev = y c = Counter(ls) ans = 0 for x in c.values(): ans += x*(x-1)//2 print(ans)
[ "assignment.add" ]
547,182
547,183
u905582793
python
p02760
a=[list(map(int,input().split())) for i in range(3)] n=int(input()) for i in range(n): b=int(input()) for j in range(3): for k in range(3): if a[j][k]==b: a[j][k]=-1 ans='No' for i in a: if list(i)==[-1,-1,-1]: ans='Yes' for i in zip(*a): if list(i)==[-1,-1,-1]: ans='Yes' if a[0][0]+a[1][1]+a[2][2]==-3: ans='Yes' if a[2][2]+a[1][1]+a[0][0]==-3: ans='Yes' print(ans)
a=[list(map(int,input().split())) for i in range(3)] n=int(input()) for i in range(n): b=int(input()) for j in range(3): for k in range(3): if a[j][k]==b: a[j][k]=-1 ans='No' for i in a: if list(i)==[-1,-1,-1]: ans='Yes' for i in zip(*a): if list(i)==[-1,-1,-1]: ans='Yes' if a[0][0]+a[1][1]+a[2][2]==-3: ans='Yes' if a[0][2]+a[1][1]+a[2][0]==-3: ans='Yes' print(ans)
[ "literal.number.integer.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
547,271
547,272
u094191970
python
p02760
A = [list(map(int, input().split())) for _ in range(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] = -1 for i in range(3): ans1, ans2 = 0, 0 for j in range(3): if A[i][j] == -1: ans1 += 1 if A[j][i] == -1: ans2 += 1 if ans1 == 3 or ans2 == 3: print("Yes") exit() if (A[0][0] == -1 and A[1][1] == -1 and A[2][2] == -1) or \ (A[0][2] == -1 and A[1][1] != -1 and A[2][0] == -1): print("Yes") else: print("No")
A = [list(map(int, input().split())) for _ in range(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] = -1 for i in range(3): ans1, ans2 = 0, 0 for j in range(3): if A[i][j] == -1: ans1 += 1 if A[j][i] == -1: ans2 += 1 if ans1 == 3 or ans2 == 3: print("Yes") exit() if (A[0][0] == -1 and A[1][1] == -1 and A[2][2] == -1) or \ (A[0][2] == -1 and A[1][1] == -1 and A[2][0] == -1): print("Yes") else: print("No")
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
547,273
547,274
u968404618
python
p02760
A = [list(map(int, input().split())) for _ in range(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] = -1 for i in range(3): ans1, ans2 = 0, 0 for j in range(3): if A[i][j] == -1: ans1 += 1 if A[j][i] == -1: ans2 += 1 if ans1 == 3 or ans2 == 3: print("Yes") exit() if (A[0][0] == -1 and A[1][1] == -1 and A[2][2] != -1) or \ (A[0][2] == -1 and A[1][1] != -1 and A[2][0] != -1): print("Yes") else: print("No")
A = [list(map(int, input().split())) for _ in range(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] = -1 for i in range(3): ans1, ans2 = 0, 0 for j in range(3): if A[i][j] == -1: ans1 += 1 if A[j][i] == -1: ans2 += 1 if ans1 == 3 or ans2 == 3: print("Yes") exit() if (A[0][0] == -1 and A[1][1] == -1 and A[2][2] == -1) or \ (A[0][2] == -1 and A[1][1] == -1 and A[2][0] == -1): print("Yes") else: print("No")
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
547,275
547,274
u968404618
python
p02760
import numpy as np arr = np.array([list(map(int, input().split())) for _ in range(3)]) n = int(input()) for _ in range(n): b = int(input()) arr[np.where(arr == b)] = 0 ans1 = (np.sum(arr, axis=0) == 0).sum() == 3 ans2 = (np.sum(arr, axis=1) == 0).sum() == 3 ans3 = (np.diag(arr) == 0).sum() == 3 ans4 = (np.diag(np.rot90(arr)) == 0).sum() == 3 print("Yes" if ans1 or ans2 or ans3 or ans4 else "No")
import numpy as np arr = np.array([list(map(int, input().split())) for _ in range(3)]) n = int(input()) for _ in range(n): b = int(input()) arr[np.where(arr == b)] = 0 ans1 = (np.sum(arr, axis=0) == 0).sum() >= 1 ans2 = (np.sum(arr, axis=1) == 0).sum() >= 1 ans3 = (np.diag(arr) == 0).sum() == 3 ans4 = (np.diag(np.rot90(arr)) == 0).sum() == 3 print("Yes" if ans1 or ans2 or ans3 or ans4 else "No")
[]
547,285
547,286
u860002137
python
p02760
import numpy as np a1 = np.zeros(3, dtype=int) a2 = np.zeros(3, dtype=int) a3 = np.zeros(3, dtype=int) for i in range(3): a1[i], a2[i], a3[i] = map(int, input().split()) n = int(input()) b = [int(input()) for i in range(n)] a = np.array([a1, a2, a3]).T.flatten() for i in range(n): a[np.where(a == b[i])] = 0 a = a.reshape(3, -1) print("Yes") if a[0].sum()==0 or a[1].sum()==0 or a[2].sum()==0 or a[:, 0].sum()==0 or a[:, 1].sum()==0 or a[:, 2].sum()==0 or np.diag(a).sum()==0 or np.diag(a[::-1]).sum()==0 else "No"
import numpy as np a1 = np.zeros(3, dtype=int) a2 = np.zeros(3, dtype=int) a3 = np.zeros(3, dtype=int) for i in range(3): a1[i], a2[i], a3[i] = map(int, input().split()) n = int(input()) b = [int(input()) for i in range(n)] a = np.array([a1, a2, a3]).T.flatten() for i in range(n): a[np.where(a == b[i])] = 0 a = a.reshape(3, -1) print("Yes") if a[0].sum()==0 or a[1].sum()==0 or a[2].sum()==0 or a[:, 0].sum()==0 or a[:, 1].sum()==0 or a[:, 2].sum()==0 or np.diag(a).sum()==0 or np.diag(a[::-1]).sum()==0 else print("No")
[ "call.add", "call.arguments.change" ]
547,287
547,288
u860002137
python
p02760
board = [list(map(int,input().split())) for i in range(3)] num = int(input()) for n in range(num): bi = int(input()) for i in range(3): for j in range(3): if board[i][j] == bi: board[i][j] = 0 #横 for i in range(3): if board[i][0] == board[i][1] == board[i][2] == 0: print("Yes") exit() #縦 for i in range(3): if board[0][j] == board[1][j] == board[2][j] == 0: print("Yes") exit() if board[0][0] == board[1][1] == board[2][2] == 0: print("Yes") exit() if board[0][2] == board[1][1] == board[2][0] == 0: print("Yes") exit() print("No")
board = [list(map(int,input().split())) for i in range(3)] num = int(input()) for n in range(num): bi = int(input()) for i in range(3): for j in range(3): if board[i][j] == bi: board[i][j] = 0 #横 for i in range(3): if board[i][0] == board[i][1] == board[i][2] == 0: print("Yes") exit() #縦 for i in range(3): if board[0][i] == board[1][i] == board[2][i] == 0: print("Yes") exit() if board[0][0] == board[1][1] == board[2][2] == 0: print("Yes") exit() if board[0][2] == board[1][1] == board[2][0] == 0: print("Yes") exit() print("No")
[ "identifier.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
547,297
547,298
u453630968
python
p02760
def main(): A = [list(map(int, input().split())) for _ in range(3)] n = int(input()) for _ in range(n): b = int(input()) for i in range(3): for j in range(3): if A[i][j] == b: A[i][j] = 0 ans = 'No' for i in range(3): if all(A[i]) == 0: ans = 'Yes' for i in range(3): if all([A[0][i], A[1][i], A[2][i]]) == 0: ans = 'Yes' if all([A[0][0], A[1][1], A[2][2]]) == 0: ans = 'Yes' if all([A[0][2], A[1][1], A[2][0]]) == 0: ans = 'Yes' print(ans) if __name__ == '__main__': main()
def main(): A = [list(map(int, input().split())) for _ in range(3)] n = int(input()) for _ in range(n): b = int(input()) for i in range(3): for j in range(3): if A[i][j] == b: A[i][j] = 0 ans = 'No' for i in range(3): if any(A[i]) == 0: ans = 'Yes' for i in range(3): if any([A[0][i], A[1][i], A[2][i]]) == 0: ans = 'Yes' if any([A[0][0], A[1][1], A[2][2]]) == 0: ans = 'Yes' if any([A[0][2], A[1][1], A[2][0]]) == 0: ans = 'Yes' print(ans) if __name__ == '__main__': main()
[ "identifier.change", "call.function.change", "control_flow.branch.if.condition.change" ]
547,301
547,302
u581511366
python
p02760
a = [[0] * 3 for x in range(3)] s = [[0] * 3 for x in range(3)] for i in range(3): a[i] = [int(x) for x in input().split()] n = int(input()) b = [] for i in range(n): b.append(int(input())) for i in range(n): for j in range(3): for k in range(3): if b[i] == a[j][k]: s[j][k] = 1 res = "No" if s[0][0] == 1 and s[0][1] == 1 and s[0][2] == 1: res = "Yes" if s[1][0] == 1 and s[1][1] == 1 and s[1][2] == 1: res = "Yes" if s[2][0] == 1 and s[2][1] == 1 and s[3][2] == 1: res = "Yes" if s[0][0] == 1 and s[1][0] == 1 and s[2][0] == 1: res = "Yes" if s[0][1] == 1 and s[1][1] == 1 and s[2][1] == 1: res = "Yes" if s[0][2] == 1 and s[1][2] == 1 and s[2][2] == 1: res = "Yes" if s[0][0] == 1 and s[1][1] == 1 and s[2][2] == 1: res = "Yes" if s[2][0] == 1 and s[1][1] == 1 and s[0][2] == 1: res = "Yes" print(res)
a = [[0] * 3 for x in range(3)] s = [[0] * 3 for x in range(3)] for i in range(3): a[i] = [int(x) for x in input().split()] n = int(input()) b = [] for i in range(n): b.append(int(input())) for i in range(n): for j in range(3): for k in range(3): if b[i] == a[j][k]: s[j][k] = 1 res = "No" if s[0][0] == 1 and s[0][1] == 1 and s[0][2] == 1: res = "Yes" if s[1][0] == 1 and s[1][1] == 1 and s[1][2] == 1: res = "Yes" if s[2][0] == 1 and s[2][1] == 1 and s[2][2] == 1: res = "Yes" if s[0][0] == 1 and s[1][0] == 1 and s[2][0] == 1: res = "Yes" if s[0][1] == 1 and s[1][1] == 1 and s[2][1] == 1: res = "Yes" if s[0][2] == 1 and s[1][2] == 1 and s[2][2] == 1: res = "Yes" if s[0][0] == 1 and s[1][1] == 1 and s[2][2] == 1: res = "Yes" if s[2][0] == 1 and s[1][1] == 1 and s[0][2] == 1: res = "Yes" print(res)
[ "literal.number.integer.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
547,311
547,312
u924828749
python
p02760
a = [list(map(int, input().split())) for _ in range(3)] n = int(input()) b = [int(input()) for _ in range(n)] bingo = 'No' for t in zip(*a): a.append(list(t)) a.append([a[i][i] for i in range(3)]) a.append([a[i][2-i]for i in range(3)]) for line in a: if all(item in b for item in a): bingo = 'Yes' print(bingo)
a = [list(map(int, input().split())) for _ in range(3)] n = int(input()) b = [int(input()) for _ in range(n)] bingo = 'No' for t in zip(*a): a.append(list(t)) a.append([a[i][i] for i in range(3)]) a.append([a[i][2-i]for i in range(3)]) for line in a: if all(item in b for item in line): bingo = 'Yes' break print(bingo)
[ "identifier.change", "control_flow.branch.if.condition.change", "control_flow.break.add" ]
547,320
547,321
u982594421
python
p02760
a = [list(map(int, input().split())) for _ in range(3)] n = int(input()) b = [int(input()) for _ in range(n)] bingo = 'No' for t in zip(*a): a.append(list(t)) a.append([a[i][i] for i in range(3)]) a.append([a[i][2-i]for i in range(3)]) for line in a: if all(item in b for item in a): bingo = 'Yes' print(bingo)
a = [list(map(int, input().split())) for _ in range(3)] n = int(input()) b = [int(input()) for _ in range(n)] bingo = 'No' for t in zip(*a): a.append(list(t)) a.append([a[i][i] for i in range(3)]) a.append([a[i][2-i]for i in range(3)]) for line in a: if all(item in b for item in line): bingo = 'Yes' print(bingo)
[ "identifier.change", "control_flow.branch.if.condition.change" ]
547,320
547,322
u982594421
python
p02760
# -*- coding:utf-8 -*- A_Bingo = [] for i in range(3): A_Bingo.append(list(map(int,input().split()))) card =[] n = int(input()) for k in range(n): card.append(int(input())) r_cnt =[0,0,0] c_cnt =[0,0,0] rc_result = [[0,0,0],[0,0,0],[0,0,0]] for row in range(3): for column in range(3): if A_Bingo[row][column] in card: r_cnt[row] += 1 c_cnt[column] += 1 rc_result[row][column] = 1 if 2 in r_cnt: print("Yes") elif 2 in c_cnt: print("Yes") elif rc_result[0][0]*rc_result[1][1]*rc_result[2][2] == 1: print("Yes") elif rc_result[0][2]*rc_result[1][1]*rc_result[2][0] == 1: print("Yes") else: print("No")
# -*- coding:utf-8 -*- A_Bingo = [] for i in range(3): A_Bingo.append(list(map(int,input().split()))) card =[] n = int(input()) for k in range(n): card.append(int(input())) r_cnt =[0,0,0] c_cnt =[0,0,0] rc_result = [[0,0,0],[0,0,0],[0,0,0]] for row in range(3): for column in range(3): if A_Bingo[row][column] in card: r_cnt[row] += 1 c_cnt[column] += 1 rc_result[row][column] = 1 if 3 in r_cnt: print("Yes") elif 3 in c_cnt: print("Yes") elif rc_result[0][0]*rc_result[1][1]*rc_result[2][2] == 1: print("Yes") elif rc_result[0][2]*rc_result[1][1]*rc_result[2][0] == 1: print("Yes") else: print("No")
[ "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
547,325
547,326
u253479302
python
p02760
s = "012 345 678 036 147 258 048 246" a = [input().split() for i in range(3)] b = a[0] + a[1] + a[2] for i in [input()for i in range(int(input()))]: if i in b: s = s.replace(str(b.index(i)), "") print("Yes" if " " in s else "No")
s = " 012 345 678 036 147 258 048 246 " a = [input().split() for i in range(3)] b = a[0] + a[1] + a[2] for i in [input()for i in range(int(input()))]: if i in b: s = s.replace(str(b.index(i)), "") print("Yes" if " " in s else "No")
[ "literal.string.change", "assignment.value.change" ]
547,331
547,332
u468972478
python
p02760
bingo=[] for i in range(3): a=list(map(int,input().split())) bingo.append(a) n=int(input()) for i in range(n): b=int(input()) for j in range(3): if b in bingo[j]: bingo[j][bingo[j].index(b)]=0 def hantei(l): for i in range(3): if all([l[i][j]==0 for j in range(3)]): return 'Yes' elif all([l[j][i]==0 for j in range(3)]): return 'Yes' elif l[0][0]==0 and l[1][1]==0 and l[2][2]==0: return 'Yes' elif l[0][2]==0 and l[1][1]==0 and l[2][0]==0: return 'Yes' else: return 'No' print(hantei(bingo))
bingo=[] for i in range(3): a=list(map(int,input().split())) bingo.append(a) n=int(input()) for i in range(n): b=int(input()) for j in range(3): if b in bingo[j]: bingo[j][bingo[j].index(b)]=0 def hantei(l): for i in range(3): if all([l[i][j]==0 for j in range(3)]): return 'Yes' elif all([l[j][i]==0 for j in range(3)]): return 'Yes' elif l[0][0]==0 and l[1][1]==0 and l[2][2]==0: return 'Yes' elif l[0][2]==0 and l[1][1]==0 and l[2][0]==0: return 'Yes' else: continue return 'No' #print(bingo) print(hantei(bingo))
[ "control_flow.continue.add" ]
547,333
547,334
u768256617
python
p02760
bingo=[] for i in range(3): a=list(map(int,input().split())) bingo.append(a) n=int(input()) for i in range(n): b=int(input()) for j in range(3): if b in bingo[i]: bingo[i][bingo[i].index(b)]=0 def hantei(l): for i in range(3): if all([l[i][j]==0 for j in range(3)]): return 'Yes' elif all([l[j][i]==0 for j in range(3)]): return 'Yes' elif l[0][0]==0 and l[1][1]==0 and l[2][2]==0: return 'Yes' elif l[0][2]==0 and l[1][1]==0 and l[2][0]==0: return 'Yes' else: return 'No' print(hantei(bingo))
bingo=[] for i in range(3): a=list(map(int,input().split())) bingo.append(a) n=int(input()) for i in range(n): b=int(input()) for j in range(3): if b in bingo[j]: bingo[j][bingo[j].index(b)]=0 def hantei(l): for i in range(3): if all([l[i][j]==0 for j in range(3)]): return 'Yes' elif all([l[j][i]==0 for j in range(3)]): return 'Yes' elif l[0][0]==0 and l[1][1]==0 and l[2][2]==0: return 'Yes' elif l[0][2]==0 and l[1][1]==0 and l[2][0]==0: return 'Yes' else: continue return 'No' #print(bingo) print(hantei(bingo))
[ "identifier.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change", "assignment.variable.change", "control_flow.continue.add" ]
547,335
547,334
u768256617
python
p02760
A = [[int(x) for x in input().split()] for _ in range(3)] N = int(input()) b = [int(input()) for _ in range(N)] Bingo = [[0, 0, 0] for _ in range(3)] for i in range(3): for j in range(3): for l in range(N): if(A[i][j] == b[l]): Bingo[i][j] = 1 bingo = 0 for i in range(3): if(Bingo[i][0]+Bingo[i][1]+Bingo[i][2])==3: bingo += 1 elif(Bingo[0][i]+Bingo[1][i]+Bingo[2][i])==3: bingo += 1 if(Bingo[0][0]+Bingo[1][1]+Bingo[2][2]): bingo += 1 elif(Bingo[0][2]+Bingo[1][1]+Bingo[2][0]): bingo += 1 if(bingo!=0): print('Yes') else: print('No')
A = [[int(x) for x in input().split()] for _ in range(3)] N = int(input()) b = [int(input()) for _ in range(N)] Bingo = [[0, 0, 0] for _ in range(3)] for i in range(3): for j in range(3): for l in range(N): if(A[i][j] == b[l]): Bingo[i][j] = 1 bingo = 0 for i in range(3): if(Bingo[i][0]+Bingo[i][1]+Bingo[i][2])==3: bingo += 1 elif(Bingo[0][i]+Bingo[1][i]+Bingo[2][i])==3: bingo += 1 if(Bingo[0][0]+Bingo[1][1]+Bingo[2][2])==3: bingo += 1 elif(Bingo[0][2]+Bingo[1][1]+Bingo[2][0])==3: bingo += 1 if(bingo!=0): print('Yes') else: print('No')
[ "control_flow.branch.if.condition.change" ]
547,378
547,379
u805011545
python
p02760
s = 3 arr =[] for _ in range(s): arr.append(list(map(int, input().rstrip().split()))) print(arr) check = [[0,0,0],[0,0,0],[0,0,0]] #print(check) #check データ N = int(input()) #print(N) for i in range(N): data = int(input()) for k in range(3): for j in range(3): if data == arr[j][k]: check[j][k]= 1 #print(check) #chek ビンゴ answer = "No" for k in range(3): if check[k][0] == 1 and check[k][1]== 1 and check[k][2] == 1: answer = "Yes" for j in range(3): if check[0][j] == 1 and check[1][j] == 1 and check[2][j] == 1: answer = "Yes" if check[0][0] == 1 and check[1][1] == 1 and check[2][2] == 1: answer = "Yes" if check[0][2] == 1 and check[1][1] == 1 and check[2][0] == 1: answer = "Yes" print(answer)
s = 3 arr =[] for _ in range(s): arr.append(list(map(int, input().rstrip().split()))) #print(arr) check = [[0,0,0],[0,0,0],[0,0,0]] #print(check) #check データ N = int(input()) #print(N) for i in range(N): data = int(input()) for k in range(3): for j in range(3): if data == arr[j][k]: check[j][k]= 1 #print(check) #chek ビンゴ answer = "No" for k in range(3): if check[k][0] == 1 and check[k][1]== 1 and check[k][2] == 1: answer = "Yes" for j in range(3): if check[0][j] == 1 and check[1][j] == 1 and check[2][j] == 1: answer = "Yes" if check[0][0] == 1 and check[1][1] == 1 and check[2][2] == 1: answer = "Yes" if check[0][2] == 1 and check[1][1] == 1 and check[2][0] == 1: answer = "Yes" print(answer)
[ "call.remove" ]
547,382
547,383
u063346608
python
p02760
p,r=input,range A=sum([list(map(int,p().split()))for _ in r(3)],[]) b=[int(p())for _ in r(int(p()))] print('YNeos'[any([sum(1<<i for i in r(9)if A[i]in b)&v==v for v in[7,56,73,84,146,273,292,448]])::2])
p,r=input,range A=sum([list(map(int,p().split()))for _ in r(3)],[]) b=[int(p())for _ in r(int(p()))] print('YNeos'[all([sum(1<<i for i in r(9)if A[i]in b)&v!=v for v in[7,56,73,84,146,273,292,448]])::2])
[ "identifier.change", "call.function.change", "variable_access.subscript.index.change", "call.arguments.change", "io.output.change", "misc.opposites", "expression.operator.compare.change" ]
547,387
547,388
u264304509
python
p02760
A = [list(map(int, input().split())) for _ in range(3)] N = int(input()) b = [int(input()) for _ in range(N)] field = 0 for v in b: for i in range(9): if A[i // 3][i % 3] == v: f|=1<<i ans = 0 for v in [7,56,73,84,146,273,292,448]: ans |= f&v==v; print('Yes' if ans else 'No')
A = [list(map(int, input().split())) for _ in range(3)] N = int(input()) b = [int(input()) for _ in range(N)] f=0 for v in b: for i in range(9): if A[i // 3][i % 3] == v: f|=1<<i ans = 0 for v in [7,56,73,84,146,273,292,448]: ans |= f&v==v; print('Yes' if ans else 'No')
[ "assignment.variable.change", "identifier.change" ]
547,389
547,390
u264304509
python
p02760
a = [list(map(int,input().split())) for i in range(3)] n = int(input()) for k in range(n): b = int(input()) for i in range(3): for j in range(3): if a[i][j] == b: a[i][j] = -1 f = False for i in range(3): for j in range(3): if (a[0][0] == a[0][1] == a[0][2]== -1) or (a[1][0] == a[1][1] == a[1][2]== -1) or (a[2][0] == a[2][1] == a[2][2]== -1): f = True elif (a[0][0] == a[1][0] == a[2][0] == -1) or (a[0][1] == a[1][1] == a[2][1] == -1) or (a[0][2] == a[1][2] == a[2][2] == -1): f = True elif (a[0][0] == a[1][1] == a[2][2] == -1) or (a[2][0] == a[1][1] == a[0][2] == -1): f = True print(a) if f: print('Yes') else: print('No')
a = [list(map(int,input().split())) for i in range(3)] n = int(input()) for k in range(n): b = int(input()) for i in range(3): for j in range(3): if a[i][j] == b: a[i][j] = -1 f = False for i in range(3): for j in range(3): if (a[0][0] == a[0][1] == a[0][2]== -1) or (a[1][0] == a[1][1] == a[1][2]== -1) or (a[2][0] == a[2][1] == a[2][2]== -1): f = True elif (a[0][0] == a[1][0] == a[2][0] == -1) or (a[0][1] == a[1][1] == a[2][1] == -1) or (a[0][2] == a[1][2] == a[2][2] == -1): f = True elif (a[0][0] == a[1][1] == a[2][2] == -1) or (a[2][0] == a[1][1] == a[0][2] == -1): f = True if f: print('Yes') else: print('No')
[ "call.remove" ]
547,406
547,407
u629540524
python
p02760
a = [list(map(int,input().split())) for i in range(3)] n = int(input()) for k in range(n): b = int(input()) for i in range(3): for j in range(3): if a[i][j] == b: a[i][j] == -1 f = True for i in range(3): for j in range(3): if (a[0][0] == a[0][1] == a[0][2]== -1) or (a[1][0] == a[1][1] == a[1][2]== -1) or (a[2][0] == a[2][1] == a[2][2]== -1): f = False elif (a[0][0] == a[1][0] == a[2][0] == -1) or (a[0][1] == a[1][1] == a[2][1] == -1) or (a[0][2] == a[1][2] == a[2][2] == -1): f = False elif (a[0][0] == a[1][1] == a[2][2] == -1) or (a[2][0] == a[1][1] == a[0][2] == -1): f = False if f: print('Yes') else: print('No')
a = [list(map(int,input().split())) for i in range(3)] n = int(input()) for k in range(n): b = int(input()) for i in range(3): for j in range(3): if a[i][j] == b: a[i][j] = -1 f = False for i in range(3): for j in range(3): if (a[0][0] == a[0][1] == a[0][2]== -1) or (a[1][0] == a[1][1] == a[1][2]== -1) or (a[2][0] == a[2][1] == a[2][2]== -1): f = True elif (a[0][0] == a[1][0] == a[2][0] == -1) or (a[0][1] == a[1][1] == a[2][1] == -1) or (a[0][2] == a[1][2] == a[2][2] == -1): f = True elif (a[0][0] == a[1][1] == a[2][2] == -1) or (a[2][0] == a[1][1] == a[0][2] == -1): f = True if f: print('Yes') else: print('No')
[ "expression.operation.compare.replace.remove", "assignment.replace.add", "misc.typo", "misc.opposites", "assignment.value.change" ]
547,408
547,407
u629540524
python
p02760
A = [0]*3 A[0] = list(map(int, input().split())) A[1] = list(map(int, input().split())) A[2] = list(map(int, input().split())) n = int(input()) b = [0]*n for i in range(n): b[i] = int(input()) flag = [] flag.append([0]*3) flag.append([0]*3) flag.append([0]*3) for i in range(3): for j in range(3): if A[i][j] in b: flag[i][j] = 1 ans = "No" for i in range(3): if A[i] == [1,1,1]: ans = "Yes" x = [0,0,0] y = [0, 0] for i in range(3): y[0] += flag[i][i] y[1] += flag[i][2-i] for j in range(3): x[j] += flag[i][j] #print(x,y) if 3 in x: ans = "Yes" if 3 in y: ans = "Yes" print(ans)
A = [0]*3 A[0] = list(map(int, input().split())) A[1] = list(map(int, input().split())) A[2] = list(map(int, input().split())) n = int(input()) b = [0]*n for i in range(n): b[i] = int(input()) flag = [] flag.append([0]*3) flag.append([0]*3) flag.append([0]*3) for i in range(3): for j in range(3): if A[i][j] in b: flag[i][j] = 1 #print(flag) ans = "No" for i in range(3): if flag[i] == [1,1,1]: ans = "Yes" x = [0,0,0] y = [0, 0] for i in range(3): y[0] += flag[i][i] y[1] += flag[i][2-i] for j in range(3): x[j] += flag[i][j] #print(x,y) if 3 in x: ans = "Yes" if 3 in y: ans = "Yes" print(ans)
[ "identifier.change", "control_flow.branch.if.condition.change" ]
547,409
547,410
u995163736
python
p02760
arr = [] temp = [] for i in range(3): t = list(map(int, input().split())) arr.append(t) temp.extend(t) n = int(input()) for i in range(n): a = int(input()) if a in temp: for i in range(3): for j in range(3): if arr[i][j] == a: arr[i][j] = 'X' elif arr[0][j] == arr[1][j] == arr[2][j] or arr[0][0] == arr[1][1] == arr[2][2] or arr[0][2] == arr[1][1] == arr[2][0] or set(arr[i]) == {'X'}: print('Yes') exit() print('No')
arr = [] temp = [] for i in range(3): t = list(map(int, input().split())) arr.append(t) temp.extend(t) n = int(input()) for i in range(n): a = int(input()) if a in temp: for i in range(3): for j in range(3): if arr[i][j] == a: arr[i][j] = 'X' if arr[0][j] == arr[1][j] == arr[2][j] or arr[0][0] == arr[1][1] == arr[2][2] or arr[0][2] == arr[1][1] == arr[2][0] or set(arr[i]) == {'X'}: print('Yes') exit() print('No')
[ "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
547,426
547,427
u139132412
python
p02760
A=[list(map(int, input().split())) for _ in range(3)] N=int(input()) B=[0]*N for _ in range(N): B[_]=int(input()) G=[['.']*3 for _ in range(3)] for i in range(3): for j in range(3): if A[i][j] in B: G[i][j]='#' print(G) if any(all(G[i][j]=='#' for i in range(3)) for j in range(3)) or \ any(all(G[i][j]=='#' for j in range(3)) for i in range(3)) or \ all(G[i][2-i]=='#' for i in range(3)) or \ all(G[i][i]=='#' for i in range(3)): print('Yes') else: print('No')
A=[list(map(int, input().split())) for _ in range(3)] N=int(input()) B=[0]*N for _ in range(N): B[_]=int(input()) G=[['.']*3 for _ in range(3)] for i in range(3): for j in range(3): if A[i][j] in B: G[i][j]='#' # print(G) if any(all(G[i][j]=='#' for i in range(3)) for j in range(3)) or \ any(all(G[i][j]=='#' for j in range(3)) for i in range(3)) or \ all(G[i][2-i]=='#' for i in range(3)) or \ all(G[i][i]=='#' for i in range(3)): print('Yes') else: print('No')
[ "call.remove" ]
547,432
547,433
u752774573
python
p02760
listA = [] listB = [] for _ in range(3): listA.append(list(map(int, input().split()))) N = int(input()) for _ in range(N): listB.append(int(input())) tate = [0 , 0 , 0] yoko = [0, 0, 0] naname = [0, 0] for i in range(3): for j in range(3): if listA[i][j] in listB: tate[i] += 1 yoko[i] += 1 if i == j: naname[0] += 1 if i + j == 2: naname[1] += 1 if 3 in tate or 3 in yoko or 3 in naname: print("Yes") else: print("No")
listA = [] listB = [] for _ in range(3): listA.append(list(map(int, input().split()))) N = int(input()) for _ in range(N): listB.append(int(input())) tate = [0 , 0 , 0] yoko = [0, 0, 0] naname = [0, 0] for i in range(3): for j in range(3): if listA[i][j] in listB: tate[i] += 1 yoko[j] += 1 if i == j: naname[0] += 1 if i + j == 2: naname[1] += 1 if 3 in tate or 3 in yoko or 3 in naname: print("Yes") else: print("No")
[ "identifier.change", "variable_access.subscript.index.change" ]
547,434
547,435
u860338101
python
p02760
seen = [0,0,0,0,0,0,0,0,0] seen[0],seen[1],seen[2] = (map(int,input().split())) seen[3],seen[4],seen[5] = (map(int,input().split())) seen[6],seen[7],seen[8] = (map(int,input().split())) over = False N = int(input()) for x in range(N): num = int(input()) if num in seen: seen[seen.index(num)] = "O" if seen[0] == "O": if seen[1] == seen[2] == "O": over = True elif seen[3] == seen[6] == "O": over = True elif seen[4] == seen[8] == "O": over = True elif seen[4] == "O": if seen[2] == seen[6] == "O": over = True elif seen[1] == seen[7] == "O": over = True elif seen[3] == seen[5] == "O": over = True elif seen[8] == "O": if seen[6] == seen[7] == "O": over = True if seen[2] == seen[5] == "O": over = True if not over: print("NO") else: print("YES")
seen = [0,0,0,0,0,0,0,0,0] seen[0],seen[1],seen[2] = (map(int,input().split())) seen[3],seen[4],seen[5] = (map(int,input().split())) seen[6],seen[7],seen[8] = (map(int,input().split())) over = False N = int(input()) for x in range(N): num = int(input()) if num in seen: seen[seen.index(num)] = "O" if seen[0] == "O": if seen[1] == seen[2] == "O": over = True elif seen[3] == seen[6] == "O": over = True elif seen[4] == seen[8] == "O": over = True elif seen[4] == "O": if seen[2] == seen[6] == "O": over = True elif seen[1] == seen[7] == "O": over = True elif seen[3] == seen[5] == "O": over = True elif seen[8] == "O": if seen[6] == seen[7] == "O": over = True if seen[2] == seen[5] == "O": over = True if not over: print("No") else: print("Yes")
[ "literal.string.change", "literal.string.case.change", "call.arguments.change", "io.output.change" ]
547,439
547,440
u091964259
python
p02760
import sys from collections import deque import numpy as np import math sys.setrecursionlimit(10**6) def S(): return sys.stdin.readline().rstrip() def SL(): return map(str,sys.stdin.readline().rstrip().split()) def I(): return int(sys.stdin.readline().rstrip()) def IL(): return map(int,sys.stdin.readline().rstrip().split()) def solve(): bingo = [False]*9 dic = dict() c = 0 for _ in range(3): tmp = list(IL()) for rep in tmp: dic[rep] = c c += 1 n = I() for _ in range(n): b = I() idx = dic.get(b) if idx is None: continue bingo[idx] = True print(bingo) flag = False for i in range(0,3): for j in range(0,7,3): if not bingo[i+j]: break else: flag = True if flag: print('Yes') return for i in range(0,7,3): for j in range(0,3): if not bingo[i+j]: break else: flag = True if flag: print('Yes') return if (bingo[2] and bingo[4] and bingo[6]) or (bingo[0] and bingo[4] and bingo[8]): print('Yes') else: print('No') return if __name__=='__main__': solve()
import sys from collections import deque import numpy as np import math sys.setrecursionlimit(10**6) def S(): return sys.stdin.readline().rstrip() def SL(): return map(str,sys.stdin.readline().rstrip().split()) def I(): return int(sys.stdin.readline().rstrip()) def IL(): return map(int,sys.stdin.readline().rstrip().split()) def solve(): bingo = [False]*9 dic = dict() c = 0 for _ in range(3): tmp = list(IL()) for rep in tmp: dic[rep] = c c += 1 n = I() for _ in range(n): b = I() idx = dic.get(b) if idx is None: continue bingo[idx] = True flag = False for i in range(0,3): for j in range(0,7,3): if not bingo[i+j]: break else: flag = True if flag: print('Yes') return for i in range(0,7,3): for j in range(0,3): if not bingo[i+j]: break else: flag = True if flag: print('Yes') return if (bingo[2] and bingo[4] and bingo[6]) or (bingo[0] and bingo[4] and bingo[8]): print('Yes') else: print('No') return if __name__=='__main__': solve()
[ "call.remove" ]
547,456
547,457
u844895214
python
p02760
import sys from collections import deque import numpy as np import math sys.setrecursionlimit(10**6) def S(): return sys.stdin.readline().rstrip() def SL(): return map(str,sys.stdin.readline().rstrip().split()) def I(): return int(sys.stdin.readline().rstrip()) def IL(): return map(int,sys.stdin.readline().rstrip().split()) def solve(): bingo = [True]*9 dic = dict() c = 0 for _ in range(3): tmp = list(IL()) for rep in tmp: dic[rep] = c c += 1 n = I() for _ in range(n): b = I() idx = dic.get(b) if idx is None: continue bingo[idx] = True flag = False for i in range(0,3): for j in range(0,7,3): if not bingo[i+j]: break else: flag = True if flag: print('Yes') return for i in range(0,7,3): for j in range(0,3): if not bingo[i+j]: break else: flag = True if flag: print('Yes') return if (bingo[2] and bingo[4] and bingo[6]) or (bingo[0] and bingo[4] and bingo[8]): print('Yes') else: print('No') return if __name__=='__main__': solve()
import sys from collections import deque import numpy as np import math sys.setrecursionlimit(10**6) def S(): return sys.stdin.readline().rstrip() def SL(): return map(str,sys.stdin.readline().rstrip().split()) def I(): return int(sys.stdin.readline().rstrip()) def IL(): return map(int,sys.stdin.readline().rstrip().split()) def solve(): bingo = [False]*9 dic = dict() c = 0 for _ in range(3): tmp = list(IL()) for rep in tmp: dic[rep] = c c += 1 n = I() for _ in range(n): b = I() idx = dic.get(b) if idx is None: continue bingo[idx] = True flag = False for i in range(0,3): for j in range(0,7,3): if not bingo[i+j]: break else: flag = True if flag: print('Yes') return for i in range(0,7,3): for j in range(0,3): if not bingo[i+j]: break else: flag = True if flag: print('Yes') return if (bingo[2] and bingo[4] and bingo[6]) or (bingo[0] and bingo[4] and bingo[8]): print('Yes') else: print('No') return if __name__=='__main__': solve()
[ "misc.opposites", "assignment.value.change", "expression.operation.binary.change" ]
547,458
547,457
u844895214
python
p02760
import sys from collections import deque import numpy as np import math sys.setrecursionlimit(10**6) def S(): return sys.stdin.readline().rstrip() def SL(): return map(str,sys.stdin.readline().rstrip().split()) def I(): return int(sys.stdin.readline().rstrip()) def IL(): return map(int,sys.stdin.readline().rstrip().split()) def solve(): bingo = [True]*9 dic = dict() c = 0 for _ in range(3): tmp = list(IL()) for rep in tmp: dic[rep] = c c += 1 n = I() for _ in range(n): b = I() idx = dic.get(b) if idx is None: continue bingo[idx] = True print(bingo) flag = False for i in range(0,3): for j in range(0,7,3): if not bingo[i+j]: break else: flag = True if flag: print('Yes') return for i in range(0,7,3): for j in range(0,3): if not bingo[i+j]: break else: flag = True if flag: print('Yes') return if (bingo[2] and bingo[4] and bingo[6]) or (bingo[0] and bingo[4] and bingo[8]): print('Yes') else: print('No') return if __name__=='__main__': solve()
import sys from collections import deque import numpy as np import math sys.setrecursionlimit(10**6) def S(): return sys.stdin.readline().rstrip() def SL(): return map(str,sys.stdin.readline().rstrip().split()) def I(): return int(sys.stdin.readline().rstrip()) def IL(): return map(int,sys.stdin.readline().rstrip().split()) def solve(): bingo = [False]*9 dic = dict() c = 0 for _ in range(3): tmp = list(IL()) for rep in tmp: dic[rep] = c c += 1 n = I() for _ in range(n): b = I() idx = dic.get(b) if idx is None: continue bingo[idx] = True flag = False for i in range(0,3): for j in range(0,7,3): if not bingo[i+j]: break else: flag = True if flag: print('Yes') return for i in range(0,7,3): for j in range(0,3): if not bingo[i+j]: break else: flag = True if flag: print('Yes') return if (bingo[2] and bingo[4] and bingo[6]) or (bingo[0] and bingo[4] and bingo[8]): print('Yes') else: print('No') return if __name__=='__main__': solve()
[ "misc.opposites", "assignment.value.change", "expression.operation.binary.change", "call.remove" ]
547,459
547,457
u844895214
python
p02760
# Bingo A = [] for _ in range(3): A += list(map(int, input().split())) N = int(input()) for _ in range(N): b = int(input()) if b in A: A[A.index(b)] = -1 # check diag = (sum(A[0::4]) == -3) | (sum(A[2:8:2]) == -3) rows = (sum(A[:3]) == -3) | (sum(A[3:6]) == -3) | (sum(A[6:]) == -3) cols = (sum(A[:7:3]) == -3) | (sum(A[1:8:3]) == -3) | (sum(A[2::3]) == -3) ans = diag | rows | cols print(A) print(['No', 'Yes'][ans])
# Bingo A = [] for _ in range(3): A += list(map(int, input().split())) N = int(input()) for _ in range(N): b = int(input()) if b in A: A[A.index(b)] = -1 # check diag = (sum(A[0::4]) == -3) | (sum(A[2:8:2]) == -3) rows = (sum(A[:3]) == -3) | (sum(A[3:6]) == -3) | (sum(A[6:]) == -3) cols = (sum(A[:7:3]) == -3) | (sum(A[1:8:3]) == -3) | (sum(A[2::3]) == -3) ans = diag | rows | cols print(['No', 'Yes'][ans])
[ "call.remove" ]
547,472
547,473
u191635495
python
p02760
if __name__ == '__main__': A = [] for i in range(3): row = list(map(int, input().split())) A.append(row) N = int(input()) B = [] for i in range(N): B.append(int(input())) for i in range(3): cnt = 0 for j in range(3): if A[i][j] in B: cnt += 1 if cnt==3: print('Yes') quit() for i in range(3): cnt = 0 for j in range(3): if A[j][i] in B: cnt += 1 if cnt==3: print('Yes') if A[0][0] in B and A[1][1] in B and A[2][2] in B: print('Yes') quit() if A[0][2] in B and A[1][1] in B and A[2][0] in B: print('Yes') quit() print('No')
if __name__ == '__main__': A = [] for i in range(3): row = list(map(int, input().split())) A.append(row) N = int(input()) B = [] for i in range(N): B.append(int(input())) for i in range(3): cnt = 0 for j in range(3): if A[i][j] in B: cnt += 1 if cnt==3: print('Yes') quit() for i in range(3): cnt = 0 for j in range(3): if A[j][i] in B: cnt += 1 if cnt==3: print('Yes') quit() if A[0][0] in B and A[1][1] in B and A[2][2] in B: print('Yes') quit() if A[0][2] in B and A[1][1] in B and A[2][0] in B: print('Yes') quit() print('No')
[ "call.add" ]
547,475
547,476
u896941378
python
p02760
import numpy as np S = np.array([list(map(int, input().split())) for _ in range(3)]) n = int(input()) for _ in range(n): S = np.where(S==int(input()), 0, S) if min(np.sum(S, axis=0))==0 or min(np.sum(S, axis=1))==0: print('Yes') exit() if (S[0][0] == 0 and S[1][1] == 0 and S[2][2]) or (S[2][0] == 0 and S[1][1] == 0 and S[0][2]): print('Yes') exit() print('No')
import numpy as np S = np.array([list(map(int, input().split())) for _ in range(3)]) n = int(input()) for _ in range(n): S = np.where(S==int(input()), 0, S) if min(np.sum(S, axis=0))==0 or min(np.sum(S, axis=1))==0: print('Yes') exit() if (S[0][0] == 0 and S[1][1] == 0 and S[2][2] == 0) or (S[2][0] == 0 and S[1][1] == 0 and S[0][2] == 0): print('Yes') exit() print('No')
[ "control_flow.branch.if.condition.change" ]
547,477
547,478
u875541136
python
p02760
a = [] [a.append(list(map(int, input().split()))) for _ in range(3)] n = int(input()) b = [int(input())for _ in range(n)] for i in b: for j in range(3): for k in range(3): if a[j][k] == i: a[j][k] = 1 ans = 0 count =0 for j in range(3): if a[j].count(1) == 3: ans += 1 elif (a[0][j] == a[1][j] == a[2][j]) == 1: ans += 1 elif (a[0][0] == a[1][1] == a[2][2]) == 1: ans += 1 elif (a[0][2] == a[1][1] == a[2][1]) == 1: ans += 1 if ans > 0: print("Yes") else: print("No")
a = [] [a.append(list(map(int, input().split()))) for _ in range(3)] n = int(input()) b = [int(input())for _ in range(n)] for i in b: for j in range(3): for k in range(3): if a[j][k] == i: a[j][k] = 1 ans = 0 count =0 for j in range(3): if a[j].count(1) == 3: ans += 1 elif (a[0][j] == a[1][j] == a[2][j]) == 1: ans += 1 elif (a[0][0] == a[1][1] == a[2][2]) == 1: ans += 1 elif (a[0][2] == a[1][1] == a[2][0]) == 1: ans += 1 if ans > 0: print("Yes") else: print("No")
[ "literal.number.integer.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
547,484
547,485
u068142202
python