problem_id stringlengths 6 6 | user_id stringlengths 10 10 | time_limit float64 1k 8k | memory_limit float64 262k 1.05M | problem_description stringlengths 48 1.55k | codes stringlengths 35 98.9k | status stringlengths 28 1.7k | submission_ids stringlengths 28 1.41k | memories stringlengths 13 808 | cpu_times stringlengths 11 610 | code_sizes stringlengths 7 505 |
|---|---|---|---|---|---|---|---|---|---|---|
p02760 | u021763820 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['# -*- coding: utf-8 -*-\na1 = list(map(int, input().split()))\na2 = list(map(int, input().split()))\na3 = list(map(int, input().split()))\na = [a1, a2, a3]\nn = int(input())\nb = []\nfor i in range(n):\n bn = int(input())\n b.append(bn)\nfor i in range(3):\n for j in range(3):\n if a[i][j] in b:\n a[i][j] = -5\nprint(*a)\nfor i in range(3):\n if sum(a[i]) == -15:\n bng = 1\nfor i in range(3):\n cnt = 0\n for j in range(3):\n cnt += a[j][i]\n if cnt == -15:\n bng = 1\n \ncnt = 0\nfor i in range(3):\n cnt += a[i][i]\nif cnt == -15:\n bng = 1 \n \nif bng == 1:\n print("Yes")\nelse:\n print("No")', '# -*- coding: utf-8 -*-\na1 = list(map(int, input().split()))\na2 = list(map(int, input().split()))\na3 = list(map(int, input().split()))\na = [a1, a2, a3]\nn = int(input())\nb = []\nbng = 0\nfor i in range(n):\n bn = int(input())\n b.append(bn)\nfor i in range(3):\n for j in range(3):\n if a[i][j] in b:\n a[i][j] = -5\nfor i in range(3):\n if sum(a[i]) == -15:\n bng = 1\nfor i in range(3):\n cnt = 0\n for j in range(3):\n cnt += a[j][i]\n if cnt == -15:\n bng = 1\n \ncnt = 0\nfor i in range(3):\n cnt += a[i][i]\nif cnt == -15:\n bng = 1 \nif a[0][2] + a[1][1] + a[2][0] == -15:\n bng = 1\n \nif bng == 1:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s795579065', 's074290211'] | [3064.0, 3064.0] | [17.0, 18.0] | [672, 721] |
p02760 | u023229441 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A=list(map(int,input().split()))\nB=list(map(int,input().split()))\nC=list(map(int,input().split()))\nn=int(input())\nans=[[0,0,0] for i in range(3)]\ncount=-1\nfor i in range(n):\n s=int(input())\n for T in [A,B,C]:\n count+=1\n if s in T:\n ans[count][T.index(s)]=1\nfor i in range(3):\n if ans[i]==[1,1,1]:\n print("Yes")\n exit()\nfor i in range(3):\n if [ans[i][j] for j in range(3)]==[1,1,1]:\n print("Yes")\n exit()\nif [ans[0][0],ans[1][1],ans[2][2]]==[1,1,1]:\n print("Yes")\n exit()\nif [ans[0][2],ans[1][1],ans[2][0]]==[1,1,1]:\n print("Yes")\n exit()\nprint("No")\n', 'A=list(map(int,input().split()))\nB=list(map(int,input().split()))\nC=list(map(int,input().split()))\nn=int(input())\nans=[[0,0,0] for i in range(3)]\nfor i in range(n):\n s=int(input())\n for T in [A,B,C]:\n if s in T:\n ans[T.index(s)]=1\nfor i in range(3):\n if ans[i]==[1,1,1]:\n print("Yes")\n exit()\nfor i in range(3):\n if [ans[i][j] for j in range(3)]==[1,1,1]:\n print("Yes")\n exit()\nif [ans[0][0],ans[1][1],ans[2][2]]==[1,1,1]:\n print("Yes")\n exit()\nif [ans[0][2],ans[1][1],ans[2][0]]==[1,1,1]:\n print("Yes")\n exit()\nprint("No")', 'A=[]\nfor i in range(3):\n a,b,c=map(int,input().split())\n A+=[a,b,c]\n \nn=int(input())\nT=[0]*9\nfor i in range(n):\n p=int(input())\n if p in A:\n T[A.index(p)]=1\n \nif [1,1,1] in [T[0:3],T[3:6],T[6:9],T[0:7:3],T[1:9:3],T[2:9:3],T[0:10:4],T[2:7:2]]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s296802090', 's960672283', 's503703615'] | [3444.0, 3064.0, 3188.0] | [19.0, 18.0, 19.0] | [581, 551, 288] |
p02760 | u025501820 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['import numpy as np\na = []\nfor _ in range(3):\n a.append(list(map(int, input().split())))\na = list(np.array(a).flatten())\nN = int(input())\nindex = []\nfor _ in range(N):\n b_i = int(input())\n if b_i in a:\n indexes = [i for i, x in enumerate(a) if x == b_i]\n for i in indexes:\n index.append(i)\nprint(index)\nfor i in sorted(index):\n if i + 1 in index and i + 2 in index:\n print("Yes")\n exit()\n if i + 2 in index and i + 4 in index:\n print("Yes")\n exit()\n if i + 3 in index and i + 6 in index:\n print("Yes")\n exit()\n if i + 4 in index and i + 8 in index:\n print("Yes")\n exit()\nprint("No")', 'import numpy as np\na = []\nfor _ in range(3):\n a.append(list(map(int, input().split())))\na = list(np.array(a).flatten())\nN = int(input())\nindex = []\nfor _ in range(N):\n b_i = int(input())\n if b_i in a:\n index.append(a.index(b_i))\nfor i in sorted(index):\n if 0 in index and 1 in index and 2 in index:\n print("Yes")\n exit()\n elif 0 in index and 3 in index and 6 in index:\n print("Yes")\n exit()\n elif 0 in index and 4 in index and 8 in index:\n print("Yes")\n exit()\n elif 1 in index and 4 in index and 7 in index:\n print("Yes")\n exit()\n elif 2 in index and 5 in index and 8 in index:\n print("Yes")\n exit()\n elif 2 in index and 4 in index and 6 in index:\n print("Yes")\n exit()\n elif 3 in index and 4 in index and 5 in index:\n print("Yes")\n exit()\n elif 6 in index and 7 in index and 8 in index:\n print("Yes")\n exit()\nprint("No")'] | ['Wrong Answer', 'Accepted'] | ['s159049113', 's549239680'] | [14180.0, 12500.0] | [153.0, 150.0] | [683, 974] |
p02760 | u026731851 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['from numpy import *\nA = [ list(map(int,input().split(" "))) for i in range(3)]\nN=int(input())\nb = [input() for i in range(N)]\nC=zeros((3,3))\nfor i in range(0,3):\n for j in range(0,3):\n for k in range(0,N):\n if A[i][j]==b[k]:\n C[i][j]==1 \n\n # if C[i]==[1,1,1]:\n # print(\'Yes\')\nif C[0][0]==1 and C[1][1]==1 and C[2][2]==1:\n print("Yes") \nelif C[0][2]==1 and C[1][1]==1 and C[2][0]==1: \n print("Yes") \nelif C[0][0]==1 and C[1][0]==1 and C[2][0]==1:\n print("Yes") \nelif C[0][1]==1 and C[1][1]==1 and C[2][1]==1:\n print("Yes") \nelif C[0][2]==1 and C[1][2]==1 and C[2][2]==1:\n print("Yes") \nelif C[0][0]==1 and C[0][1]==1 and C[0][2]==1:\n print("Yes") \nelif C[1][0]==1 and C[1][1]==1 and C[1][2]==1:\n print("Yes") \nelif C[2][0]==1 and C[2][1]==1 and C[2][2]==1:\n print("Yes") \nelse:\n print("No")', 'from numpy import *\nimport itertools\n\nA = [ list(map(int,input().split(" "))) for i in range(3)]\nN=int(input())\n\nb=[]\nfor i in range(N):\n b.append(int(input())) \nC=zeros((3,3))\nfor i in range(0,3):\n for j in range(0,3): \n for k in range(0,N):\n if A[i][j]==b[k]:\n C[i][j]=1 \nif C[0][0]==1 and C[1][1]==1 and C[2][2]==1:\n print("Yes") \nelif C[0][2]==1 and C[1][1]==1 and C[2][0]==1: \n print("Yes") \nelif C[0][0]==1 and C[1][0]==1 and C[2][0]==1:\n print("Yes") \nelif C[0][1]==1 and C[1][1]==1 and C[2][1]==1:\n print("Yes") \nelif C[0][2]==1 and C[1][2]==1 and C[2][2]==1:\n print("Yes") \nelif C[0][0]==1 and C[0][1]==1 and C[0][2]==1:\n print("Yes") \nelif C[1][0]==1 and C[1][1]==1 and C[1][2]==1:\n print("Yes") \nelif C[2][0]==1 and C[2][1]==1 and C[2][2]==1:\n print("Yes") \nelse:\n print("No") '] | ['Wrong Answer', 'Accepted'] | ['s801043925', 's086619121'] | [12524.0, 21304.0] | [149.0, 324.0] | [870, 828] |
p02760 | u030410515 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['a=list(map(int,input().split()))\nb=list(map(int,input().split()))\nc=list(map(int,input().split()))\nmaru=111\nflag=0\nn=int(input())\nfor k in range(0,n):\n e=int(input())\n for i in range(0,3): \n if e==a[i]:\n a[i]=maru\n if e==b[i]:\n b[i]=maru\n if e==c[i]:\n c[i]=maru\n\nfor j in range(0,3):\n if a[j]==b[j] and b[j]==c[j]:\n if c[j]==maru:\n flag==1\n \nif a[0]==a[1] and a[1]==a[2]:\n if a[0]==maru:\n flag=1\nif b[0]==b[1] and b[1]==b[2]:\n if b[0]==maru:\n flag=1\nif c[0]==c[1] and c[1]==c[2]:\n if c[0]==maru:\n flag=1\n\nif a[0]==b[1] and b[1]==c[2]:\n if c[2]==maru:\n flag=1\n\nif a[2]==b[1] and b[1]==c[0]:\n if c[2]==maru:\n flag=1\n\nprint(a)\nprint(b)\nprint(c)\n\nif flag==1:\n print("Yes")\nelse:\n print("No")\n', 'a=list(map(int,input().split()))\nb=list(map(int,input().split()))\nc=list(map(int,input().split()))\nmaru=111\nflag=0\nn=int(input())\nfor k in range(0,n):\n e=int(input())\n for i in range(0,3): \n if e==a[i]:\n a[i]=maru\n if e==b[i]:\n b[i]=maru\n if e==c[i]:\n c[i]=maru\n\nfor j in range(0,3):\n if a[j]==b[j] and b[j]==c[j]:\n if c[j]==maru:\n flag=1\n \nif a[0]==a[1] and a[1]==a[2]:\n if a[0]==maru:\n flag=1\nif b[0]==b[1] and b[1]==b[2]:\n if b[0]==maru:\n flag=1\nif c[0]==c[1] and c[1]==c[2]:\n if c[0]==maru:\n flag=1\n\nif a[0]==b[1] and b[1]==c[2]:\n if c[2]==maru:\n flag=1\n\nif a[2]==b[1] and b[1]==c[0]:\n if c[0]==maru:\n flag=1\n\n\nprint(a)\nprint(b)\nprint(c)\n\nif flag==1:\n print("Yes")\nelse:\n print("No")\n', 'a=list(map(int,input().split()))\nb=list(map(int,input().split()))\nc=list(map(int,input().split()))\nmaru=111\nflag=0\nn=int(input())\nfor k in range(0,n):\n e=int(input())\n for i in range(0,3): \n if e==a[i]:\n a[i]=maru\n if e==b[i]:\n b[i]=maru\n if e==c[i]:\n c[i]=maru\n\nfor j in range(0,3):\n if a[j]==b[j] and b[j]==c[j]:\n if c[j]==maru:\n flag=1\n \nif a[0]==a[1] and a[1]==a[2]:\n if a[0]==maru:\n flag=1\nif b[0]==b[1] and b[1]==b[2]:\n if b[0]==maru:\n flag=1\nif c[0]==c[1] and c[1]==c[2]:\n if c[0]==maru:\n flag=1\n\nif a[0]==b[1] and b[1]==c[2]:\n if c[2]==maru:\n flag=1\n\nif a[2]==b[1] and b[1]==c[0]:\n if c[0]==maru:\n flag=1\n\n\n\nif flag==1:\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s934747661', 's957570873', 's171054719'] | [3064.0, 3064.0, 3064.0] | [19.0, 17.0, 17.0] | [839, 839, 812] |
p02760 | u030669569 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\nlst_b = [int(input()) for i in range(N)]\n\n\ndef main(A, N, lst_b):\n \n matrix_result = [[False]*3 for i in range(3)]\n flag_bingo = False\n\n for b in lst_b:\n for i in range(3):\n for j in range(3):\n if A[i][j] == b:\n matrix_result[i][j] = True\n \n for i in range(3):\n \n if (matrix_result[0][i] and matrix_result[1][i] and matrix_result[2][i]):\n flag_bingo = True\n \n if (matrix_result[i][0] and matrix_result[i][1] and matrix_result[i][2]):\n flag_bingo = True\n \n \n if (matrix_result[0][0] and matrix_result[1][1] and matrix_result[2][2]):\n flag_bingo = True\n elif (matrix_result[0][2] and matrix_result[1][1] and matrix_result[2][0]):\n flag_bingo = True\n\n print(matrix_result)\n \n if flag_bingo: return "Yes"\n else : return "No"\n \n\nif __name__ == "__main__":\n\n answer = main(A, N, lst_b)\n print(answer)\n ', 'A = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\nlst_b = [int(input()) for i in range(N)]\n\n\ndef main(A, N, lst_b):\n \n matrix_result = [[False]*3 for i in range(3)]\n flag_bingo = False\n\n for b in lst_b:\n for i in range(3):\n for j in range(3):\n if A[i][j] == b:\n matrix_result[i][j] = True\n \n for i in range(3):\n \n if (matrix_result[0][i] and matrix_result[1][i] and matrix_result[2][i]):\n flag_bingo = True\n \n if (matrix_result[i][0] and matrix_result[i][1] and matrix_result[i][2]):\n flag_bingo = True\n \n \n if (matrix_result[0][0] and matrix_result[1][1] and matrix_result[2][2]):\n flag_bingo = True\n elif (matrix_result[0][2] and matrix_result[1][1] and matrix_result[2][0]):\n flag_bingo = True\n \n if flag_bingo: return "Yes"\n else : return "No"\n \n\nif __name__ == "__main__":\n\n answer = main(A, N, lst_b)\n print(answer)\n '] | ['Wrong Answer', 'Accepted'] | ['s053342284', 's864079782'] | [3064.0, 3064.0] | [17.0, 17.0] | [1097, 1071] |
p02760 | u033642300 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["def main():\n top = list(map(int, input().split()))\n middle = list(map(int, input().split()))\n bottom = list(map(int, input().split()))\n N = int(input())\n taken = []\n for i in range(N):\n taken.append(int(input()))\n \n bingo = []\n bingo.append(top)\n bingo.append(middle)\n bingo.append(bottom)\n temp = [top[0], middle[0], bottom[0]]\n bingo.append(temp)\n temp = [top[1], middle[1], bottom[1]]\n bingo.append(temp)\n temp = [top[2], middle[2], bottom[2]]\n bingo.append(temp)\n temp = [top[0], middle[1], bottom[2]]\n bingo.append(temp)\n temp = [top[2], middle[1], bottom[0]]\n bingo.append(0)\n \n \n cnt = 0\n flag = 0\n for i in range(len(bingo)):\n cnt = 0\n for j in range(len(bingo[i])):\n if bingo[i][j] in taken:\n cnt += 1\n if cnt == 3:\n flag += 1\n \n if flag > 0:\n print('Yes')\n else:\n print('No')\nmain()", "def main():\n top = list(map(int, input().split()))\n middle = list(map(int, input().split()))\n bottom = list(map(int, input().split()))\n N = int(input())\n taken = []\n for i in range(N):\n taken.append(int(input()))\n \n bingo = []\n bingo.append(top)\n bingo.append(middle)\n bingo.append(bottom)\n temp = [top[0], middle[0], bottom[0]]\n bingo.append(temp)\n temp = [top[1], middle[1], bottom[1]]\n bingo.append(temp)\n temp = [top[2], middle[2], bottom[2]]\n bingo.append(temp)\n temp = [top[0], middle[1], bottom[2]]\n bingo.append(temp)\n temp = [top[2], middle[1], bottom[0]]\n bingo.append(temp)\n \n \n cnt = 0\n flag = 0\n for i in range(len(bingo)):\n cnt = 0\n for j in range(len(bingo[i])):\n if bingo[i][j] in taken:\n cnt += 1\n if cnt == 3:\n flag += 1\n \n if flag > 0:\n print('Yes')\n else:\n print('No')\nmain()"] | ['Runtime Error', 'Accepted'] | ['s957185594', 's272843584'] | [9172.0, 9228.0] | [23.0, 28.0] | [952, 955] |
p02760 | u035420666 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["A=[]\nb=[]\nc=[[0,0,0],[0,0,0],[0,0,0]]\nd=[[0,0,0],[0,0,0],[0,0,0]]\nfor i in range(3):\n x,y,z=map(int,input().split())\n A.append([x,y,z])\n\nN = int(input())\n\nfor i in range(N):\n b.append(int(input()))\n\nfor i in range(3):\n for j in range(3):\n if A[i][j] in b:\n c[i][j] = 1\n d[j][i] = 1\n\nprint(c)\nprint(d)\n\nif [1,1,1] in c[0:2]:\n print('Yes')\nelif [1,1,1] in d[0:2]:\n print('Yes')\nelif (c[0][0]+c[1][1]+c[2][2] == 3) or (d[0][0]+d[1][1]+d[2][2] == 3):\n print('Yes')\nelse:\n print('No')\n", "A=[]\nb=[]\nc=[[0,0,0],[0,0,0],[0,0,0]]\nd=[[0,0,0],[0,0,0],[0,0,0]]\nfor i in range(3):\n x,y,z=map(int,input().split())\n A.append([x,y,z])\n\nN = int(input())\n\nfor i in range(N):\n b.append(int(input()))\n\nfor i in range(3):\n for j in range(3):\n if A[i][j] in b:\n c[i][j] = 1\n d[j][i] = 1\n\nprint(c)\nprint(d)\n\nif [1,1,1] in c:\n print('Yes')\nelif [1,1,1] in d:\n print('Yes')\nelif (c[0][0]+c[1][1]+c[2][2] == 3) or (d[0][0]+d[1][1]+d[2][2] == 3):\n print('Yes')\nelse:\n print('No')\n", "A=[]\nb=[]\nc=[[0,0,0],[0,0,0],[0,0,0]]\nd=[[0,0,0],[0,0,0],[0,0,0]]\nfor i in range(3):\n x,y,z=map(int,input().split())\n A.append([x,y,z])\n\nN = int(input())\n\nfor i in range(N):\n b.append(int(input()))\n\nfor i in range(3):\n for j in range(3):\n if A[i][j] in b:\n c[i][j] = 1\n d[j][i] = 1\n\nif [1,1,1] in c:\n print('Yes')\nelif [1,1,1] in d:\n print('Yes')\nelif (c[0][0]+c[1][1]+c[2][2] == 3) or (c[0][2]+c[1][1]+c[2][0] == 3):\n print('Yes')\nelse:\n print('No')\n\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s138374257', 's592334098', 's559357934'] | [3064.0, 3064.0, 3064.0] | [18.0, 18.0, 18.0] | [533, 523, 505] |
p02760 | u042113240 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["import numpy as np\na = np.zeros((3,3))\nfor i in range(3):\n for j in range(3):\n a[i][j] = input()\nA = a.T\nN = input()\nb = np.zeros(N)\nfor i in range(N):\n b[i] = input()\nk = 0\nfor i in range(N):\n for j in range(3):\n for k in range(3):\n if a[j,k] == b[i]:\n a[j,k] == 0\nc = np.array(a[0,0],a[1,1],a[2,2])\nd = np.array(a[0,2],a[1,1],a[2,0])\nk = 1\nfor i in range(3):\n if a[i].cumprod * A[i].cumprod == 0:\n k = 0\nif c.cumprod * d.cumprod == 0:\n k = 0\nif k:\n print('No')\nelse:\n print('Yes')\n \n ", "a = [input().split() for l in range(3)]\na = [[int(item) for item in row] for row in a]\nN = int(input())\nb = [input() for i in range(N)]\nA = [[0,0,0],[0,0,0],[0,0,0]]\nx = 0\nfor i in range(N):\n for j in range(3):\n for k in range(3):\n if a[j][k] == b[i]:\n A[j][k] = 1\nfor i in range(3):\n if A[i][0]*A[i][1]*A[i][2] == 1 | A[0][i]*A[1][i]*A[2][i] == 1:\n x = 1\nif A[0][0]*A[1][1]*A[2][2] == 1 | A[0][2]*A[1][1]*A[2][0] == 1:\n x = 1\nif x:\n print('Yes')\nelse:\n print('No')\n ", "a = [input().split() for l in range(3)]\na = [[int(item) for item in row] for row in a]\nN = int(input())\nb = [input() for i in range(N)]\n\ntate0 = len(set(a[0]) & set(b)) == 3\ntate1 = len(set(a[1]) & set(b)) == 3\ntate2 = len(set(a[2]) & set(b)) == 3\nyoko0 = len(set([a[i][0] for i in range(3)]) & set(b)) == 3\nyoko1 = len(set([a[i][1] for i in range(3)]) & set(b)) == 3\nyoko2 = len(set([a[i][2] for i in range(3)]) & set(b)) == 3\nnaname0 = len(set([a[0][0],a[1][1],a[2][2]]) & set(b)) == 3\nnaname1 = len(set([a[0][2],a[1][1],a[2][0]]) & set(b)) == 3\nif tate0 | tate1 | tate2 | yoko0 | yoko1 | yoko2 | naname0 | naname1\n print('Yes')\nelse:\n print('No')\n ", "a = [input().split() for l in range(3)]\na = [[int(item) for item in row] for row in a]\nN = int(input())\nb = [input() for i in range(N)]\nA[[1,1,1],[1,1,1],[1,1,1]]\nx = 1\nfor i in range(N):\n for j in range(3):\n for k in range(3):\n if a[j][k] == b[i]:\n A[j][k] = 0\nfor i in range(3):\n if A[i][0]*A[i][1]*A[i][2] == 0 | A[0][i]*A[1][i]*A[2][i] == 0:\n x = 0\nif A[0][0]*A[1][1]*A[2][2] == 0 | A[0][2]*A[1][1]*A[2][0] == 0:\n x = 0\nif x:\n print('No')\nelse:\n print('Yes')\n ", "a = [input().split() for l in range(3)]\na = [[int(item) for item in row] for row in a]\nN = int(input())\nb = [input() for i in range(n)]\nx = 1\nfor i in range(N):\n for j in range(3):\n for k in range(3):\n if a[j][k] == b[i]:\n a[j][k] = 0\nfor i in range(3):\n if a[i][0]*a[i][1]*a[i][2] == 0 | a[0][i]*a[1][i]*a[2][i] == 0:\n x = 0\nif a[0][0]*a[1][1]*a[2][2] == 0 | a[0][2]*a[1][1]*a[2][0] == 0:\n x = 0\nif x:\n print('No')\nelse:\n print('Yes')\n ", "a = [input().split() for l in range(3)]\na = [[int(item) for item in row] for row in a]\nN = int(input())\nb = np.zeros(N)\nfor i in range(N):\n b[i] = int(input())\nx = 1\nfor i in range(N):\n for j in range(3):\n for k in range(3):\n if a[j][k] == b[i]:\n a[j][k] = 0\nfor i in range(3):\n if a[i][0]*a[i][1]*a[i][2] == 0 | a[0][i]*a[1][i]*a[2][i] == 0:\n x = 0\nif a[0][0]*a[1][1]*a[2][2] == 0 | a[0][2]*a[1][1]*a[2][0] == 0:\n x = 0\nif x:\n print('No')\nelse:\n print('Yes')\n ", "a = [input().split() for l in range(3)]\na = [[int(item) for item in row] for row in a]\nN = int(input())\nb = [input() for i in range(N)]\nA = [[1,1,1],[1,1,1],[1,1,1]]\nx = 1\nfor i in range(N):\n for j in range(3):\n for k in range(3):\n if a[j][k] == b[i]:\n A[j][k] = 0\nfor i in range(3):\n if A[i][0]*A[i][1]*A[i][2] == 0 | A[0][i]*A[1][i]*A[2][i] == 0:\n x = 0\nif A[0][0]*A[1][1]*A[2][2] == 0 | A[0][2]*A[1][1]*A[2][0] == 0:\n x = 0\nif x:\n print('No')\nelse:\n print('Yes')\n ", "import numpy as np\na = np.zeros((3,3))\nfor i in range(3):\n for j in range(3):\n a[i][j] = int(input())\nA = a.T\nN = int(input())\nb = np.zeros(N)\nfor i in range(N):\n b[i] = int(input())\nk = 0\nfor i in range(N):\n for j in range(3):\n for k in range(3):\n if a[j,k] == b[i]:\n a[j,k] = 0\na\nc = np.array([a[0,0],a[1,1],a[2,2]])\nd = np.array([a[0,2],a[1,1],a[2,0]])\nk = 1\nfor i in range(3):\n if (a[i] == 0).any() | (A[i] == 0).any():\n k = 0\nif (c == 0).any() | (d == 0).any():\n k = 0\nif k:\n print('No')\nelse:\n print('Yes')", "a = [input().split() for l in range(3)]\na = [[int(item) for item in row] for row in a]\nN = int(input())\nb = [input() for i in range(N)]\nx = 1\nfor i in range(N):\n for j in range(3):\n for k in range(3):\n if a[j][k] == b[i]:\n a[j][k] = 0\nfor i in range(3):\n if a[i][0]*a[i][1]*a[i][2] == 0 | a[0][i]*a[1][i]*a[2][i] == 0:\n x = 0\nif a[0][0]*a[1][1]*a[2][2] == 0 | a[0][2]*a[1][1]*a[2][0] == 0:\n x = 0\nif x:\n print('No')\nelse:\n print('Yes')\n ", 'a = [input().split() for l in range(3)]\nn = int(input())\nb = [input() for i in range(n)]\nc = [a[0][0],a[1][1],a[2][2]]\nd = [a[0][2],a[1][1],a[2][0]]\ntate1 = len(set(a[0]) & set(b))\ntate2 = len(set(a[1]) & set(b))\ntate3 = len(set(a[2]) & set(b))\nyoko1 = len(set([x[0] for x in a]) & set(b))\nyoko2 = len(set([x[1] for x in a]) & set(b))\nyoko3 = len(set([x[2] for x in a]) & set(b))\nnaname1 = len(set(c) & set(b))\nnaname2 = len(set(d) & set(b))\nbingo = [tate1,tate2,tate3,yoko1,yoko2,yoko3,naname1,naname2]\nif 3 in bingo:\n print("Yes")\nelse:\n print("No")\n\n '] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s474501406', 's542731493', 's595621687', 's687431810', 's759298398', 's803063188', 's918193537', 's944671187', 's993166871', 's719560977'] | [12516.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 14520.0, 3064.0, 3064.0] | [155.0, 18.0, 17.0, 18.0, 18.0, 18.0, 17.0, 149.0, 17.0, 17.0] | [518, 491, 654, 488, 461, 486, 491, 540, 461, 557] |
p02760 | u044026875 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['a=[]\nb=[]\nnums=[]\nans="No"\n\nfor i in range(3):\n l=list(map(int,input().split()))\n a.append(l)\n\nn=int(input())\n\nfor i in range(n):\n s=int(input())\n b.append(s)\n\nfor i in range(n):\n for j in range(3):\n for k in range(3):\n if b[i]==a[j][k]:\n a[j][k]=0\n num=10*(j+1)+k+1\n nums.append(num)\n\nnums.sort()\n\n\nif A[0][0]==A[0][1]==A[0][2]==0:\n ans="Yes"\nif A[1][0]==A[1][1]==A[1][2]==0:\n ans="Yes"\nif A[2][0]==A[2][1]==A[2][2]==0:\n ans="Yes"\nif A[0][0]==A[1][0]==A[2][0]==0:\n ans="Yes"\nif A[0][1]==A[1][1]==A[2][1]==0:\n ans="Yes"\nif A[0][2]==A[1][2]==A[2][2]==0:\n ans="Yes"\n \nif 11 in nums and 22 in nums and 33 in nums:\n ans="Yes"\n\nif 13 in nums and 22 in nums and 31 in nums:\n ans="Yes"\n \nprint(ans)', 'a=[]\nb=[]\nnums=[]\nans="No"\n\nfor i in range(3):\n l=list(map(int,input().split()))\n a.append(l)\n\nn=int(input())\n\nfor i in range(n):\n s=int(input())\n b.append(s)\n\nfor i in range(n):\n for j in range(3):\n for k in range(3):\n if b[i]==a[j][k]:\n a[j][k]=0\n num=10*(j+1)+k+1\n nums.append(num)\n\nnums.sort()\n\n\nif a[0][0]==a[0][1]==a[0][2]==0:\n ans="Yes"\nif a[1][0]==a[1][1]==a[1][2]==0:\n ans="Yes"\nif a[2][0]==a[2][1]==a[2][2]==0:\n ans="Yes"\nif a[0][0]==a[1][0]==a[2][0]==0:\n ans="Yes"\nif a[0][1]==a[1][1]==a[2][1]==0:\n ans="Yes"\nif a[0][2]==a[1][2]==a[2][2]==0:\n ans="Yes"\n \nif 11 in nums and 22 in nums and 33 in nums:\n ans="Yes"\n\nif 13 in nums and 22 in nums and 31 in nums:\n ans="Yes"\n \nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s950721917', 's873352450'] | [3064.0, 3064.0] | [18.0, 19.0] | [811, 811] |
p02760 | u044638697 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\nb = []\nfor i in range(N):\n b.append(int(input()))\nx = False\nfor i in range(3):\n count = 0\n for j in range(3):\n for k in range(N):\n if A[i][j] == b[k]:\n count += 1\n if count == 3:\n x = True\n break\nif not x:\n for i in range(3):\n count = 0\n for j in range(3):\n for k in range(N):\n if A[j][i] == b[k]:\n count += 1\n if count == 3:\n x = True\n break\nif not x:\n count = 0\n for i in range(3):\n for k in range(N):\n\n if A[i][i] == b[k]:\n count += 1\n if count == 3:\n x = True\nif not x:\n count = 0\n for i in range(3):\n for k in range(N):\n if A[2-i][i] == b[k]:\n count += 1\n if count == 3:\n x = True\n\nif x:\n print("YES")\nelse:\n print("NO")\n\n\n\n\n\n\n', 'A = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\nb = []\nfor i in range(N):\n b.append(int(input()))\nx = False\nfor i in range(3):\n count = 0\n for j in range(3):\n for k in range(N):\n if A[i][j] == b[k]:\n count += 1\n if count == 3:\n x = True\n break\nif not x:\n for i in range(3):\n count = 0\n for j in range(3):\n for k in range(N):\n if A[j][i] == b[k]:\n count += 1\n if count == 3:\n x = True\n break\nif not x:\n count = 0\n for i in range(3):\n for k in range(N):\n\n if A[i][i] == b[k]:\n count += 1\n if count == 3:\n x = True\nif not x:\n count = 0\n for i in range(3):\n for k in range(N):\n if A[2-i][i] == b[k]:\n count += 1\n if count == 3:\n x = True\n\nif x:\n print("Yes")\nelse:\n print("No")\n\n\n\n\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s934755841', 's970405214'] | [3064.0, 3064.0] | [17.0, 17.0] | [959, 959] |
p02760 | u047023156 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["import sys\n\ninput = sys.stdin.readline\n\nA = []\nb = []\nB = [[0, 0, 0] for _ in range(3)]\n\nfor _ in range(3):\n A.append(list(map(int, input().split())))\n\nN = int(input())\n\nfor _ in range(N):\n b.append(int(input()))\n\nfor value in b:\n for i in range(3):\n for j in range(3):\n if A[i][j] == value:\n B[i][j] = 1\n\nbingo = False\n\nif B[0][0] == 1:\n if B[0][1] == 1 and B[0][1] == 1:\n bingo = True\n if B[1][0] == 1 and B[2][0] == 1:\n bingo = True\n if B[1][1] == 1 and B[2][2] == 1:\n bingo = True\n\nif B[1][1] == 1:\n if B[1][0] == 1 and B[1][2] == 1:\n bingo = True\n if B[0][1] == 1 and B[2][1] == 1:\n bingo = True\n if B[0][2] == 1 and B[2][0] == 1:\n bingo = True \n\nif B[2][2] == 1:\n if B[0][2] == 1 and B[1][2] == 1:\n bingo = True\n if B[2][0] == 1 and B[2][1] == 1:\n bingo = True\n \nif bingo:\n print('Yes')\nelse:\n print('No')\n\nprint(B)", "import sys\n\ninput = sys.stdin.readline\n\nA = []\nb = []\nB = [[0, 0, 0] for _ in range(3)]\n\nfor _ in range(3):\n A.append(list(map(int, input().split())))\n\nN = int(input())\n\nfor _ in range(N):\n b.append(int(input()))\n\nfor value in b:\n for i in range(3):\n for j in range(3):\n if A[i][j] == value:\n B[i][j] = 1\n\nbingo = False\n\nif B[0][0] == 1:\n if B[0][1] == 1 and B[0][2] == 1:\n bingo = True\n if B[1][0] == 1 and B[2][0] == 1:\n bingo = True\n if B[1][1] == 1 and B[2][2] == 1:\n bingo = True\n\nif B[1][1] == 1:\n if B[1][0] == 1 and B[1][2] == 1:\n bingo = True\n if B[0][1] == 1 and B[2][1] == 1:\n bingo = True\n if B[0][2] == 1 and B[2][0] == 1:\n bingo = True \n\nif B[2][2] == 1:\n if B[0][2] == 1 and B[1][2] == 1:\n bingo = True\n if B[2][0] == 1 and B[2][1] == 1:\n bingo = True\n \nif bingo:\n print('Yes')\nelse:\n print('No')\n\n"] | ['Wrong Answer', 'Accepted'] | ['s939011043', 's098626489'] | [3064.0, 3064.0] | [17.0, 18.0] | [954, 946] |
p02760 | u050087249 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["a = [list(map(int, input().split())) for i in range(3)]\n \nnum = int(input())\nfor i in range(num):\n now = int(input())\n for i in range(3):\n for j in range(3):\n if(a[i][j] == now):\n a[i][j] = 0\nstr = 'No'\nfor j in range(3):\n a1, a2 = 0, 0\n for i in range(3):\n if(a[i][j] != 0):\n a1 = -1\n if(a[j][i] != 0):\n a2 = -1\n if(a1 == -1 and a2 == -1 and a3 == -1 and a4 == -1):\n print('No')\n exit()\n if(a[j][j] != 0):\n a3 = -1\n if(a[j][2-j] != 0):\n a4 = -1\nif(a1 == -1 and a2 == -1 and a3 == -1 and a4 == -1):\n print('No')\nelse:\n print('Yes')", "a = [list(map(int, input().split())) for i in range(3)]\n \nnum = int(input())\nfor i in range(num):\n now = int(input())\n for i in range(3):\n for j in range(3):\n if(a[i][j] == now):\n a[i][j] = 0\n \nfor i in range(3):\n if(a[i][0] == 0 and a[i][1] == 0 and a[i][2] == 0):\n ans = 'yes'\n if(a[0][i] == 0 and a[1][i] == 0 and a[2][i] == 0):\n ans = 'yes'\n \nif(a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0):\n ans = 'yes'\nif(a[0][2] == 0 and a[1][1] == 0 and a[2][0] == 0):\n ans = 'yes'\n\nprint(ans)", "a = [list(map(int, input().split())) for i in range(3)]\n \nnum = int(input())\nfor i in range(num):\n now = int(input())\n for i in range(3):\n for j in range(3):\n if(a[i][j] == now):\n a[i][j] = 0\nans = 'No' \nfor i in range(3):\n if(a[i][0] == 0 and a[i][1] == 0 and a[i][2] == 0):\n ans = 'Yes'\n if(a[0][i] == 0 and a[1][i] == 0 and a[2][i] == 0):\n ans = 'Yes'\n \nif(a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0):\n ans = 'Yes'\nif(a[0][2] == 0 and a[1][1] == 0 and a[2][0] == 0):\n ans = 'Yes'\n\nprint(ans)"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s144138993', 's275081436', 's517666564'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [589, 525, 535] |
p02760 | u054825571 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A=[list(map(int,input().split())) for _ in range(3)]\nN=int(input())\nB=[int(input()) for _ in range(N)]\nS=[[0,0,0] for _ in range(3)]\nfor b in B:\n for i in range(3):\n if b in A[i]:\n S[i][A[i].index(b)] = 1\n break\np = False\nfor a in S:\n if sum(a)==3:\n p = True\n break\nif not p:\n for i in range(3):\n if S[0][i]+S[1][i]+S[2][i]==3:\n p = True\n break\nif not p:\n if S[0][0]+S[1][1]+S[2][2]==3 or S[2][0]+S[1][1]+S[0][2]==3:\n p=True\nprint("Yes" if p else "No")\nprint(S)', 'A=[list(map(int,input().split())) for _ in range(3)]\nN=int(input())\nB=[int(input()) for _ in range(N)]\nS=[[0,0,0] for _ in range(3)]\nfor b in B:\n for i in range(3):\n if b in A[i]:\n S[i][A[i].index(b)] = 1\n break\np = False\nfor a in S:\n if sum(a)==3:\n p = True\n break\nif not p:\n for i in range(3):\n if S[0][i]+S[1][i]+S[2][i]==3:\n p = True\n break\nprint("Yes" if p else "No")', 'A=[list(map(int,input().split())) for _ in range(3)]\nN=int(input())\nB=[int(input()) for _ in range(N)]\nS=[[0,0,0] for _ in range(3)]\nfor b in B:\n for i in range(3):\n if b in A[i]:\n S[i][A[i].index(b)] = 1\n break\np = False\nfor a in S:\n if sum(a)==3:\n p = True\n break\nif not p:\n for i in range(3):\n if S[0][i]+S[1][i]+S[2][i]==3:\n p = True\n break\nif not p:\n if S[0][0]+S[1][1]+S[2][2]==3 or S[2][0]+S[1][1]+S[0][2]==3:\n p=True\nprint("Yes" if p else "No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s635305359', 's774019316', 's043514669'] | [9252.0, 9128.0, 9156.0] | [30.0, 26.0, 28.0] | [500, 407, 491] |
p02760 | u055687574 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['import itertools\n\nA = [input().split() for _ in range(3)]\nA = list(itertools.chain.from_iterable(A))\nN = int(input())\nB = [input() for _ in range(N)]\n\nl = [a in B for a in A]\nprint(l)\nif l[0] == l[1] == l[2]:\n print("Yes")\nelif l[3] == l[4] == l[5]:\n print("Yes")\nelif l[6] == l[7] == l[8]:\n print("Yes")\nelif l[0] == l[3] == l[6]:\n print("Yes")\nelif l[1] == l[4] == l[7]:\n print("Yes")\nelif l[2] == l[5] == l[8]:\n print("Yes")\nelif l[0] == l[4] == l[8]:\n print("Yes")\nelif l[2] == l[4] == l[6]:\n print("Yes")\nelse:\n print("No")', 'import itertools\n\nA = [input().split() for _ in range(3)]\nA = list(itertools.chain.from_iterable(A))\nN = int(input())\nB = [input() for _ in range(N)]\n\nl = [a in B for a in A]\nif l[0] == l[1] == l[2] == True:\n print("Yes")\nelif l[3] == l[4] == l[5] == True:\n print("Yes")\nelif l[6] == l[7] == l[8] == True:\n print("Yes")\nelif l[0] == l[3] == l[6] == True:\n print("Yes")\nelif l[1] == l[4] == l[7] == True:\n print("Yes")\nelif l[2] == l[5] == l[8] == True:\n print("Yes")\nelif l[0] == l[4] == l[8] == True:\n print("Yes")\nelif l[2] == l[4] == l[6] == True:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s866203354', 's178648580'] | [3064.0, 3064.0] | [18.0, 18.0] | [555, 610] |
p02760 | u056599756 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['a=[list(input().split()) for i in range(3)]\n\nn=int(input())\n\nb=list(int(input()) for i in range(n))\n\nc=[[0]*3 for i in range(3)]\n\nfor i in range(3):\n for j in range(3):\n c[i][j]=False\n for k in range(n):\n if a[i][j]==b[k]:\n c[i][j]=True\n\nanswer="No"\n\nfor i in range(3):\n if (c[i][0] and c[i][1] and c[i][2]):\n answer="Yes"\n if (c[0][i] and c[1][i] and c[2][i]):\n answer="Yes"\nif (c[0][0] and c[1][1] and c[2][2]):\n answer="Yes"\nif (c[0][2] and c[1][1] and c[2][0]):\n answer="Yes"\n\nprint(answer)', 'a=[list(map(int,input().split())) for i in range(3)]\n\nn=int(input())\n\nb=list(int(input()) for i in range(n))\n\nc=[[0]*3 for i in range(3)]\n\nfor i in range(3):\n for j in range(3):\n c[i][j]=False\n for k in range(n):\n if a[i][j]==b[k]:\n c[i][j]=True\n\nanswer="No"\n\nfor i in range(3):\n if (c[i][0] and c[i][1] and c[i][2]):\n answer="Yes"\n if (c[0][i] and c[1][i] and c[2][i]):\n answer="Yes"\nif (c[0][0] and c[1][1] and c[2][2]):\n answer="Yes"\nif (c[0][2] and c[1][1] and c[2][0]):\n answer="Yes"\n\nprint(answer)'] | ['Wrong Answer', 'Accepted'] | ['s249469229', 's223187328'] | [3064.0, 3064.0] | [17.0, 18.0] | [563, 572] |
p02760 | u056830573 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['rows = []\nfor i in range(3):\n row = [int(x) for x in input().split()]\n rows.append(row)\n\n\ncolumns = []\nfor k in range(3):\n column = [rows[l][k] for l in range(3)]\n columns.append(column)\n\nleft = []\nfor m in range(3):\n left.append(rows[m][m])\n\nright = []\nfor n in range(3):\n for o in range(3)[::-1]:\n right.append(rows[n][o])\n\nN = int(input())\nchoice = []\nfor j in range(N):\n choice.append(int(input()))\n\n\nmatches = []\nfor row in rows:\n matches.append([c for c in choice if c in row])\n\nfor column in columns:\n matches.append([c for c in choice if c in column])\n\nmatches.append([c for c in choice if c in left])\nmatches.append([c for c in choice if c in right])\n\n\nfor match in matches:\n if (len(matches) == 3):\n print("Yes")\nelse:\n print("No")\n', 'rows = []\nfor i in range(2):\n row = [int(x) for x in input().split()]\n rows.append(row)\n\nN = int(input())\nchoice = []\nfor j in range(N):\n choice.append(int(input()))\n\n\nfor row in rows:\n match = [c for c in choice if c in row]\n\n if (len(match) >= 3):\n print("yes")\n break\n\ncolumns = []\nfor k in range(3):\n column = [rows[l][k] for l in range(3)]\n columns.append(column)\n\nfor column in columns:\n match = [c for c in choice if c in column]\n\n if (len(match) >= 3):\n print("yes")\n break\n\nleft = []\nfor m in range(3):\n left.append(rows[m][m])\n\nfor x in left:\n match = [c for c in choice if c in x]\n\n if (len(match) >= 3):\n print("yes")\n break\n\nright = []\nfor n in range(3):\n for o in range(3)[::-1]:\n right.append(rows[n][o])\n\nfor y in right:\n match = [c for c in choice if c in y]\n\n if (len(match) >= 3):\n print("yes")\n break\n', 'rows = []\nfor i in range(3):\n row = [int(x) for x in input().split()]\n rows.append(row)\n\nN = int(input())\nchoice = []\nfor j in range(N):\n choice.append(int(input()))\n\n\nfor row in rows:\n match = [c for c in choice if c in row]\n\n if (len(match) >= 3):\n print("yes")\n break\n\ncolumns = []\nfor k in range(3):\n column = [rows[l][k] for l in range(3)]\n columns.append(column)\n\nfor column in columns:\n match = [c for c in choice if c in column]\n\n if (len(match) >= 3):\n print("yes")\n break\n\nleft = []\nfor m in range(3):\n left.append(rows[m][m])\n\nright = []\nfor n in range(3):\n for o in range(3)[::-1]:\n right.append(rows[n][o])\n\nmatch_left = [c for c in choice if c in left]\nmatch_right = [c for c in choice if c in right]\n\nif (len(match_left) >= 3):\n print("yes")\nelif (len(match_right) >= 3):\n print("yes")\nelse:\n print("no")\n', 'rows = []\nfor i in range(3):\n row = [int(x) for x in input().split()]\n rows.append(row)\n\n\ncolumns = []\nfor k in range(3):\n column = [rows[l][k] for l in range(3)]\n columns.append(column)\n\nleft = []\nfor m in range(3):\n left.append(rows[m][m])\n\nright = []\nfor n in range(3):\n for o in range(3)[::-1]:\n right.append(rows[n][o])\n\nN = int(input())\nchoice = []\nfor j in range(N):\n choice.append(int(input()))\n\n\nmatches = []\nfor row in rows:\n matches.append([c for c in choice if c in row])\n\nfor column in columns:\n matches.append([c for c in choice if c in column])\n\nmatches.append([c for c in choice if c in left])\nmatches.append([c for c in choice if c in right])\n\n\nfor match in matches:\n if (len(matches) == 3):\n print("Yes")\n break\nelse:\n print("No")\n', 'rows = []\nfor i in range(3):\n row = [int(x) for x in input().split()]\n rows.append(row)\n\n\ncolumns = []\nfor k in range(3):\n column = [rows[l][k] for l in range(3)]\n columns.append(column)\n\nleft = []\nfor m in range(3):\n left.append(rows[m][m])\n\nright = []\no = 2\nfor n in range(3):\n right.append(rows[n][o])\n o -= 1\n\n\nN = int(input())\nchoice = []\nfor j in range(N):\n choice.append(int(input()))\n\n\nmatches = []\nfor row in rows:\n matches.append([c for c in row if c in choice])\n\nfor column in columns:\n matches.append([c for c in column if c in choice])\n\nmatches.append([c for c in left if c in choice])\nmatches.append([c for c in right if c in choice])\n\n\nisPrinted = False\nfor match in matches:\n if (len(match) == 3):\n print("Yes")\n isPrinted = True\n break\n\nif (not isPrinted):\n print("No")\n'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s155872838', 's299774524', 's675665554', 's677018594', 's959354778'] | [3064.0, 3064.0, 3064.0, 3064.0, 3188.0] | [17.0, 19.0, 17.0, 17.0, 22.0] | [789, 929, 897, 803, 844] |
p02760 | u062691227 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["import numpy as np\n\ncard = np.array([list(map(int, input().split())) for i in range(3)])\n\nn = int(input())\n\nnumber = [int(input()) for i in range(n)]\n\nhit = np.isin(card, number)\n\nrow = hit.all(axis=0).any()\ncol = hit.all(axis=1).any()\n\ndiag1 = hit[0][0] and hit[1][1] and hit[2][2]\ndiag2 = hit[0][2] and hit[1][1] and hit[2][0]\n\nprint('yes' if row or col or diag1 or diag2 else 'no')", "import numpy as np\n\ncard = np.array([list(map(int, input().split())) for i in range(3)])\n\nn = int(input())\n\nnumber = [int(input()) for i in range(n)]\n\nhit = np.vectorize(lambda x: x in number)(card)\n\nrow = hit.all(axis=0).any()\ncol = hit.all(axis=1).any()\n\ndiag1 = hit[0][0] and hit[1][1] and hit[2][2]\ndiag2 = hit[0][2] and hit[1][1] and hit[2][0]\n\nprint('Yes' if row or col or diag1 or diag2 else 'No')"] | ['Runtime Error', 'Accepted'] | ['s572255007', 's033860984'] | [12440.0, 12488.0] | [149.0, 150.0] | [384, 404] |
p02760 | u063346608 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['s = 3\narr =[]\nfor _ in range(s):\n arr.append(list(map(int, input().rstrip().split())))\nprint(arr)\n\ncheck = [[0,0,0],[0,0,0],[0,0,0]]\n#print(check)\n\n\nN = int(input())\n#print(N)\n\nfor i in range(N):\n data = int(input())\n for k in range(3):\n for j in range(3):\n if data == arr[j][k]:\n check[j][k]= 1\n#print(check)\n\n\nanswer = "No"\nfor k in range(3):\n if check[k][0] == 1 and check[k][1]== 1 and check[k][2] == 1:\n answer = "Yes"\n\nfor j in range(3):\n if check[0][j] == 1 and check[1][j] == 1 and check[2][j] == 1:\n answer = "Yes"\n\nif check[0][0] == 1 and check[1][1] == 1 and check[2][2] == 1:\n answer = "Yes"\n\nif check[0][2] == 1 and check[1][1] == 1 and check[2][0] == 1:\n answer = "Yes"\n\n\nprint(answer)', 'H = [[0] * 3 for i in range(3)]\nA = [[0] * 3 for i in range(3)]\n\nA[0][0],A[0][1],A[0][2] = map(int,input().split())\nA[1][0],A[1][1],A[1][2] = map(int,input().split())\nA[2][0],A[2][1],A[2][2] = map(int,input().split())\n\nN = int(input())\nfor i in range(N):\n\tball = int(input())\n\tfor l in range(3):\n\t\tfor c in range(3):\n\t\t\tif A[l][c] == ball:\n\t\t\t\tH[l][c] = 1\n#print(H)\nflag = 0\nfor l in range(3):\n\tif H[l][0] ==1 and H[l][1] ==1 and H[l][2] ==1:\n\t\tflag =1\n\nfor c in range(3):\n\tif H[0][c] ==1 and H[1][c] ==1 and H[2][c] ==1:\n\t\tflag =1\n\nif H[0][0]==1 and H[1][1]==1 and H[2][2]== 1:\n\tflag = 1\n\nif H[2][0]==1 and H[1][1]==1 and H[0][2]== 1:\n\tflag = 1\n\nif flag == 1:\n\tprint("Yes")\nelse:\n\tprint("No")\n#A[2][1] = 10\n#print(A)\n#print(flag)'] | ['Wrong Answer', 'Accepted'] | ['s634962653', 's181908060'] | [3064.0, 9288.0] | [18.0, 25.0] | [802, 732] |
p02760 | u064434060 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['a = [input().split() for l in range(3)]\n\nn=int(input())\nb = [(input()) for i in range(n)]\ns=[]\nfor i in range(n):\n for j in range(3):\n if b[i] in a[j]:\n k=a[j].index(b[i])\n s.append([j,k])\n if [j,0] in s and [j,1] in s and [j,2] in s:\n print("YES")\n break\n elif [0,k] in s and [1,k] in s and [2,k] in s:\n print("YES")\n break\n elif j==k:\n if [0,0] in s and [1,1] in s and [2,2] in s:\n print("YES")\n break\n elif [0,2] in s and [1,1] in s and [2,0] in s:\n print("YES")\n break\n else:\n continue\n break\nelse:\n print("NO")', 'a = [input().split() for l in range(3)]\n\nn=int(input())\nb = [(input()) for i in range(n)]\ns=[]\nfor i in range(n):\n for j in range(3):\n if b[i] in a[j]:\n k=a[j].index(b[i])\n s.append([j,k])\n if [j,0] in s and [j,1] in s and [j,2] in s:\n print("YES")\n break\n elif [0,k] in s and [1,k] in s and [2,k] in s:\n print("YES")\n break\n elif j==k:\n if [0,0] in s and [1,1] in s and [2,2] in s:\n print("YES")\n break\n elif [0,2] in s and [1,1] in s and [2,0] in s:\n print("YES")\n break\n else:\n continue\n break\nelse:\n print("NO")', 'a = [input().split() for l in range(3)]\n\nn=int(input())\nb = [(input()) for i in range(n)]\ns=[]\nfor i in range(n):\n for j in range(3):\n if b[i] in a[j]:\n k=a[j].index(b[i])\n s.append([j,k])\n if [j,0] in s and [j,1] in s and [j,2] in s:\n print("Yes")\n break\n elif [0,k] in s and [1,k] in s and [2,k] in s:\n print("Yes")\n break\n elif j==k:\n if [0,0] in s and [1,1] in s and [2,2] in s:\n print("Yes")\n break\n elif [0,2] in s and [1,1] in s and [2,0] in s:\n print("Yes")\n break\n else:\n continue\n break\nelse:\n print("No")\n '] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s209684205', 's933376250', 's660024094'] | [3064.0, 3192.0, 3064.0] | [18.0, 17.0, 17.0] | [628, 628, 633] |
p02760 | u066413086 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A=[]\nfor i in range(3):\n A.append(list(map(int, input().split()))) \n\nN = int(input())\nB = []\nfor i in range(N):\n B.append(int(input()))\n\n#print(A)\n\n\nmatch = []\nfor A_line in A:\n match.append([(a in B) for a in A_line])\n\n#print(match)\nans = False\n\nfor m in match:\n ans = ans or all(m)\n\n\nmatch_v = [[m[i] for m in match] for i in range(3)]\n#print(match_v)\nfor m in match_v:\n ans = ans or all(m)\n\nans = ans or all([match[i][i] for i in range(3)])\nans = ans or all([match[2-i][i] for i in range(3)])\n\nprint(ans)', "A=[]\nfor i in range(3):\n A.append(list(map(int, input().split()))) \n\nN = int(input())\nB = []\nfor i in range(N):\n B.append(int(input()))\n\n#print(A)\n\n\nmatch = []\nfor A_line in A:\n match.append([(a in B) for a in A_line])\n\n#print(match)\nans = False\n\nfor m in match:\n ans = ans or all(m)\n\n\nmatch_v = [[m[i] for m in match] for i in range(3)]\n#print(match_v)\nfor m in match_v:\n ans = ans or all(m)\n\nans = ans or all([match[i][i] for i in range(3)])\nans = ans or all([match[2-i][i] for i in range(3)])\n\nprint('Yes' if ans else 'No')"] | ['Wrong Answer', 'Accepted'] | ['s833800068', 's961179302'] | [3064.0, 3064.0] | [17.0, 17.0] | [540, 559] |
p02760 | u068142202 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A = [list(map(int,input().split())) for i in range(3)]\nN = int(input())\nB = [int(input()) for i in range(N)]\nans = 0\nfor i in range(3):\n for j in range(3):\n for k in B:\n if A[i][j] == k:\n A[i][j] = 1\nprint(A)\nfor i in range(3):\n if A[i].count(1) == 3:\n ans += 1\n elif A[0][i] == 1 and A[2][i] == 1 and A[2][i] == 1:\n ans += 1\nif A[0][0] == 1 and A[1][1] == 1 and A[2][2] == 1:\n ans += 1\nelif A[0][2] == 1 and A[1][1] == 1 and A[2][0] == 1:\n ans += 1\nelif ans > 1:\n print("Yes")\nelse:\n print("No")\n\n', 'A = [list(map(int,input().split())) for i in range(3)]\nN = int(input())\nB = [int(input()) for i in range(N)]\nans = 0\nfor i in range(3):\n for j in range(3):\n for k in B:\n if A[i][j] == k:\n A[i][j] = 1\nfor i in range(3):\n if A[i].count(1) == 3:\n ans += 1\n elif A[0][i] == 1 and A[2][i] == 1 and A[2][i] == 1:\n ans += 1\nif A[0][0] == 1 and A[1][1] == 1 and A[2][2] == 1:\n ans += 1\nelif A[0][2] == 1 and A[1][1] == 1 and A[2][0] == 1:\n ans += 1\nelif ans > 1:\n print("Yes")\nelse:\n print("No")\n', 'a = []\n[a.append(list(map(int, input().split()))) for _ in range(3)]\nn = int(input())\nb = [int(input())for _ in range(n)]\nfor i in b:\n for j in range(3):\n for k in range(3):\n if a[j][k] == i:\n a[j][k] = 1\nans = 0\ncount =0\nfor j in range(3):\n if a[j].count(1) == 3:\n ans += 1\n elif (a[0][j] == a[1][j] == a[2][j]) == 1:\n ans += 1\n elif (a[0][0] == a[1][1] == a[2][2]) == 1:\n ans += 1\n elif (a[0][2] == a[1][1] == a[2][0]) == 1:\n ans += 1\nif ans > 0:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s550378611', 's568004269', 's899215346'] | [3064.0, 3064.0, 3064.0] | [17.0, 18.0, 18.0] | [526, 516, 515] |
p02760 | u068750695 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['a=[list(map(int,input().split())) for i in range(3)]\nn=int(input())\nfor i in range(n):\n b=int(input())\n for j in range(3):\n for k in range(3):\n if a[j][k]==b:\n a[j][k]=0\n \nfor i in range(3):\n flag=True\n for j in range(3):\n if a[i][j]!=0:\n flag=False\n if flag:\n print("Yes")\n exit()\n \nfor i in range(3):\n flag=True\n for j in range(3):\n if a[j][i]!=0:\n flag=False\n if flag:\n print("Yes")\n exit()\n \nfor i in range(3):\n flaf=True\n if a[i][i]!=0:\n flag=False\nif flag:\n print("Yes")\n exit()\n \nfor i in range(3):\n if a[i][2-i]!=0:\n print("No")\n exit()\nprint("Yes")\nexit()', 'a=[list(map(int,input().split())) for i in range(3)]\nn=int(input())\nfor i in range(n):\n b=int(input())\n for j in range(3):\n for k in range(3):\n if a[j][k]==b:\n a[j][k]=0\n \nfor i in range(3):\n flag=True\n for j in range(3):\n if a[i][j]!=0:\n flag=False\n if flag:\n print("Yes")\n exit()\n \nfor i in range(3):\n flag=True\n for j in range(3):\n if a[j][i]!=0:\n flag=False\n if flag:\n print("Yes")\n exit()\n\nflag=True\nfor i in range(3):\n if a[i][i]!=0:\n flag=False\nif flag:\n print("Yes")\n exit()\n \nfor i in range(3):\n if a[i][2-i]!=0:\n print("No")\n exit()\nprint("Yes")\nexit()'] | ['Wrong Answer', 'Accepted'] | ['s867811553', 's736432463'] | [3064.0, 3064.0] | [17.0, 17.0] | [721, 716] |
p02760 | u069699931 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["Aij= [input().split() for l in range(3)]\nN=int(input())\nb= [int(input()) for i in range(N)]\nfor j in range(3):\n for k in range(3):\n for n in range(N):\n if int(Aij[j][k])==b[n]:\n Aij[j][k]='0'\nif (A[0][0] == A[0][1] == A[0][2] == 0) or (A[1][0] == A[1][1] == A[1][2] == 0) or (A[2][0] == A[2][1] == A[2][2] == 0):\nelif Aij[0][0]=='0' and Aij[0][1]=='0' and Aij[0][2]=='0':\n print('Yes')\nelif Aij[1][0]=='0' and Aij[1][1]=='0' and Aij[1][2]=='0':\n print('Yes')\nelif Aij[2][0]=='0' and Aij[2][1]=='0' and Aij[2][2]=='0':\n print('Yes')\nelif Aij[0][0]=='0'and Aij[1][1]=='0'and Aij[2][2]=='0':\n print('Yes')\nelif Aij[0][2]=='0' and Aij[1][1]=='0'and Aij[2][0]=='0':\n print('Yes')\nelse:\n print('No')", "Aij= [input().split() for l in range(3)]\nN=int(input())\nb= [int(input()) for i in range(N)]\nfor j in range(3):\n for k in range(3):\n for n in range(N):\n if int(Aij[j][k])==b[n]:\n Aij[j][k]='0'\nif (A[0][0] == A[0][1] == A[0][2] == 0) or (A[1][0] == A[1][1] == A[1][2] == 0) or (A[2][0] == A[2][1] == A[2][2] == 0):\n print('Yes')\nelif Aij[0][0]=='0' and Aij[0][1]=='0' and Aij[0][2]=='0':\n print('Yes')\nelif Aij[1][0]=='0' and Aij[1][1]=='0' and Aij[1][2]=='0':\n print('Yes')\nelif Aij[2][0]=='0' and Aij[2][1]=='0' and Aij[2][2]=='0':\n print('Yes')\nelif Aij[0][0]=='0'and Aij[1][1]=='0'and Aij[2][2]=='0':\n print('Yes')\nelif Aij[0][2]=='0' and Aij[1][1]=='0'and Aij[2][0]=='0':\n print('Yes')\nelse:\n print('No')", "Aij= [input().split() for l in range(3)]\nN=int(input())\nb= [int(input()) for i in range(N)]\nfor j in range(3):\n for k in range(3):\n for n in range(N):\n if int(Aij[j][k])==b[n]:\n Aij[j][k]='0'\nif Aij[0].count('0')==3 or Aij[1].count('0')==3 or Aij[2].count('0')==3:\n print('Yes')\nelif Aij[0][0]=='0' and Aij[1][0]=='0' and Aij[2][0]=='0':\n print('Yes')\nelif Aij[0][1]=='0' and Aij[1][1]=='0' and Aij[2][1]=='0':\n print('Yes')\nelif Aij[0][2]=='0' and Aij[1][2]=='0' and Aij[2][2]=='0':\n print('Yes')\nelif Aij[0][0]=='0'and Aij[1][1]=='0'and Aij[2][2]=='0':\n print('Yes')\nelif Aij[0][2]=='0' and Aij[1][1]=='0'and Aij[2][0]=='0':\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s444107562', 's811119662', 's941384271'] | [8992.0, 9312.0, 9296.0] | [25.0, 25.0, 28.0] | [747, 764, 716] |
p02760 | u071695942 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["\nli1 = list(map(int,input().split()))\nli1.extend(list(map(int,input().split())))\nli1.extend(list(map(int,input().split())))\nn = int(input())\nfor i in range(n):\n p = int(input())\n li1 = [0 if j == p else j for j in li1]\nprint(li1)\nif ( li1[0] + li1[1] + li1[2] ) == 0:\n print('Yes')\nelif ( li1[3] + li1[4] + li1[5] ) == 0:\n print('Yes')\nelif ( li1[6] + li1[7] + li1[8] ) == 0:\n print('Yes')\nelif ( li1[0] + li1[3] + li1[6] ) == 0:\n print('Yes')\nelif ( li1[1] + li1[4] + li1[7] ) == 0:\n print('Yes')\nelif ( li1[2] + li1[5] + li1[8] ) == 0:\n print('Yes')\nelif ( li1[0] + li1[4] + li1[8] ) == 0:\n print('Yes')\nelif ( li1[2] + li1[4] + li1[6] ) == 0:\n print('Yes')\nelse:\n print('No')", "li1 = list(map(int,input().split()))\nli1.extend(list(map(int,input().split())))\nli1.extend(list(map(int,input().split())))\nn = int(input())\nfor i in range(n):\n p = int(input())\n li1 = [0 if j == p else j for j in li1]\nif ( li1[0] + li1[1] + li1[2] ) == 0:\n print('Yes')\nelif ( li1[3] + li1[4] + li1[5] ) == 0:\n print('Yes')\nelif ( li1[6] + li1[7] + li1[8] ) == 0:\n print('Yes')\nelif ( li1[0] + li1[3] + li1[6] ) == 0:\n print('Yes')\nelif ( li1[1] + li1[4] + li1[7] ) == 0:\n print('Yes')\nelif ( li1[2] + li1[5] + li1[8] ) == 0:\n print('Yes')\nelif ( li1[0] + li1[4] + li1[8] ) == 0:\n print('Yes')\nelif ( li1[2] + li1[4] + li1[6] ) == 0:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s819023503', 's613839516'] | [3064.0, 3064.0] | [17.0, 17.0] | [689, 677] |
p02760 | u075401284 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['al = [map(int, input().split()) for i in range(3)]\nn = int(input())\nbl = [int(input()) for i in range(n)]\ncheck = [0 for i in range(9)]\n\nfor b in bl:\n if b in al:\n check[al.index(b)] = 1\n\nif [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]]:\n print("Yes")\nelse:\n print("No")\n', 'al = [list(map(int, input().split())) for i in range(3)]\nal = sum(a, [])\nn = int(input())\nbl = [int(input()) for i in range(n)]\ncheck = [0 for i in range(9)]\n\nfor b in bl:\n if b in al:\n check[al.index(b)] = 1\n\nif [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]]:\n print("Yes")\nelse:\n print("No")', 'al = [list(map(int, input().split())) for i in range(3)]\nal = sum(al, [])\nn = int(input())\nbl = [int(input()) for i in range(n)]\ncheck = [0 for i in range(9)]\n\nfor b in bl:\n if b in al:\n check[al.index(b)] = 1\n\nif [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]]:\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s305469593', 's391366111', 's274693447'] | [9084.0, 9052.0, 9048.0] | [30.0, 29.0, 32.0] | [357, 378, 380] |
p02760 | u075683628 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["import numpy as np\n\nmat = []\n\nfor i in range(3):\n\t(a,b,c)= input().split(' ')\n\tmat.append((int(a),int(b),int(c)))\n\nmat = np.array(mat).reshape(3,3)\n\n\nnum = int(input())\nball=[]\nfor i in range(num):\n ball.append(int(input()))\n\nball = set(ball)\n\nfor h in range(3):\n x = set(mat[h,:])\n res = ball.intersection(x) == x\n if res:\n print(res)\n exit()\n\nfor w in range(3):\n x = set(mat[:, w])\n res = ball.intersection(x) == x\n if res:\n print(res)\n exit()\n\nx = {mat[0,0],mat[1,1], mat[2,2]}\nres = ball.intersection(x) == x\nif res:\n print(res)\n exit()\n\nx = {mat[2,0],mat[1,1], mat[0,2]} \nres = ball.intersection(x) == x\nif res:\n print(res)\n exit()\n \nprint(res)", "import numpy as np\n\nmat = []\n\nfor i in range(3):\n\t(a,b,c)= input().split(' ')\n\tmat.append((int(a),int(b),int(c)))\n\nmat = np.array(mat).reshape(3,3)\n\n\nnum = int(input())\nball=[]\nfor i in range(num):\n ball.append(int(input()))\n\nball = set(ball)\n\nfor h in range(3):\n x = set(mat[h,:])\n res = ball.intersection(x) == x\n if res:\n print('Yes')\n exit()\n\nfor w in range(3):\n x = set(mat[:, w])\n res = ball.intersection(x) == x\n if res:\n print('Yes')\n exit()\n\nx = {mat[0,0],mat[1,1], mat[2,2]}\nres = ball.intersection(x) == x\nif res:\n print('Yes')\n exit()\n\nx = {mat[2,0],mat[1,1], mat[0,2]} \nres = ball.intersection(x) == x\nif res:\n print('Yes')\n exit()\n \nprint('No')"] | ['Wrong Answer', 'Accepted'] | ['s923398262', 's499106884'] | [12472.0, 12500.0] | [153.0, 149.0] | [674, 683] |
p02760 | u077291787 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['/* \n * Created by solzard on 2020-03-05.\n * \n */\n\n\n\n\n\nbool is_bingo(int player) {\n std::unordered_set<int> winnable_conditions\n {0b111000000, 0b000111000, 0b000000111, 0b100100100, 0b010010010, 0b001001001, 0b100010001, 0b001010100};\n for (const auto &condition : winnable_conditions) {\n if ((player & condition) == condition) return true;\n }\n return false;\n}\n\nint main() {\n std::cin.tie(nullptr);\n std::ios_base::sync_with_stdio(false);\n\n std::vector<int> sheet;\n std::unordered_set<int> bingo;\n int a, n, b;\n rep(_, 9) {\n std::cin >> a;\n sheet.emplace_back(a);\n }\n std::cin >> n;\n rep(_, n) {\n std::cin >> b;\n bingo.emplace(b);\n }\n int player = 0;\n rep(i, 9) {\n if (bingo.find(sheet[i]) != bingo.end()) {\n player |= 1 << i;\n }\n }\n std::cout << (is_bingo(player) ? "Yes" : "No") << "\\n";\n}\n', '/* \n * Created by solzard on 2020-03-05.\n * \n */\n\n\n#include <algorithm>\n\n\n\nbool is_bingo(int player) {\n std::unordered_set<int> winnable_conditions\n {0b111000000, 0b000111000, 0b000000111, 0b100100100, 0b010010010, 0b001001001, 0b100010001, 0b001010100};\n for (const auto &condition : winnable_conditions) {\n if ((player & condition) == condition) return true;\n }\n return false;\n}\n\nint main() {\n std::cin.tie(nullptr);\n std::ios_base::sync_with_stdio(false);\n\n std::vector<int> sheet;\n std::unordered_set<int> bingo;\n int a, n, b;\n rep(_, 9) {\n std::cin >> a;\n sheet.emplace_back(a);\n }\n std::cin >> n;\n rep(_, n) {\n std::cin >> b;\n bingo.emplace(b);\n }\n int player = 0;\n rep(i, 9) {\n if (bingo.find(sheet[i]) != std::end(bingo)) {\n player |= 1 << i;\n }\n }\n std::cout << (is_bingo(player) ? "Yes" : "No") << "\\n";\n}\n\n', '# B - Bingo\ndef is_winnable(player: int) -> bool:\n winnable_conditions = \\\n {0b111000000, 0b000111000, 0b000000111, 0b100100100, 0b010010010, 0b001001001, 0b100010001, 0b001010100}\n return any(player & condition == condition for condition in winnable_conditions)\n\n\ndef main():\n *ANB, = map(int, open(0).read().split())\n A, B = ANB[:9], set(ANB[10:])\n player = 0b000000000\n for i, a in enumerate(A):\n if a in B:\n player |= 1 << i\n print("Yes" if is_winnable(player) else "No")\n\n\nif __name__ == "__main__":\n main()\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s166863945', 's217511675', 's413294888'] | [2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0] | [952, 978, 562] |
p02760 | u078276601 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A = [list(map(int, input().split())) for i in range(3)]\n\nn = int(input())\n\nfor j in range(n):\n b = int(input())\n for j in range(3):\n if A[j][0] == b:\n A[j][0] = 0\n if A[j][1] == b:\n A[j][1] = 0\n if A[j][2] == b:\n A[j][2] = 0\n\nif A[0][0]==A[1][1]==A[2][2]==0:\n print("Yes")\n exit\nelif A[0][2]==A[1][1]==A[2][0]==0:\n print("Yes")\n exit\n \nelif for k in range(3):\n if A[k][0]==A[k][1]==A[k][2]==0:\n print("Yes")\n exit\n elif A[0][k]==A[1][k]==A[2][k]==0:\n print("Yes")\n exit\n\nelse:\n print("No")', 'A = [list(map(int, input().split())) for i in range(3)]\n\nn = int(input())\n\nfor j in range(n):\n b = int(input())\n for j in range(3):\n if A[j][0] == b:\n A[j][0] = 0\n if A[j][1] == b:\n A[j][1] = 0\n if A[j][2] == b:\n A[j][2] = 0\n\nfor k in range(3):\n if A[k][0]==a[k][1]==a[k][2]==0:\n print("Yes")\n elif A[0][k]==A[1][k]==A[2][k]==0:\n print("Yes")\n exit\nif A[0][0]==A[1][1]==A[2][2]==0:\n print("Yes")\nelif A[0][2]==A[1][1]==A[2][0]==0:\n print("Yes")\nelse:\n print("No")', 'A = [list(map(int, input().split())) for i in range(3)]\n\nn = int(input())\n\nfor j in range(n):\n b = int(input())\n for j in range(3):\n if A[j][0] == b:\n A[j][0] = 0\n if A[j][1] == b:\n A[j][1] = 0\n if A[j][2] == b:\n A[j][2] = 0\n\nif A[0][0]==A[1][1]==A[2][2]==0:\n print("Yes")\nelif A[0][2]==A[1][1]==A[2][0]==0:\n print("Yes") \nelif for k in range(3):\n if A[k][0]==A[k][1]==A[k][2]==0:\n print("Yes")\n elif A[0][k]==A[1][k]==A[2][k]==0:\n print("Yes")\nelse:\n print("No")', 'A = [list(map(int, input().split())) for i in range(3)]\n\nn = int(input())\n\nfor j in range(n):\n b = int(input())\n for l in range(3):\n if A[l][0] == b:\n A[l][0] = 0\n if A[l][1] == b:\n A[l][1] = 0\n if A[l][2] == b:\n A[l][2] = 0\n\nif A[0][0]==A[1][1]==A[2][2]==0:\n print("Yes")\nelif A[0][2]==A[1][1]==A[2][0]==0:\n print("Yes") \nelif for k in range(3):\n if A[k][0]==A[k][1]==A[k][2]==0:\n print("Yes")\n elif A[0][k]==A[1][k]==A[2][k]==0:\n print("Yes")\nelse:\n print("No")', '\nn = int(input())\n\nfor j in range(n):\n b = int(input())\n for j in range(3):\n if A[j][0] == b:\n A[j][0] = 0\n if A[j][1] == b:\n A[j][1] = 0\n if A[j][2] == b:\n A[j][2] = 0\n\nfor k in range(3):\n if A[k][0]==A[k][1]==A[k][2]==0:\n print("Yes")\n elif A[0][k]==A[1][k]==A[2][k]==0:\n print("Yes")\n exit\nif A[0][0]==A[1][1]==A[2][2]==0:\n print("Yes")\nelif A[0][2]==A[1][1]==A[2][0]==0:\n print("Yes")\nelse:\n print("No")', 'A1 = list(map(int, input().split()))\nA2 = list(map(int, input().split()))\nA3 = list(map(int, input().split()))\nn = int(input())\n\nfor i in range(n):\n b = int(input())\n for j in range(3):\n if A1[j] == b:\n A1[j] = 0\n if A2[j] == b:\n A2[j] = 0\n if A3[j] == b:\n A3[j] = 0\n\nif A1[0]==A1[1]==A1[2]==0:\n print("Yes")\n exit\nif A2[0]==A2[1]==A2[2]==0:\n print("Yes")\n exit\nif A3[0]==A3[1]==A3[2]==0:\n print("Yes")\n exit\n\nif A1[0]==A2[0]==A3[0]==0:\n print("Yes")\n exit\nif A1[1]==A2[1]==A3[1]==0:\n print("Yes")\n exit\nif A1[2]==A2[2]==A3[2]==0:\n print("Yes")\n exit\n \nif A1[0]==A2[1]==A3[2]==0:\n print("Yes")\n exit\nif A1[2]==A2[1]==A3[0]==0:\n print("Yes")\n exit\nelse:\n print("No")', 'A = [list(map(int, input().split())) for i in range(3)]\n\nn = int(input())\n\nfor j in range(n):\n b = int(input())\n for j in range(3):\n if A[j][0] == b:\n A[j][0] = 0\n if A[j][1] == b:\n A[j][1] = 0\n if A[j][2] == b:\n A[j][2] = 0\n\nfor k in range(3):\n if A[k][0]==a[k][1]==a[k][2]=0:\n print("Yes")\n elif A[0][k]==A[1][k]==A[2][k]==0:\n print("Yes")\n exit\nif A[0][0]==A[1][1]==A[2][2]==0:\n print("Yes")\nelif A[0][2]==A[1][1]==A[2][0]==0:\n print("Yes")\nelse:\n print("No")', 'import sys\nA = [list(map(int, input().split())) for i in range(3)]\n\nn = int(input())\n\nfor j in range(n):\n b = int(input())\n for l in range(3):\n if A[l][0] == b:\n A[l][0] = 0\n if A[l][1] == b:\n A[l][1] = 0\n if A[l][2] == b:\n A[l][2] = 0\nif A[0][0]==A[1][1]==A[2][2]==0:\n print("Yes")\n sys.exit()\nelif A[0][2]==A[1][1]==A[2][0]==0:\n print("Yes")\n sys.exit()\nelif A[0][0]==A[0][1]==A[0][2]==0:\n print("Yes")\n sys.exit()\nelif A[1][0]==A[1][1]==A[1][2]==0:\n print("Yes")\n sys.exit()\nelif A[2][0]==A[2][1]==A[2][2]==0:\n print("Yes")\n sys.exit()\nelif A[0][0]==A[1][0]==A[2][0]==0:\n print("Yes")\n sys.exit()\nelif A[0][1]==A[1][1]==A[2][1]==0:\n print("Yes")\n sys.exit() \nelif A[0][2]==A[1][2]==A[2][2]==0:\n print("Yes")\n sys.exit() \nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s130715309', 's211729790', 's441837699', 's670623626', 's752031212', 's860341314', 's960939758', 's791393220'] | [9088.0, 9188.0, 9008.0, 8984.0, 9200.0, 9184.0, 8976.0, 9336.0] | [24.0, 28.0, 27.0, 25.0, 27.0, 24.0, 26.0, 30.0] | [609, 559, 556, 556, 503, 779, 558, 858] |
p02760 | u079427319 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["aList = []\nfor i in range(3):\n aList.append(list(map(int, input().split())))\nn = int(input())\nbList = []\nfor i in range(n):\n bList.append(int(input()))\n\naListCheck = []\nfor i in range(3):\n aListCheckRow = []\n for j in range(3):\n aListCheckRow.append(aList[i][j] in bList)\n aListCheck.append(aListCheckRow)\n\nfor i in range(3):\n if aListCheck[i][0] and aListCheck[i][1] and aListCheck[i][2]:\n print('YES')\n exit()\n if aListCheck[0][i] and aListCheck[1][i] and aListCheck[2][i]:\n print('YES')\n exit()\nif aListCheck[0][0] and aListCheck[1][1] and aListCheck[2][2]:\n print('YES')\n exit()\nif aListCheck[0][2] and aListCheck[1][1] and aListCheck[2][0]:\n print('YES')\n exit()\n\nprint('No')", "aList = []\nfor i in range(3):\n aList.append(list(map(int, input().split())))\nn = int(input())\nbList = []\nfor i in range(n):\n bList.append(int(input()))\n\naListCheck = []\nfor i in range(3):\n aListCheckRow = []\n for j in range(3):\n aListCheckRow.append(aList[i][j] in bList)\n aListCheck.append(aListCheckRow)\n\nfor i in range(3):\n if aListCheck[i][0] and aListCheck[i][1] and aListCheck[i][2]:\n print('Yes')\n exit()\n if aListCheck[0][i] and aListCheck[1][i] and aListCheck[2][i]:\n print('Yes')\n exit()\nif aListCheck[0][0] and aListCheck[1][1] and aListCheck[2][2]:\n print('Yes')\n exit()\nif aListCheck[0][2] and aListCheck[1][1] and aListCheck[2][0]:\n print('Yes')\n exit()\n\nprint('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s060676263', 's445945177'] | [3064.0, 3064.0] | [17.0, 19.0] | [706, 707] |
p02760 | u085530099 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["a1 = list(map(int, input().split()))\na2 = list(map(int, input().split()))\na3 = list(map(int, input().split()))\nn = int(input())\ns = list(map(int, [input() for i in range(n)]))\nl = [\n [0, 0, 0]\n , [0, 0, 0]\n , [0, 0, 0]\n]\nfor i in range(0, 3):\n for j in range(0, n):\n if a1[i] == s[j]:\n l[0][i] = i+1\nfor i in range(0, 3):\n for j in range(0, n):\n if a2[i] == s[j]:\n l[1][i] = i+1\nfor i in range(0, 3):\n for j in range(0, n):\n if a3[i] == s[j]:\n l[2][i] = i+1\nfor i in l:\n for j in i:\n if j != 0:\n n.append(j)\ncount = 0\nfor i in range(0, 3):\n if l[i][0] and l[i][1] and l[i][2]:\n count += 1\nif (l[0][0] and l[1][1] and l[2][2]) or (l[2][0] and l[1][1] and l[0][2]):\n count += 1\nelse:\n for i in range(1, 4):\n if n.count(i) == 3:\n count += 1\nprint('Yes' if count >= 1 else 'No')", "a1 = list(map(int, input().split()))\na2 = list(map(int, input().split()))\na3 = list(map(int, input().split()))\nn = int(input())\ns = list(map(int, [input() for i in range(n)]))\nl = [\n [0, 0, 0]\n , [0, 0, 0]\n , [0, 0, 0]\n]\nn = []\nfor i in range(0, 3):\n for j in range(0, n):\n if a1[i] == s[j]:\n l[0][i] = i+1\nfor i in range(0, 3):\n for j in range(0, n):\n if a2[i] == s[j]:\n l[1][i] = i+1\nfor i in range(0, 3):\n for j in range(0, n):\n if a3[i] == s[j]:\n l[2][i] = i+1\nfor i in l:\n for j in i:\n if j != 0:\n n.append(j)\ncount = 0\nfor i in range(0, 3):\n if l[i][0] and l[i][1] and l[i][2]:\n count += 1\nif (l[0][0] and l[1][1] and l[2][2]) or (l[2][0] and l[1][1] and l[0][2]):\n count += 1\nelse:\n for i in range(1, 4):\n if n.count(i) == 3:\n count += 1\nprint('Yes' if count >= 1 else 'No')", "import sys\na1 = list(map(int, input().split()))\na2 = list(map(int, input().split()))\na3 = list(map(int, input().split()))\nn = int(input())\ns = list(map(int, [input() for i in range(n)]))\nl = [\n [0, 0, 0]\n , [0, 0, 0]\n , [0, 0, 0]\n]\nfor i in range(0, 3):\n for j in range(0, n):\n if a1[i] == s[j]:\n l[0][i] = i+1\nfor i in range(0, 3):\n for j in range(0, n):\n if a2[i] == s[j]:\n l[1][i] = i+1\nfor i in range(0, 3):\n for j in range(0, n):\n if a3[i] == s[j]:\n l[2][i] = i+1\nfor i in l:\n for j in i:\n if j != 0:\n n.append(j)\nfor i in range(0, 3):\n if l[i][0] and l[i][1] and l[i][2]:\n print('Yes')\n sys.exit()\nif (l[0][0] and l[1][1] and l[2][2]) or (l[2][0] and l[1][1] and l[0][2]):\n print('Yes')\n sys.exit()\nelse:\n for i in range(1, 4):\n if n.count(i) == 3:\n print('Yes')\n sys.exit()\nprint('No')", "a1 = list(map(int, input().split()))\na2 = list(map(int, input().split()))\na3 = list(map(int, input().split()))\nn = int(input())\ns = list(map(int, [input() for i in range(n)]))\nl = [\n [0, 0, 0]\n , [0, 0, 0]\n , [0, 0, 0]\n]\nfor i in range(0, 3):\n for j in range(0, n):\n if a1[i] == s[j]:\n l[0][i] = i+1\n print(a1[i])\nfor i in range(0, 3):\n for j in range(0, n):\n if a2[i] == s[j]:\n print(a2[i])\n l[1][i] = i+1\nfor i in range(0, 3):\n for j in range(0, n):\n if a3[i] == s[j]:\n print(a3[i])\n l[2][i] = i+1\nn = []\nfor i in l:\n for j in i:\n if j != 0:\n n.append(j)\ncount = 0\nif (1 in n) == (2 in n) == (3 in n) == True:\n count += 1\n print('Yes')\nelse:\n for i in range(1, 4):\n if n.count(i) == 3:\n count += 1\n print('Yes')\nif count == 0:\n print('No')", "a1 = list(map(int, input().split()))\na2 = list(map(int, input().split()))\na3 = list(map(int, input().split()))\nn = int(input())\ns = list(map(int, [input() for i in range(n)]))\nl = [\n [0, 0, 0]\n , [0, 0, 0]\n , [0, 0, 0]\n]\nfor i in range(0, 3):\n for j in range(0, n):\n if a1[i] == s[j]:\n l[0][i] = i+1\nfor i in range(0, 3):\n for j in range(0, n):\n if a2[i] == s[j]:\n l[1][i] = i+1\nfor i in range(0, 3):\n for j in range(0, n):\n if a3[i] == s[j]:\n l[2][i] = i+1\nn = []\nfor i in l:\n for j in i:\n if j != 0:\n n.append(j)\ncount = 0\nfor i in range(0, 3):\n if l[i][0] and l[i][1] and l[i][2]:\n count += 1\nif (l[0][0] and l[1][1] and l[2][2]) or (l[2][0] and l[1][1] and l[0][2]):\n count += 1\nelse:\n for i in range(1, 4):\n if n.count(i) == 3:\n count += 1\nprint('Yes' if count >= 1 else 'No')"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s013894716', 's442576383', 's543537110', 's993649616', 's942143055'] | [3184.0, 3064.0, 3188.0, 3064.0, 3064.0] | [18.0, 18.0, 18.0, 17.0, 18.0] | [827, 834, 854, 812, 834] |
p02760 | u087951292 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['list1 = input().split(" ")\nlist2 = input().split(" ")\nlist3 = input().split(" ")\ncount = int(input())\nvlist1 = [list1[0],list2[0],list3[0]]\nvlist2 = [list1[1],list2[1],list3[1]]\nvlist3 = [list1[2],list2[2],list3[2]]\nxlist1 = [list1[0],list2[1],list3[2]]\nxlist2 = [list1[2],list2[1],list3[0]]\ncorrect = [\'o\',\'o\',\'o\']\nanswer = "no"\n\nfor i in range(count):\n\tnum = input()\n\tlist1 = [\'o\' if num in s else s for s in list1]\n\tlist2 = [\'o\' if num in s else s for s in list2]\n\tlist3 = [\'o\' if num in s else s for s in list3]\n\tvlist1 = [list1[0],list2[0],list3[0]]\n\tvlist2 = [list1[1],list2[1],list3[1]]\n\tvlist3 = [list1[2],list2[2],list3[2]]\n\txlist1 = [list1[0],list2[1],list3[2]]\n\txlist2 = [list1[2],list2[1],list3[0]]\n\tif list1 == correct:\n\t\tanswer = "yes"\n\t\tbreak\n\telif list2 == correct:\n\t\tanswer = "yes"\n\t\tbreak\n\telif list3 == correct:\n\t\tanswer = "yes"\n\t\tbreak\n\telif vlist1 == correct:\n\t\tanswer = "yes"\n\t\tbreak\n\telif vlist2 == correct:\n\t\tanswer = "yes"\n\t\tbreak\n\telif vlist3 == correct:\n\t\tanswer = "yes"\n\t\tbreak\n\telif xlist1 == correct:\n\t\tanswer = "yes"\n\t\tbreak\n\telif xlist2 == correct:\n\t\tanswer = "yes"\n\t\tbreak\nprint(answer)', 'list1 = input().split(" ")\nlist2 = input().split(" ")\nlist3 = input().split(" ")\ncount = int(input())\ncorrect = [\'o\',\'o\',\'o\']\nanswer = "No"\nfor i in range(count):\n\tnum = input()\n\tlist1 = [\'o\' if i == num else i for i in list1]\n\tlist2 = [\'o\' if i == num else i for i in list2]\n\tlist3 = [\'o\' if i == num else i for i in list3]\n\tvlist1 = [list1[0],list2[0],list3[0]]\n\tvlist2 = [list1[1],list2[1],list3[1]]\n\tvlist3 = [list1[2],list2[2],list3[2]]\n\txlist1 = [list1[0],list2[1],list3[2]]\n\txlist2 = [list1[2],list2[1],list3[0]]\n\tif list1 == correct:\n\t\tanswer = "Yes"\n\t\tbreak\n\telif list2 == correct:\n\t\tanswer = "Yes"\n\t\tbreak\n\telif list3 == correct:\n\t\tanswer = "Yes"\n\t\tbreak\n\telif vlist1 == correct:\n\t\tanswer = "Yes"\n\t\tbreak\n\telif vlist2 == correct:\n\t\tanswer = "Yes"\n\t\tbreak\n\telif vlist3 == correct:\n\t\tanswer = "Yes"\n\t\tbreak\n\telif xlist1 == correct:\n\t\tanswer = "Yes"\n\t\tbreak\n\telif xlist2 == correct:\n\t\tanswer = "Yes"\n\t\tbreak \nprint(answer)'] | ['Wrong Answer', 'Accepted'] | ['s982145472', 's201908351'] | [3188.0, 3064.0] | [18.0, 18.0] | [1119, 932] |
p02760 | u089504174 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["a=[[0]*3 for i in range(3)]\nb=[]\nfor i in range(3):\n x=input().split()\n a[i][0]=x[0]\n a[i][1]=x[1]\n a[i][2]=x[2]\nn=int(input())\nfor i in range(n):\n b.append(input())\nfor i in range(n):\n for j in range(9):\n if b[i]==a[j//3][j%3]:\n a[j//3][j%3]='X'\njud=[0,0,0,0]\nz=0\nres=0\nfor i in range(3):\n for j in range(2):\n if a[i][j]==a[i][j+1]:\n jud[0]+=1\n if a[j][i]==a[j+1][i]:\n jud[1]+=1\n if max(jud)>1:\n res-=1\n else:\n jud[0]=0\n jud[1]=0\nfor j in range(2):\n if a[j][j]==a[j+1][j+1]:\n jud[2]+=1\n if a[j][2-j]==a[j+1][2-j-1]:\n jud[3]+=1\n if max(jud)>1:\n res-=1\n else:\n jud[3]=0\n jud[2]=0\nif res<0:\n print('Yes')\nelse:\n print('No')", "a=[[0]*3 for i in range(3)]\nb=[]\nfor i in range(3):\n x=input().split()\n a[i][0]=x[0]\n a[i][1]=x[1]\n a[i][2]=x[2]\nn=int(input())\nfor i in range(n):\n b.append(input())\nfor i in range(n):\n for j in range(9):\n if b[i]==a[j//3][j%3]:\n a[j//3][j%3]='X'\njud=[0,0,0,0]\nz=0\nres=0\nfor i in range(3):\n for j in range(2):\n if a[i][j]==a[i][j+1]:\n jud[0]+=1\n if a[j][i]==a[j+1][i]:\n jud[1]+=1\n if max(jud)>1:\n res-=1\n else:\n jud[0]=0\n jud[1]=0\nfor j in range(2):\n if a[j][j]==a[j+1][j+1]:\n jud[2]+=1\n if a[j][2-j]==a[j+1][2-j-1]:\n jud[3]+=1\nif max(jud)>1:\n res-=1\nif res<0:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s057373668', 's733586143'] | [3064.0, 3064.0] | [18.0, 18.0] | [684, 646] |
p02760 | u091964259 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['seen = [0,0,0,0,0,0,0,0,0]\nseen[0],seen[1],seen[2] = (map(int,input().split()))\nseen[3],seen[4],seen[5] = (map(int,input().split()))\nseen[6],seen[7],seen[8] = (map(int,input().split()))\nover = False\nN = int(input())\nfor x in range(N):\n num = int(input())\n if num in seen:\n seen[x] = "O"\nif seen[0] == "O":\n if seen[1] == seen[2] == "O":\n over = True\n elif seen[3] == seen[6] == "O":\n over = True\n elif seen[4] == seen[8] == "O":\n over = True\nelif seen[4] == "O":\n if seen[2] == seen[6] == "O":\n over = True\n elif seen[1] == seen[7] == "O":\n over = True\n elif seen[3] == seen[5] == "O":\n over = True\nelif seen[8] == "O":\n if seen[6] == seen[7] == "O":\n over = True\n if seen[2] == seen[5] == "O":\n over = True\nif not over:\n print("NO")\nelse:\n print("YES")', 'seen = [0,0,0,0,0,0,0,0,0]\nseen[0],seen[1],seen[2] = (map(int,input().split()))\nseen[3],seen[4],seen[5] = (map(int,input().split()))\nseen[6],seen[7],seen[8] = (map(int,input().split()))\nover = "NO"\nN = int(input())\nfor x in range(N):\n num = int(input())\n if num in seen:\n seen[seen.index(num)] = "O"\nif seen[0] == "O":\n if seen[1] == "O" and seen[2] == "O":\n over = "YES"\n if seen[3] == "O" and seen[6] == "O":\n over = "YES"\n if seen[4] == "O" and seen[8] == "O":\n over = "YES"\nif seen[8] == "O":\n if seen[6] == "O" and seen[7] == "O":\n over = "YES"\n if seen[2] == "O" and seen[5] == "O":\n over = "YES"\nif seen[4] == "O":\n if seen[6] == "O" and seen[2] == "O":\n over = "YES"\n if seen[1] == "O" and seen[7] == "O":\n over = "YES"\n if seen[3] == "O" and seen[5] == "O":\n over = "YES"\nprint(over)', 'seen = [0,0,0,0,0,0,0,0,0]\nseen[0],seen[1],seen[2] = (map(int,input().split()))\nseen[3],seen[4],seen[5] = (map(int,input().split()))\nseen[6],seen[7],seen[8] = (map(int,input().split()))\nover = "NO"\nN = int(input())\nfor x in range(N):\n num = int(input())\n if num in seen:\n seen[seen.index(num)] = "O"\nif seen[0] == "O":\n if seen[1] == "O" and seen[2] == "O":\n over = "YES"\n elif seen[3] == "O" and seen[6] == "O":\n over = "YES"\n elif seen[4] == "O" and seen[8] == "O":\n over = "YES"\nif seen[8] == "O":\n if seen[6] == "O" and seen[7] == "O":\n over = "YES"\n if seen[2] == "O" and seen[5] == "O":\n over = "YES"\nif seen[4] == "O":\n if seen[2] == "O" and seen[6] == "O":\n over = "YES"\n elif seen[1] == "O" and seen[7] == "O":\n over = "YES"\n elif seen[3] == "O" and seen[5] == "O":\n over = "YES"\nprint(over)', 'seen = [0,0,0,0,0,0,0,0,0]\nseen[0],seen[1],seen[2] = list(map(int,input().split()))\nseen[3],seen[4],seen[5] = list(map(int,input().split()))\nseen[6],seen[7],seen[8] = list(map(int,input().split()))\nover = False\nN = int(input())\nfor x in range(N):\n num = int(input())\n if num in seen:\n seen[x] = "O"\nif seen[0] == "O":\n if seen[1] == seen[2] == "O":\n over = True\n elif seen[3] == seen[6] == "O":\n over = True\n elif seen[4] == seen[8] == "O":\n over = True\nelif seen[4] == "O":\n if seen[2] == seen[6] == "O":\n over = True\n elif seen[1] == seen[7] == "O":\n over = True\n elif seen[3] == seen[5] == "O":\n over = True\nelif seen[8] == "O":\n if seen[6] == seen[7] == "O":\n over = True\n if seen[2] == seen[5] == "O":\n over = True\nif not over:\n print("NO")\nelse:\n print("YES")', 'seen = [0,0,0,0,0,0,0,0,0]\nseen[0],seen[1],seen[2] = (map(int,input().split()))\nseen[3],seen[4],seen[5] = (map(int,input().split()))\nseen[6],seen[7],seen[8] = (map(int,input().split()))\nover = False\nN = int(input())\nfor x in range(N):\n num = int(input())\n print(num)\n if num in seen:\n seen[x] = "O"\nprint(seen)\nif seen[0] == "O":\n if seen[1] == seen[2] == "O":\n over = True\n elif seen[3] == seen[6] == "O":\n over = True\n elif seen[4] == seen[8] == "O":\n over = True\nelif seen[4] == "O":\n if seen[2] == seen[6] == "O":\n over = True\n elif seen[1] == seen[7] == "O":\n over = True\n elif seen[3] == seen[5] == "O":\n over = True\nelif seen[8] == "O":\n if seen[6] == seen[7] == "O":\n over = True\n if seen[2] == seen[5] == "O":\n over = True\nif not over:\n print("NO")\nelse:\n print("YES")', 'seen = [0,0,0,0,0,0,0,0,0]\nseen[0],seen[1],seen[2] = (map(int,input().split()))\nseen[3],seen[4],seen[5] = (map(int,input().split()))\nseen[6],seen[7],seen[8] = (map(int,input().split()))\nover = "NO"\nN = int(input())\nfor x in range(N):\n num = int(input())\n if num in seen:\n seen[seen.index(num)] = "O"\nif seen[0] == "O":\n if seen[1] == "O" and seen[2] == "O":\n over = "YES"\n elif seen[3] == "O" and seen[6] == "O":\n over = "YES"\n elif seen[4] == "O" and seen[8] == "O":\n over = "YES"\nif seen[8] == "O":\n if seen[6] == "O" and seen[7] == "O":\n over = "YES"\n if seen[2] == "O" and seen[5] == "O":\n over = "YES"\nif seen[4] == "O":\n if seen[2] == "O" and seen[6] == "O":\n over = "YES"\n elif seen[1] == "O" and seen[7] == "O":\n over = "YES"\n elif seen[3] == "O" and seen[5] == "O":\n over = "YES"\nprint(over)', 'seen = [0,0,0,0,0,0,0,0,0]\nseen[0],seen[1],seen[2] = (map(int,input().split()))\nseen[3],seen[4],seen[5] = (map(int,input().split()))\nseen[6],seen[7],seen[8] = (map(int,input().split()))\nover = False\nN = int(input())\nfor x in range(N):\n num = int(input())\n if num in seen:\n seen[seen.index(num)] = "O"\nif seen[0] == "O":\n if seen[1] == "O" and seen[2] == "O":\n over = True\n elif seen[3] == "O" and seen[6] == "O":\n over = True\n elif seen[4] == "O" and seen[8] == "O":\n over = True\nif seen[8] == "O":\n if seen[6] == "O" and seen[7] == "O":\n over = True\n if seen[2] == "O" and seen[5] == "O":\n over = True\nif seen[4] == "O":\n if seen[2] == "O" and seen[6] == "O":\n over = True\n elif seen[1] == "O" and seen[7] == "O":\n over = True\n elif seen[3] == "O" and seen[5] == "O":\n over = True\nif not over:\n print("NO")\nelse:\n print("YES")', 'seen = [0,0,0,0,0,0,0,0,0]\nseen[0],seen[1],seen[2] = (map(int,input().split()))\nseen[3],seen[4],seen[5] = (map(int,input().split()))\nseen[6],seen[7],seen[8] = (map(int,input().split()))\nover = False\nN = int(input())\nfor x in range(N):\n num = int(input())\n if num in seen:\n seen[seen.index(num)] = "O"\nif seen[0] == "O":\n if seen[1] == seen[2] == "O":\n over = True\n elif seen[3] == seen[6] == "O":\n over = True\n elif seen[4] == seen[8] == "O":\n over = True\nif seen[8] == "O":\n if seen[6] == seen[7] == "O":\n over = True\n if seen[2] == seen[5] == "O":\n over = True\nif seen[4] == "O":\n if seen[2] == seen[6] == "O":\n over = True\n elif seen[1] == seen[7] == "O":\n over = True\n elif seen[3] == seen[5] == "O":\n over = True\nif not over:\n print("NO")\nelse:\n print("YES")', 'seen = [0,0,0,0,0,0,0,0,0]\nseen[0],seen[1],seen[2] = (map(int,input().split()))\nseen[3],seen[4],seen[5] = (map(int,input().split()))\nseen[6],seen[7],seen[8] = (map(int,input().split()))\nover = "NO"\nN = int(input())\nfor x in range(N):\n num = int(input())\n if num in seen:\n seen[seen.index(num)] = "O"\nif seen[0] == "O":\n if seen[1] == "O" and seen[2] == "O":\n over = "YES"\n elif seen[3] == "O" and seen[6] == "O":\n over = "YES"\n elif seen[4] == "O" and seen[8] == "O":\n over = "YES"\nif seen[8] == "O":\n if seen[6] == "O" and seen[7] == "O":\n over = "YES"\n if seen[2] == "O" and seen[5] == "O":\n over = "YES"\nif seen[4] == "O":\n if seen[2] == "O" and seen[6] == "O":\n over = "YES"\n elif seen[1] == "O" and seen[7] == "O":\n over = "YES"\n elif seen[3] == "O" and seen[5] == "O":\n over = "YES"\nprint(over)', 'seen = [0,0,0,0,0,0,0,0,0]\nseen[0],seen[1],seen[2] = (map(int,input().split()))\nseen[3],seen[4],seen[5] = (map(int,input().split()))\nseen[6],seen[7],seen[8] = (map(int,input().split()))\nover = False\nN = int(input())\nfor x in range(N):\n num = int(input())\n if num in seen:\n seen[seen.index(num)] = "O"\nif seen[0] == "O":\n if seen[1] == seen[2] == "O":\n over = True\n elif seen[3] == seen[6] == "O":\n over = True\n elif seen[4] == seen[8] == "O":\n over = True\nif seen[8] == "O":\n if seen[6] == seen[7] == "O":\n over = True\n if seen[2] == seen[5] == "O":\n over = True\nif seen[4] == "O":\n if seen[2] == seen[6] == "O":\n over = True\n elif seen[1] == seen[7] == "O":\n over = True\n elif seen[3] == seen[5] == "O":\n over = True\nif not over:\n print("NO")\nelse:\n print("YES")', 'nums1 = list(map(int,input().split()))\nnums2 = list(map(int,input().split()))\nnums3 = list(map(int,input().split()))\nseen = [nums1[0],nums1[1],nums1[2],nums2[0],nums2[1],nums2[2],nums3[0],nums3[1],nums3[2]]\nover = False\nN = int(input())\nfor x in range(N):\n num = int(input())\n if num in seen:\n seen[x] = "O"\nif seen[0] == "O":\n if seen[1] == seen[2] == "O":\n print("YES")\n over = True\n elif seen[3] == seen[6] == "O":\n print("YES")\n over = True\n elif seen[4] == seen[8] == "O":\n print("YES")\n over = True\nelif seen[2] == "O":\n if seen[5] == seen[8] == "O":\n print("YES")\n over = True\n elif seen[4] == seen[6] == "O":\n print("YES")\n over = True\nelif seen[8] == "O" == seen[7] == seen[6]:\n print("YES")\n over = True\nelif seen[3] == seen[4] == seen[5] == "O":\n print("YES")\n over = True\nelif seen[1] == seen[4] == seen[7] == "O":\n print("YES")\n over = True\nelse:\n print("NO")\nif not over:\n print("YES")', 'seen = [0,0,0,0,0,0,0,0,0]\nseen[0],seen[1],seen[2] = (map(int,input().split()))\nseen[3],seen[4],seen[5] = (map(int,input().split()))\nseen[6],seen[7],seen[8] = (map(int,input().split()))\nover = False\nN = int(input())\nfor x in range(N):\n num = int(input())\n print(num)\n if num in seen:\n seen[x] = "O"\nprint(seen)\nif seen[0] == "O":\n if seen[1] == seen[2] == "O":\n print("YES")\n over = True\n elif seen[3] == seen[6] == "O":\n print("YES")\n over = True\n elif seen[4] == seen[8] == "O":\n print("YES")\n over = True\nelif seen[4] == "O":\n if seen[2] == seen[6] == "O":\n print("YES")\n over = True\n elif seen[1] == seen[7] == "O":\n print("YES")\n over = True\n elif seen[3] == seen[5] == "O":\n print("YES")\n over = True\nelif seen[8] == "O":\n if seen[6] == seen[7] == "O":\n print("YES")\n if seen[2] == seen[5] == "O":\n print("YES")\n over = True\nif not over:\n print("NO")', 'seen = [0,0,0,0,0,0,0,0,0]\nseen[0],seen[1],seen[2] = (map(int,input().split()))\nseen[3],seen[4],seen[5] = (map(int,input().split()))\nseen[6],seen[7],seen[8] = (map(int,input().split()))\nover = False\nN = int(input())\nfor x in range(N):\n num = int(input())\n if num in seen:\n seen[seen.index(num)] = "O"\nif seen[0] == "O":\n if seen[1] == seen[2] == "O":\n over = True\n elif seen[3] == seen[6] == "O":\n over = True\n elif seen[4] == seen[8] == "O":\n over = True\nelif seen[4] == "O":\n if seen[2] == seen[6] == "O":\n over = True\n elif seen[1] == seen[7] == "O":\n over = True\n elif seen[3] == seen[5] == "O":\n over = True\nelif seen[8] == "O":\n if seen[6] == seen[7] == "O":\n over = True\n if seen[2] == seen[5] == "O":\n over = True\nif not over:\n print("NO")\nelse:\n print("YES")', 'nums1 = list(map(int,input().split()))\nnums2 = list(map(int,input().split()))\nnums3 = list(map(int,input().split()))\nseen = [nums1[0],nums1[1],nums1[2],nums2[0],nums2[1],nums2[2],nums3[0],nums3[1],nums3[2]]\nover = False\nN = int(input())\nfor x in range(N):\n num = int(input())\n print(num)\n if num in seen:\n seen[x] = "O"\nprint(seen)\nif seen[0] == "O":\n if seen[1] == seen[2] == "O":\n print("YES")\n over = True\n elif seen[3] == seen[6] == "O":\n print("YES")\n over = True\n elif seen[4] == seen[8] == "O":\n print("YES")\n over = True\nelif seen[4] == "O":\n if seen[2] == seen[6] == "O":\n print("YES")\n over = True\n elif seen[1] == seen[7] == "O":\n print("YES")\n over = True\n elif seen[3] == seen[5] == "O":\n print("YES")\n over = True\nelif seen[8] == "O":\n if seen[6] == seen[7] == "O":\n print("YES")\n if seen[2] == seen[5] == "O":\n print("YES")\n over = True\nif not over:\n print("NO")', 'seen = [0,0,0,0,0,0,0,0,0]\nseen[0],seen[1],seen[2] = (map(int,input().split()))\nseen[3],seen[4],seen[5] = (map(int,input().split()))\nseen[6],seen[7],seen[8] = (map(int,input().split()))\nover = "NO"\nN = int(input())\nfor x in range(N):\n num = int(input())\n if num in seen:\n seen[seen.index(num)] = "O"\nif seen[0] == "O":\n if seen[1] == "O" and seen[2] == "O":\n over = "YES"\n elif seen[3] == "O" and seen[6] == "O":\n over = "YES"\n elif seen[4] == "O" and seen[8] == "O":\n over = "YES"\nif seen[8] == "O":\n if seen[6] == "O" and seen[7] == "O":\n over = "YES"\n elif seen[2] == "O" and seen[5] == "O":\n over = "YES"\nif seen[4] == "O":\n if seen[6] == "O" and seen[2] == "O":\n over = "YES"\n elif seen[1] == "O" and seen[7] == "O":\n over = "YES"\n elif seen[3] == "O" and seen[5] == "O":\n over = "YES"\nprint(over)', 'nums1 = list(map(int,input().split()))\nnums2 = list(map(int,input().split()))\nnums3 = list(map(int,input().split()))\nseen = [nums1[0],nums1[1],nums1[2],nums2[0],nums2[1],nums2[2],nums3[0],nums3[1],nums3[2]]\nover = False\nN = int(input())\nfor x in range(N):\n num = int(input())\n if num in seen:\n seen[x] = "O"\nif seen[0] == "O":\n if seen[1] == seen[2] == "O":\n print("YES")\n over = True\n elif seen[3] == seen[6] == "O":\n print("YES")\n over = True\n elif seen[4] == seen[8] == "O":\n print("YES")\n over = True\nelif seen[2] == "O":\n if seen[5] == seen[8] == "O":\n print("YES")\n over = True\n elif seen[4] == seen[6] == "O":\n print("YES")\n over = True\nelif seen[8] == "O" == seen[7] == seen[6] or seen[3] == seen[4] == seen[5] == "O" or seen[1] == seen[4] == seen[7] == "O":\n print("YES")\n over = True\nif not over:\n print("YES")', 'seen = [0,0,0,0,0,0,0,0,0]\nseen[0],seen[1],seen[2] = (map(int,input().split()))\nseen[3],seen[4],seen[5] = (map(int,input().split()))\nseen[6],seen[7],seen[8] = (map(int,input().split()))\nover = False\nN = int(input())\nfor x in range(N):\n num = int(input())\n if num in seen:\n seen[seen.index(num)] = "O"\nif seen[0] == "O":\n if seen[1] == seen[2] == "O":\n over = True\n elif seen[3] == seen[6] == "O":\n over = True\n elif seen[4] == seen[8] == "O":\n over = True\nelif seen[4] == "O":\n if seen[2] == seen[6] == "O":\n over = True\n elif seen[1] == seen[7] == "O":\n over = True\n elif seen[3] == seen[5] == "O":\n over = True\nelif seen[8] == "O":\n if seen[6] == seen[7] == "O":\n over = True\n if seen[2] == seen[5] == "O":\n over = True\nif not over:\n print("No")\nelse:\n print("Yes")'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s096731465', 's122128187', 's257039288', 's262869069', 's308559214', 's342245188', 's399759999', 's428017703', 's446471332', 's454270580', 's498707800', 's517811316', 's531311468', 's617461022', 's627531666', 's748194789', 's008720504'] | [9192.0, 9192.0, 9032.0, 9192.0, 9288.0, 9192.0, 9244.0, 9212.0, 9204.0, 9244.0, 9304.0, 9316.0, 9296.0, 9252.0, 9108.0, 9168.0, 9240.0] | [27.0, 28.0, 31.0, 30.0, 27.0, 28.0, 30.0, 28.0, 27.0, 31.0, 25.0, 28.0, 27.0, 28.0, 32.0, 28.0, 29.0] | [792, 829, 837, 804, 817, 837, 866, 802, 837, 802, 947, 914, 806, 935, 839, 863, 806] |
p02760 | u094425865 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['import sys\na =[]\na.append(list(map(int,input().split())))\na.append(list(map(int,input().split())))\na.append(list(map(int,input().split())))\nn = int(input())\nb =[]\nfor i in range(n):\n b.append(int(input()))\n#print(b)\nfor i in range(3):\n for j in range(3):\n if a[i][j] in b:\n a[i][j] = 0', "import sys\na =[]\na.append(list(map(int,input().split())))\na.append(list(map(int,input().split())))\na.append(list(map(int,input().split())))\nn = int(input())\nb =[]\nfor i in range(n):\n b.append(int(input()))\n#print(b)\nfor i in range(3):\n for j in range(3):\n if a[i][j] in b:\n a[i][j] = 0\n#print(a)\n\nfor i in range(3):\n if sum(a[i])==0:\n print('Yes')\n exit()\nfor i in range(3):\n if a[0][i]+a[1][i]+a[2][i]==0:\n print('Yes')\n exit()\nif (a[0][0]+a[1][1]+a[2][2]==0)or(a[0][2]+a[1][1]+a[2][0]==0):\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s340655965', 's788080918'] | [3064.0, 3192.0] | [18.0, 17.0] | [309, 588] |
p02760 | u094999522 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['a1,a2,a3,_,*b = [i.split() for i in open(0)]\nbingo = [[0, 1, 2], [3, 4, 5], [6, 7, 8], [2, 5, 8], [0, 3, 6], [1, 4, 7], [0, 4, 8], [2, 4, 6]]\ns = ["" if i in b else i for i in a1 + a2 + a3]\nfor i,j,k in bingo:\n if {s[i],s[j],s[k]} == {\'\'}:\n print(\'Yes\')\n exit()\nprint(\'No\')', 'a1,a2,a3,_,*b = [i.split() for i in open(0)]\nbingo = [[0, 1, 2], [3, 4, 5], [6, 7, 8], [2, 5, 8], [0, 3, 6], [1, 4, 7], [0, 4, 8], [2, 4, 6]]\ns = ["" if i in sum(b,[]) else i for i in a1 + a2 + a3]\nfor i,j,k in bingo:\n if {s[i],s[j],s[k]} == {\'\'}:\n print(\'Yes\')\n exit()\nprint(\'No\')'] | ['Wrong Answer', 'Accepted'] | ['s469180628', 's332441195'] | [3064.0, 3064.0] | [17.0, 17.0] | [291, 299] |
p02760 | u096294926 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A = [list(map(int,input().split())) for i in range(3)]\nN = int(input())\nB = [list(map(int,input().split())) for i in range(N)]\n\n\nfor k in range(N):\n print(B[k][0])\n for i in range(3):\n for j in range(3):\n print(A[i][j])\n if B[k][0] == A[i][j]:\n A[i][j] = 0\n\nif A[0][0] == A[0][1] == A[0][2] ==0:\n print("Yes")\nelif A[1][0] == A[1][1] == A[1][2] ==0:\n print("Yes")\nelif A[2][0] == A[2][1] == A[2][2] ==0:\n print("Yes")\nelif A[0][0] == A[1][0] == A[2][0] ==0:\n print("Yes")\nelif A[0][1] == A[1][1] == A[2][1] ==0:\n print("Yes")\nelif A[0][2] == A[1][2] == A[2][2] ==0:\n print("Yes")\nelif A[0][0] == A[1][1] == A[2][2] ==0:\n print("Yes")\nelif A[2][2] == A[1][1] == A[2][0] ==0:\n print("Yes")\nelse:\n print("No")', 'A = [list(map(int,input().split())) for i in range(3)]\nN = int(input())\nB = [list(map(int,input().split())) for i in range(N)]\nfor k in range(N):\n for i in range(3):\n for j in range(3):\n if B[k][0] == A[i][j]:\n A[i][j] = 0\n\nif A[0][0] == A[0][1] == A[0][2] ==0:\n print("Yes")\nelif A[1][0] == A[1][1] == A[1][2] ==0:\n print("Yes")\nelif A[2][0] == A[2][1] == A[2][2] ==0:\n print("Yes")\nelif A[0][0] == A[1][0] == A[2][0] ==0:\n print("Yes")\nelif A[0][1] == A[1][1] == A[2][1] ==0:\n print("Yes")\nelif A[0][2] == A[1][2] == A[2][2] ==0:\n print("Yes")\nelif A[0][0] == A[1][1] == A[2][2] ==0:\n print("Yes")\nelif A[0][2] == A[1][1] == A[2][0] ==0:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s477464367', 's464656220'] | [3064.0, 3064.0] | [18.0, 19.0] | [783, 735] |
p02760 | u102223485 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["def cal(lst1, lst2, lst3):\n for i in range(3):\n if lst1[i] in lst3:\n lst2[i] = 1\n\ndef judge(a, b, c):\n if a == 1 and (a == b == c):\n return True\n else:\n return False\n\nA_1 = list(map(int, input().split()))\nA_2 = list(map(int, input().split()))\nA_3 = list(map(int, input().split()))\nN = int(input())\nb = [int(input()) for _ in range(N)]\nC_1 = [0, 0, 0]\nC_2 = [0, 0, 0]\nC_3 = [0, 0, 0]\ncal(A_1, C_1, b)\ncal(A_2, C_2, b)\ncal(A_3, C_3, b)\n\na, b, c, d, e, f, g, h = False\n\na = judge(C_1[0], C_2[0], C_3[0])\nb = judge(C_1[1], C_2[1], C_3[1])\nc = judge(C_1[2], C_2[2], C_3[2])\n\n\nd = judge(C_1[0], C_1[1], C_1[2])\ne = judge(C_2[0], C_2[1], C_2[2])\nf = judge(C_3[0], C_3[1], C_3[2])\n\ng = judge(C_1[0], C_2[1], C_3[2])\nh = judge(C_1[2], C_2[1], C_3[0])\n\nlst = [a, b, c, d, e, f, g]\n\nif True in lst:\n print('Yes')\nelse:\n print('No')", "def cal(lst1, lst2):\n lst3 = [0, 0, 0]\n for i in range(3):\n if lst1[i] in lst2:\n lst3[i] = 1\n return lst3\n\ndef judge(a, b, c):\n if (a == 1) and (a == b == c):\n return True\n else:\n return False\n\nA_1 = list(map(int, input().split()))\nA_2 = list(map(int, input().split()))\nA_3 = list(map(int, input().split()))\nN = int(input())\nb = [int(input()) for _ in range(N)]\n\nC_1 = []\nC_2 = []\nC_3 = []\n\nC_1 = cal(A_1, b)\nC_2 = cal(A_2, b)\nC_3 = cal(A_3, b)\n\na = judge(C_1[0], C_2[0], C_3[0])\nb = judge(C_1[1], C_2[1], C_3[1])\nc = judge(C_1[2], C_2[2], C_3[2])\n\nd = judge(C_1[0], C_1[1], C_1[2])\ne = judge(C_2[0], C_2[1], C_2[2])\nf = judge(C_3[0], C_3[1], C_3[2])\n\ng = judge(C_1[0], C_2[1], C_3[2])\nh = judge(C_1[2], C_2[1], C_3[0])\n\nlst = [a, b, c, d, e, f, g, h]\n\nif True in lst:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s304486162', 's125664687'] | [3188.0, 3188.0] | [18.0, 17.0] | [877, 854] |
p02760 | u102242691 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['\na1 = list(map(int,input().split()))\na2 = list(map(int,input().split()))\na3 = list(map(int,input().split()))\nn = int(input())\n\nb1 = [0,0,0]\nb2 = [0,0,0]\nb3 = [0,0,0]\n\nfor i in range(n):\n b = int(input())\n for j in range(3):\n if a1[j] == b:\n b1[j] = 1\n if a2[j] == b:\n b2[j] = 1\n if a3[j] == b:\n b3[j] = 1\n\nif b1[0] == 1 and b1[1] == 1 and b1[2] == 1:\n print("yes")\nelif b2[0] == 1 and b2[1] == 1 and b2[2] == 1:\n print("yes")\nelif b3[0] == 1 and b3[1] == 1 and b3[2] == 1:\n print("yes")\nelif b1[0] == 1 and b2[0] == 1 and b3[0] == 1:\n print("yes")\nelif b1[1] == 1 and b2[1] == 1 and b3[1] == 1:\n print("yes")\nelif b1[2] == 1 and b2[2] == 1 and b3[2] == 1:\n print("yes")\nelif b1[0] == 1 and b2[1] == 1 and b3[2] == 1:\n print("yes")\nelif b1[2] == 1 and b2[1] == 1 and b3[0] == 1:\n print("yes")\nelse:\n print("No")\n', '\na1 = list(map(int,input().split()))\na2 = list(map(int,input().split()))\na3 = list(map(int,input().split()))\nn = int(input())\nb = [int(input()) for _ in range(n)]\n\nb1 = [0] * 3\nb2 = [0] * 3\nb3 = [0] * 3\n\nfor i in b:\n for j in range(3):\n if i == a1[j]:\n b1[j] = 1\nfor i in b:\n for j in range(3):\n if i == a2[j]:\n b2[j] = 1\nfor i in b:\n for j in range(3):\n if i == a3[j]:\n b3[j] = 1\n\nprint(b1)\nprint(b2)\nprint(b3)\n\n\nif b1[0] == b2[0] == b3[0] ==1 or b1[1] == b2[1] == b3[1] == 1 or b1[2] == b2[2] == b3[2]==1:\n print("Yes")\n exit()\nelif b1[0] == b2[1] == b3[2] == 1 or b1[2] == b2[1] == b3[0] ==1:\n print("Yes")\n exit()\nelif b1[0] == b1[1] == b1[2] == 1 or b2[0] == b2[1] == b2[2] == 1 or b3[0] == b3[1] == b3[2] == 1:\n print("Yes")\n exit()\n\nprint("No")\n', '\nA1 = list(map(int,input().split()))\nA2 = list(map(int,input().split()))\nA3 = list(map(int,input().split()))\nn = int(input())\nb = [int(input()) for _ in range(n)]\nB1 = [0,0,0] \nB2 = [0,0,0]\nB3 = [0,0,0]\n\nfor i in b:\n if i in A1:\n x = A1.index(i)\n B1[x] = 1\n if i in A2:\n x = A2.index(i)\n B2[x] = 1\n if i in A3:\n x = A3.index(i)\n B3[x] = 1\n\nif B1[0] == B1[1] == B1[2] == 1 or B2[0] == B2[1] == B2[2] == 1 or B3[0] == B3[1] == B3[2] == 1:\n print("Yes")\n exit()\nelif B1[0] == B2[0] == B3[0] == 1 or B1[1] == B2[1] == B3[1] == 1 or B1[2] == B2[2] == B3[2] == 1 or B1[0] == B2[1] == B3[2] == 1 or B1[2] == B2[1] == B3[0] == 1:\n print("Yes")\n exit()\nelse:\n print("No")\n\n\n\n\n\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s627599478', 's879011095', 's316427988'] | [3064.0, 3064.0, 3192.0] | [18.0, 18.0, 18.0] | [898, 833, 734] |
p02760 | u105210954 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["def resolve():\n a_list = list(map(int,input().split()))\n b_list = list(map(int,input().split()))\n c_list = list(map(int,input().split()))\n arr = np.array([a_list, b_list, c_list])\n\n n = int(input())\n for _ in range(n):\n num = int(input())\n arr = np.where(arr == num, 0, arr)\n\n if True in np.all(arr == 0, axis=0):\n print('Yes')\n return\n\n elif True in np.all(arr == 0, axis=1):\n print('Yes')\n return\n\n elif arr[0, 0] == 0 and arr[1, 1] == 0 and arr[2, 2] == 0:\n print('Yes')\n return\n\n elif arr[2, 0] == 0 and arr[1, 1] == 0 and arr[0, 2] == 0:\n print('Yes')\n return\n\n else:\n print('No')\n return\n \nresolve()", "import numpy as np\n\n\ndef resolve():\n a_list = list(map(int,input().split()))\n b_list = list(map(int,input().split()))\n c_list = list(map(int,input().split()))\n arr = np.array([a_list, b_list, c_list])\n\n n = int(input())\n for _ in range(n):\n num = int(input())\n arr = np.where(arr == num, 0, arr)\n\n if True in np.all(arr == 0, axis=0):\n print('Yes')\n return\n\n elif True in np.all(arr == 0, axis=1):\n print('Yes')\n return\n\n elif arr[0, 0] == 0 and arr[1, 1] == 0 and arr[2, 2] == 0:\n print('Yes')\n return\n\n elif arr[2, 0] == 0 and arr[1, 1] == 0 and arr[0, 2] == 0:\n print('Yes')\n return\n\n else:\n print('No')\n return\n \nresolve()"] | ['Runtime Error', 'Accepted'] | ['s393218468', 's206648453'] | [3064.0, 12512.0] | [17.0, 151.0] | [727, 748] |
p02760 | u105302073 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['a = [[int(i) for i in input().split()] for _ in range(3)]\nappear = [[False] * 3] * 3\nprint("appear", appear)\nfor i in range(int(input())):\n b = int(input())\n for j in range(3):\n for k in range(3):\n if a[j][k] == b:\n appear[j][k] = True\n\nans = "No"\nfor i in range(3):\n if appear[i][0] == appear[i][1] == appear[i][2] == True:\n ans = "Yes"\n if appear[0][i] == appear[1][i] == appear[2][i] == True:\n ans = "Yes"\nif appear[0][0] == appear[1][1] == appear[2][2] == True:\n ans = "Yes"\nif appear[2][0] == appear[1][1] == appear[0][2] == True:\n ans = "Yes"\nprint(ans)\n', 'a = [[int(i) for i in input().split()] for _ in range(3)]\nappear = [[False] * 3] * 3\nprint("appear", appear)\nfor i in range(int(input())):\n b = int(input())\n for j in range(3):\n for k in range(3):\n if a[j][k] == b:\n appear[j][k] = True\n\nans = "No"\nfor i in range(3):\n if appear[i][0] == appear[i][1] == appear[i][2]:\n ans = "Yes"\n if appear[0][i] == appear[1][i] == appear[2][i]:\n ans = "Yes"\nif appear[0][0] == appear[1][1] == appear[2][2]:\n ans = "Yes"\nif appear[2][0] == appear[1][1] == appear[0][2]:\n ans = "Yes"\nprint(ans)\n', 'a = [[int(i) for i in input().split()] for _ in range(3)]\nfor i in range(int(input())):\n b = int(input())\n for j in range(3):\n for k in range(3):\n if a[j][k] == b:\n a[j][k] = 0\n \nans = "No"\nfor i in range(3):\n if a[i][0] == a[i][1] == a[i][2] == 0:\n ans = "Yes"\n if a[0][i] == a[1][i] == a[2][i] == 0:\n ans = "Yes"\nif a[0][0] == a[1][1] == a[2][2] == 0:\n ans = "Yes"\nif a[2][0] == a[1][1] == a[0][2] == 0:\n ans = "Yes"\nprint(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s360231374', 's471574857', 's781046234'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [625, 593, 494] |
p02760 | u106181248 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['a=[]\nfor i in range(3):\n a.append(list(map(int,input().split())))\nn = int(input())\nx = 0\n\nfor i in range(n):\n b = int(input())\n for j in range(3):\n for k in range(3):\n if a[j][k] == b:\n a[j][k] = 0\n\nprint(a)\n\nif (a[0][0] == 0 and a[2][2] == 0 and a[1][1] == 0) or (a[0][2] == 0 and a[2][0] == 0 and a[1][1] == 0): \n print("Yes")\n x = 1\nfor i in range(3):\n if a[i][0] == 0 and a[i][1] == 0 and a[i][2] and x == 0: \n print("Yes")\n x = 1\n break\n elif a[0][i] == 0 and a[1][i] == 0 and a[2][i] and x == 0: \n print("Yes")\n x = 1\n break\nif x == 0:\n print("No")a=[]\nfor i in range(3):\n a.append(list(map(int,input().split())))\nn = int(input())\nx = 0\n\nfor i in range(n):\n b = int(input())\n for j in range(3):\n for k in range(3):\n if a[j][k] == b:\n a[j][k] = 0\n\nif (a[0][0] == 0 and a[2][2] == 0 and a[1][1] == 0) or (a[0][2] == 0 and a[2][0] == 0 and a[1][1] == 0): \n print("Yes")\n x = 1\nfor i in range(3):\n if a[i][0] == 0 and a[i][1] == 0 and a[i][2] and x == 0: \n print("Yes")\n x = 1\n break\n elif a[0][i] == 0 and a[1][i] == 0 and a[2][i] and x == 0: \n print("Yes")\n x = 1\n break\nif x == 0:\n print("No")', 'import itertools\n\nA=[]\nfor i in range(3):\n try:\n A.append(list(map(int,input().split())))\n except:\n break;\nA = list(itertools.chain.from_iterable(A))\nn = int(input())\nb=[int(input()) for i in range(n)]\n\nfor i in b:\n if i in A:\n \n#print(A)\n#print(b)', 'a=[]\nfor i in range(3):\n a.append(list(map(int,input().split())))\nn = int(input())\nx = 0\n\nfor i in range(n):\n b = int(input())\n for j in range(3):\n for k in range(3):\n if a[j][k] == b:\n a[j][k] = 0\n\nprint(a)\n\nif (a[0][0] == 0 and a[2][2] == 0 and a[1][1] == 0) or (a[0][2] == 0 and a[2][0] == 0 and a[1][1] == 0): \n print("Yes")\n x = 1\nfor i in range(3):\n if a[i][0] == 0 and a[i][1] == 0 and a[i][2] and x == 0: \n print("Yes")\n x = 1\n break\n elif a[0][i] == 0 and a[1][i] == 0 and a[2][i] and x == 0: \n print("Yes")\n x = 1\n break\nif x == 0:\n print("No")', 'a=[]\nfor i in range(3):\n a.append(list(map(int,input().split())))\nn = int(input())\nx = 0\n\nfor i in range(n):\n b = int(input())\n for j in range(3):\n for k in range(3):\n if a[j][k] == b:\n a[j][k] = 0\n\nif (a[0][0] == 0 and a[2][2] == 0 and a[1][1] == 0) or (a[0][2] == 0 and a[2][0] == 0 and a[1][1] == 0): \n print("Yes")\n x = 1\nfor i in range(3):\n if a[i][0] == 0 and a[i][1] == 0 and a[i][2] == 0 and x == 0: \n print("Yes")\n x = 1\n break\n elif a[0][i] == 0 and a[1][i] == 0 and a[2][i] == 0 and x == 0: \n print("Yes")\n x = 1\n break\nif x == 0:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s050922794', 's497285463', 's718307191', 's684384551'] | [3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0, 17.0] | [1336, 278, 673, 673] |
p02760 | u115110170 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['mat = [[map(int,input().split())] for i in range(3)]\nmat = mat[0]+mat[1]+mat[2]\n\nn = int(input())\nfor _ in range(n):\n m = int(input())\n for i in range(9):\n if mat[i] == m:\n mat[i] = 1000\n\nif sum(mat[:3])>=3000:\n print("Yes")\nelif sum(mat[3:6])>=3000:\n print("Yes")\nelif sum(mat[6:])>=3000:\n print("Yes")\nelif sum(mat[::3])>=3000:\n print("Yes")\nelif sum(mat[1::3])>=3000:\n print("Yes")\nelif sum(mat[2::3])>=3000:\n print("Yes")\nelif sum(mat[::4])>=3000:\n print("Yes")\nelif sum(mat[2:7:2])>=3000:\n print("Yes")\nelse:\n print("No")', 'mat = [list(map(int,input().split())) for i in range(3)]\nmat = mat[0]+mat[1]+mat[2]\n\nn = int(input())\nfor _ in range(n):\n m = int(input())\n for i in range(9):\n if mat[i] == m:\n mat[i] = 1000\n\nif sum(mat[:3])>=3000:\n print("Yes")\nelif sum(mat[3:6])>=3000:\n print("Yes")\nelif sum(mat[6:])>=3000:\n print("Yes")\nelif sum(mat[::3])>=3000:\n print("Yes")\nelif sum(mat[1::3])>=3000:\n print("Yes")\nelif sum(mat[2::3])>=3000:\n print("Yes")\nelif sum(mat[::4])>=3000:\n print("Yes")\nelif sum(mat[2:7:2])>=3000:\n print("Yes")\nelse:\n print("No")\n\n'] | ['Runtime Error', 'Accepted'] | ['s762757702', 's768508020'] | [3064.0, 3064.0] | [17.0, 17.0] | [545, 551] |
p02760 | u118760114 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['a1 = list(map(int, input().split()))\na2 = list(map(int, input().split()))\na3 = list(map(int, input().split()))\n\nal = a1+a2+a3\nn =int(input())\n\nfor i in range(n):\n b = int(input())\n if b in al:\n al[al.index()] = 0\nif a1[0] + a1[1] + a1[2] == 0 or a2[0] + a2[1] + a2[2] == 0 or a3[0] + a3[1] + a3[2] == 0 or a1[0] + a2[0] + a3[0] == 0 or a1[1] + a2[1] + a3[1] == 0 or a1[2] + a2[2] + a3[2] == 0 or a1[0] + a2[1] + a3[2] == 0 or a1[2] + a2[1] + a3[0] == 0:\n print("Yes")\nelse:\n print("No")\n', 'a1 = list(map(int, input().split()))\na2 = list(map(int, input().split()))\na3 = list(map(int, input().split()))\n\nal = a1+a2+a3\nn =int(input())\n\nfor i in range(n):\n b = int(input())\n if b == al:\n al[al.index()] = 0\nif a1[0] + a1[1] + a1[2] == 0 or a2[0] + a2[1] + a2[2] == 0 or a3[0] + a3[1] + a3[2] == 0 or a1[0] + a2[0] + a3[0] == 0 or a1[1] + a2[1] + a3[1] == 0 or a1[2] + a2[2] + a3[2] == 0 or a1[0] + a2[1] + a3[2] == 0 or a1[2] + a2[1] + a3[0] == 0:\n print("Yes")\nelse:\n print("No")\n', 'a1 = list(map(int, input().split()))\na2 = list(map(int, input().split()))\na3 = list(map(int, input().split()))\n\nal = a1+a2+a3\nn =int(input())\n\nfor i in range(n):\n b = int(input())\n if b == al:\n al[al.index()] = 0\nif al[0] + al[1] + al[2] == 0 or al[3] + al[4] + al[5] == 0 or al[6] + al[7] + al[8] == 0 or al[0] + al[3] + al[6] == 0 or al[1] + al[4] + al[7] == 0 or al[2] + al[5] + al[8] == 0 or al[0] + al[4] + al[8] == 0 or al[2] + al[4] + al[6] == 0:\n print("Yes")\nelse:\n print("No")\n', 'a1 = list(map(int, input().split()))\na2 = list(map(int, input().split()))\na3 = list(map(int, input().split()))\n\nal = a1+a2+a3\nn =int(input())\n\nfor i in range(n):\n b = int(input())\n if b in al:\n al[al.index()] = 0\nif al[0] + al[1] + al[2] == 0 or al[3] + al[4] + al[5] == 0 or al[6] + al[7] + al[8] == 0 or al[0] + al[3] + al[6] == 0 or al[1] + al[4] + al[7] == 0 or al[2] + al[5] + al[8] == 0 or al[0] + al[4] + al[8] == 0 or al[2] + al[4] + al[6] == 0:\n print("Yes")\nelse:\n print("No")\n', 'a1 = list(map(int, input().split()))\na2 = list(map(int, input().split()))\na3 = list(map(int, input().split()))\n\nal = a1+a2+a3\nn =int(input())\n\nfor i in range(n):\n b = int(input())\n if b in al:\n al[al.index(b)] = 0\nif al[0] + al[1] + al[2] == 0 or al[3] + al[4] + al[5] == 0 or al[6] + al[7] + al[8] == 0 or al[0] + al[3] + al[6] == 0 or al[1] + al[4] + al[7] == 0 or al[2] + al[5] + al[8] == 0 or al[0] + al[4] + al[8] == 0 or al[2] + al[4] + al[6] == 0:\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s048299480', 's386728156', 's437372763', 's783748898', 's772421966'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [18.0, 17.0, 18.0, 18.0, 18.0] | [506, 506, 506, 506, 507] |
p02760 | u121879791 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["list_1 = list(map(int,input().split()))\nlist_2 = list(map(int,input().split()))\nlist_3 = list(map(int,input().split()))\n\n\n#list_a = []\n\nlist_a=list_1\n\n\nfor x in list_2:\n list_a.append(x)\n\n\nfor x in list_3:\n list_a.append(x)\n\n\nN = int(input())\n#list_b = [int(x) for x in input().split()]\nlist_b = list(map(int,input().split()))\n\nlist_c = [0,0,0,0,0,0,0,0,0]\nfor i in range(N):\n for j in range(9):\n if list_a[j] == list_b[i]:\n list_c[j] = 1\n\nflag=0\nif list_c[0]==1 and list_c[1]==1 and list_c[2]==1:\n flag=1\nif list_c[3]==1 and list_c[4]==1 and list_c[5]==1:\n flag=1\nif list_c[6]==1 and list_c[7]==1 and list_c[8]==1:\n flag=1\nif list_c[0]==1 and list_c[3]==1 and list_c[6]==1:\n flag=1\nif list_c[1]==1 and list_c[4]==1 and list_c[7]==1:\n flag=1\nif list_c[2]==1 and list_c[5]==1 and list_c[8]==1:\n flag=1\nif list_c[0]==1 and list_c[4]==1 and list_c[8]==1:\n flag=1\nif list_c[2]==1 and list_c[4]==1 and list_c[6]==1:\n flag=1\n \nif flag == 1:\n print('Yes')\nelse:\n print('No')", "list_a = [int(x) for x in input().split()]\nN = int(input())\nlist_b = [int(x) for x in input().split()]\n\nlist_c = [0,0,0,0,0,0,0,0,0]\nfor i in range(N):\n for j in range(9):\n if list_a[j] == list_b[i]:\n list_c[j] = 1\n\nflag=0\nif list_c[0]==1 and list_c[1]==1 and list_c[2]==1:\n flag=1\nif list_c[3]==1 and list_c[4]==1 and list_c[5]==1:\n flag=1\nif list_c[6]==1 and list_c[7]==1 and list_c[8]==1:\n flag=1\nif list_c[0]==1 and list_c[3]==1 and list_c[6]==1:\n flag=1\nif list_c[1]==1 and list_c[4]==1 and list_c[7]==1:\n flag=1\nif list_c[2]==1 and list_c[5]==1 and list_c[8]==1:\n flag=1\nif list_c[0]==1 and list_c[4]==1 and list_c[8]==1:\n flag=1\nif list_c[2]==1 and list_c[4]==1 and list_c[6]==1:\n flag=1\n \nif flag == 1:\n print('Yes')\nelse:\n print('No')", "#list_a = [int(x) for x in input().split()]\nlist_a = list(map(int,input().split()))\n\nN = int(input())\n#list_b = [int(x) for x in input().split()]\nlist_b = list(map(int,input().split()))\n\nlist_c = [0,0,0,0,0,0,0,0,0]\nfor i in range(N):\n for j in range(9):\n if list_a[j] == list_b[i]:\n list_c[j] = 1\n\nflag=0\nif list_c[0]==1 and list_c[1]==1 and list_c[2]==1:\n flag=1\nif list_c[3]==1 and list_c[4]==1 and list_c[5]==1:\n flag=1\nif list_c[6]==1 and list_c[7]==1 and list_c[8]==1:\n flag=1\nif list_c[0]==1 and list_c[3]==1 and list_c[6]==1:\n flag=1\nif list_c[1]==1 and list_c[4]==1 and list_c[7]==1:\n flag=1\nif list_c[2]==1 and list_c[5]==1 and list_c[8]==1:\n flag=1\nif list_c[0]==1 and list_c[4]==1 and list_c[8]==1:\n flag=1\nif list_c[2]==1 and list_c[4]==1 and list_c[6]==1:\n flag=1\n \nif flag == 1:\n print('Yes')\nelse:\n print('No')", "list_1 = list(map(int,input().split()))\nlist_2 = list(map(int,input().split()))\nlist_3 = list(map(int,input().split()))\n\n\n#list_a = []\n\nlist_a=list_1\n\n\nfor x in list_2:\n list_a.append(x)\n\n\nfor x in list_3:\n list_a.append(x)\n\n\nN = int(input())\n#list_b = [int(x) for x in input().split()]\n#list_b = list(map(int,input().split()))\n\n\nlist_b=[]\nfor k in range(N):\n b=int(input())\n list_b.append(b)\n\n\nlist_c = [0,0,0,0,0,0,0,0,0]\nfor i in range(N):\n for j in range(9):\n if list_a[j] == list_b[i]:\n list_c[j] = 1\n\nflag=0\nif list_c[0]==1 and list_c[1]==1 and list_c[2]==1:\n flag=1\nif list_c[3]==1 and list_c[4]==1 and list_c[5]==1:\n flag=1\nif list_c[6]==1 and list_c[7]==1 and list_c[8]==1:\n flag=1\nif list_c[0]==1 and list_c[3]==1 and list_c[6]==1:\n flag=1\nif list_c[1]==1 and list_c[4]==1 and list_c[7]==1:\n flag=1\nif list_c[2]==1 and list_c[5]==1 and list_c[8]==1:\n flag=1\nif list_c[0]==1 and list_c[4]==1 and list_c[8]==1:\n flag=1\nif list_c[2]==1 and list_c[4]==1 and list_c[6]==1:\n flag=1\n \nif flag == 1:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s112370261', 's498002266', 's707320587', 's659935600'] | [3192.0, 3064.0, 3064.0, 3188.0] | [18.0, 17.0, 17.0, 18.0] | [1081, 797, 880, 1154] |
p02760 | u123282507 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['#Input\nl_A = [[0 for i in range(3)] for j in range(3)]\n\ndef detect_BINGO(l_Atf):\n #print(l_Atf)\n \n for i in range(3):\n f_detect = True\n for j in range(3):\n #print(f_detect, l_Atf[i][j])\n f_detect = f_detect and l_Atf[i][j]\n if(f_detect):\n \n return True\n \n for i in range(3):\n f_detect = True\n for j in range(3):\n f_detect = f_detect and l_Atf[j][i]\n if(f_detect):\n \n return True\n \n f_detect = True\n for i in range(3):\n f_detect = f_detect and l_Atf[i][i]\n if(f_detect):\n \n return True\n f_detect = True\n for i in range(3):\n f_detect = f_detect and l_Atf[3-1-i][3-1-i]\n if(f_detect):\n \n return True\n \n \n return False\n\n#Process\nl_Atf = [[False for i in range(3)] for j in range(3)]\nfor i in range(int(input())):\n b = int(input())\n for j in range(3):\n for k in range(3):\n if(l_A[j][k] == b):\n l_Atf[j][k] = True\n #print(l_Atf)\n\n# print(l_Atf)\nf_bingo = detect_BINGO(l_Atf)\n\n#Output\nif(f_bingo):\n print("Yes")\nelse:\n print("no")\n', '#Input\nl_A = [[0 for i in range(3)] for j in range(3)]\nl_A[0] = list(map(int, input().split()))\nl_A[1] = list(map(int, input().split()))\nl_A[2] = list(map(int, input().split()))\n\ndef detect_BINGO(l_Atf):\n #print(l_Atf)\n \n for i in range(3):\n f_detect = True\n for j in range(3):\n #print(f_detect, l_Atf[i][j])\n f_detect = f_detect and l_Atf[i][j]\n if(f_detect):\n \n return True\n \n for i in range(3):\n f_detect = True\n for j in range(3):\n f_detect = f_detect and l_Atf[j][i]\n if(f_detect):\n \n return True\n \n f_detect = True\n for i in range(3):\n f_detect = f_detect and l_Atf[i][i]\n if(f_detect):\n \n return True\n f_detect = True\n for i in range(3):\n f_detect = f_detect and l_Atf[i][3-1-i]\n if(f_detect):\n \n return True\n \n \n return False\n\n#Process\nl_Atf = [[False for i in range(3)] for j in range(3)]\nfor i in range(int(input())):\n b = int(input())\n for j in range(3):\n for k in range(3):\n if(l_A[j][k] == b):\n l_Atf[j][k] = True\n #print(l_Atf)\n\nf_bingo = detect_BINGO(l_Atf)\n\n#Output\nif(f_bingo):\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s234685075', 's835230163'] | [3064.0, 3064.0] | [17.0, 18.0] | [1281, 1383] |
p02760 | u123849536 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["# -*- coding: utf-8 -*-\n# 157b\na = []\nb = []\ncheck_list = [False] * 9\nfor _ in range(3);\n a.extend(list(map(int, input().split())))\nn = int(input())\nfor _ in range(n);\n b.append(int(input()))\n\nfor _b in b:\n if _b in a:\n check_list[a.index(_b)] = True\n\nif check_list[0] and check_list[1] and check_list[2]\\\n or check_list[3] and check_list[4] and check_list[5]\\\n or check_list[6] and check_list[7] and check_list[8]\\\n or check_list[0] and check_list[3] and check_list[6]\\\n or check_list[1] and check_list[4] and check_list[7]\\\n or check_list[2] and check_list[5] and check_list[8]\\\n or check_list[0] and check_list[4] and check_list[8]\\\n or check_list[2] and check_list[4] and check_list[6]:\n print('Yes')\nelse:\n print('No')\n", "\n# -*- coding: utf-8 -*-\n# 157b\na = []\nb = []\ncheck_list = [False] * 9\nfor _ in range(3):\n a.extend(list(map(int, input().split())))\nn = int(input())\nfor _ in range(n):\n b.append(int(input()))\n\nfor _b in b:\n if _b in a:\n check_list[a.index(_b)] = True\n\nif check_list[0] and check_list[1] and check_list[2]\\\n or check_list[3] and check_list[4] and check_list[5]\\\n or check_list[6] and check_list[7] and check_list[8]\\\n or check_list[0] and check_list[3] and check_list[6]\\\n or check_list[1] and check_list[4] and check_list[7]\\\n or check_list[2] and check_list[5] and check_list[8]\\\n or check_list[0] and check_list[4] and check_list[8]\\\n or check_list[2] and check_list[4] and check_list[6]:\n print('Yes')\nelse:\n print('No')\n\n"] | ['Runtime Error', 'Accepted'] | ['s968494522', 's392279593'] | [2940.0, 3064.0] | [17.0, 18.0] | [739, 741] |
p02760 | u128196936 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A=list(map(lambda x: (int(x), False), input().split()))\nA+=list(map(lambda x: (int(x), False), input().split()))\nA+=list(map(lambda x: (int(x), False), input().split()))\n\nN = int(input())\nfor _ in range(N):\n n = int(input())\n for a, b in A:\n if a == n:\n b = True\nif (A[0][1] and ((A[1][1] and A[2][1]) or \\\n (A[3][1] and A[6][1]) or \\\n (A[4][1] and A[8][1])) or \\\n (A[1][1] and A[4][1] and A[7][1]) or \\\n (A[2][1] and A[5][1] and A[8][1]) or \\\n (A[3][1] and A[4][1] and A[5][1]) or \\\n (A[6][1] and A[7][1] and A[8][1]) or \\\n (A[2][1] and A[4][1] and A[6][1]):\n print("YES")\nelse:\n print("No")\n', 'A=list(map(lambda x: int(x), False), input().split()))\nA+=list(map(lambda x: (int(x), False), input().split()))\nA+=list(map(lambda x: (int(x), False), input().split()))\n\nN = int(input())\nfor _ in range(N):\n n = int(input())\n for a, b in A:\n if a == n:\n b = True\nif (A[0][1] and ((A[1][1] and A[2][1]) or \\\n (A[3][1] and A[6][1]) or \\\n (A[4][1] and A[8][1])) or \\\n (A[1][1] and A[4][1] and A[7][1]) or \\\n (A[2][1] and A[5][1] and A[8][1]) or \\\n (A[3][1] and A[4][1] and A[5][1]) or \\\n (A[6][1] and A[7][1] and A[8][1]) or \\\n (A[2][1] and A[4][1] and A[6][1]):\n print("YES")\nelse:\n print("No")', 'A=list(map(lambda x: (int(x), False), input().split()))\nA+=list(map(lambda x: (int(x), False), input().split()))\nA+=list(map(lambda x: (int(x), False), input().split()))\n\nN = int(input())\nfor _ in range(N):\n n = int(input())\n for a, b in A:\n if a == n:\n b = True\nif (A[0][1] and ((A[1][1] and A[2][1]) or \\\n (A[3][1] and A[6][1]) or \\\n (A[4][1] and A[8][1]))) or \\\n (A[1][1] and A[4][1] and A[7][1]) or \\\n (A[2][1] and A[5][1] and A[8][1]) or \\\n (A[3][1] and A[4][1] and A[5][1]) or \\\n (A[6][1] and A[7][1] and A[8][1]) or \\\n (A[2][1] and A[4][1] and A[6][1]):\n print("YES")\nelse:\n print("No")\n', '#!/usr/bin/env python3\nimport sys\n\nYES = "Yes" # type: str\nNO = "No" # type: str\n\n\ndef solve(A: "List[List[int]]", N: int, b: "List[int]"):\n A_ = []\n for a_ in A:\n A_ += [[a__, False] for a__ in a_]\n for b_ in b:\n for a__ in A_:\n if a__[0] == b_:\n a__[1] = True\n if (A_[0][1] and ((A_[1][1] and A_[2][1]) or \\\n (A_[3][1] and A_[6][1]) or \\\n (A_[4][1] and A_[8][1]))) or \\\n (A_[1][1] and A_[4][1] and A_[7][1]) or \\\n (A_[2][1] and A_[5][1] and A_[8][1]) or \\\n (A_[3][1] and A_[4][1] and A_[5][1]) or \\\n (A_[6][1] and A_[7][1] and A_[8][1]) or \\\n (A_[2][1] and A_[4][1] and A_[6][1]):\n print(YES)\n else:\n print(NO)\n return\n\n\n# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)\ndef main():\n def iterate_tokens():\n for line in sys.stdin:\n for word in line.split():\n yield word\n tokens = iterate_tokens()\n A = [[int(next(tokens)) for _ in range(3)] for _ in range(3)] # type: "List[List[int]]"\n N = int(next(tokens)) # type: int\n b = [int(next(tokens)) for _ in range(N)] # type: "List[int]"\n solve(A, N, b)\n\nif __name__ == \'__main__\':\n main()\n'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s082717466', 's340664116', 's504009264', 's641701115'] | [9016.0, 8976.0, 9280.0, 9260.0] | [27.0, 25.0, 28.0, 33.0] | [698, 696, 699, 1387] |
p02760 | u129961029 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['a1=[map(int(),input().split())]\na2=[map(int(),input().split())]\na3=[map(int(),input().split())]\nn=int(input())\nb=[input() for i in range(n)]\nfor i in range(3):\n for j in range(n):\n if a1[i] == b[j]:\n a1[i] = 1\n elif a2[i] == b[j]:\n a2[i] = 1\n elif a3[i] == b[j]:\n a3[i] = 1\n \nif a1[0] == a1[1] == a1[2]:\n print("Yes")\nelif a2[0] == a2[1] == a2[2]:\n print("Yes")\nelif a3[0] == a3[1] == a3[2]:\n print("Yes")\nelif a1[0] == a2[0] == a3[0]:\n print("Yes")\nelif a1[1] == a2[1] == a3[1]:\n print("Yes")\nelif a1[2] == a2[2] == a3[2]:\n print("Yes")\nelif a1[0] == a2[1] == a3[2]:\n print("Yes")\nelif a1[2] == a2[1] == a3[0]:\n print("Yes")\nelse:\n print("No")', 'a1=[map(int(),input().split())]\na2=[map(int(),input().split())]\na3=[map(int(),input().split())]\nn=int(input())\nb=[input() for i in range(n)]\nfor i in range(3):\n for j in range(N):\n if a1[i] == b[j]:\n a1[i] = 1\n elif a2[i] == b[j]:\n a2[i] = 1\n elif a3[i] == b[j]:\n a3[i] = 1\n \nprint(line1)\nprint(line2)\nprint(line3)\n\nif a1[0] == a1[1] == a1[2]:\n print("Yes")\nelif a2[0] == a2[1] == a2[2]:\n print("Yes")\nelif a3[0] == a3[1] == a3[2]:\n print("Yes")\nelif a1[0] == a2[0] == a3[0]:\n print("Yes")\nelif a1[1] == a2[1] == a3[1]:\n print("Yes")\nelif a1[2] == a2[2] == a3[2]:\n print("Yes")\nelif a1[0] == a2[1] == a3[2]:\n print("Yes")\nelif a1[2] == a2[1] == a3[0]:\n print("Yes")\nelse:\n print("No")', 'a1=[map(int(),input().split())]\na2=[map(int(),input().split())]\na3=[map(int(),input().split())]\nn=int(input())\nb=[input() for i in range(n)]\n\nline1=[]\nline2=[]\nline3=[]\n\nfor num in b:\n if num in a1:\n line1.append(a1.index(num))\n elif num in a2:\n line2.append(a2.index(num))\n elif num in a3:\n line3.append(a3.index(num))\nif 0 in line1 and 0 in line2 and 0 in line3 or 1 in line1 and 1 in line2 and 1 in line3 or 2 in line1 and 2 in line2 and 2 in line3 :\n print("Yes")\nelif 0 in line1 and 1 in line2 and 2 in line3 or 2 in line1 and 1 in line2 and 0 in line3:\n print("Yes")\nelif 0 in line1 and 1 in line1 and 2 in line1 or 0 in line2 and 1 in line2 and 2 in line2 or 0 in line3 and 1 in line3 and 2 in line3:\n print("Yes")\nelse:\n print("No")', 'a1=[map(int(),input().split())]\na2=[map(int(),input().split())]\na3=[map(int(),input().split())]\nn=int(input())\nb=[input() for i in range(n)]\n\nline1=[]\nline2=[]\nline3=[]\n\nfor num in b:\n if num in a1:\n line1.append(a1.index(num))\n elif num in a2:\n line2.append(a2.index(num))\n elif num in a3:\n line3.append(a3.index(num))\nif 0 in line1 and 0 in line2 and 0 in line3 or 1 in line1 and 1 in line2 and 1 in line3 or 2 in line1 and 2 in line2 and 2 in line3 :\n print("Yes")\nelif 0 in line1 and 1 in line2 and 2 in line3 or 2 in line1 and 1 in line2 and 0 in line3:\n print("Yes")\nelif 0 in line1 and 1 in line1 and 2 in line1 or 0 in line2 and 1 in line2 and 2 in line2 or 0 in line3 and 1 in line3 and 2 in line3:\n print("Yes")\nelse:\n print("No")', 'a1=list(map(int,input().split()))\na2=list(map(int,input().split()))\na3=list(map(int,input().split()))\nn=int(input())\nb=[int(input()) for i in range(n)]\nfor i in range(3):\n for j in range(n):\n if a1[i] == b[j]:\n a1[i] = 1\n elif a2[i] == b[j]:\n a2[i] = 1\n elif a3[i] == b[j]:\n a3[i] = 1\n \nif a1[0] == a1[1] == a1[2]:\n print("Yes")\nelif a2[0] == a2[1] == a2[2]:\n print("Yes")\nelif a3[0] == a3[1] == a3[2]:\n print("Yes")\nelif a1[0] == a2[0] == a3[0]:\n print("Yes")\nelif a1[1] == a2[1] == a3[1]:\n print("Yes")\nelif a1[2] == a2[2] == a3[2]:\n print("Yes")\nelif a1[0] == a2[1] == a3[2]:\n print("Yes")\nelif a1[2] == a2[1] == a3[0]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s028886394', 's427472743', 's774666651', 's829088272', 's635253445'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [18.0, 18.0, 17.0, 17.0, 18.0] | [728, 768, 782, 782, 739] |
p02760 | u131411061 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['def main():\n A = [list(map(int,input().split(" "))) for i in range(3)]\n N = int(input())\n b_list = [int(input()) for _ in range(N)]\n\n for i in range(3):\n for j in range(3):\n for b in b_list:\n if(A[i][j] == b):\n A[i][j] = 0\n\n flag = False\n for i in range(3):\n for j in range(3):\n if(j+2 < 3 and A[i][j] == 0 and A[i][j+1] == 0 and A[i][j+2] == 0):\n flag = True\n break\n if(i+2 < 3 and A[i][j] == 0 and A[i+1][j] == 0 and A[i+2][j] == 0):\n flag = True\n break\n if(i+2 < 3 and j+2 < 3 and A[i][j] == 0 and A[i+1][j+1] == 0 and A[i+2][j+2] == 0):\n flag = True\n break\n if(i-2 >= 0 and j-2 >= 0 and A[i][j] == 0 and A[i-1][j-1] == 0 and A[i-2][j-2] == 0):\n flag = True\n break\n if(i-2 >= 0 and j+1 < 3 and A[i][j] == 0 and A[i-1][j+1] == 0 and A[i-2][j+2] == 0):\n flag = True\n break\n if(i+2 < 3 and j-2 >= 0 and A[i][j] == 0 and A[i+1][j-1] == 0 and A[i+2][j-2] == 0)\n if(flag):\n break\n\n if(flag):\n print("Yes")\n else:\n print("No")\n\nif __name__ == "__main__":\n main()', 'def main():\n A = [list(map(int,input().split(" "))) for i in range(3)]\n N = int(input())\n b_list = [int(input()) for _ in range(N)]\n\n for i in range(3):\n for j in range(3):\n for b in b_list:\n if(A[i][j] == b):\n A[i][j] = 0\n\n flag = False\n for i in range(3):\n for j in range(3):\n if(j+2 < 3 and A[i][j] == 0 and A[i][j+1] == 0 and A[i][j+2] == 0):\n flag = True\n break\n if(i+2 < 3 and A[i][j] == 0 and A[i+1][j] == 0 and A[i+2][j] == 0):\n flag = True\n break\n if(i+2 < 3 and j+2 < 3 and A[i][j] == 0 and A[i+1][j+1] == 0 and A[i+2][j+2] == 0):\n flag = True\n break\n if(i-2 >= 0 and j-2 >= 0 and A[i][j] == 0 and A[i-1][j-1] == 0 and A[i-2][j-2] == 0):\n flag = True\n break\n if(i-2 >= 0 and j+2 < 3 and A[i][j] == 0 and A[i-1][j+1] == 0 and A[i-2][j+2] == 0):\n flag = True\n break\n if(i+2 < 3 and j-2 >= 0 and A[i][j] == 0 and A[i+1][j-1] == 0 and A[i+2][j-2] == 0):\n flag = True\n break\n if(flag):\n break\n\n if(flag):\n print("Yes")\n else:\n print("No")\n\nif __name__ == "__main__":\n main()'] | ['Runtime Error', 'Accepted'] | ['s573980800', 's062158835'] | [3064.0, 3188.0] | [17.0, 19.0] | [1356, 1415] |
p02760 | u131946248 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['import numpy as np\ncard = []\nfor i in range(3):\n card.append(list(map(int, input().split())))\ncard = np.array(card)\nn = int(input())\nfor k in range(n):\n b = int(input())\n for i in range(3):\n for j in range(3):\n if (card[i, j] == b):\n card[i, j] = 0\nflag = 0\nfor i in range(3):\n if (sum(card[i,:]) == 0):\n flag = 1\n if (sum(card[:,i]) == 0):\n flag = 1\nif (card[0,0]+card[1,1]+card[2,2] == 0):\n flag = 1\nif (card[0,2]+card[1,1]+card[2,0] == 0):\n flag = 1\nif (flag == 1):\n print("yes")\nelse:\n print("no")', 'import numpy as np\ncard = []\nfor i in range(3):\n card.append(list(map(int, input().split())))\ncard = np.array(card)\nn = int(input())\nfor k in range(n):\n b = int(input())\n for i in range(3):\n for j in range(3):\n if (card[i, j] == b):\n card[i, j] = 0\nflag = 0\nfor i in range(3):\n if (sum(card[i,:]) == 0):\n flag = 1\n if (sum(card[:,i]) == 0):\n flag = 1\nif (card[0,0]+card[1,1]+card[2,2] == 0):\n flag = 1\nif (card[0,2]+card[1,1]+card[2,0] == 0):\n flag = 1\nif (flag == 1):\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s523013470', 's855693028'] | [21768.0, 21256.0] | [356.0, 1155.0] | [553, 553] |
p02760 | u132049876 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['s = input().split()\nnums = []\n[[nums.append(num) for num in row.split(" ")] for row in s[:9]]\nn = int(s[9])\nbs = s[10:]\nmat = [num in bs for num in nums]\npatterns = [[0, 1, 2],\n [0, 4, 8],\n [0, 3, 6],\n [1, 4, 7],\n [2, 4, 6],\n [2, 5, 8],\n [3, 4, 5],\n [6, 7, 8]]\nfor pat in patterns:\n if mat[pat[0]] and mat[pat[1]] and mat[pat[2]]:\n print("Yes")\n', 's = input().split()\nnums = []\n[[nums.append(num) for num in row] for row in s[:3]]\nn = int(s[3])\nbs = s[4:]\nmat = [num in bs for num in nums]\npattterns = [[1, 2, 3],\n [1, 5, 9],\n [1, 4, 7],\n [2, 5, 8],\n [3, 5, 7],\n [3, 6, 9],\n [4, 5, 6],\n [7, 8, 9]]\nfor pat in patterns:\n if mat[pat[0]] and mat[pat[1]] and mat[pat[2]]:\n print("Yes")', 'import sys\ninput = sys.stdin.readline\ns = input.split()\nnums = []\n[[nums.append(num) for num in row] for row in s[:3]]\nn = int(s[3])\nbs = s[4:]\nmat = [num in bs for num in nums]\npattterns = [[1, 2, 3],\n [1, 5, 9],\n [1, 4, 7],\n [2, 5, 8],\n [3, 5, 7],\n [3, 6, 9],\n [4, 5, 6],\n [7, 8, 9]]\nfor pat in patterns:\n if mat[pat[0]] and mat[pat[1]] and mat[pat[2]]:\n print("Yes")', 's = input().split()\nnums = []\n[[nums.append(num) for num in row] for row in s[:3]]\nn = int(s[3])\nbs = s[4:]\nmat = [num in bs for num in nums]\npatterns = [[1, 2, 3],\n [1, 5, 9],\n [1, 4, 7],\n [2, 5, 8],\n [3, 5, 7],\n [3, 6, 9],\n [4, 5, 6],\n [7, 8, 9]]\nfor pat in patterns:\n if mat[pat[0]] and mat[pat[1]] and mat[pat[2]]:\n print("Yes")\n', 's = []\na = [[s.append(i) for i in line.split(" ")] for line in input().split()]\nnums = []\n[[nums.append(num) for num in row.split(" ")] for row in s[:9]]\nn = int(s[9])\nbs = s[10:]\nmat = [num in bs for num in nums]\npatterns = [[0, 1, 2],\n [0, 4, 8],\n [0, 3, 6],\n [1, 4, 7],\n [2, 4, 6],\n [2, 5, 8],\n [3, 4, 5],\n [6, 7, 8]]\nfor pat in patterns:\n if mat[pat[0]] and mat[pat[1]] and mat[pat[2]]:\n print("Yes")\n', 'import sys\ninput = sys.stdin.readlines()\nnums = []\n[[nums.append(num) for num in row.strip().split(" ")] for row in input[:3]]\nbs = [i.strip() for i in input[4:]]\nmat = [num in bs for num in nums]\npatterns = [[0, 1, 2],\n [0, 4, 8],\n [0, 3, 6],\n [1, 4, 7],\n [2, 4, 6],\n [2, 5, 8],\n [3, 4, 5],\n [6, 7, 8]]\nfor pat in patterns:\n if mat[pat[0]] and mat[pat[1]] and mat[pat[2]]:\n print("Yes")\n else:\n print("No")\n', 'import sys\ninput = sys.stdin.readlines()\nnums = []\n[[nums.append(num) for num in row.strip().split(" ")] for row in input[:3]]\nbs = [i.strip() for i in input[4:]]\nmat = [num in bs for num in nums]\npatterns = [[0, 1, 2],\n [0, 4, 8],\n [0, 3, 6],\n [1, 4, 7],\n [2, 4, 6],\n [2, 5, 8],\n [3, 4, 5],\n [6, 7, 8]]\nfor pat in patterns:\n if mat[pat[0]] and mat[pat[1]] and mat[pat[2]]:\n print("Yes")\n sys.exit()\nprint("No")'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s042187557', 's061218227', 's502807986', 's582808775', 's805776243', 's811923953', 's156754458'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [18.0, 18.0, 17.0, 17.0, 17.0, 17.0, 18.0] | [432, 427, 484, 420, 492, 505, 505] |
p02760 | u132878037 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['a=[0]\na.extend(list(map(int,input().split())))\na.extend(list(map(int,input().split())))\na.extend(list(map(int,input().split())))\nprint(a)\nn=int(input())\nfor i in range(n):\n b=int(input())\n for k in range(10):\n if a[k]==b:\n a[k]=0\nprint(a)\nt="No"\nif a[1]==0 and a[2]==0 and a[3]==0:\n t="Yes"\nif a[4]==0 and a[5]==0 and a[6]==0:\n t="Yes"\nif a[7]==0 and a[8]==0 and a[9]==0:\n t="Yes"\nif a[1]==0 and a[4]==0 and a[7]==0:\n t="Yes"\nif a[2]==0 and a[5]==0 and a[8]==0:\n t="Yes"\nif a[3]==0 and a[6]==0 and a[9]==0:\n t="Yes"\nif a[1]==0 and a[5]==0 and a[9]==0:\n t="Yes"\nif a[3]==0 and a[5]==0 and a[7]==0:\n t="Yes"\n\nprint(t)\n', 'a=[0]\na.extend(list(map(int,input().split())))\na.extend(list(map(int,input().split())))\na.extend(list(map(int,input().split())))\nn=int(input())\nfor i in range(n):\n b=int(input())\n for k in range(10):\n if a[k]==b:\n a[k]=0\nt="No"\nif a[1]==0 and a[2]==0 and a[3]==0:\n t="Yes"\nif a[4]==0 and a[5]==0 and a[6]==0:\n t="Yes"\nif a[7]==0 and a[8]==0 and a[9]==0:\n t="Yes"\nif a[1]==0 and a[4]==0 and a[7]==0:\n t="Yes"\nif a[2]==0 and a[5]==0 and a[8]==0:\n t="Yes"\nif a[3]==0 and a[6]==0 and a[9]==0:\n t="Yes"\nif a[1]==0 and a[5]==0 and a[9]==0:\n t="Yes"\nif a[3]==0 and a[5]==0 and a[7]==0:\n t="Yes"\n\nprint(t)\n'] | ['Wrong Answer', 'Accepted'] | ['s012629086', 's355362295'] | [3064.0, 3192.0] | [17.0, 17.0] | [664, 646] |
p02760 | u136282556 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["n=3\nnum_list = []\nfor i in range(n):\n num_list.append(list(map(int,input().split())))\n\nN=int(input())\n\nlist1=[int(input()) for _ in range(N)]\n\nlist2=[]\ni=0\nwhile i<=2:\n j=0\n while j<=2:\n list2.append(num_list[i][j])\n j=j+1\n i=i+1\n\ns=0\nfor k in list2:\n if list1.count(k)==1:\n list2[s]=101\n s=s+1\n else:\n s=s+1\n continue\n\nprint(list2)\n\nif list2[0]+list2[1]+list2[2]==303:\n print('Yes')\nelif list2[3]+list2[4]+list2[5]==303:\n print('Yes')\nelif list2[6]+list2[7]+list2[8]==303:\n print('Yes')\nelif list2[0]+list2[3]+list2[6]==303:\n print('Yes')\nelif list2[1]+list2[4]+list2[7]==303:\n print('Yes')\nelif list2[2]+list2[5]+list2[8]==303:\n print('Yes')\nelif list2[0]+list2[4]+list2[8]==303:\n print('Yes')\nelif list2[2]+list2[4]+list2[6]==303:\n print('Yes')\nelse:\n print('No')\n", "n=3\nnum_list = []\nfor i in range(n):\n num_list.append(list(map(int,input().split())))\n\nN=int(input())\n\nlist1=[int(input()) for _ in range(N)]\n\nlist2=[]\ni=0\nwhile i<=2:\n j=0\n while j<=2:\n list2.append(num_list[i][j])\n j=j+1\n i=i+1\n\ns=0\nfor k in list2:\n if list1.count(k)==1:\n list2[s]=101\n s=s+1\n else:\n s=s+1\n continue\n\nif list2[0]+list2[1]+list2[2]==303:\n print('Yes')\nelif list2[3]+list2[4]+list2[5]==303:\n print('Yes')\nelif list2[6]+list2[7]+list2[8]==303:\n print('Yes')\nelif list2[0]+list2[3]+list2[6]==303:\n print('Yes')\nelif list2[1]+list2[4]+list2[7]==303:\n print('Yes')\nelif list2[2]+list2[5]+list2[8]==303:\n print('Yes')\nelif list2[0]+list2[4]+list2[8]==303:\n print('Yes')\nelif list2[2]+list2[4]+list2[6]==303:\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s106021201', 's113036231'] | [9296.0, 9236.0] | [26.0, 31.0] | [854, 840] |
p02760 | u141574039 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['B=[];bingo=0\nimport numpy as np\nA=np.zeros((3,3),dtype=int)\nfor i in range(3):\n a,b,c=map(int,input().split())\n A[i][0]=a\n A[i][1]=b\n A[i][2]=c\nN=int(input())\nfor i in range(N):\n B.append(int(input()))\n#print(A)\n\nfor i in range(3):\n for j in range(3):\n for k in range(N):\n if A[i][j]==B[k]:\n A[i][j]=0\n#print(A)\nfor i in range(3):\n if sum(A[i][:])==0:\n bingo=bingo+1\nfor i in range(3):\n if sum(A[0][i])==0 or sum(A[1][i])==0 or sum(A[2][i])==0:\n bingo=bingo+1\nif A[0][0]+A[1][1]+A[2][2]==0:\n bingo=bingo+1\nif A[2][0]+A[1][1]+A[0][2]==0:\n bingo=bingo+1\nprint("Yes" if bingo>=1 else "No")\nprint(sum(A[:][1]))\nprint(sum(A[1][:]))\nprint(bingo)', 'B=[];bingo=0\nimport numpy as np\nA=np.zeros((3,3),dtype=int)\nfor i in range(3):\n a,b,c=map(int,input().split())\n A[i][0]=a\n A[i][1]=b\n A[i][2]=c\nN=int(input())\nfor i in range(N):\n B.append(int(input()))\n#print(A)\n\nfor i in range(3):\n for j in range(3):\n for k in range(N):\n if A[i][j]==B[k]:\n A[i][j]=0\n#print(A)\nfor i in range(3):\n if sum(A[i][:])==0:\n bingo=bingo+1\nfor i in range(3):\n if sum(A[0][i])==0 or sum(A[1][i])==0 or sum(A[2][i])==0:\n bingo=bingo+1\nif A[0][0]+A[1][1]+A[2][2]==0:\n bingo=bingo+1\nif A[2][0]+A[1][1]+A[0][2]==0:\n bingo=bingo+1\nprint("Yes" if bingo>=1 else "No")', 'B=[];bingo=0\nimport numpy as np\nA=np.zeros((3,3),dtype=int)\nfor i in range(3):\n a,b,c=map(int,input().split())\n A[i][0]=a\n A[i][1]=b\n A[i][2]=c\nN=int(input())\nfor i in range(N):\n B.append(int(input()))\n#print(A)\n\nfor i in range(3):\n for j in range(3):\n for k in range(N):\n if A[i][j]==B[k]:\n A[i][j]=0\n#print(A)\nfor i in range(3):\n if sum(A[i][:])==0:\n bingo=bingo+1\nfor i in range(3):\n if A[0][i]+A[1][i]+A[2][i]==0:\n bingo=bingo+1\nif A[0][0]+A[1][1]+A[2][2]==0:\n bingo=bingo+1\nif A[2][0]+A[1][1]+A[0][2]==0:\n bingo=bingo+1\nprint("Yes" if bingo>=1 else "No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s228194793', 's576962307', 's683625578'] | [12508.0, 12508.0, 12508.0] | [152.0, 148.0, 149.0] | [679, 626, 599] |
p02760 | u146803137 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['import math\ndef py():\n print("Yes")\ndef pn():\n print("No")\ndef iin():\n x = int(input())\n return x\n\nneko = 0\nnya = 0\nnuko = 0\na = [[0] * 3] * 3\nx = [[0] * 3] * 3\nfor i in range(3):\n for j in range(3):\n a[i][j] = iin()\nn = iin()\nb = [0] * n\nfor i in range(n):\n b[i] = iin()\n\nfor i in range(3):\n for j in range(3):\n for f in range(3):\n if a[i][j] == b[f]:\n x[i][j] = 1\nfor i in range(3):\n if sum(x[i]) == 3:\n neko = neko + 1\n nya = x[0][i] + x[1][i] + x[2][i]\n if nya == 3:\n neko = neko + 1\nnya = x[0][0]+ x[1][1] + x[2][2]\nif nya == 3:\n neko = neko + 1\nnya = x[0][2]+ x[1][1] + x[2][0]\nif nya == 3:\n neko = neko + 1\nif neko > 0:\n py()\nelse:\n pn()', 'import math\ndef py():\n print("Yes")\ndef pn():\n print("No")\ndef iin():\n x = int(input())\n return x\n\nneko = 0\nnya = 0\nnuko = 0\na = [] \nx = [[0] * 3 for i in range(3)]\nfor i in range(3):\n a.append([int(x) for x in input().split()])\nn = iin()\nb = [0] * n\nfor i in range(n):\n b[i] = iin()\n\nfor i in range(3):\n for j in range(3):\n for f in range(n):\n if a[i][j] == b[f]:\n x[i][j] = 1\nprint(x)\nfor i in range(3):\n if sum(x[i]) == 3:\n neko = neko + 1\n nya = x[0][i] + x[1][i] + x[2][i]\n if nya == 3:\n neko = neko + 1\nnya = x[0][0]+ x[1][1] + x[2][2]\nif nya == 3:\n neko = neko + 1\nnya = x[0][2]+ x[1][1] + x[2][0]\nif nya == 3:\n neko = neko + 1\nif neko > 0:\n py()\nelse:\n pn()', 'import math\ndef py():\n print("Yes")\ndef pn():\n print("No")\ndef iin():\n x = int(input())\n return x\n\nneko = 0\nnya = 0\nnuko = 0\na = [] \nx = [[0] * 3 for i in range(3)]\nfor i in range(3):\n a.append([int(x) for x in input().split()])\nn = iin()\nb = [0] * n\nfor i in range(n):\n b[i] = iin()\n\nfor i in range(3):\n for j in range(3):\n for f in range(n):\n if a[i][j] == b[f]:\n x[i][j] = 1\nfor i in range(3):\n if sum(x[i]) == 3:\n neko = neko + 1\n nya = x[0][i] + x[1][i] + x[2][i]\n if nya == 3:\n neko = neko + 1\nnya = x[0][0]+ x[1][1] + x[2][2]\nif nya == 3:\n neko = neko + 1\nnya = x[0][2]+ x[1][1] + x[2][0]\nif nya == 3:\n neko = neko + 1\nif neko > 0:\n py()\nelse:\n pn()'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s041766128', 's154234842', 's825469366'] | [3064.0, 3064.0, 3064.0] | [18.0, 18.0, 18.0] | [740, 754, 745] |
p02760 | u150027030 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A = []\nfor i in range(3):\n A += list(map(int, input().split()))\nN = int(input())\nfor i in range(N-1):\n b = int(input())\n if b in A:\n A = [0 if num == b else num for num in A]\n print(A)\nbingo_check = [[0, 1, 2],\n [0, 3, 6],\n [0, 4, 8],\n [1, 4, 7],\n [2, 4, 6],\n [2, 5, 8],\n [3, 4, 5],\n [6, 7, 8]]\nno_check = 1\nfor check in bingo_check:\n row = [A[i] for i in check]\n if not sum(row):\n print("Yes")\n no_check = 0\n break\nif no_check:\n print("No")', 'A = []\nfor i in range(3):\n A += list(map(int, input().split()))\nN = int(input())\nfor i in range(N):\n b = int(input())\n if b in A:\n A = [0 if num == b else num for num in A]\nbingo_check = [[0, 1, 2],\n [0, 3, 6],\n [0, 4, 8],\n [1, 4, 7],\n [2, 4, 6],\n [2, 5, 8],\n [3, 4, 5],\n [6, 7, 8]]\nno_check = 1\nfor check in bingo_check:\n row = [A[i] for i in check]\n if not sum(row):\n print("Yes")\n no_check = 0\n break\nif no_check:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s029307921', 's174152762'] | [3064.0, 3064.0] | [18.0, 19.0] | [588, 573] |
p02760 | u150517577 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["def check(A,b):\n for raw in range(3):\n for colomn in range(3):\n if A[raw][colomn] == b:\n A[raw][colomn] = -1\n return\n return\n\nA = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nis_bingo = 'No'\nfor _ in range(N):\n b = int(input())\n check(A,b)\n\nprint(A)\nfor raw in range(3):\n if A[raw][0] + A[raw][1] + A[raw][2] == -3:\n is_bingo = 'Yes'\n\nfor colomn in range(3):\n if A[0][colomn] + A[1][colomn] + A[2][colomn] == -3:\n is_bingo = 'Yes'\n\nif A[0][0] + A[1][1] + A[2][2] == -3:\n is_bingo = 'Yes'\nif A[0][2] + A[1][1] + A[2][0] == -3:\n is_bingo = 'Yes'\n\nprint(is_bingo)", "def check(A,b):\n for raw in range(3):\n for colomn in range(3):\n if A[raw][colomn] == b:\n A[raw][colomn] = -1\n return\n return\n\nA = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nis_bingo = 'No'\nfor _ in range(N):\n b = int(input())\n check(A,b)\n\nfor raw in range(3):\n if A[raw][0] + A[raw][1] + A[raw][2] == -3:\n is_bingo = 'Yes'\n\nfor colomn in range(3):\n if A[0][colomn] + A[1][colomn] + A[2][colomn] == -3:\n is_bingo = 'Yes'\n\nif A[0][0] + A[1][1] + A[2][2] == -3:\n is_bingo = 'Yes'\nif A[0][2] + A[1][1] + A[2][0] == -3:\n is_bingo = 'Yes'\n\nprint(is_bingo)"] | ['Wrong Answer', 'Accepted'] | ['s250182236', 's477463368'] | [3064.0, 3064.0] | [17.0, 17.0] | [670, 661] |
p02760 | u151005508 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["A=[]\nA+=list(map(int, input().split()))\nA+=list(map(int, input().split()))\nA+=list(map(int, input().split()))\nN=int(input())\n\nb=[]\nfor _ in range(N):\n b.append(int(input()))\n\nprint(A, N, b)\nfind=set()\nfor num in b:\n if num in A:\n find.add(A.index(num))\nprint(find)\nif {0, 3, 6} < find or {1, 4, 7} < find or {2, 5, 8} < find or {0, 1, 2} < find or {3, 4, 5} < find or {6, 7, 8} < find or {0, 4, 8} < find or {2, 4, 6} < find:\n print('Yes')\nelse:\n print('No')", "A=[]\nfor _ in range(3):\n A+=list(map(int, input().split()))\nN=int(input())\nb=[]\nfor _ in range(N):\n b.append(int(input()))\n\n\nBINGO=[{0,1,2}, {3,4,5}, {6,7,8}, {0,3,6}, {1,4,7}, {2,5,8}, {0,4,8}, {2,4,6}]\n\nhole=set()\nfor num in b:\n for i in range(9):\n if num==A[i]:\n hole.add(i)\n\nfor tri in BINGO:\n\n if tri <= hole:\n print('Yes')\n break\nelse:\n print('No')\n\n"] | ['Wrong Answer', 'Accepted'] | ['s479797992', 's209633266'] | [3064.0, 3064.0] | [17.0, 17.0] | [477, 403] |
p02760 | u152402277 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['Ai_j = []\nfor i in range(3):\n Ai_j.append(list(map(int,input().split())))\nN = int(input())\nnumber_list = []\nfor i in range(N):\n number_list.append(int(input()))\n\n\nfor x in number_list:\n for i in range(3):\n for j in range(3):\n if Ai_j[i][j] == x:\n Ai_j[i][j] = \'○\'\n\n\ncount = 0\n\nif Ai_j[0][0] == Ai_j[0][2] == Ai_j[0][1] == \'○\': count+=1\nif Ai_j[1][0] == Ai_j[1][2] == Ai_j[1][1] == \'○\': count+=1\nif Ai_j[2][0] == Ai_j[2][2] == Ai_j[2][1] == \'○\': count+=1\nif Ai_j[0][0] == Ai_j[1][0] == Ai_j[2][0] == \'○\': count+=1\nif Ai_j[0][1] == Ai_j[1][1] == Ai_j[2][1] == \'○\': count+=1\nif Ai_j[0][2] == Ai_j[1][2] == Ai_j[2][2] == \'○\': count+=1\nif Ai_j[0][0] == Ai_j[1][1] == Ai_j[2][2] == \'○\': count+=1\nif Ai_j[0][2] == Ai_j[1][1] == Ai_j[2][0] == \'○\': count+=1\n\nif count == 0:\n print("Yes")\nelse:\n print("No")', 'Ai_j = []\nfor i in range(3):\n Ai_j.append(list(map(int,input().split())))\nN = int(input())\nnumber_list = []\nfor i in range(N):\n number_list.append(int(input()))\n\'\'\'\nprint(Ai_j)\nprint(N)\nprint(number_list)\n\'\'\'\n\nfor x in number_list:\n for i in range(3):\n for j in range(3):\n if Ai_j[i][j] == x:\n Ai_j[i][j] = \'○\'\n#print(Ai_j)\n\ncount = 0\n\nif Ai_j[0][0] == Ai_j[0][2] == Ai_j[0][1] == \'○\': count+=1\nif Ai_j[1][0] == Ai_j[1][2] == Ai_j[1][1] == \'○\': count+=1\nif Ai_j[2][0] == Ai_j[2][2] == Ai_j[2][1] == \'○\': count+=1\nif Ai_j[0][0] == Ai_j[1][0] == Ai_j[2][0] == \'○\': count+=1\nif Ai_j[0][1] == Ai_j[1][1] == Ai_j[2][1] == \'○\': count+=1\nif Ai_j[0][2] == Ai_j[1][2] == Ai_j[2][2] == \'○\': count+=1\nif Ai_j[0][0] == Ai_j[1][1] == Ai_j[2][2] == \'○\': count+=1\nif Ai_j[0][2] == Ai_j[1][1] == Ai_j[2][0] == \'○\': count+=1\n\nif count == 0:\n print("No")\nelse:\n print("Yes")'] | ['Wrong Answer', 'Accepted'] | ['s539870970', 's073513863'] | [3064.0, 3064.0] | [17.0, 18.0] | [862, 921] |
p02760 | u152638361 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['import numpy as np\nA = np.array([list(map(int,input().split())) for i in range(3)])\nN = int(input())\nb = [int(input()) for i in range(N)]\nB = np.array([[0]*3 for i in range(3)])\nfor _ in b:\n for t in range(3):\n for y in range(3):\n if A[t][y] == _:\n B[t][y] = 1\nans = "No"\nfor i in range(3):\n if all(A[i] == [1,1,1]):\n ans ="Yes"\n if all(A[:,i] == [1,1,1]):\n ans ="Yes"\nif A[0,0] == 1 and A[1,1] == 1 and A[2,2] == 1:\n ans ="Yes"\nif A[2,0] == 1 and A[1,1] == 1 and A[0,2] == 1:\n ans ="Yes"\nprint(ans)', 'import numpy as np\nA = np.array([list(map(int,input().split())) for i in range(3)])\nN = int(input())\nb = [int(input()) for i in range(N)]\nB = np.array([[0]*3 for i in range(3)])\nfor _ in b:\n for t in range(3):\n for y in range(3):\n if A[t][y] == _:\n B[t][y] = 1\nans = "No"\nfor i in range(3):\n if all(B[i] == [1,1,1]):\n ans ="Yes"\n if all(B[:,i] == [1,1,1]):\n ans ="Yes"\nif B[0,0] == 1 and B[1,1] == 1 and B[2,2] == 1:\n ans ="Yes"\nif B[2,0] == 1 and B[1,1] == 1 and B[0,2] == 1:\n ans ="Yes"\nprint(ans)\n '] | ['Wrong Answer', 'Accepted'] | ['s085039314', 's905531014'] | [14092.0, 12220.0] | [149.0, 154.0] | [561, 570] |
p02760 | u153379420 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["inp = [int(x) for x in input().split()]\n\nbingo = inp[0:9]\nb = inp[10:]\n\nfor i in b:\n for j in range(len(bingo)):\n if i == bingo[j]:\n bingo[j] = 0\n\ntrue_list = list()\nfor i in [0, 3, 6]:\n if (bingo[i] + bingo[i+1] + bingo[i+2]) == 0:\n true_list.append(0)\nfor i in [0, 1, 2]:\n if (bingo[i] + bingo[i+3] + bingo[i+6]) == 0:\n true_list.append(0)\nif (bingo[0] + bingo[4] + bingo[8]) == 0:\n true_list.append(0)\nif (bingo[2] + bingo[4] + bingo[6]) == 0:\n true_list.append(0)\n\nif not all(true_list):\n print('Yes')\nelse:\n print('No')", "# B problem\ninp = [int(x) for x in input().rstrip('\\n').split()]\n\nbingo = inp[0:9]\nb = inp[10:]\n\nfor i in b:\n for j in range(len(bingo)):\n if i == bingo[j]:\n bingo[j] = 0\n\ntrue_list = list()\nfor i in [0, 3, 6]:\n if (bingo[i] + bingo[i+1] + bingo[i+2]) == 0:\n true_list.append(0)\nfor i in [0, 1, 2]:\n if (bingo[i] + bingo[i+3] + bingo[i+6]) == 0:\n true_list.append(0)\nif (bingo[0] + bingo[4] + bingo[8]) == 0:\n true_list.append(0)\nif (bingo[2] + bingo[4] + bingo[6]) == 0:\n true_list.append(0)\n\nif not all(true_list):\n print('Yes')\nelse:\n print('No')", 'import sys\nbingo = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\n\nfor i in range(N):\n b = int(input())\n for j in range(len(bingo)):\n for k in range(len(bingo[j])):\n if b == bingo[j][k]:\n bingo[j][k] = 0\n\nfor i in range(len(bingo)):\n if sum(bingo[i]) == 0:\n print(\'Yes\')\n sys.exit()\n if (bingo[0][i] + bingo[1][i] + bingo[2][i]) == 0:\n print(\'Yes\')\n sys.exit()\n\nfor i in [0]:\n if (bingo[i][i] + bingo[i+1][i+1] + bingo[i+2][i+2]) == 0:\n print(\'Yes\')\n sys.exit()\n if (bingo[i][i+2] + bingo[i+1][i+1] + bingo[i+2][i]) == 0:\n print(\'Yes\')\n sys.exit()\n else:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s368126227', 's643573647', 's458475207'] | [3064.0, 3064.0, 3064.0] | [19.0, 18.0, 18.0] | [585, 610, 678] |
p02760 | u154473588 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['input1 = list(map(int, (input().split())))\ninput2 = list(map(int, (input().split())))\ninput3 = list(map(int, (input().split())))\n\na = input1 + input2 + input3\n\nn = int(input())\n\nb = []\nfor i in range(n):\n b.append(int(input()))\n\nfor s in b:\n for i in range(9):\n if a[i] == s:\n a[i] = 0\n\nfor i in range(3):\n if(a[i] + a[i+3] + a[i+6] == 0):\n print("YES")\n exit(0)\n\nfor i in range(0, 3, 3):\n if(a[i] + a[i+1] + a[i+2] == 0):\n print("YES")\n exit(0)\n\nif(a[0] + a[4] + a[8] == 0):\n print("YES")\n exit(0)\n\nif(a[2] + a[4] + a[6] == 0):\n print("YES")\n exit(0)\n\nprint("NO")\n', 'input1 = list(map(int, (input().split())))\ninput2 = list(map(int, (input().split())))\ninput3 = list(map(int, (input().split())))\n\na = input1 + input2 + input3\n\nn = int(input())\n\nb = []\nfor i in range(n):\n b.append(int(input()))\n\nfor s in b:\n for i in range(9):\n if a[i] == s:\n a[i] = 0\n\nfor i in range(3):\n if(a[i] + a[i+3] + a[i+6] == 0):\n print("Yes")\n exit(0)\n\nfor i in [0, 3, 6]:\n print(i)\n if(a[i] + a[i+1] + a[i+2] == 0):\n print("Yes")\n exit(0)\n\nif(a[0] + a[4] + a[8] == 0):\n print("Yes")\n exit(0)\n\nif(a[2] + a[4] + a[6] == 0):\n print("Yes")\n exit(0)\n\nprint("No")\n', 'input1 = list(map(int, (input().split())))\ninput2 = list(map(int, (input().split())))\ninput3 = list(map(int, (input().split())))\n\na = input1 + input2 + input3\n\nn = int(input())\n\nb = []\nfor i in range(n):\n b.append(int(input()))\n\nfor s in b:\n for i in range(9):\n if a[i] == s:\n a[i] = 0\n\nfor i in range(3):\n if(a[i] == a[i+3] and a[i] == a[i+6]):\n print("YES")\n exit(0)\n\nfor i in range(0, 3, 3):\n if(a[i] == a[i+1] and a[i] == a[i+2]):\n print("YES")\n exit(0)\n\nif(a[0] == a[4] and a[i] == a[8]):\n print("YES")\n exit(0)\n\nif(a[2] == a[4] and a[i] == a[6]):\n print("YES")\n exit(0)\n\nprint("NO")\n', 'input1 = list(map(int, (input().split())))\ninput2 = list(map(int, (input().split())))\ninput3 = list(map(int, (input().split())))\n\na = input1 + input2 + input3\n\nn = int(input())\n\nb = []\nfor i in range(n):\n b.append(int(input()))\n\n# print(b)\nfor s in b:\n for i in range(9):\n if a[i] == s:\n a[i] = 0\n\nfor i in range(3):\n if(a[i] + a[i+3] + a[i+6] == 0):\n print("Yes")\n exit(0)\n\nfor i in [0, 3, 6]:\n # print(i)\n if(a[i] + a[i+1] + a[i+2] == 0):\n print("Yes")\n exit(0)\n\nif(a[0] + a[4] + a[8] == 0):\n print("Yes")\n exit(0)\n\nif(a[2] + a[4] + a[6] == 0):\n print("Yes")\n exit(0)\n\nprint("No")\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s016160216', 's875074975', 's961854892', 's298685972'] | [3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 18.0, 18.0, 17.0] | [635, 643, 659, 656] |
p02760 | u155604571 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["A = [list(map(int, input().split())) for i in range(3)]\n\nN = int(input())\nB = [int(input()) for i in range(N)]\n\nans='No'\n\nfor i in range(3):\n for j in range(3):\n print(A[i][j])\n if A[i][j] in B:\n A[i][j]=-1\n\nfor i in range(3):\n if sum(A[i])==-3:\n ans='Yes'\n if A[0][i]+A[1][i]+A[2][i]==-3:\n ans='Yes'\n\nif A[0][0]+A[1][1]+A[2][2]==-3:\n ans='Yes'\n\nif A[0][2]+A[1][1]+A[2][0]==-3:\n ans='Yes'\n\nprint(ans)", "A = [list(map(int, input().split())) for i in range(3)]\n\nN = int(input())\nB = [int(input()) for i in range(N)]\n\nans='No'\n\nfor i in range(3):\n for j in range(3):\n if A[i][j] in B:\n A[i][j]=-1\n\nfor i in range(3):\n if sum(A[i])==-3:\n ans='Yes'\n if A[0][i]+A[1][i]+A[2][i]==-3:\n ans='Yes'\n\nif A[0][0]+A[1][1]+A[2][2]==-3:\n ans='Yes'\n\nif A[0][2]+A[1][1]+A[2][0]==-3:\n ans='Yes'\n\nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s671267075', 's996480610'] | [3064.0, 3064.0] | [17.0, 17.0] | [454, 431] |
p02760 | u157672361 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['a=[list(map(int,input().split())) for i in range(3)]\nn=int(input())\nb=[int(input()) for j in range(n)]\nfor j in range(n):\n for i in range(3):\n for k in range(3):\n if b[j] == a[i][k]:\n a[i][k]=0\n\nfor i in range(3):\n n=0 \n for k in range(3): \n if a[i][k]==0:\n n+=1\n if n==3:\n print("Yes")\n break\nif n==0:\n for k in range(3):\n n=0 \n for i in range(3): \n if a[i][k]==0:\n n+=1\n if n==3:\n print("Yes")\n break\nif n==0:\n for i in range(3): \n if a[i][i]==0:\n n+=1\n if n==3:\n print("Yes")\n \n \n if n==0:\n for i in range(3):\n if a[2-i][i]==0:\n n+=1\n if n==3:\n print("Yes")\n elif n==0:\n print("No")', 'a=[list(map(int,input().split())) for i in range(3)]\nn=int(input())\nb=[int(input()) for j in range(n)]\nfor j in range(n):\n for i in range(3):\n for k in range(3):\n if b[j] == a[i][k]:\n a[i][k]=0\nx="yet"\nsum=0\nfor i in range(3):\n sum+=a[i][i]\nif sum==0:\n print("Yes")\n x="done" \n\nif x=="yet":\n sum=0\n for i in range(3):\n sum+=a[2-i][i]\n if sum==0:\n print("Yes")\n x="done"\n \nif x=="yet":\n for i in range(3): \n sum=0\n for k in range(3): \n sum+=a[i][k]\n if sum==0:\n print("Yes")\n x="done"\n break\n\nif x=="yet":\n for k in range(3): \n sum=0\n for i in range(3): \n sum+=a[i][k]\n if sum==0:\n print("Yes")\n x="done"\n break\nif x=="yet":\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s155832571', 's099716646'] | [3064.0, 3064.0] | [17.0, 20.0] | [716, 738] |
p02760 | u158703648 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A1 = list(map(int, input().split()))\nA2 = list(map(int, input().split()))\nA3 = list(map(int, input().split()))\nN = int(input())\nb = []\nfor _ in range(N):\n b.append(input())\n\nbingo1 =[0,0,0]\nbingo2 =[0,0,0]\nbingo3 =[0,0,0]\nfor i in range(3):\n for j in range(N):\n if A1[i]=b[j]:\n bingo1[i]+=1\n if A2[i]=b[j]:\n bingo2[i]+=1\n if A3[i]=b[j]:\n bingo3[i]+=1\nif bingo1[0] == 1 and bingo1[1] == 1 and bingo1[2] == 1:\n print("Yes")\nelif bingo2[0] == 1 and bingo2[1] == 1 and bingo2[2] == 1:\n print("Yes")\nelif bingo3[0] == 1 and bingo3[1] == 1 and bingo3[2] == 1:\n print("Yes")\nelif bingo1[0] == 1 and bingo2[0] == 1 and bingo3[0] == 1:\n print("Yes")\nelif bingo1[1] == 1 and bingo2[1] == 1 and bingo3[1] == 1:\n print("Yes")\nelif bingo1[2] == 1 and bingo2[2] == 1 and bingo3[2] == 1:\n print("Yes")\nelif bingo1[1] == 1 and bingo2[2] == 1 and bingo3[3] == 1:\n print("Yes")\nelif bingo1[3] == 1 and bingo2[2] == 1 and bingo3[1] == 1:\n print("Yes")\nelse:\n print("No")\n', 'A1 = list(map(int, input().split()))\nA2 = list(map(int, input().split()))\nA3 = list(map(int, input().split()))\nN = int(input())\nb = [(int(input())) for _ in range(N)]\n\nbingo1 =[0,0,0]\nbingo2 =[0,0,0]\nbingo3 =[0,0,0]\nfor i in range(3):\n for j in range(N):\n if A1[i]==b[j]:\n bingo1[i]=1\n elif A2[i]==b[j]:\n bingo2[i]=1\n elif A3[i]==b[j]:\n bingo3[i]=1 \n\n\n \nif bingo1[0] == bingo1[1] == bingo1[2] == 1:\n print("Yes")\nelif bingo2[0] == bingo2[1] == bingo2[2] == 1:\n print("Yes")\nelif bingo3[0] == bingo3[1] == bingo3[2] == 1:\n print("Yes")\nelif bingo1[0] == bingo2[0] == bingo3[0] == 1:\n print("Yes")\nelif bingo1[1] == bingo2[1] == bingo3[1] == 1:\n print("Yes")\nelif bingo1[2] == bingo2[2] == bingo3[2] == 1:\n print("Yes")\nelif bingo1[0] == bingo2[1] == bingo3[2] == 1:\n print("Yes")\nelif bingo1[2] == bingo2[1] == bingo3[0] == 1:\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s554376089', 's281428595'] | [3060.0, 3064.0] | [17.0, 17.0] | [1039, 957] |
p02760 | u161868822 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A1 = input().split()\nA2 = input().split()\nA3 = input().split()\n\nhit_example = [7,56,73,84,146,273,292,448]\nb = 0\nans = "no"\n\nN = int(input())\nfor i in range(N):\n x = int(input())\n if int(A1[0]) == x:\n b += 256\n elif int(A1[1]) == x:\n b += 128\n elif int(A1[2]) == x:\n b += 64\n elif int(A2[0]) == x:\n b += 32\n elif int(A2[1]) == x:\n b += 16\n elif int(A2[2]) == x:\n b += 8\n elif int(A3[0]) == x:\n b += 4\n elif int(A3[1]) == x:\n b += 2\n elif int(A3[2]) == x:\n b += 1\n\nfor val in hit_example:\n if val & b == val:\n ans = "yes"\n break\n \nprint(ans)', 'A1 = input().split()\nA2 = input().split()\nA3 = input().split()\n\nhit_example = [7,56,73,84,146,273,292,448]\nb = 0\nans = "No"\n\nN = int(input())\nfor i in range(N):\n x = int(input())\n if int(A1[0]) == x:\n b += 256\n elif int(A1[1]) == x:\n b += 128\n elif int(A1[2]) == x:\n b += 64\n elif int(A2[0]) == x:\n b += 32\n elif int(A2[1]) == x:\n b += 16\n elif int(A2[2]) == x:\n b += 8\n elif int(A3[0]) == x:\n b += 4\n elif int(A3[1]) == x:\n b += 2\n elif int(A3[2]) == x:\n b += 1\n\nfor val in hit_example:\n if val & b == val:\n ans = "Yes"\n break\n \nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s585536732', 's000408136'] | [3064.0, 3064.0] | [19.0, 18.0] | [587, 587] |
p02760 | u163421511 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['a = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nb = [int(input()) for _ in range(10)]\n\nc = [[0 for _ in range(3)] for _ in range(3)]\nresult = ""\n\nfor i in range(3):\n for j in range(3):\n if a[j][i] in b:\n c[j][i] = 1\n\nfor i in range(3):\n if c[i][0] == c[i][1] == c[i][2] == 1:\n result = "Yes"\n break\n elif c[0][i] == c[1][i] == c[2][i] == 1:\n result = "Yes"\n break\n\nif c[0][0] == c[1][1] == c[2][2] == 1:\n result = "Yes"\nelif c[0][2] == c[1][1] == c[2][0] == 1:\n result = "Yes"\n\nif result == "":\n result ="No"\n\nprint(result)\n', 'a = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nb = [int(input()) for _ in range(10)]\n\nc = [[0 for _ in range(3)] for _ in range(3)]\nresult = ""\n\nfor i in range(3):\n for j in range(3):\n if a[j][i] in b:\n c[j][i] = 1\n\nfor i in range(3):\n if c[i][0] == c[i][1] == c[i][2] == 1:\n result = "Yes"\n break\n elif c[0][i] == c[1][i] == c[2][i] == 1:\n result = "Yes"\n break\n\nif c[0][0] == c[1][1] == c[2][2] == 1:\n result = "Yes"\nelif c[0][2] == c[1][1] == c[2][0] == 1:\n result = "Yes"\n\nif result is None:\n result ="No"\n\nprint(result)', 'a = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nb = [int(input()) for _ in range(N)]\n\nc = [[0 for _ in range(3)] for _ in range(3)]\nresult = ""\n\nfor i in range(3):\n for j in range(3):\n if a[j][i] in b:\n c[j][i] = 1\n\nfor i in range(3):\n if c[i][0] == c[i][1] == c[i][2] == 1:\n result = "Yes"\n break\n elif c[0][i] == c[1][i] == c[2][i] == 1:\n result = "Yes"\n break\n\nif c[0][0] == c[1][1] == c[2][2] == 1:\n result = "Yes"\nelif c[0][2] == c[1][1] == c[2][0] == 1:\n result = "Yes"\n\nif result == "":\n result ="No"\n\nprint(result)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s338623198', 's523840089', 's801360409'] | [9128.0, 9240.0, 9240.0] | [25.0, 23.0, 32.0] | [613, 614, 612] |
p02760 | u173178698 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["a = [[j for j in map(int,input().split())] for i in range(3)]\nn = int(input())\nb = [[int(j) for j in input()] for i in range(n)]\n\nfor i in range(3):\n for j in range(3):\n for k in range(n):\n if a[i][j] == b[k]:\n a[i][j] = 0\n\nif sum(a[0]) == 0 or sum(a[1]) == 0 or sum(a[2]) == 0:\n print('Yes')\nelif a[0][0] + a[1][1] + a[2][2] == 0 or a[0][2] + a[1][1] + a[3][0] == 0:\n print('Yes')\nelse:\n print('No')", "a = [[j for j in map(int,input().split())] for i in range(3)]\nn = int(input())\nb = [[int(j) for j in input()] for i in range(n)]\n\nfor i in range(3):\n for j in range(3):\n for k in range(n):\n if a[i][j] == b[k]:\n a[i][j] = 0\n\nif sum(a[0]) == 0 or sum(a[1]) == 0 or sum(a[2]) == 0:\n print('Yes')\nelif (a[0][0] + a[1][1] + a[2][2]) == 0 or (a[0][2] + a[1][1] + a[2][0]) == 0:\n print('Yes')\nelse:\n print('No')", "a = [[j for j in map(int,input().split())] for i in range(3)]\nn = int(input())\nb = [int(input()) for i in range(n)]\n\nfor i in range(3):\n for j in range(3):\n for k in range(n):\n if a[i][j] == b[k]:\n a[i][j] = 0\n\nif sum(a[0,:]) == 0 or sum(a[1,:]) == 0 or sum(a[2,:]) == 0:\n print('Yes')\nelif sum(a[:,0]) == 0 or sum(a[:,1]) == 0 or sum(a[:,2]) == 0:\n print('Yes')\nelif (a[0][0] + a[1][1] + a[2][2]) == 0 or (a[0][2] + a[1][1] + a[2][0]) == 0:\n print('Yes')\nelse:\n print('No')", "a = [[j for j in map(int,input().split())] for i in range(3)]\nn = int(input())\nb = [[int(j) for j in input()] for i in range(n)]\n\nfor i in range(3):\n for j in range(3):\n for k in range(n):\n if a[i][j] == b[k]:\n a[i][j] = 0\n\nif sum(a[0]) == 0 or sum(a[1]) == 0 or sum(a[2]) == 0:\n print('Yes')\nelif (a[0][0] + a[1][1] + a[2][2]) == 0 or (a[0][2] + a[1][1] + a[3][0]) == 0:\n print('Yes')\nelse:\n print('No')", "a = [[j for j in map(int,input().split())] for i in range(3)]\nn = int(input())\nb = [[int(j) for j in input()] for i in range(n)]\n\nfor i in range(3):\n for j in range(3):\n for k in range(n):\n if a[i][j] == b[k]:\n a[i][j] = 0\n\nif sum(a[0]) == 0 or sum(a[1]) == 0 or sum(a[2] == 0):\n print('Yes')\nelif a[0][0] + a[1][1] + a[2][2] or a[0][2] + a[1][1] + a[3][0]:\n print('Yes')\nelse:\n print('No')", "a = [[j for j in map(int,input().split())] for i in range(3)]\nn = int(input())\nb = [int(input()) for i in range(n)]\n\nfor i in range(3):\n for j in range(3):\n for k in range(n):\n if a[i][j] == b[k]:\n a[i][j] = 0\n\nif sum(a[0:]) == 0 or sum(a[1:]) == 0 or sum(a[2:]) == 0:\n print('Yes')\nelif sum(a[:0]) == 0 or sum(a[:1]) == 0 or sum(a[:2]) == 0:\n print('Yes')\nelif (a[0][0] + a[1][1] + a[2][2]) == 0 or (a[0][2] + a[1][1] + a[2][0]) == 0:\n print('Yes')\nelse:\n print('No')", "import numpy as np\na = [[j for j in map(int,input().split())] for i in range(3)]\nn = int(input())\nb = [int(input()) for i in range(n)]\n\nfor i in range(3):\n for j in range(3):\n for k in range(n):\n if a[i][j] == b[k]:\n a[i][j] = 0\na = np.array(a)\nif sum(a[0,:]) == 0 or sum(a[1,:]) == 0 or sum(a[2,:]) == 0:\n print('Yes')\nelif sum(a[:,0]) == 0 or sum(a[:,1]) == 0 or sum(a[:,2]) == 0:\n print('Yes')\nelif (a[0][0] + a[1][1] + a[2][2]) == 0 or (a[0][2] + a[1][1] + a[2][0]) == 0:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s177087898', 's390375603', 's471732299', 's603236274', 's697134002', 's794638867', 's462975575'] | [3064.0, 3188.0, 3064.0, 3064.0, 3064.0, 3064.0, 12396.0] | [17.0, 19.0, 18.0, 18.0, 17.0, 18.0, 150.0] | [445, 449, 522, 449, 435, 516, 556] |
p02760 | u174766008 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["a1 = list(map(int, input().split()))\na2 = list(map(int, input().split()))\na3 = list(map(int, input().split()))\nn = int(input())\na = []\nfor i in range(n):\n b = int(input()) \n a.append(b)\nfor i in range(3):\n if a1[i] in a and a2[i] in a and a3[i] in a:\n ans = 'Yes'\nif a1[0] in a and a1[1] in a and a1[2] in a:\n ans = 'Yes'\nif a2[0] in a and a2[1] in a and a3[2] in a:\n ans = 'Yes'\nif a3[0] in a and a3[1] in a and a3[2] in a:\n ans = 'Yes'\nif a1[0] in a and a2[1] in a and a3[2] in a:\n ans = 'Yes'\nif a1[2] in a and a2[1] in a and a3[0] in a:\n ans = 'Yes'\nelse:\n ans = 'No'\nprint(ans)", "a1 = list(map(int, input().split()))\na2 = list(map(int, input().split()))\na3 = list(map(int, input().split()))\nn = int(input())\na = []\nans = 0\nfor i in range(n):\n b = int(input()) \n a.append(b)\nfor i in range(3):\n if a1[i] in a and a2[i] in a and a3[i] in a:\n ans = 'Yes'\nif a1[0] in a and a1[1] in a and a1[2] in a:\n ans = 'Yes'\nif a2[0] in a and a2[1] in a and a3[2] in a:\n ans = 'Yes'\nif a3[0] in a and a3[1] in a and a3[2] in a:\n ans = 'Yes'\nif a1[0] in a and a2[1] in a and a3[2] in a:\n ans = 'Yes'\nif a1[2] in a and a2[1] in a and a3[0] in a:\n ans = 'Yes'\nif ans == 'Yes':\n print(ans)\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s390245553', 's211478922'] | [3064.0, 3064.0] | [18.0, 17.0] | [616, 646] |
p02760 | u175590965 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['=[list(map(int,input().split())) for i in range(3)]\nn=int(input())\nfor k in range(n):\n s=int(input())\n for i in range(3):\n for j in range(3):\n if s == A[i][j]:\n A[i][j]=0 \nif A[0][0]==0 and A[1][0]==0 and A[2][0]==0:\n print("Yes")\n \nelif A[0][1]==0 and A[1][1]==0 and A[2][1]==0:\n print("Yes")\nelif A[0][2]==0 and A[1][2]==0 and A[2][2]==0:\n print("Yes")\nelif [0,0,0] in A:\n print("Yes")\n \nelif A[0][2]==0 and A[1][1]==0 and A[2][0]==0:\n print("Yes")\n \nelif A[0][0]==0 and A[1][1]==0 and A[2][2]==0:\n print("Yes")\n \nelse:\n print("No")', 'A=[list(map(int,input().split())) for i in range(3)]\nn=int(input())\nfor k in range(n):\n s=int(input())\n for i in range(3):\n for j in range(3):\n if s == A[i][j]:\n A[i][j]=0 \nif A[0][0]==0 and A[1][0]==0 and A[2][0]==0:\n print("Yes")\n \nelif A[0][1]==0 and A[1][1]==0 and A[2][1]==0:\n print("Yes")\nelif A[0][2]==0 and A[1][2]==0 and A[2][2]==0:\n print("Yes")\nelif [0,0,0] in A:\n print("Yes")\n \nelif A[0][2]==0 and A[1][1]==0 and A[2][0]==0:\n print("Yes")\n \nelif A[0][0]==0 and A[1][1]==0 and A[2][2]==0:\n print("Yes")\n \nelse:\n print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s518591750', 's448963079'] | [2940.0, 3064.0] | [17.0, 19.0] | [565, 567] |
p02760 | u175746978 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nB = []\nfor _ in range(N):\n B.append(input())\n \nfor b in B:\n for x in range(3):\n for y in range(3) :\n if A[x][y] == b:\n A[x][y] = 0\nif A[0][0] + A[1][0] + A[2][0] == 0 \\\nor A[0][1] + A[1][1] + A[2][1] == 0 \\\nor A[0][2] + A[1][2] + A[2][2] == 0 \\\nor A[0][0] + A[0][1] + A[0][2] == 0 \\\nor A[1][0] + A[1][1] + A[1][2] == 0 \\\nor A[2][0] + A[2][1] + A[2][2] == 0 \\\nor A[0][0] + A[1][1] + A[2][2] == 0 \\\nor A[0][2] + A[1][1] + A[2][0] == 0:\n print("Yes")\nelse:\n print("No") \n', 'A = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nB = []\nfor _ in range(n):\n B.append(input())\n\nfor b in B:\n for x in range(3):\n for y in range(3) :\n if a[x][y] == b:\n a[x][y] = 0\n\nif A[0][0] * A[1][0] * A[2][0] == 0 or A[0][1] * A[1][1] * A[2][1] == 0 or A[0][2] * A[1][2] * A[2][2] == 0 or A[0][0] * A[0][1] * A[0][2] == 0 or A[1][0] * A[1][1] * A[1][2] == 0 or A[2][0] * A[2][1] * A[2][2] == 0 or A[0][0] * A[1][1] * A[2][2] == 0 or A[0][2] * A[1][1] * A[2][0] == 0:\n print("Yes")\nelse:\n print("No") \n', 'A = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nB = []\nfor _ in range(N):\n B.append(input())\nfor b in B:\n for x in range(3):\n for y in range(3) :\n if A[x][y] == b:\n A[x][y] = 0\nif A[0][0] * A[1][0] * A[2][0] == 0 \\\nor A[0][1] * A[1][1] * A[2][1] == 0 \\\nor A[0][2] * A[1][2] * A[2][2] == 0 \\\nor A[0][0] * A[0][1] * A[0][2] == 0 \\\nor A[1][0] * A[1][1] * A[1][2] == 0 \\\nor A[2][0] * A[2][1] * A[2][2] == 0 \\\nor A[0][0] * A[1][1] * A[2][2] == 0 \\\nor A[0][2] * A[1][1] * A[2][0] == 0:\n print("Yes")\nelse:\n print("No") \n', '[a11, a12, a13],[a21, a22, a23],[a31, a32, a33] = [input().split() for l in range(3)]\n\nif : a == [a11, a12, a13]\n print(Yes)\nelif :is [a11, a22, a33]\n print(Yes)\nelif :is [a11, a21, a31]\n print(Yes)\nelif :is [a12, a22, a32]\n print(Yes)\nelif :is [a13, a23, a33]\n print(Yes)\nelif :is [a13, a22, a31]\n print(Yes)\nelif :is [a21, a22, a23]\n print(Yes)\nelif :is [a31, a32, a33]\n print(Yes)\nelse:\n print(No)', 'A = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nB = []\nfor _ in range(N):\n B.append(input())\n\nfor b in B:\n for x in range(3):\n for y in range(3) :\n if A[x][y] == b:\n A[x][y] = 0\n\nif A[0][0] * A[1][0] * A[2][0] == 0 or A[0][1] * A[1][1] * A[2][1] == 0 or A[0][2] * A[1][2] * A[2][2] == 0 or A[0][0] * A[0][1] * A[0][2] == 0 or A[1][0] * A[1][1] * A[1][2] == 0 or A[2][0] * A[2][1] * A[2][2] == 0 or A[0][0] * A[1][1] * A[2][2] == 0 or A[0][2] * A[1][1] * A[2][0] == 0:\n print("Yes")\nelse:\n print("No") \n', 'A = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nB = [int(input()) for i in range(N)]\nfor b in B:\n for x in range(3):\n for y in range(3) :\n if A[x][y] == b:\n A[x][y] = 0\n\nif A[0][0] + A[1][0] + A[2][0] == 0 \\\nor A[0][1] + A[1][1] + A[2][1] == 0 \\\nor A[0][2] + A[1][2] + A[2][2] == 0 \\\nor A[0][0] + A[0][1] + A[0][2] == 0 \\\nor A[1][0] + A[1][1] + A[1][2] == 0 \\\nor A[2][0] + A[2][1] + A[2][2] == 0 \\\nor A[0][0] + A[1][1] + A[2][2] == 0 \\\nor A[0][2] + A[1][1] + A[2][0] == 0:\n print("Yes")\nelse:\n print("No") \n'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s381532991', 's579933097', 's862190796', 's878877029', 's907243081', 's172338240'] | [3064.0, 3064.0, 3064.0, 2940.0, 3064.0, 3064.0] | [18.0, 17.0, 18.0, 17.0, 18.0, 21.0] | [589, 572, 584, 427, 572, 574] |
p02760 | u178465329 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['import numpy as np\n\ndef check(a,b,c):\n return a==b==c==0\n\n\nt=[list(map(int,list(input().split(" ")))) for i in range(3)]\nn = int(input())\na = [int(input()) for _ in range(n)]\n\nfor i in a:\n for x in range(3):\n for y in range(3):\n if t[x][y] == i :\n t[x][y] = 0\n\nans = check(t[0][0],t[0][1],t[0][2]) or \\\ncheck(t[1][0],t[1][1],t[1][2]) or \\\ncheck(t[2][0],t[2][1],t[2][2]) or \\\ncheck(t[0][0],t[1][0],t[2][0]) or \\\ncheck(t[0][1],t[1][1],t[2][1]) or \\\ncheck(t[0][2],t[1][2],t[2][2]) or \\\ncheck(t[0][0],t[1][1],t[2][2]) or \\\ncheck(t[0][2],t[1][1],t[2][0]) \n\nprint(ans)', 'import numpy as np\n\ndef check(a,b,c):\n return a==b==c==0\n\n\nt=[list(map(int,list(input().split(" ")))) for i in range(3)]\nn = int(input())\na = [int(input()) for _ in range(n)]\n\nfor i in a:\n for x in range(3):\n for y in range(3):\n if t[x][y] == i :\n t[x][y] = 0\n\nans = check(t[0][0],t[0][1],t[0][2]) or \\\ncheck(t[1][0],t[1][1],t[1][2]) or \\\ncheck(t[2][0],t[2][1],t[2][2]) or \\\ncheck(t[0][0],t[1][0],t[2][0]) or \\\ncheck(t[0][1],t[1][1],t[2][1]) or \\\ncheck(t[0][2],t[1][2],t[2][2]) or \\\ncheck(t[0][0],t[1][1],t[2][2]) or \\\ncheck(t[0][2],t[1][1],t[2][0]) \n\nprint(["No","Yes"][ans])'] | ['Wrong Answer', 'Accepted'] | ['s408856552', 's681925078'] | [13348.0, 12484.0] | [162.0, 153.0] | [579, 593] |
p02760 | u179376941 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["bingo = []\nsheet = set()\nfor _ in range(3):\n lst = [int(i) for i in input().split()]\n bingo.append(lst)\nn = int(input())\nfor _ in range(n):\n a = int(input())\n for i in range(3):\n for j in range(3):\n if bingo[i][j] == a:\n num = 3 * i + j\n sheet.add(num)\nif 0 in sheet and 1 in sheet and 2 in sheet:\n print('Yes')\nif 0 in sheet and 3 in sheet and 6 in sheet:\n print('Yes')\nif 0 in sheet and 4 in sheet and 8 in sheet:\n print('Yes')\nif 1 in sheet and 4 in sheet and 7 in sheet:\n print('Yes')\nif 2 in sheet and 5 in sheet and 8 in sheet:\n print('Yes')\nif 2 in sheet and 4 in sheet and 6 in sheet:\n print('Yes')\nif 3 in sheet and 4 in sheet and 5 in sheet:\n print('Yes')\nif 6 in sheet and 7 in sheet and 8 in sheet:\n print('Yes')\nelse:\n print('No')", "bingo = []\nsheet = set()\nfor _ in range(3):\n lst = [int(i) for i in input().split()]\n bingo.append(lst)\nn = int(input())\nfor _ in range(n):\n a = int(input())\n for i in range(3):\n for j in range(3):\n if bingo[i][j] == a:\n num = 3 * i + j\n sheet.add(num)\nif 0 in sheet and 1 in sheet and 2 in sheet:\n print('Yes')\nelif 0 in sheet and 3 in sheet and 6 in sheet:\n print('Yes')\nelif 0 in sheet and 4 in sheet and 8 in sheet:\n print('Yes')\nelif 1 in sheet and 4 in sheet and 7 in sheet:\n print('Yes')\nelif 2 in sheet and 5 in sheet and 8 in sheet:\n print('Yes')\nelif 2 in sheet and 4 in sheet and 6 in sheet:\n print('Yes')\nelif 3 in sheet and 4 in sheet and 5 in sheet:\n print('Yes')\nelif 6 in sheet and 7 in sheet and 8 in sheet:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s954390931', 's676831750'] | [9148.0, 9088.0] | [30.0, 28.0] | [778, 792] |
p02760 | u180528413 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["for i in range(3):\n for j in a[i]:\n if j != 0:\n break\n else:\n print('Yes')\n break\n if a[0][i] == 0 and a[1][i] == 0 and a[2][i] == 0:\n print('Yes')\n break\n if a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0:\n print('Yes')\n break\n if a[0][2] == 0 and a[1][1] == 0 and a[2][0] == 0:\n print('Yes')\n break\nelse:\n print('No')", "a = [list(map(int, input().split(' '))) for _ in range(3)]\nn = int(input())\nfor _ in range(n):\n b = int(input())\n for i in range(3):\n for j in range(3):\n if a[i][j] == b:\n a[i][j] = 0\n\nfor i in range(3):\n for j in a[i]:\n if j != 0:\n break\n else:\n print('Yes')\n break\n if a[0][i] == 0 and a[1][i] == 0 and a[2][i] == 0:\n print('Yes')\n break\n if a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0:\n print('Yes')\n break\n if a[0][2] == 0 and a[1][1] == 0 and a[2][0] == 0:\n print('Yes')\n break\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s110120694', 's673060119'] | [3064.0, 3188.0] | [18.0, 19.0] | [411, 635] |
p02760 | u182594853 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['a0=list(map(int, input().split()))\na1=list(map(int, input().split()))\na2=list(map(int, input().split()))\nn=int(input())\nb=[]\nfor i in range(n):\n b.append(int(input()))\nans=[]\nfor i in b:\n if (i in a0) == True:\n ans.append(a0.index(i))\n if (i in a1) == True:\n ans.append((a1.index(i))+3)\n if (i in a2) == True:\n ans.append((a2.index(i))+6)\nif (0 in ans) == True:\n if (1 in ans) == True:\n if (2 in ans) == True:\n print("Yes")\n elif (3 in ans) == True:\n if (6 in ans) == True:\n print("Yes")\n elif (4 in ans) == True:\n if (8 in ans) == True:\n print("Yes")\nelif (1 in ans)==True:\n if (4 in ans)==True:\n if (7 in ans)==True:\n print("Yes")\nelif (2 in ans)==True:\n if (5 in ans)==True:\n if (8 in ans)==True:\n print("Yes")\n elif (4 in ans)==True:\n if (6 in ans)==True:\n print("Yes")\nelif (3 in ans)==True:\n if (4 in ans)==True:\n if (5 in ans)==True:\n print("Yes")\nelif (6 in ans)==True:\n if (7 in ans)==True:\n if (8 in ans)==True:\n print("Yes")\nelse:\n print("No")\n', 'a0=list(map(int, input().split()))\na1=list(map(int, input().split()))\na2=list(map(int, input().split()))\nn=int(input())\nb=[]\nfor i in range(n):\n b.append(int(input()))\nans=[]\nfor i in b:\n if (i in a0) == True:\n ans.append(a0.index(i))\n if (i in a1) == True:\n ans.append((a1.index(i))+3)\n if (i in a2) == True:\n ans.append((a2.index(i))+6)\nif (0 in ans) and (1 in ans) and (2 in ans) == True:\n print("Yes")\nelif (0 in ans) and (3 in ans) and (6 in ans) == True:\n print("Yes")\nelif (0 in ans) and (4 in ans) and (8 in ans) == True:\n print("Yes")\nelif (1 in ans) and (4 in ans) and (7 in ans) == True:\n print("Yes")\nelif (2 in ans) and (5 in ans) and (8 in ans) == True:\n print("Yes")\nelif (2 in ans) and (4 in ans) and (6 in ans) == True:\n print("Yes")\nelif (3 in ans) and (4 in ans) and (5 in ans) == True:\n print("Yes")\nelif (6 in ans) and (7 in ans) and (8 in ans) == True:\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s936673149', 's846225805'] | [3064.0, 3064.0] | [18.0, 18.0] | [1167, 968] |
p02760 | u185005484 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["A1=[int(e) for e in input().split()]\nA2=[int(e) for e in input().split()]\nA3=[int(e) for e in input().split()]\nN=int(input())\nfor i in range(N):\n b=input()\n for j in range(3):\n if b==A1[j]:\n A1[j]= -1\n elif b==A2[j]:\n A2[j]= -1\n elif b==A3[j]:\n A3[j]= -1\nif A1[0]==A2[0] and A2[0]==A3[0]:\n print('Yes')\nelif A1[1]==A2[1] and A2[1]==A3[1]:\n print('Yes')\nelif A1[2]==A2[2] and A2[2]==A3[2]:\n print('Yes')\nelif A1[0]==A1[1] and A1[1]==A1[2]:\n print('Yes')\nelif A2[0]==A2[1] and A2[1]==A2[2]:\n print('Yes')\nelif A3[0]==A3[1] and A3[1]==A3[2]:\n print('Yes')\nelif A1[0]==A2[1] and A2[1]==A3[2]:\n print('Yes')\nelif A1[2]==A2[1] and A2[1]==A3[0]:\n print('Yes')\nelse:\n print('No')", "A1=[int(e) for e in input().split()]\nA2=[int(f) for f in input().split()]\nA3=[int(g) for g in input().split()]\nN=int(input())\nfor i in range(N):\n b=int(input())\n for j in range(3):\n if b==A1[j]:\n A1[j]= -1\n elif b==A2[j]:\n A2[j]= -1\n elif b==A3[j]:\n A3[j]= -1\nif A1[0]==-1 and A2[0]==-1 and A3[0]==-1:\n print('Yes')\nelif A1[1]==-1 and A2[1]==-1 and A3[1]==-1:\n print('Yes')\nelif A1[2]==-1 and A2[2]==-1 and A3[2]==-1:\n print('Yes')\nelif A1[0]==-1 and A1[1]==-1 and A1[2]==-1:\n print('Yes')\nelif A2[0]==-1 and A2[1]==-1 and A2[2]==-1:\n print('Yes')\nelif A3[0]==-1 and A3[1]==-1 and A3[2]==-1:\n print('Yes')\nelif A1[0]==-1 and A2[1]==-1 and A3[2]==-1:\n print('Yes')\nelif A3[0]==-1 and A2[1]==-1 and A1[2]==-1:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s505142676', 's003267724'] | [3064.0, 3064.0] | [18.0, 17.0] | [758, 827] |
p02760 | u185966380 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\nd = [[0]*3]*3\nfor i in range(3):\n for j in range(3):\n b = int(input())\n if A[i][j] == b:\n d[i][j] = 1\n\nans = "No"\n\nfor i in range(3):\n if sum(d[i]) == 3:\n ans = "Yes"\n break\n if sum([D[i] for D in d]) == 3:\n ans = "Yes"\n break\nif sum([d[i][i] for i in range(3)]) == 3:\n ans = "Yes"\n\nif sum([d[i][2 - i] for i in range(3)]) == 3:\n ans = "Yes"\n \nprint(ans)\n\n\t\n \n ', 'A = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\nd = [[0]*3 for _ in range(3)]\n\nfor _ in range(N):\n b = int(input())\n for i in range(3):\n for j in range(3):\n if A[i][j] == b:\n d[i][j] = 1\n \nans = "No"\n \nfor i in range(3):\n if sum(d[i]) == 3:\n ans = "Yes"\n break\n if sum([D[i] for D in d]) == 3:\n ans = "Yes"\n break\nif sum([d[i][i] for i in range(3)]) == 3:\n ans = "Yes"\n \nif sum([d[i][2 - i] for i in range(3)]) == 3:\n ans = "Yes"\n \nprint(ans)\n '] | ['Runtime Error', 'Accepted'] | ['s497112105', 's299334773'] | [3064.0, 3064.0] | [19.0, 17.0] | [467, 511] |
p02760 | u189516107 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['card = [list(map(int, input().split())) for i in range (3)]\nN = int(input())\nb = [int(input()) for i in range(N)]\n\nfor k in range(N):\n for i in range(3):\n for j in range(3):\n if card[i][j] == b[k]:\n card[i][j] = 0\n \nprint(card)\n\n\nfor i in range(3):\n if card[i] == [0, 0, 0]:\n \n print("Yes")\n exit()\n elif [x[i] for x in card] == [0, 0, 0]:\n \n print("Yes")\n exit()\n \nif [card[i][i] for i in range(3)] == [0, 0, 0]:\n \n print("Yes")\n exit()\nelif [card[2-i][i] for i in range(3)] == [0, 0, 0]:\n \n print("Yes")\n exit()\nelse:\n \n print("No")', 'card = [list(map(int, input().split())) for i in range (3)]\nN = int(input())\nb = [int(input()) for i in range(N)]\n\nfor k in range(N):\n for i in range(3):\n for j in range(3):\n if card[i][j] == b[k]:\n card[i][j] = 0\n \n#print(card)\n\n\nfor i in range(3):\n if card[i] == [0, 0, 0]:\n \n print("Yes")\n exit()\n elif [x[i] for x in card] == [0, 0, 0]:\n \n print("Yes")\n exit()\n \nif [card[i][i] for i in range(3)] == [0, 0, 0]:\n \n print("Yes")\n exit()\nelif [card[2-i][i] for i in range(3)] == [0, 0, 0]:\n \n print("Yes")\n exit()\nelse:\n \n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s572532744', 's709455425'] | [3064.0, 3064.0] | [18.0, 17.0] | [684, 685] |
p02760 | u190178779 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['import sys\ncard = [ list(map(int,input().split())) for a in range(3) ]\nN = int(input())\npoint = [ int(input()) for a in range(N) ]\n\n# cut holes\nfor I in point:\n for J in card:\n if I in J:\n J.index(I)\n J[J.index(I)] = "H"\nprint(card)\n# vertical check\nfor K in range(3):\n check = set([ x[K] for x in card ])\n if len(check) == 1 and list(check)[0] == "H":\n print(\'Yes\')\n sys.exit()\n# horizon check\nfor L in card:\n check = set(L)\n if len(check) == 1 and list(check)[0] == "H":\n print(\'Yes\')\n sys.exit()\n# diagonal check\nLtoR = set([ card[M][M] for M in range(3)])\nRtoL = set([ card[M][-M-1] for M in range(3)])\nif len(LtoR) == 1 and list(LtoR)[0] == "H" or len(RtoL) == 1 and list(RtoL)[0] == "H": \n print(\'Yes\')\n sys.exit()\nprint(\'No\')', 'import sys\ncard = [ list(map(int,input().split())) for a in range(3) ]\nN = int(input())\npoint = [ int(input()) for a in range(N) ]\n\n# cut holes\nfor I in point:\n for J in card:\n if I in J:\n J.index(I)\n J[J.index(I)] = "H"\n# vertical check\nfor K in range(3):\n check = set([ x[K] for x in card ])\n if len(check) == 1 and list(check)[0] == "H":\n print(\'Yes\')\n sys.exit()\n# horizon check\nfor L in card:\n check = set(L)\n if len(check) == 1 and list(check)[0] == "H":\n print(\'Yes\')\n sys.exit()\n# diagonal check\nLtoR = set([ card[M][M] for M in range(3)])\nRtoL = set([ card[M][-M-1] for M in range(3)])\nif len(LtoR) == 1 and list(LtoR)[0] == "H" or len(RtoL) == 1 and list(RtoL)[0] == "H": \n print(\'Yes\')\n sys.exit()\nprint(\'No\')'] | ['Wrong Answer', 'Accepted'] | ['s803705886', 's532595192'] | [9280.0, 9264.0] | [27.0, 28.0] | [814, 802] |
p02760 | u191635495 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["# Bingo\nA = []\nfor _ in range(3):\n A += list(map(int, input().split()))\nN = int(input())\nfor _ in range(N):\n b = int(input())\n if b in A:\n A[A.index(b)] = -1\n \n\ndiag = (sum(A[0::4]) == -3) | (sum(A[2:8:2]) == -3)\nrows = (sum(A[:3]) == -3) | (sum(A[3:6]) == -3) | (sum(A[6:]) == -3)\ncols = (sum(A[:7:3]) == -3) | (sum(A[1:8:3]) == -3) | (sum(A[2::3]) == -3)\nans = diag | rows | cols\nprint(A)\nprint(['No', 'Yes'][ans])", "# Bingo\nA = []\nfor _ in range(3):\n A += list(map(int, input().split()))\nN = int(input())\nfor _ in range(N):\n b = int(input())\n if b in A:\n A[A.index(b)] = -1\n \n\ndiag = (sum(A[0::4]) == -3) | (sum(A[2:8:2]) == -3)\nrows = (sum(A[:3]) == -3) | (sum(A[3:6]) == -3) | (sum(A[6:]) == -3)\ncols = (sum(A[:7:3]) == -3) | (sum(A[1:8:3]) == -3) | (sum(A[2::3]) == -3)\nans = diag | rows | cols\nprint(['No', 'Yes'][ans])"] | ['Wrong Answer', 'Accepted'] | ['s040119509', 's430568310'] | [9148.0, 9260.0] | [28.0, 29.0] | [446, 437] |
p02760 | u194228880 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['def checkbingo(bingo,bs):\n for b in bingo:\n cnt = 0\n for n in bs:\n if n in b:\n cnt +=1\n if cnt == 3:\n return True\n return False\n\nlist1 = input(\'\').split(\' \')\nlist2 = input(\'\').split(\' \')\nlist3 = input(\'\').split(\' \')\nbingo = [list1,list2,list3]\nfor i in range(0,2):\n bingo.append([list1[i],list2[i],list3[i]])\nbingo.append([list1[0],list1[1],list2[2]])\nbingo.append([list1[2],list1[1],list2[0]])\nmax_n = int(input(\'\'))\nbs = []\nresult = False\nfor n in range(0,max_n):\n b = input(\'\')\n bs.append(b)\nif checkbingo(bingo,bs):\n result = True\n\nif result == True:\n print("Yes")\nelse:\n print("No")\n\n', 'def checkbingo(bingo,bs):\n for b in bingo:\n cnt = 0\n for n in bs:\n if n in b:\n cnt +=1\n if cnt == len(b):\n return True\n return False\n\nlist1 = input(\'\').split(\' \')\nlist2 = input(\'\').split(\' \')\nlist3 = input(\'\').split(\' \')\nbingo = [list1,list2,list3]\nbingo.append([list1[0],list2[0],list3[0]])\nbingo.append([list1[1],list2[1],list3[1]])\nbingo.append([list1[2],list2[2],list3[2]])\nbingo.append([list1[0],list1[1],list2[2]])\nbingo.append([list1[2],list1[1],list2[0]])\nmax_n = int(input(\'\'))\nbs = []\nresult = False\nfor n in range(0,max_n):\n bs.append(input(\'\'))\n\nif checkbingo(bingo,bs):\n print("Yes")\nelse:\n print("No")\n\n', 'def checkbingo(bingo,bs):\n for b in bingo:\n cnt = 0\n for n in bs:\n if n in b:\n cnt +=1\n print("{}".format(cnt))\n if cnt == 3:\n return True\n return False\n\nlist1 = input(\'\').split(\' \')\nlist2 = input(\'\').split(\' \')\nlist3 = input(\'\').split(\' \')\nbingo = [list1,list2,list3]\nfor i in range(0,2):\n bingo.append([list1[i],list2[i],list3[i]])\nbingo.append([list1[0],list1[1],list2[2]])\nbingo.append([list1[2],list1[1],list2[0]])\nmax_n = int(input(\'\'))\nbs = []\nresult = False\nfor n in range(0,max_n):\n b = input(\'\')\n bs.append(b)\nif checkbingo(bingo,bs):\n result = True\n\nif result == True:\n print("Yes")\nelse:\n print("No")\n\n', 'def checkbingo(bingo,bs):\n for b in bingo:\n cnt = 0\n for n in bs:\n if n in b:\n cnt +=1\n if cnt == len(b):\n return True\n return False\n\nlist1 = input(\'\').split(\' \')\nlist2 = input(\'\').split(\' \')\nlist3 = input(\'\').split(\' \')\nbingo = [list1,list2,list3]\nbingo.append([list1[0],list2[0],list3[0]])\nbingo.append([list1[1],list2[1],list3[1]])\nbingo.append([list1[2],list2[2],list3[2]])\nbingo.append([list1[0],list2[1],list3[2]])\nbingo.append([list1[2],list2[1],list3[0]])\nmax_n = int(input(\'\'))\nbs = []\nresult = False\nfor n in range(0,max_n):\n bs.append(input(\'\'))\n\nif checkbingo(bingo,bs):\n print("Yes")\nelse:\n print("No")\n\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s161385767', 's491156096', 's838156425', 's207111891'] | [3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 18.0, 18.0] | [627, 652, 655, 652] |
p02760 | u194472175 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['bingonum=[[0,0,0],[0,0,0],[0,0,0]]\nbingo=[["False","False","False"],["False","False","False"],["False","False","False"]]\nfor i in range(3):\n bingonum[i][0],bingonum[i][1],bingonum[i][2] = map(int,input().split())\nN = int(input())\nb=[]\nfor _ in range(N):\n b.append(int(input()))\nprint(bingonum[0][0])\nprint(b[0])\nfor x in range(N):\n for i in range(3):\n for j in range(3):\n if bingonum[i][j]==b[x]:\n bingo[i][j]="True"\nIsBingo = "No"\nfor i in range(3):\n if bingo[i][0]=="True" and bingo[i][1]=="True" and bingo[i][2]=="True":\n IsBingo="Yes"\n if bingo[0][i]=="True" and bingo[1][i]=="True" and bingo[2][i]=="True":\n IsBingo="Yes"\nif (bingo[0][0]=="True" and bingo[1][1]=="True" and bingo[2][2]=="True") or (bingo[0][2]=="True" and bingo[1][1]=="True" and bingo[2][0]=="True"):\n IsBingo="Yes"\nprint(IsBingo)\n', 'bingonum=[[0,0,0],[0,0,0],[0,0,0]]\nbingo=[["False","False","False"],["False","False","False"],["False","False","False"]]\nfor i in range(3):\n bingonum[i][0],bingonum[i][1],bingonum[i][2] = map(int,input().split())\n\nN = int(input())\nb=[]\nfor _ in range(N):\n b.append(int(input()))\nprint(bingonum[0][0])\nprint(b[0])\nfor x in range(N):\n for i in range(3):\n for j in range(3):\n if bingonum[i][j]==b[x]:\n bingo[i][j]="True"\n\nIsBingo = "No"\nfor i in range(3):\n if bingo[i][0]=="True" and bingo[i][1]=="True" and bingo[i][2]=="True":\n IsBingo="Yes"\n elif bingo[0][i]=="True" and bingo[1][i]=="True" and bingo[2][i]=="True":\n IsBingo="Yes"\nif (bingo[0][0]=="True" and bingo[1][1]=="True" and bingo[2][2]=="True") or (bingo[0][2]=="True" and bingo[1][1]=="True" and bingo[2][0]=="True"):\n IsBingo="Yes"\nprint(IsBingo)\n', 'bingonum=[[0,0,0],[0,0,0],[0,0,0]]\nbingo=[["False","False","False"],["False","False","False"],["False","False","False"]]\nfor i in range(3):\n bingonum[i][0],bingonum[i][1],bingonum[i][2] = map(int,input().split())\n\nN = int(input())\nb=[]\nfor _ in range(N):\n b.append(int(input()))\nprint(bingonum[0][0])\nprint(b[0])\nfor x in range(N):\n for i in range(3):\n for j in range(3):\n if bingonum[i][j]==b[x]:\n bingo[i][j]="True"\n\nIsBingo = "No"\nfor i in range(3):\n if bingo[i][0]=="True" and bingo[i][1]=="True" and bingo[i][2]=="True":\n IsBingo="Yes"\n elif bingo[0][i]=="True" and bingo[1][i]=="True" and bingo[2][i]=="True":\n IsBingo="Yes"\nif (bingo[0][0]=="True" and bingo[1][1]=="True" and bingo[2][2]=="True") or (bingo[0][2]=="True" and bingo[1][1]=="True" and bingo[2][0]=="True"):\n IsBingo="Yes"\nprint(IsBingo)\n', 'bingonum=[[0,0,0],[0,0,0],[0,0,0]]\nbingo=[["False","False","False"],["False","False","False"],["False","False","False"]]\nfor i in range(3):\n bingonum[i][0],bingonum[i][1],bingonum[i][2] = map(int,input().split())\nN = int(input())\nb=[]\nfor _ in range(N):\n b.append(int(input()))\nfor x in range(N):\n for i in range(3):\n for j in range(3):\n if bingonum[i][j]==b[x]:\n bingo[i][j]="True"\nIsBingo = "No"\nfor i in range(3):\n if bingo[i][0]=="True" and bingo[i][1]=="True" and bingo[i][2]=="True":\n IsBingo="Yes"\n if bingo[0][i]=="True" and bingo[1][i]=="True" and bingo[2][i]=="True":\n IsBingo="Yes"\nif (bingo[0][0]=="True" and bingo[1][1]=="True" and bingo[2][2]=="True") or (bingo[0][2]=="True" and bingo[1][1]=="True" and bingo[2][0]=="True"):\n IsBingo="Yes"\nprint(IsBingo)\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s091148262', 's319643561', 's672121226', 's482895283'] | [3064.0, 3064.0, 3064.0, 3064.0] | [18.0, 17.0, 18.0, 17.0] | [869, 873, 873, 835] |
p02760 | u198073053 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["\na = []\nfor i in range(3):\n inp = [int(x) for x in input().split()]\n a.append(inp)\nn = int(input())\nb = []\nfor i in range(n):\n b.append(input())\nfor i in range(n):\n for j in range(3):\n for k in range(3):\n if a[j][k] == b[i]:\n a[j][k] = 0\nif a[0][0] == 0 and a[0][1] == 0 and a[0][2] == 0:\n print('YES')\nelif a[1][0] == 0 and a[1][1] == 0 and a[1][2] == 0:\n print('YES')\nelif a[1][0] == 0 and a[1][1] == 0 and a[1][2] == 0:\n print('YES')\n \nelif a[0][0] == 0 and a[1][0] == 0 and a[2][0] == 0:\n print('YES')\nelif a[0][1] == 0 and a[1][1] == 0 and a[2][1] == 0:\n print('YES')\nelif a[0][2] == 0 and a[1][2] == 0 and a[2][2] == 0:\n print('YES')\n \nelif a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0:\n print('YES')\nelif a[0][2] == 0 and a[1][1] == 0 and a[2][0] == 0:\n print('YES')\nelse:\n print('NO')", "a = []\nfor i in range(3):\n inp = [int(x) for x in input().split()]\n a.append(inp)\nn = int(input())\nb = []\nfor i in range(n):\n b.append(int(input()))\nfor i in range(n):\n for j in range(3):\n for k in range(3):\n if a[j][k] == b[i]:\n a[j][k] = 0\nif a[0][0] == 0 and a[0][1] == 0 and a[0][2] == 0:\n print('YES')\nelif a[1][0] == 0 and a[1][1] == 0 and a[1][2] == 0:\n print('YES')\nelif a[1][0] == 0 and a[1][1] == 0 and a[1][2] == 0:\n print('YES')\n \nelif a[0][0] == 0 and a[1][0] == 0 and a[2][0] == 0:\n print('YES')\nelif a[0][1] == 0 and a[1][1] == 0 and a[2][1] == 0:\n print('YES')\nelif a[0][2] == 0 and a[1][2] == 0 and a[2][2] == 0:\n print('YES')\n \nelif a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0:\n print('YES')\nelif a[0][2] == 0 and a[1][1] == 0 and a[2][0] == 0:\n print('YES')\nelse:\n print('NO')", "a = []\nfor i in range(3):\n inp = [int(x) for x in input().split()]\n a.append(inp)\nn = int(input())\nb = []\nfor i in range(n):\n b.append(int(input()))\nfor i in range(n):\n for j in range(3):\n for k in range(3):\n if a[j][k] == b[i]:\n a[j][k] = 0\nif a[0][0] == 0 and a[0][1] == 0 and a[0][2] == 0:\n print('Yes')\nelif a[1][0] == 0 and a[1][1] == 0 and a[1][2] == 0:\n print('Yes')\nelif a[2][0] == 0 and a[2][1] == 0 and a[2][2] == 0:\n print('Yes')\n \nelif a[0][0] == 0 and a[1][0] == 0 and a[2][0] == 0:\n print('Yes')\nelif a[0][1] == 0 and a[1][1] == 0 and a[2][1] == 0:\n print('Yes')\nelif a[0][2] == 0 and a[1][2] == 0 and a[2][2] == 0:\n print('Yes')\n \nelif a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0:\n print('Yes')\nelif a[0][2] == 0 and a[1][1] == 0 and a[2][0] == 0:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s254420285', 's409466428', 's686744096'] | [3188.0, 3188.0, 3188.0] | [17.0, 17.0, 17.0] | [828, 832, 832] |
p02760 | u199830845 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["from collections import OrderedDict\n\nf_row_nums = list(input().split())\ns_row_nums = list(input().split())\nt_row_nums = list(input().split())\nN = int(input())\nchosen_nums = [input() for _ in range(N)]\n\nf_dict = OrderedDict()\nfor key in f_row_nums:\n print(key)\n f_dict[key] = False\ns_dict = OrderedDict()\nfor key in s_row_nums:\n s_dict[key] = False\nt_dict = OrderedDict()\nfor key in t_row_nums:\n t_dict[key] = False\n\nfor num in chosen_nums:\n if num in f_dict:\n f_dict[num] = True\n if num in s_dict:\n s_dict[num] = True\n if num in t_dict:\n t_dict[num] = True\n\nf_rows = list(f_dict.values())\ns_rows = list(s_dict.values())\nt_rows = list(t_dict.values())\nf_cols = [f_rows[0], s_rows[0], t_rows[0]]\ns_cols = [f_rows[1], s_rows[1], t_rows[1]]\nt_cols = [f_rows[2], s_rows[2], t_rows[2]]\n\nout = 'No'\n\nif all(f_rows) or all(s_rows) or all(t_rows) or all(f_cols) or all(s_cols) or all(t_cols):\n out = 'Yes'\nelif f_rows[0] and s_rows[1] and t_rows[2]:\n out = 'Yes'\nelif f_rows[2] and s_rows[1] and t_rows[0]:\n out = 'Yes'\n\nprint(out)\n", 'from collections import OrderedDict\n\nf_row_nums = list(input().split())\ns_row_nums = list(input().split())\nt_row_nums = list(input().split())\nN = int(input())\nchosen_nums = [input() for _ in range(N)]\n\nf_dict = OrderedDict()\nfor key in f_row_nums:\n f_dict[key] = False\ns_dict = OrderedDict()\nfor key in s_row_nums:\n s_dict[key] = False\nt_dict = OrderedDict()\nfor key in t_row_nums:\n t_dict[key] = False\n\nfor num in chosen_nums:\n if num in f_dict:\n f_dict[num] = True\n if num in s_dict:\n s_dict[num] = True\n if num in t_dict:\n t_dict[num] = True\n\nf_rows = list(f_dict.values())\ns_rows = list(s_dict.values())\nt_rows = list(t_dict.values())\n\nf_cols = [f_rows[0], s_rows[0], t_rows[0]]\ns_cols = [f_rows[1], s_rows[1], t_rows[1]]\nt_cols = [f_rows[2], s_rows[2], t_rows[2]]\n\nout = "No"\n\nif all(f_rows) or all(s_rows) or all(t_rows) or all(f_cols) or all(s_cols) or all(t_cols):\n out = "Yes"\nelif f_rows[0] and s_rows[1] and t_rows[2]:\n out = "Yes"\nelif f_rows[2] and s_rows[1] and t_rows[0]:\n out = "Yes"\n\nprint(out)\n'] | ['Wrong Answer', 'Accepted'] | ['s373213883', 's655024053'] | [3316.0, 3316.0] | [21.0, 20.0] | [1074, 1060] |
p02760 | u199845325 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['# coding: utf-8\n# Your code here!\nls = []\ncount = [0]*9\nfor i in range(3):\n ls.extend(input().split(\' \'))\nfor i in range(int(input())):\n s = input()\n if s in ls:\n i = ls.index(s)\n count[i]="1"\nflag = 0\nfor i in range(3):\n if count[i] == count[i+3] == count[i+6]=="1":\n flag = 1\n break\nif flag == 0:\n\tfor i in range(0,8,3):\n \tif count[i] == count[i+1] == count[i+2] == "1":\n \t\tflag = 1\n \tbreak\nif count[0]==count[4]==count[8]=="1":\n flag = 1\nif count[2] == count[4] == count[6] == "1":\n flag = 1\nif flag == 1:\n print("Yes")\nelif flag == 0:\n print("No")', '# coding: utf-8\n# Your code here!\nls = []\ncount = [0]*9\nfor i in range(3):\n ls.extend(input().split(\' \'))\nfor i in range(int(input())):\n s = input()\n if s in ls:\n i = ls.index(s)\n count[i]="1"\nflag = 0\nfor i in range(3):\n if count[i] == count[i+3] == count[i+6]=="1":\n flag = 1\n break\nfor i in range(0,8,3):\n if count[i] == count[i+1] == count[i+2] == "1":\n flag = 1\n break\nif count[0]==count[4]==count[8]=="1":\n flag = 1\nif count[2] == count[4] == count[6] == "1":\n flag = 1\nif flag == 1:\n print("Yes")\nelif flag == 0:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s979427391', 's781475513'] | [3064.0, 3316.0] | [17.0, 20.0] | [619, 601] |
p02760 | u201928947 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["bingo = [0,1,3,5,7,8]\nif 4 in bingo:\n if 0 in bingo:\n if 8 in bingo:\n print('Yes')\n exit()\n if 1 in bingo:\n if 7 in bingo:\n print('Yes')\n exit()\n if 2 in bingo:\n if 6 in bingo:\n print('Yes')\n exit()\n if 3 in bingo:\n if 5 in bingo:\n print('Yes')\n exit()\nif 0 in bingo:\n if 1 in bingo:\n if 2 in bingo:\n print('Yes')\n exit()\n if 3 in bingo:\n if 6 in bingo: \n print('Yes')\n exit()\nif 8 in bingo:\n if 2 in bingo:\n if 5 in bingo:\n print('Yes')\n exit()\n if 6 in bingo:\n if 7 in bingo: \n print('Yes')\n exit()\nprint('No')\n ", "a11,a12,a13 = input().split()\na21,a22,a23 = input().split()\na31,a32,a33 = input().split()\nlst = [a11,a12,a13,a21,a22,a23,a31,a32,a33]\nbingo = []\nn = int(input())\nfor i in range(n):\n ai = input()\n if ai in lst:\n bingo.append(lst.index(ai))\nif 4 in bingo:\n if 0 in bingo:\n if 8 in bingo:\n print('Yes')\n exit()\n if 1 in bingo:\n if 7 in bingo:\n print('Yes')\n exit()\n if 2 in bingo:\n if 6 in bingo:\n print('Yes')\n exit()\n if 3 in bingo:\n if 5 in bingo:\n print('Yes')\n exit()\nif 0 in bingo:\n if 1 in bingo:\n if 2 in bingo:\n print('Yes')\n exit()\n if 3 in bingo:\n if 6 in bingo: \n print('Yes')\n exit()\nif 8 in bingo:\n if 2 in bingo:\n if 5 in bingo:\n print('Yes')\n exit()\n if 6 in bingo:\n if 7 in bingo: \n print('Yes')\n exit()\nprint('No')"] | ['Wrong Answer', 'Accepted'] | ['s107647831', 's815152456'] | [3064.0, 3064.0] | [17.0, 17.0] | [783, 1008] |
p02760 | u201986772 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["A=[]\nfor _ in range(3):\n A.append(list(map(int,input().split())))\n\ndef bingo(x):\n a=False\n for s in range(3):\n if sum(x[0])==3:a=True\n \n for h in range(3):\n if x[i][0]+x[i][1]+x[i][2]==3:a=True\n \n if x[0][0]+x[1][1]+x[2][2]==3:a=True\n \n if x[0][2]+x[1][1]+x[2][0]==3:a=True\n \n return a\n\n\nfor _ in range(int(input())):\n seen=[[0,0,0] for _ in range(3)]\n a=int(input())\n \n for i in range(3):\n for j in range(3):\n if A[i][j]==a:seen[i][j]=1\n \n ff=bingo(seen)\n if ff==True:\n print('Yes')\n exit()\n \nprint('No')\n", "import numpy as np\nA=[]\nfor _ in range(3):\n A.append(list(map(int,input().split())))\n\ndef bingo(x):\n a=False\n for s in range(3):\n if sum(x[s])==3:a=True\n \n for h in range(3):\n if x[0][h]+x[1][h]+x[2][h]==3:a=True\n \n if x[0][0]+x[1][1]+x[2][2]==3:a=True\n \n if x[0][2]+x[1][1]+x[2][0]==3:a=True\n \n return a\n\nseen=[[0,0,0] for _ in range(3)]\n\nfor _ in range(int(input())):\n a=int(input())\n \n for i in range(3):\n for j in range(3):\n if A[i][j]==a:seen[i][j]=1\n\nff=bingo(seen)\n\nif ff==True:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s128498027', 's903548047'] | [9276.0, 27148.0] | [31.0, 115.0] | [561, 552] |
p02760 | u205087376 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['a = list(map(int,input().split()))\nb = list(map(int,input().split()))\nc = list(map(int,input().split()))\nn = int(input())\nfor i in range(1,n+1):\n b_i = int(input())\nfor j in range(1,n+1):\n d = [" " if b_j in s else s for s in a]\n e = [" " if b_j in s else s for s in b]\n f = [" " if b_j in s else s for s in c]\nif d[0]==d[1]==d[2] or e[0]==e[1]==e[2] or f[0]==f[1]==f[2] or d[0]==e[0]==f[0] or d[1]==e[1]==f[1] or d[2]==e[2]==f[2] or d[0]==e[1]==f[2] or d[2]==e[1]==f[0]:\n print(\'Yes\')\nelse:\n print(\'No\')', "a = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\nb = [int(input()) for i in range(n)]\nfor i in range(3):\n for j in range(3):\n for k in range(3):\n if a[i][j] == b[k]:\n a[i][j] = 0\nans = 'No'\nfor i in range(3):\n if a[i][0]+a[i][1]+a[i][2] == 0:\n ans = 'Yes'\n if a[0][i]+a[1][i]+a[2][i] == 0:\n ans = 'Yes'\nif a[0][0]+a[1][1]+a[2][2] == 0 or a[2][0]+a[1][1]+a[0][2] == 0:\n ans = 'Yes'\nprint(ans)\n", "a = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\nb = [int(input()) for i in range(n)]\nfor i in range(3):\n for j in range(3):\n for k in range(3):\n if a[i][j] == b[k]:\n a[i][j] = 0\nans = 'No'\nfor i in range(3):\n if a[i][0]+a[i][1]+a[i][2] == 0:\n ans = 'Yes'\n if a[0][i]+a[1][i]+a[2][i] == 0:\n ans = 'Yes'\nif a[0][0]+a[1][1]+a[2][2] == 0 or a[2][0]+a[1][1]+a[0][2] == 0:\n ans = 'Yes'\nprint(ans)\n", 'a = list(map(str,input().split()))\nb = list(map(str,input().split()))\nc = list(map(str,input().split()))\nn = int(input())\nfor i in range(1,n+1):\n b_i = int(input())\n \nfor i in range(1,n+1):\n d = [" " if \'b_i\' in s else s for s in a]\n e = [" " if \'b_i\' in s else s for s in b]\n f = [" " if \'b_i\' in s else s for s in c]\nif d[0]==d[1]==d[2] or e[0]==e[1]==e[2] or f[0]==f[1]==f[2] or d[0]==e[0]==f[0] or d[1]==e[1]==f[1] or d[2]==e[2]==f[2] or d[0]==e[1]==f[2] or d[2]==e[1]==f[0]:\n print(\'Yes\')\nelse:\n print(\'No\')', "a = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\nb = [int(input()) for i in range(n)]\nfor i in range(3):\n for j in range(3):\n for k in range(3):\n if a[i][j] == b[k]:\n a[i][j] = 0\nans = 'No'\nfor i in range(3):\n if a[i][0]+a[i][1]+a[i][2] == 0:\n ans = 'Yes'\n if a[0][i]+a[1][i]+a[2][i] == 0:\n ans = 'Yes'\nif a[0][0]+a[1][1]+a[2][2] == 0 or a[2][0]+a[1][1]+a[0][2] == 0:\n ans = 'Yes'\nprint(ans)", "a = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\nb = [int(input()) for i in range(n)]\nfor i in range(3):\n for j in range(3):\n for k in range(n):\n if a[i][j] == b[k]:\n a[i][j] = 0\nans = 'No'\nfor i in range(3):\n if a[i][0]+a[i][1]+a[i][2] == 0:\n ans = 'Yes'\n if a[0][i]+a[1][i]+a[2][i] == 0:\n ans = 'Yes'\nif a[0][0]+a[1][1]+a[2][2] == 0 or a[2][0]+a[1][1]+a[0][2] == 0:\n ans = 'Yes'\nprint(ans)\n"] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s123447095', 's544662043', 's646781019', 's666406707', 's966312861', 's576854554'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [18.0, 17.0, 18.0, 17.0, 18.0, 18.0] | [510, 464, 448, 519, 439, 440] |
p02760 | u207137484 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['a11,a12,a13=(int(x) for x in input().split())\na21,a22,a23=(int(x) for x in input().split())\na31,a32,a33=(int(x) for x in input().split())\nn=int(input())\nlist=[]\nfor i in range(n):\n\tlist.append(int(input()))\ns=set(list)\n\ndef ch(a,b,c,s):\n\tprint(a,b,c,s)\n\tk=0\n\tif a in s:\n\t\tif b in s:\n\t\t\tif c in s:\n\t\t\t\tk=1\n\treturn k\nco=0\nco+=ch(a11,a12,a13,s)\nco+=ch(a21,a22,a23,s)\nco+=ch(a31,a32,a33,s)\nco+=ch(a11,a21,a31,s)\nco+=ch(a12,a22,a32,s)\nco+=ch(a13,a23,a33,s)\nco+=ch(a11,a22,a33,s)\nco+=ch(a13,a22,a31,s)\nif co>0:\n\tprint("Yes")\nelse:\n\tprint("No")\n', 'a11,a12,a13=(int(x) for x in input().split())\na21,a22,a23=(int(x) for x in input().split())\na31,a32,a33=(int(x) for x in input().split())\nn=int(input())\nlist=[]\nfor i in range(n):\n\tlist.append(int(input()))\ns=set(list)\n\ndef ch(a,b,c,s):\n\tk=0\n\tif a in s:\n\t\tif b in s:\n\t\t\tif c in s:\n\t\t\t\tk=1\n\treturn k\nco=0\nco+=ch(a11,a12,a13,s)\nco+=ch(a21,a22,a23,s)\nco+=ch(a31,a32,a33,s)\nco+=ch(a11,a21,a31,s)\nco+=ch(a12,a22,a32,s)\nco+=ch(a13,a23,a33,s)\nco+=ch(a11,a22,a33,s)\nco+=ch(a13,a22,a31,s)\nif co>0:\n\tprint("Yes")\nelse:\n\tprint("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s486459947', 's742236432'] | [3064.0, 3064.0] | [18.0, 17.0] | [538, 522] |
p02760 | u207241407 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A = sum([list(map(int, input().split())) for _ in range(3)], [])\nN = int(input())\n\nfor b in range(N):\n if b in A:\n A[A.index(b)] = 0\n elif A[0] + A[1] + A[2] == 0:\n print("Yes")\n exit()\n elif A[3] + A[4] + A[5] == 0:\n print("Yes")\n exit()\n elif A[6] + A[7] + A[8] == 0:\n print("Yes")\n exit()\n elif A[0] + A[3] + A[6] == 0:\n print("Yes")\n exit()\n elif A[1] + A[4] + A[7] == 0:\n print("Yes")\n exit()\n elif A[2] + A[5] + A[8] == 0:\n print("Yes")\n exit()\n elif A[0] + A[4] + A[8] == 0:\n print("Yes")\n exit()\n elif A[2] + A[4] + A[6] == 0:\n print("Yes")\n exit()\n\nprint("No")', 'A = sum([list(map(int, input().split())) for _ in range(3)], [])\nN = int(input())\n\nfor _ in range(N):\n b = int(input())\n if b in A:\n A[A.index(b)] = 0\n if (\n A[0] + A[1] + A[2] == 0\n or A[3] + A[4] + A[5] == 0\n or A[6] + A[7] + A[8] == 0\n or A[0] + A[3] + A[6] == 0\n or A[1] + A[4] + A[7] == 0\n or A[2] + A[5] + A[8] == 0\n or A[0] + A[4] + A[8] == 0\n or A[2] + A[4] + A[6] == 0\n ):\n print("Yes")\n break\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s533663004', 's263691838'] | [3064.0, 3064.0] | [17.0, 17.0] | [715, 513] |
p02760 | u207400417 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["A = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\nB = [list(map(int, input().split())) for i in range(N)]\nc = [[0] * 3 for _ in range(3)]\nfor b in B:\n for i in range(3):\n for j in range(3):\n if A[i][j] == b:\n c[i][j] == 1\nfor i in range(3):\n if c[i][0] and c[i][1] and c[i][2]:\n print('Yes')\n exit()\n if c[0][i] and c[1][i] and c[2][i]:\n print('Yes')\n exit()\nif c[0][0] and c[1][1] and c[2][2]:\n print('Yes')\n exit()\nif c[0][2] and c[1][1] and c[2][0]:\n print('Yes')\n exit()\nprint('No')", 'bingo = [list(map(int,input().split())) for _ in range(3)]\nn = int(input())\nl = [int(input()) for _ in range(n)]\nfor i in range(3):\n if bingo[i][0] in l and bingo[i][1] in l and bingo[i][2] in l:\n print("Yes")\n exit()\nfor i in range(3):\n if bingo[0][i] in l and bingo[1][i] in l and bingo[2][i] in l:\n print("Yes")\n exit()\nif bingo[0][0] in l and bingo[1][1] in l and bingo[2][2] in l:\n print("Yes")\n exit()\nif bingo[0][2] in l and bingo[1][1] in l and bingo[2][0] in l:\n print("Yes")\n exit()\nprint("No")'] | ['Wrong Answer', 'Accepted'] | ['s165565361', 's873194502'] | [3064.0, 3188.0] | [18.0, 20.0] | [571, 550] |
p02760 | u209313313 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["A11, A12, A13=list(map(int,input().split()))\nA21, A22, A23=list(map(int,input().split()))\nA31, A32, A33=list(map(int,input().split()))\nN=int(input())\nb=[input() for i in range(N)]\nif A11, A12, A13 in b:\n print('Yes')\nelif A21, A22, A23 in b:\n print('Yes')\nelif A31, A32, A33 in b:\n print('Yes')\nelif A11, A21, A31 in b:\n print('Yes')\nelif A12, A22, A32 in b:\n print('Yes')\nelif A13, A23, A33 in b:\n print('Yes')\nelif A11, A22, A33 in b:\n print('Yes')\nelif A13, A22, A31 in b:\n print('Yes')\nelse:\n print('No')", "A11, A12, A13=list(map(int,input().split()))\nA21, A22, A23=list(map(int,input().split()))\nA31, A32, A33=list(map(int,input().split()))\nN=int(input())\nb=[input() for i in range(N)]\nif A11 in b and A12 in b and A13 in b:\n print('Yes')\nelif A21 in b and A22 in b and A23 in b:\n print('Yes')\nelif A31 in b and A32 in b and A33 in b:\n print('Yes')\nelif A11 in b and A21 in b and A31 in b:\n print('Yes')\nelif A12 in b and A22 in b and A32 in b:\n print('Yes')\nelif A13 in b and A23 in b and A33 in b:\n print('Yes')\nelif A11 in b and A22 in b and A33 in b:\n print('Yes')\nelif A13 in b and A22 in b and A31 in b:\n print('Yes')\nelse:\n print('No')", "A11, A12, A13=list(map(int,input().split()))\nA21, A22, A23=list(map(int,input().split()))\nA31, A32, A33=list(map(int,input().split()))\nN=int(input())\nb=[input() for i in range(N)]\nif A11 in b and A12 in b and A13 in b:\n print('Yes')\nelif A21 in b and A22 in b and A23 in b:\n print('Yes')\nelif A31 in b and A32 in b and A33 in b:\n print('Yes')\nelif A11 in b and A21 in b and A31 in b:\n print('Yes')\nelif A12 in b and A22 in b and A32 in b:\n print('Yes')\nelif A13 in b and A23 in b and A33 in b:\n print('Yes')\nelif in b A11 and A22 in b and A33 in b:\n print('Yes')\nelif A13 in b and A22 in b and A31 in b:\n print('Yes')\nelse:\n print('No')", "A11, A12, A13=list(map(int,input().split()))\nA21, A22, A23=list(map(int,input().split()))\nA31, A32, A33=list(map(int,input().split()))\nN=int(input())\nb=[input() for i in range(N)]\nif A11 and A12 and A13 in b:\n print('Yes')\nelif A21 and A22 and A23 in b:\n print('Yes')\nelif A31 and A32 and A33 in b:\n print('Yes')\nelif A11 and A21 and A31 in b:\n print('Yes')\nelif A12 and A22 and A32 in b:\n print('Yes')\nelif A13 and A23 and A33 in b:\n print('Yes')\nelif A11 and A22 and A33 in b:\n print('Yes')\nelif A13 and A22 and A31 in b:\n print('Yes')\nelse:\n print('No')", "A11, A12, A13=list1(map(int,input().split()))\nA21, A22, A23=list2(map(int,input().split()))\nA31, A32, A33=list3(map(int,input().split()))\nN=int(input())\nb=[input() for i in range(N)]\nif A11 and A12 and A13 in b:\n print('Yes')\nelif A21 and A22 and A23 in b:\n print('Yes')\nelif A31 and A32 and A33 in b:\n print('Yes')\nelif A11 and A21 and A31 in b:\n print('Yes')\nelif A12 and A22 and A32 in b:\n print('Yes')\nelif A13 and A23 and A33 in b:\n print('Yes')\nelif A11 and A22 and A33 in b:\n print('Yes')\nelif A13 and A22 and A31 in b:\n print('Yes')\nelse:\n print('No')", "A11, A12, A13=list(map(int,input().split()))\nA21, A22, A23=list(map(int,input().split()))\nA31, A32, A33=list(map(int,input().split()))\nN=int(input())\nb=[int(input()) for i in range(N)]\nif A11 in b and A12 in b and A13 in b:\n print('Yes')\nelif A21 in b and A22 in b and A23 in b:\n print('Yes')\nelif A31 in b and A32 in b and A33 in b:\n print('Yes')\nelif A11 in b and A21 in b and A31 in b:\n print('Yes')\nelif A12 in b and A22 in b and A32 in b:\n print('Yes')\nelif A13 in b and A23 in b and A33 in b:\n print('Yes')\nelif A11 in b and A22 in b and A33 in b:\n print('Yes')\nelif A13 in b and A22 in b and A31 in b:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s046371821', 's180155841', 's207994039', 's293899170', 's630373612', 's865645661'] | [3064.0, 3188.0, 3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 20.0, 18.0, 17.0, 17.0, 18.0] | [535, 663, 661, 581, 584, 668] |
p02760 | u210369205 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A1 = list(map(int,input().split()))\nA2 = list(map(int,input().split()))\nA3 = list(map(int,input().split()))\nN = int(input())\nb = [0] * N \nfor i in range(N):\n b[i] = int(input())\nA = [A1,A2,A3]\nB = [[0]*3,[0]*3,[0]*3]\nfor i in range(3):\n for j in range(3):\n for k in range(N):\n if A[i][j] == b[k]:\n B[i][j] = 1\nif B[0] == [1,1,1]:\n print("Yes")\nelif B[1] == [1,1,1]:\n print("Yes")\nelif B[2] == [1,1,1]:\n print("Yes")\nelif B[0][0] == 1 and B[1][0] == 1 and B[2][0] == 1:\n print("Yes")\nelif B[0][1] == 1 and B[1][1] == 1 and B[2][1] == 1:\n print("Yes")\nelif B[0][2] == 1 and B[1][2] == 1 and B[2][2] == 1:\n print("Yes")\nelif B[0][0] == 1 and B[1][1] == 1 and B[2][2] == 1:\n print("Yes")\nelif B[0][2] == 1 and B[1][1] == 1 and B[2][0] == 1:\n print("Yes")\nelse:\n print("No"', 'A1 = list(map(int,input().split()))\nA2 = list(map(int,input().split()))\nA3 = list(map(int,input().split()))\nN = int(input())\nb = [0] * N \nfor i in range(N):\n b[i] = int(input())\nA = [A1,A2,A3]\nB = [[0]*3,[0]*3,[0]*3]\nfor i in range(3):\n for j in range(3):\n for k in range(N):\n if A[i][j] == b[k]:\n B[i][j] = 1\nif B[0] == [1,1,1]:\n print("Yes")\nelif B[1] == [1,1,1]:\n print("Yes")\nelif B[2] == [1,1,1]:\n print("Yes")\nelif B[0][0] == 1 and B[1][0] == 1 and B[2][0] == 1:\n print("Yes")\nelif B[0][1] == 1 and B[1][1] == 1 and B[2][1] == 1:\n print("Yes")\nelif B[0][2] == 1 and B[1][2] == 1 and B[2][2] == 1:\n print("Yes")\nelif B[0][0] == 1 and B[1][1] == 1 and B[2][2] == 1:\n print("Yes")\nelif B[0][2] == 1 and B[1][1] == 1 and B[2][0] == 1:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s701425381', 's929833205'] | [3064.0, 3188.0] | [17.0, 17.0] | [834, 835] |
p02760 | u211236379 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['mark = []\nfor i in range(N):\n b = int(input())\n for j, a in enumerate(A):\n for k, aa in enumerate(a):\n if aa == b:\n mark.append((j,k))\n\n\n\nif ( ((0,0) and (1,1) and (2,2)) or ((0,2) and (1,1) and (2,0)) ) in mark:\n print("Yes")\n exit()\nelse:\n for i in range(3):\n if ((i,0) and (i,1) and (i,2)) in mark:\n print(\'Yes\')\n exit()\n if ((0,i) and (1,i) and (2,i)) in mark:\n print("Yes")\n exit()\n\nprint("No")', '\nA = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\n\nmark = [[0]*3, [0]*3, [0]*3]\n\nfor i in range(N):\n b = int(input())\n for j, a in enumerate(A):\n for k, aa in enumerate(a):\n if aa == b:\n mark[j][k] = 1\n\n\nif mark[0][0] == mark[1][1] == mark[2][2] == 1 or mark[0][2] == mark[1][1] == mark[2][0] == 1:\n print("Yes")\n exit()\nelse:\n for i in range(3):\n if mark[i][0] == mark[i][1] == mark[i][2] == 1:\n print(\'Yes\')\n exit()\n if mark[0][i] == mark[1][i] == mark[2][i] == 1:\n print("Yes")\n exit()\n\nprint("No")'] | ['Runtime Error', 'Accepted'] | ['s870487541', 's867565884'] | [3064.0, 3064.0] | [18.0, 18.0] | [505, 632] |
p02760 | u211805975 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["#7\na = [[map(int,input().split())] for _ in range(3)]\nn = int(input())\nb = [int(input()) for _ in range(n)]\n\nfor i in range(3):\n for j in range(3):\n if a[i][j] in b:\n a[i][j] = -1\nbingo = 0\n\nfor i in range(3):\n if a[i][0] == a[i][1] == a[i][2] == -1:\n bingo = 1\n \nfor j in range(3):\n if a[0][j] == a[1][j] == a[2][j] == -1:\n bingo = 1\n\nif a[0][0] == a[1][1] == a[2][2] == -1 or a[0][2] == a[1][1] == a[2][0]:\n bingo = 1\n\nif bingo == True:\n print('Yes')\n\nelse:\n print('No')\n", "#7\na = [list(map(int,input().split())) for _ in range(3)]\nn = int(input())\nb = [int(input()) for _ in range(n)]\n\nfor i in range(3):\n for j in range(3):\n if a[i][j] in b:\n a[i][j] = -1\nbingo = 0\n\nfor i in range(3):\n if a[i][0] == a[i][1] == a[i][2] == -1:\n bingo = 1\n \nfor j in range(3):\n if a[0][j] == a[1][j] == a[2][j] == -1:\n bingo = 1\n\nif a[0][0] == a[1][1] == a[2][2] == -1 or a[0][2] == a[1][1] == a[2][0]:\n bingo = 1\n\nif bingo == 1:\n print('Yes')\n\nelse:\n print('No')\n "] | ['Runtime Error', 'Accepted'] | ['s350559772', 's614188539'] | [3064.0, 3064.0] | [17.0, 17.0] | [530, 539] |
p02760 | u215341636 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['a = list(list(map(int , input().split())) for l in range(3))\nn = int(input())\n\nfor i in range(input()):\n b=int(input())\n for j in range(3):\n for k in range(3):\n if a[j][k]==b:a[j][k]=0\nans="No"\nfor i in range(3):\n if a[i][0]==a[i][1]==a[i][2]==0:ans="Yes"\n if a[0][i]==a[1][i]==a[2][i]==0:ans="Yes"\nif a[0][0]==a[1][1]==a[2][2]==0:ans="Yes"\nif a[2][0]==a[1][1]==a[0][2]==0:ans="Yes"\nprint(ans)', 'a=[list(map(int,input().split()))for _ in range(3)]\nfor i in range(int(input())):\n b=int(input())\n for j in range(3):\n for k in range(3):\n if a[j][k]==b:a[j][k]=0\nans="No"\nfor i in range(3):\n if a[i][0]==a[i][1]==a[i][2]==0:ans="Yes"\n if a[0][i]==a[1][i]==a[2][i]==0:ans="Yes"\nif a[0][0]==a[1][1]==a[2][2]==0:ans="Yes"\nif a[2][0]==a[1][1]==a[0][2]==0:ans="Yes"\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s891944158', 's743532357'] | [3064.0, 3064.0] | [18.0, 17.0] | [405, 384] |
p02760 | u215630013 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["table = []\nfor i in range(3):\n table.append(list(map(int, input().split())))\nparts = int(input())\np_list = []\nfor i in range(parts):\n p_list.append(int(input()))\n\nchk = 0\ncolc = [0, 0, 0]\nnaname = 0\ninaname = 0\nfor r_idx, row in enumerate(table):\n rcnt = 0\n for c_idx, col in enumerate(row):\n if col in p_list:\n rcnt += 1\n colc[c_idx] += 1\n if r_idx == c_idx:\n naname += 1\n if r_idx == 1 and c_idx == 1:\n inaname += 1\n if abs(r_idx - c_idx) == 2:\n inaname += 1\n if rcnt == 3:\n chk += 1\n\nif len(list(filter(lambda x: x > 0, colc))) > 0:\n chk += 1\n\nif naname == 3:\n chk += 1\nif inaname == 3:\n chk += 1\n\nprint('YES' if chk > 0 else 'NO')", "table = []\nfor i in range(3):\n table.append(list(map(int, input().split())))\nparts = int(input())\np_list = []\nfor i in range(parts):\n p_list.append(int(input()))\n\nchk = 0\ncolc = [0, 0, 0]\nnaname = 0\nfor r_idx, row in enumerate(table):\n rcnt = 0\n for c_idx, col in enumerate(row):\n if col in p_list:\n rcnt += 1\n colc[c_idx] += 1\n if r_idx == c_idx:\n naname += 1\n if rcnt == 3:\n chk += 1\n\nif len(list(filter(lambda x: x > 0, colc))) > 0:\n chk += 1\n\nif naname == 3:\n chk += 1\n\nprint('YES' if chk > 0 else 'NO')", "table = []\nfor i in range(3):\n table.append(list(map(int, input().split())))\nparts = int(input())\np_list = []\nfor i in range(parts):\n p_list.append(int(input()))\n\nresult = [[False, False, False], [False, False, False], [False, False, False]]\nchk = 0\nfor r_idx, row in enumerate(table):\n for c_idx, col in enumerate(row):\n result[r_idx][c_idx] = col in p_list\n\n\nfor i in range(3):\n if result[i][0] and result[i][1] and result[i][2]:\n chk += 1\n if result[0][i] and result[1][i] and result[2][i]:\n chk += 1\n\nif result[0][0] and result[1][1] and result[2][2]:\n chk += 1\n\nif result[0][2] and result[1][1] and result[2][0]:\n chk += 1\n\nprint('YES' if chk > 0 else 'NO')\n", "table = []\nfor i in range(3):\n table.append(list(map(int, input().split())))\nparts = int(input())\np_list = []\nfor i in range(parts):\n p_list.append(int(input()))\n\nresult = [[False, False, False], [False, False, False], [False, False, False]]\nchk = 0\nfor r_idx, row in enumerate(table):\n for c_idx, col in enumerate(row):\n result[r_idx][c_idx] = col in p_list\n\nfor i in range(3):\n if result[i][0] and result[i][1] and result[i][2]:\n chk += 1\n if result[0][i] and result[1][i] and result[2][i]:\n chk += 1\n if result[i][i] and result[i][i] and result[i][i]:\n chk += 1\n\nif result[0][2] and result[1][1] and result[2][0]:\n chk += 1\n\nprint('YES' if chk > 0 else 'NO')\n", "table = []\nfor i in range(3):\n table.append(list(map(int, input().split())))\nparts = int(input())\np_list = []\nfor i in range(parts):\n p_list.append(int(input()))\n\nresult = [[False, False, False], [False, False, False], [False, False, False]]\nchk = 0\nfor r_idx, row in enumerate(table):\n for c_idx, col in enumerate(row):\n result[r_idx][c_idx] = col in p_list\n\n\nfor i in range(3):\n if result[i][0] and result[i][1] and result[i][2]:\n chk += 1\n if result[0][i] and result[1][i] and result[2][i]:\n chk += 1\n\nif result[0][0] and result[1][1] and result[2][2]:\n chk += 1\n\nif result[0][2] and result[1][1] and result[2][0]:\n chk += 1\n\nprint('Yes' if chk > 0 else 'No')\n"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s140226585', 's238989285', 's247773458', 's585424787', 's251296648'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 18.0, 17.0, 17.0] | [780, 590, 705, 711, 705] |
p02760 | u216392490 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["import sys\nimport math\nsys.setrecursionlimit(int(1e6))\n\nA = [[0]*3]*3\nA[0] = list(map(int, input().split()))\nA[1] = list(map(int, input().split()))\nA[2] = list(map(int, input().split()))\n\nN = int(input())\nb = [0] * N\nfor i in range(N):\n b[i] = int(input())\n\ncard = [[0]*3]*3\nn = 0\nfor bn in b:\n for m in range(3*3):\n i = m % 3\n j = m // 3\n if (A[i][j] == bn):\n card[i][j] = 1\n break\n\nans = 'No'\nfor i in range(3):\n if sum(A[i]) == 3:\n ans = 'Yes'\n break\n if sum([A[0][i], A[1][i], A[2][i]]) == 3:\n ans = 'Yes'\n break\nelse:\n if sum([A[0][0], A[1][1], A[2][2]]) == 3:\n ans = 'Yes'\n elif sum([A[2][0], A[1][1], A[0][2]]) == 3:\n ans = 'Yes'\n\nprint(ans)\n", "import sys\nimport math\nsys.setrecursionlimit(int(1e6))\n\nA = [[0]*3]*3\nA[0] = list(map(int, input().split()))\nA[1] = list(map(int, input().split()))\nA[2] = list(map(int, input().split()))\n\nN = int(input())\nb = [0] * N\nfor i in range(N):\n b[i] = int(input())\n\nc = [[0]*3 for i in range(3)]\nfor bn in b:\n for m in range(3*3):\n i = m % 3\n j = m // 3\n if (A[i][j] == bn):\n c[i][j] = 1\n break\n\nans = 'No'\nfor i in range(3):\n if sum(c[i]) == 3:\n ans = 'Yes'\n break\n if sum([c[0][i], c[1][i], c[2][i]]) == 3:\n ans = 'Yes'\n break\nelse:\n if sum([c[0][0], c[1][1], c[2][2]]) == 3:\n ans = 'Yes'\n elif sum([c[2][0], c[1][1], c[0][2]]) == 3:\n ans = 'Yes'\n\nprint(ans)\n"] | ['Wrong Answer', 'Accepted'] | ['s530158177', 's151104383'] | [3064.0, 3064.0] | [18.0, 18.0] | [752, 756] |
p02760 | u216888678 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A=[list(map(int,input().split())) for _ in range(3)]\nN=int(input())\nbn=[int(input()) for _ in range(N)]\nans=False\nfor ver in zip(*A):\n if all(item in bn for item in ver):\n ans=True\nfor wide in A:\n if all(item in bn for item in wide):\n ans=True\nif all(A[i][i] in bn for i in range(3)):\n ans=True\nif all(A[i][3-i] in bn for i in range(3)):\n ans=True\nif ans==True:\n print("Yes")\nelse:\n print("No")', 'A=[list(map(int,input().split())) for _ in range(3)]\nN=int(input())\nbn=[int(input()) for _ in range(N)]\nans=False\nfor ver in zip(*A):\n if all(item in bn for item in ver):\n ans=True\nfor wide in A:\n if all(item in bn for item in wide):\n ans=True\nif all(A[i][i] in bn for i in range(3)):\n ans=True\nif all(A[i][3-i-1] in bn for i in range(3)):\n ans=True\nif ans==True:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s812254390', 's356475807'] | [3064.0, 3064.0] | [17.0, 17.0] | [426, 428] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.