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 | u420567327 | 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. | ['#!/usr/bin/env python3\nimport sys\n\n\ndef inn(func=int):\n return list(map(func,input().split()))\n\ndef ins():\n return input().split()\n\na0 = inn()\na1 = inn()\na2 = inn()\na = a0+a1+a2\nn = int(input())\nban = [0,0,0,0,0,0,0,0,0]\nfor i in range(n):\n b = int(input())\n for j in range(9):\n if b == a[j]:\n ban[j] = 1\n\nfor i in [0,3,6]:\n tate = ban[i]+ban[i+3]+ban[i+6]\n yoko = ban[i]+ban[i+1]+ban[i+2]\n if tate == 3 or yoko == 3:\n print("Yes")\n exit()\nif (ban[0]+ban[4]+ban[8]) == 3 or (ban[2]+ban[4]+ban[6]) == 3:\n print("Yes")\n exit()\nprint("No")', '#!/usr/bin/env python3\nimport sys\n\n\ndef inn(func=int):\n return list(map(func,input().split()))\n\ndef ins():\n return input().split()\n\na0 = inn()\na1 = inn()\na2 = inn()\na = a0+a1+a2\nn = int(input())\nban = [0,0,0,0,0,0,0,0,0]\nfor i in range(n):\n b = int(input())\n for j in range(9):\n if b == a[j]:\n ban[j] = 1\n\n\nfor i in [0,1,2]:\n t = ban[i]+ban[i+3]+ban[i+6]\n if t == 3:\n print("Yes")\n exit()\nfor i in [0,3,6]:\n t = ban[i]+ban[i+1]+ban[i+2]\n if t == 3:\n print("Yes")\n exit()\nif (ban[0]+ban[4]+ban[8]) == 3 or (ban[2]+ban[4]+ban[6]) == 3:\n print("Yes")\n exit()\nprint("No")'] | ['Runtime Error', 'Accepted'] | ['s280509273', 's336243274'] | [3064.0, 3188.0] | [18.0, 17.0] | [629, 677] |
p02760 | u422165425 | 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. | ['60 88 34\n92 41 43\n65 73 48\n10\n60\n43\n88\n11\n48\n73\n65\n41\n92\n34', 'import sys\n\nar = []\nx = sys.stdin.readline()\nx = x.split(\' \')\nar.extend([int(str) for str in x])\nx = sys.stdin.readline()\nx = x.split(\' \')\nar.extend([int(str) for str in x])\nx = sys.stdin.readline()\nx = x.split(\' \')\nar.extend([int(str) for str in x])\n\nn = int(sys.stdin.readline())\nret = []\nfor i in range(n):\n b = int(sys.stdin.readline())\n if( b in ar):\n index = ar.index(b)\n ret.append(index)\n\nresult = "No"\nfor i in range(0,3):\n if( i*3+0 in ret and i*3+1 in ret and i*3+2 in ret ):\n result = "Yes"\n if( i+0*3 in ret and i+1*3 in ret and i+2*3 in ret ):\n result = "Yes"\nif( 0 in ret and 4 in ret and 8 in ret ):\n result = "Yes"\nif( 2 in ret and 4 in ret and 6 in ret ):\n result = "Yes"\n\nprint(result)\n\n\n\nsys.stdout.flush()\n'] | ['Runtime Error', 'Accepted'] | ['s821978690', 's664213442'] | [2940.0, 3064.0] | [17.0, 17.0] | [59, 745] |
p02760 | u422272120 | 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. | ['#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\ngrid = []\nfor _ in range(3):\n array = list(map(int, input().strip().split()))\n grid.append(array)\n\ndef judge():\n for i in range(3):\n if grid[i][0] == 0 and grid[i][1] == 0 and grid[i][2]:\n return True\n if grid[0][0] == 0 and grid[1][1] == 0 and grid[2][2] == 0:\n return True\n if grid[0][2] == 0 and grid[1][1] == 0 and grid[2][0] == 0:\n return True\n return False\n\nn = int(input())\nans = "No"\nfor _ in range(n):\n b = int(input())\n for i in range(3):\n if b in grid[i]:\n grid[i][grid[i].index(b)] = 0\n if judge():\n ans = "Yes"\n print (grid)\n\nprint (ans)', '#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\ngrid = []\nfor _ in range(3):\n array = list(map(int, input().strip().split()))\n grid.append(array)\n\ndef judge():\n for i in range(3):\n if grid[i][0] == 0 and grid[i][1] == 0 and grid[i][2] == 0:\n return True\n if grid[0][i] == 0 and grid[1][i] == 0 and grid[2][i] == 0:\n return True\n if grid[0][0] == 0 and grid[1][1] == 0 and grid[2][2] == 0:\n return True\n if grid[0][2] == 0 and grid[1][1] == 0 and grid[2][0] == 0:\n return True\n return False\n\nn = int(input())\nans = "No"\nfor _ in range(n):\n b = int(input())\n for i in range(3):\n if b in grid[i]:\n grid[i][grid[i].index(b)] = 0\n if judge():\n ans = "Yes"\n# print (grid)\n\nprint (ans)'] | ['Wrong Answer', 'Accepted'] | ['s764597303', 's442430425'] | [3064.0, 3064.0] | [17.0, 17.0] | [684, 782] |
p02760 | u425762225 | 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]*3\nfor i in range(3):\n a[i] = list(map(int,input().split()))\n \n \ndef isInList(b,a):\n for i in range(len(a)):\n for j in range(len(a[i])):\n if a[i][j] == b:\n return i,j\n \n return 0,0\n \nN = int(input())\nfor i in range(N):\n b = int(input())\n I,J = isInList(b,a)\n if I != 0:\n a[I][J] = -1\n \ndef judge(a):\n for i in range(3):\n if a[i][0] == -1 and a[i][1] == -1 and a[i][2] == -1:\n return True\n for i in range(3):\n if a[0][i] == -1 and a[1][i] == -1 and a[2][i] == -1:\n return True\n tmp = [a[i][i] for i in range(3)]\n if tmp == [-1,-1,-1]:\n return True\n tmp = [a[i][2-i] for i in range(3)]\n if tmp == [-1,-1,-1]:\n return True\n return False\n\n\nans = "Yes" if judge(a) else "No"\nprint(ans)\n ', 'a = [[0]*3]*3\nfor i in range(3):\n a[i] = list(map(int,input().split()))\n \ndef isInList(b,a):\n for i in range(len(a)):\n for j in range(len(a[i])):\n if a[i][j] == b:\n return i,j\n \n return -1,-1\n \nN = int(input())\nfor i in range(N):\n b = int(input())\n I,J = isInList(b,a)\n if I != -1:\n a[I][J] = -1\n \n\ndef judge(a):\n for i in range(3):\n if a[i][0] == -1 and a[i][1] == -1 and a[i][2] == -1:\n return True\n for i in range(3):\n if a[0][i] == -1 and a[1][i] == -1 and a[2][i] == -1:\n return True\n tmp = [a[i][i] for i in range(3)]\n if tmp == [-1,-1,-1]:\n return True\n tmp = [a[i][2-i] for i in range(3)]\n if tmp == [-1,-1,-1]:\n return True\n return False\n\n\nans = "Yes" if judge(a) else "No"\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s153601275', 's637258628'] | [3064.0, 3064.0] | [17.0, 19.0] | [760, 756] |
p02760 | u428891594 | 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. | ['#!/usr/bin/env python3\n\ndef main():\n N = map(int, open(0).read().split())\n\n\nmain()', '#!/usr/bin/env python3\n\ndef main():\n *N, = map(int, open(0).read().split())\n A = N[0:9]\n N_number = N[9]\n b = N[10:]\n\n Ab_comm = set(A) & set(b)\n A_rep = [0 if i in Ab_comm else i for i in A]\n\n Ax=[]\n Ay=[]\n for i in range(0,3):\n Ax.append(A_rep[3*i] + A_rep[3*i + 1] + A_rep[3*i + 2])\n Ay.append(A_rep[i] + A_rep[i + 3] + A_rep[i + 6])\n An=[]\n An.append(A_rep[0] + A_rep[4] + A_rep[8])\n An.append(A_rep[2] + A_rep[4] + A_rep[6])\n if min(Ax + Ay + An) == 0:\n print("Yes")\n else:\n print("No")\n \n\nmain()'] | ['Wrong Answer', 'Accepted'] | ['s807326176', 's460284859'] | [2940.0, 3064.0] | [17.0, 17.0] | [85, 578] |
p02760 | u430336181 | 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 = [int(input()) for _ in range(N)]\ncon1 = A1[0] and A1[1] and A1[2]\ncon2 = A2[0] and A2[1] and A2[2]\ncon3 = A3[0] and A3[1] and A3[2]\ncon4 = A1[0] and A2[0] and A3[0]\ncon5 = A1[1] and A2[1] and A3[1]\ncon6 = A1[2] and A2[2] and A3[2]\ncon7 = A1[0] and A2[1] and A3[2]\ncon8 = A1[2] and A2[1] and A3[0]\nif (con1 or con2 or con3 or con4 or con5 or con6 or con7 or con8) in B:\n print("Yes")\nelse:\n print("No")\n\n', 'A11, A12, A13 = map(int, input().split())\nA21, A22, A23 = map(int, input().split())\nA31, A32, A33 = map(int, input().split())\nN = int(input())\nB = {int(input()) for _ in range(N)}\n\nh1 = {A11, A12, A13}\nh2 = {A21, A22, A23}\nh3 = {A31, A32, A33}\nv1 = {A11, A21, A31}\nv2 = {A12, A22, A32}\nv3 = {A13, A23, A33}\nc1 = {A11, A22, A33}\nc2 = {A13, A22, A31}\n\nif len(h1 & B)==3 or len(h2 & B)==3 or len(h3 & B)==3 or len(v1 & B)==3 or len(v2 & B)==3 or len(v3 & B)==3 or (c1 & B)==3 or len(c2 & B)==3:\n print("Yes")\nelse:\n print("No")\n\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\ncon1 = A1[0] in B and A1[1] in B and A1[2] in B\ncon2 = A2[0]in B and A2[1]in B and A2[2]\ncon3 = A3[0]in B and A3[1]in B and A3[2]\ncon4 = A1[0]in B and A2[0]in B and A3[0]\ncon5 = A1[1]in B and A2[1]in B and A3[1]\ncon6 = A1[2]in B and A2[2]in B and A3[2]\ncon7 = A1[0]in B and A2[1]in B and A3[2]\ncon8 = A1[2]in B and A2[1]in B and A3[0]\n\n\nif (con1 or con2 or con3 or con4 or con5 or con6 or con7 or con8) in B:\n print("Yes")\nelse:\n print("No")\n', 'A11, A12, A13 = map(int, input().split())\nA21, A22, A23 = map(int, input().split())\nA31, A32, A33 = map(int, input().split())\nN = int(input())\nB = [int(input()) for _ in range(N)]\n\nh1 = [A11, A12, A13]\nh2 = [A21, A22, A23]\nh3 = [A31, A32, A33]\nv1 = [A11, A21, A31]\nv2 = [A12, A22, A32]\nv3 = [A13, A23, A33]\nc1 = [A11, A22, A33]\nc2 = [A13, A22, A31]\n\nprint(h3 >= B)\nprint(h3)\nprint(B)\n\n\nif h1 >= B or h2 >= B or h3 >= B or v1 >= B or v2 >= B or v3 >= B or c1 >= B or c2 >= B:\n print("Yes")\nelse:\n print("No")\n', 'A11, A12, A13 = map(int, input().split())\nA21, A22, A23 = map(int, input().split())\nA31, A32, A33 = map(int, input().split())\nN = int(input())\nB = {int(input()) for _ in range(N)}\n\nh1 = {A11, A12, A13}\nh2 = {A21, A22, A23}\nh3 = {A31, A32, A33}\nv1 = {A11, A21, A31}\nv2 = {A12, A22, A32}\nv3 = {A13, A23, A33}\nc1 = {A11, A22, A33}\nc2 = {A13, A22, A31}\n\nif len(h1 & B)==3 or len(h2 & B)==3 or len(h3 & B)==3 or len(v1 & B)==3 or len(v2 & B)==3 or len(v3 & B)==3 or len(c1 & B)==3 or len(c2 & B)==3:\n print("Yes")\nelse:\n print("No")\n\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s127348096', 's402904899', 's545932937', 's874233660', 's494383084'] | [3064.0, 9216.0, 3064.0, 9208.0, 9148.0] | [17.0, 30.0, 18.0, 27.0, 32.0] | [541, 532, 614, 514, 535] |
p02760 | u432853936 | 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,m = map(int,input().split())\nsc = [list(map(int,input().split())) for i in range(m)]\ntmp = [-1]*n\nfor j in range(m):\n if tmp[(sc[j][0]-1)] != sc[j][1]:\n if tmp[(sc[j][0]-1)] != -1:\n print(-1)\n exit()\n tmp[(sc[j][0]-1)] = sc[j][1]\nif tmp[0] == -1 and len(tmp) >= 2:\n print(-1)\n exit()\nelif tmp[0] == -1 and len(tmp) == 1:\n print(0)\n exit()\nelse:\n for k in range(n):\n if tmp[k] == -1:\n tmp[k] = 0\n print("{}".format(tmp[k]), end = "")\n', 'a = []\nfor i in range(3):\n a.append( list(map(int,input().split())))\nn = int(input())\nb = [int(input()) for j in range(n)]\nfor k in range(3):\n for l in range(3):\n for m in range(n):\n if a[k][l] == b[m]:\n a[k][l] = -1\nif a[0][0] == a[0][1] == a[0][2] == -1 or a[1][0] == a[1][1] == a[1][2] == -1 or a[2][0] == a[2][1] == a[2][2] == -1 or a[0][0] == a[1][0] == a[2][0] == -1 or a[0][1] == a[1][1] == a[2][1] == -1 or a[0][2] == a[1][2] == a[2][2] == -1 or a[0][0] == a[1][1] == a[2][2] == -1 or a[0][2] == a[1][1] == a[2][0] == -1 :\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s717621069', 's603691230'] | [3064.0, 3064.0] | [17.0, 18.0] | [620, 681] |
p02760 | u434296044 | 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\nsheet=[input().split() for l in range(3)]\nn=int(input())\nb=[input() for i in range(n)]\na=np.array(sheet)\ni,j,k,c,z=0,0,0,0,0\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]="x"\n\n\nif a[0][0]==a[1][1]==a[2][2]=="x":\n c+=1\n\nif a[0][2]==a[1][1]==a[2][0]=="x":\n c+=1\n\nfor z in range(3):\n if a[0][z]==a[1][z]==a[2][z]=="x":\n c+=1\nprint(a)\nif c!=0:\n print("Yes")\nelse:\n print("No")\n', 'import numpy as np\n\nsheet=[input().split() for l in range(3)]\nn=int(input())\nb=[input() for i in range(n)]\na=np.array(sheet)\nc=0\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]="x"\n\n\nif a[0][0]==a[1][1]==a[2][2]="x":\n c+=1\n\nif a[0][2]==a[1][1]==a[2][0]="x":\n c+=1\n\nfor z in range(3):\n if a[0][z]==a[1][z]==a[2][z]="x":\n c+=1\n\nif c!=0:\n print("Yes")\nelse:\n print("No")\n', 'import numpy as np\n\nsheet=[input().split() for l in range(3)]\nn=int(input())\nb=[input() for i in range(n)]\na=np.array(sheet)\ni,j,k,c,z=0,0,0,0,0\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]="x"\n\n\nif a[0][0]==a[1][1]==a[2][2]=="x":\n c+=1\n\nif a[0][2]==a[1][1]==a[2][0]=="x":\n c+=1\n\nfor z in range(3):\n if a[0][z]==a[1][z]==a[2][z]=="x":\n c+=1\n if a[z]][0]==a[z][1]==a[z][1s]=="x":\n c+=1\nif c!=0:\n print("Yes")\nelse:\n print("No")\n', 'import numpy as np\n\nsheet=[input().split() for l in range(3)]\nn=int(input())\nb=[input() for i in range(n)]\na=np.array(sheet)\ni,j,k,c,z=0,0,0,0,0\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]="x"\n\n\nif a[0][0]==a[1][1]==a[2][2]=="x":\n c+=1\n\nif a[0][2]==a[1][1]==a[2][0]=="x":\n c+=1\n\nfor z in range(3):\n if a[0][z]==a[1][z]==a[2][z]=="x":\n c+=1\n if a[z][0]==a[z][1]==a[z][2]=="x":\n c+=1\nif c!=0:\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s008310950', 's031735696', 's654384921', 's778383830'] | [12432.0, 2940.0, 3064.0, 12500.0] | [153.0, 17.0, 17.0, 155.0] | [493, 466, 538, 536] |
p02760 | u439619952 | 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 solve():\n card = []\n num_pos = {}\n for i in range(3):\n row = [int(num) for num in input().split()]\n card.append(row)\n for j,num in enumerate(row):\n num_pos[num] = (i,j)\n\n N = int(input())\n for i in range(N):\n target = int(input())\n # print(int(input()))\n if target in num_pos:\n pos_i, pos_j = num_pos[target]\n card[pos_i][pos_j] = 0\n\n ans = False\n for row in card:\n if not any(row):\n ans = True\n for column in range(3):\n column_flag = True\n for i in range(3):\n if card[i][column]:\n column_flag = False\n if column_flag:\n ans = True\n for i in range(3):\n diagonal_flag = True\n if card[i][i]:\n diagonal_flag = False\n if diagonal_flag:\n ans = True\n for i in range(3):\n diagonal_flag = True\n if card[2-i][i]:\n diagonal_flag = False\n if diagonal_flag:\n ans = True\n if ans:\n print("Yes")\n else:\n print("No")\n\n print(card)\n\nif __name__ == "__main__":\n solve()', 'def solve():\n card = []\n num_pos = {}\n for i in range(3):\n row = [int(num) for num in input().split()]\n card.append(row)\n for j,num in enumerate(row):\n num_pos[num] = (i,j)\n\n N = int(input())\n for i in range(N):\n target = int(input())\n # print(int(input()))\n if target in num_pos:\n pos_i, pos_j = num_pos[target]\n card[pos_i][pos_j] = 0\n\n ans = False\n for row in card:\n if not any(row):\n ans = True\n for column in range(3):\n column_flag = True\n for i in range(3):\n if card[i][column]:\n column_flag = False\n if column_flag:\n ans = True\n diagonal_flag = True\n for i in range(3):\n if card[i][i]:\n diagonal_flag = False\n if diagonal_flag:\n ans = True\n diagonal_flag = True\n for i in range(3):\n if card[2-i][i]:\n diagonal_flag = False\n if diagonal_flag:\n ans = True\n if ans:\n print("Yes")\n else:\n print("No")\n # for row in card:\n # print(row)\n\nif __name__ == "__main__":\n solve()'] | ['Wrong Answer', 'Accepted'] | ['s420834294', 's858130324'] | [9144.0, 9220.0] | [29.0, 30.0] | [1147, 1150] |
p02760 | u440161695 | 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 sys import stdin,exit\nimport numpy as np\nA = [stdin.readline().rstrip().split() for _ in range(3)]\nsum(A,[])\nn = int(stdin.readline().rstrip())\nB= [stdin.readline().rstrip().split() for _ in range(n)]\nif len(B)<=2:\n print("No")\n sys.exit()\nfor i in range(len(B)):\n try:\n A[A.index(B[i])]=0\n except:\n continue\nif A[1]+A[2]+A[3]==0 or A[1]+A[4]+A[7]==0 or A[3]+A[5]+A[7]==0 or A[4]+A[5]+A[6]==0 or A[2]+A[5]+A[8]==0 or A[1]+A[5]+A[9]==0 or A[7]+A[8]+A[9]==0 or A[3]+A[6]+A[9]==0:\n print("Yes")\nelse:\n print("No")', 'from sys import stdin,exit\nimport numpy as np\nA = [stdin.readline().rstrip().split() for _ in range(3)]\nA=sum(A,[])\nn = int(stdin.readline().rstrip())\nB= [stdin.readline().rstrip().split() for _ in range(n)]\nB=sum(B,[])\nif len(B)<=2:\n print("No")\n sys.exit()\nfor i in range(len(B)):\n try:\n A[A.index(B[i])]=0\n except:\n continue \nif A[1]+A[2]+A[0]==0 or A[0]+A[3]+A[6]==0 or A[2]+A[4]+A[6]==0 or A[3]+A[4]+A[5]==0 or A[1]+A[4]+A[7]==0 or A[0]+A[4]+A[8]==0 or A[6]+A[7]+A[8]==0 or A[2]+A[5]+A[8]==0:\n print("Yes")\nelse:\n print("No")', 'from sys import stdin,exit\nimport numpy as np\nA = [stdin.readline().rstrip().split() for _ in range(3)]\nA=sum(A,[])\nn = int(stdin.readline().rstrip())\nB= [stdin.readline().rstrip().split() for _ in range(n)]\nB=sum(B,[])\nif len(B)<=2:\n print("No")\n sys.exit()\nfor i in range(len(B)):\n try:\n A[A.index(B[i])]=0\n except:\n continue\nA=[int(i) for i in A]\nif A[1]+A[2]+A[0]==0 or A[0]+A[3]+A[6]==0 or A[2]+A[4]+A[6]==0 or A[3]+A[4]+A[5]==0 or A[1]+A[4]+A[7]==0 or A[0]+A[4]+A[8]==0 or A[6]+A[7]+A[8]==0 or A[2]+A[5]+A[8]==0:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s262249529', 's910883787', 's012758227'] | [12452.0, 12452.0, 12432.0] | [150.0, 152.0, 159.0] | [548, 566, 584] |
p02760 | u441320782 | 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. | ['x=[list(map(str,input().split())) for _ in range(3)]\nN=int(input())\nB=[input() for _ in range(N)]\nflag=0\nfor i in range(3):\n for j in range(3):\n if x[i][j] in B:\n x[i][j]=True\n\nfor p in range(3):\n if x[p].count(True)==3:\n flag=1\nlis=[]\nlis2=[]\nfor a in range(3):\n for b in range(3):\n lis2.append(x[b][a])\n else:\n lis.append(lis2)\n lis2=[]\n\nfor q in range(3):\n if lis[q].count(True)==3:\n flag=1\nif flag==1:\n print("Yes")\nelse:\n print("No")', 'x=[list(map(str,input().split())) for _ in range(3)]\nN=int(input())\nB=[input() for _ in range(N)]\nflag=0\nfor i in range(3):\n for j in range(3):\n if x[i][j] in B:\n x[i][j]=True\n\nfor p in range(3):\n if x[p].count(True)==3:\n flag=1\nlis=[]\nlis2=[]\nfor a in range(3):\n for b in range(3):\n lis2.append(x[b][a])\n else:\n lis.append(lis2)\n lis2=[]\n\nfor q in range(3):\n if lis[q].count(True)==3:\n flag=1\nif x[0][0]==True and x[1][1]==True and x[2][2]==True:\n flag=1\nelif if x[0][2]==True and x[1][1]==True and x[2][0]==True:\nif flag==1:\n print("Yes")\nelse:\n print("No")', 'x=[list(map(str,input().split())) for _ in range(3)]\nN=int(input())\nB=[input() for _ in range(N)]\nflag=0\nfor i in range(3):\n for j in range(3):\n if x[i][j] in B:\n x[i][j]=True\n\nfor p in range(3):\n if x[p].count(True)==3:\n flag=1\nlis=[]\nlis2=[]\nfor a in range(3):\n for b in range(3):\n lis2.append(x[b][a])\n else:\n lis.append(lis2)\n lis2=[]\n\nfor q in range(3):\n if lis[q].count(True)==3:\n flag=1\nif x[0][0]==True and x[1][1]==True and x[2][2]==True:\n flag=1\nelif x[0][2]==True and x[1][1]==True and x[2][0]==True:\n flag=1\nif flag==1:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s485003859', 's603510058', 's315923419'] | [3064.0, 3064.0, 3064.0] | [17.0, 18.0, 18.0] | [468, 590, 597] |
p02760 | u442877951 | 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(str,input().split())) for i in range(3)]\nN = int(input())\nb = list(map(int,input().split()))\nimport numpy as np\nA = np.array(A)\nl = []\nfor i in range(N):\n if str(b[i]) in A:\n l.append(tuple(nd[0] for nd in np.where(A == str(b[i]))))\nif (0, 0) in l and (1, 0) in l and (2, 0) in l:\n print("Yes")\nelif (0, 0) in l and (1, 1) in l and (2, 2) in l:\n print("Yes")\nelif (0, 1) in l and (1, 1) in l and (2, 1) in l:\n print("Yes")\nelif (0, 2) in l and (1, 1) in l and (2, 0) in l:\n print("Yes")\nelif (0, 2) in l and (1, 2) in l and (2, 2) in l:\n print("Yes")\nelif (0, 0) in l and (0, 1) in l and (0, 2) in l:\n print("Yes")\nelif (1, 0) in l and (1, 1) in l and (1, 2) in l:\n print("Yes")\nelif (2, 0) in l and (2, 1) in l and (2, 2) in l:\n print("Yes")\nelse:\n print("No")', 'A = [list(map(int,input().split())) for _ in range(N)]\nN = int(input())\nb = list(map(int,input().split()))\n \nimport numpy as np\nA = np.array(A)\nl = []\nfor i in range(N):\n if b[i] in A:\n l.append(tuple(nd[0] for nd in np.where(A == b[i])))\nif (0, 0) in l and (1, 0) in l and (2, 0) in l:\n print("Yes")\nelif (0, 0) in l and (1, 1) in l and (2, 2) in l:\n print("Yes")\nelif (0, 1) in l and (1, 1) in l and (2, 1) in l:\n print("Yes")\nelif (0, 2) in l and (1, 1) in l and (2, 0) in l:\n print("Yes")\nelif (0, 2) in l and (1, 2) in l and (2, 2) in l:\n print("Yes")\nelif (0, 0) in l and (0, 1) in l and (0, 2) in l:\n print("Yes")\nelif (1, 0) in l and (1, 1) in l and (1, 2) in l:\n print("Yes")\nelif (2, 0) in l and (2, 1) in l and (2, 2) in l:\n print("Yes")\nelse:\n print("No")', 'A = [input().split() for i in range(3)]\nN = int(input())\nb = list(map(int,input().split()))\nA = [[int(v) for v in l] for l in A]\nimport numpy as np\nA = np.array(A)\nl = []\nfor i in range(N):\n if b[i] in A:\n l.append(tuple(nd[0] for nd in np.where(A == b[i])))\nif (0, 0) in l and (1, 0) in l and (2, 0) in l:\n print("Yes")\nelif (0, 0) in l and (1, 1) in l and (2, 2) in l:\n print("Yes")\nelif (0, 1) in l and (1, 1) in l and (2, 1) in l:\n print("Yes")\nelif (0, 2) in l and (1, 1) in l and (2, 0) in l:\n print("Yes")\nelif (0, 2) in l and (1, 2) in l and (2, 2) in l:\n print("Yes")\nelif (0, 0) in l and (0, 1) in l and (0, 2) in l:\n print("Yes")\nelif (1, 0) in l and (1, 1) in l and (1, 2) in l:\n print("Yes")\nelif (2, 0) in l and (2, 1) in l and (2, 2) in l:\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())))\nimport numpy as np\nA = np.array(A)\nl = []\nfor i in range(N):\n if b[i] in A:\n l.append(tuple(nd[0] for nd in np.where(A == b[i])))\nif (0, 0) in l and (1, 0) in l and (2, 0) in l:\n print("Yes")\nelif (0, 0) in l and (1, 1) in l and (2, 2) in l:\n print("Yes")\nelif (0, 1) in l and (1, 1) in l and (2, 1) in l:\n print("Yes")\nelif (0, 2) in l and (1, 1) in l and (2, 0) in l:\n print("Yes")\nelif (0, 2) in l and (1, 2) in l and (2, 2) in l:\n print("Yes")\nelif (0, 0) in l and (0, 1) in l and (0, 2) in l:\n print("Yes")\nelif (1, 0) in l and (1, 1) in l and (1, 2) in l:\n print("Yes")\nelif (2, 0) in l and (2, 1) in l and (2, 2) in l:\n print("Yes")\nelse:\n print("No")', 'A = [list(map(int,input().split())) for _ in range(3)]\nN = int(input())\nb = list(map(int,input().split()))\n \nimport numpy as np\nA = np.array(A)\nl = []\nfor i in range(N):\n if b[i] in A:\n l.append(tuple(nd[0] for nd in np.where(A == b[i])))\nif (0, 0) in l and (1, 0) in l and (2, 0) in l:\n print("Yes")\nelif (0, 0) in l and (1, 1) in l and (2, 2) in l:\n print("Yes")\nelif (0, 1) in l and (1, 1) in l and (2, 1) in l:\n print("Yes")\nelif (0, 2) in l and (1, 1) in l and (2, 0) in l:\n print("Yes")\nelif (0, 2) in l and (1, 2) in l and (2, 2) in l:\n print("Yes")\nelif (0, 0) in l and (0, 1) in l and (0, 2) in l:\n print("Yes")\nelif (1, 0) in l and (1, 1) in l and (1, 2) in l:\n print("Yes")\nelif (2, 0) in l and (2, 1) in l and (2, 2) in l:\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())))\nimport numpy as np\nA = np.array(A)\nl = []\nfor i in range(N):\n if b[i] in A:\n l.append(tuple(nd[0] for nd in np.where(A == b[i])))\nif (0, 0) in l and (1, 0) in l and (2, 0) in l:\n print("Yes")\nelif (0, 0) in l and (1, 1) in l and (2, 2) in l:\n print("Yes")\nelif (0, 1) in l and (1, 1) in l and (2, 1) in l:\n print("Yes")\nelif (0, 2) in l and (1, 1) in l and (2, 0) in l:\n print("Yes")\nelif (0, 2) in l and (1, 2) in l and (2, 2) in l:\n print("Yes")\nelif (0, 0) in l and (0, 1) in l and (0, 2) in l:\n print("Yes")\nelif (1, 0) in l and (1, 1) in l and (1, 2) in l:\n print("Yes")\nelif (2, 0) in l and (2, 1) in l and (2, 2) in l:\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()))\nimport numpy as np\nA = np.array(A)\nl = []\nfor i in range(N):\n if b[i] in A:\n l.append(tuple(nd[0] for nd in np.where(A == b[i])))\nif (0, 0) in l and (1, 0) in l and (2, 0) in l:\n print("Yes")\nelif (0, 0) in l and (1, 1) in l and (2, 2) in l:\n print("Yes")\nelif (0, 1) in l and (1, 1) in l and (2, 1) in l:\n print("Yes")\nelif (0, 2) in l and (1, 1) in l and (2, 0) in l:\n print("Yes")\nelif (0, 2) in l and (1, 2) in l and (2, 2) in l:\n print("Yes")\nelif (0, 0) in l and (0, 1) in l and (0, 2) in l:\n print("Yes")\nelif (1, 0) in l and (1, 1) in l and (1, 2) in l:\n print("Yes")\nelif (2, 0) in l and (2, 1) in l and (2, 2) in l:\n print("Yes")\nelse:\n print("No")', 'A = [list(map(int,input().split())) for _ in range(3)]\nN = int(input())\nb = [int(input()) for i in range(N)]\n \nimport numpy as np\nA = np.array(A)\nl = []\nfor i in range(N):\n if b[i] in A:\n l.append(tuple(nd[0] for nd in np.where(A == b[i])))\nif (0, 0) in l and (1, 0) in l and (2, 0) in l:\n print("Yes")\nelif (0, 0) in l and (1, 1) in l and (2, 2) in l:\n print("Yes")\nelif (0, 1) in l and (1, 1) in l and (2, 1) in l:\n print("Yes")\nelif (0, 2) in l and (1, 1) in l and (2, 0) in l:\n print("Yes")\nelif (0, 2) in l and (1, 2) in l and (2, 2) in l:\n print("Yes")\nelif (0, 0) in l and (0, 1) in l and (0, 2) in l:\n print("Yes")\nelif (1, 0) in l and (1, 1) in l and (1, 2) in l:\n print("Yes")\nelif (2, 0) in l and (2, 1) in l and (2, 2) in l:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s344849594', 's377552914', 's563657017', 's585958969', 's742427138', 's784417946', 's798725710', 's948997838'] | [19912.0, 3064.0, 12184.0, 3064.0, 12052.0, 3192.0, 12052.0, 12236.0] | [292.0, 18.0, 152.0, 18.0, 151.0, 18.0, 149.0, 155.0] | [788, 783, 800, 774, 783, 771, 778, 785] |
p02760 | u444722572 | 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\ndef solve():\n input=sys.stdin.readline\n mod=10*9+7\n a=[list(map(int,input().rstrip("\\n").split())) for _ in range(3)]\n n= int(input().rstrip("\\n"))\n for _ in range(n):\n b= int(input().rstrip("\\n"))\n for i in range(3):\n for j in range(3):\n if a[i][j]==b:\n a[i][j]=-1\n \n for i in range(3):\n if a[i][0]==a[i][1]==a[i][2]==-1:\n print("Yes")\n elif a[0][i]==a[1][i]==a[2][i]==-1:\n print("Yes")\n if a[0][0]==a[1][1]==a[2][2]==-1:\n print("Yes")\n exit()\n elif a[0][2]==a[1][1]==a[2][0]==-1:\n print("Yes")\n exit()\n print("No")', 'A=[list(map(int,input().split())) for _ in range(3)]\nN=int(input())\nB=[int(input()) for _ in range(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\nis_bingo=False\n\nfor i in range(3):\n if A[i][0]==A[i][1]==A[i][2]==-1:\n is_bingo=True\n break\n\nfor i in range(3):\n if A[0][i]==A[1][i]==A[2][i]==-1:\n is_bingo=True\n break\n\nif A[0][0]==A[1][1]==A[2][2]==-1 or A[2][0]==A[1][1]==A[0][2]==-1:\n is_bingo=True\n\nprint("Yes" if is_bingo==True else "No")'] | ['Wrong Answer', 'Accepted'] | ['s899848771', 's548761362'] | [3064.0, 3064.0] | [17.0, 17.0] | [681, 542] |
p02760 | u445624660 | 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. | ['41 7 46\n26 89 2\n78 92 8\n5\n6\n45\n16\n57\n17\n', 'bingo = []\nfor i in range(3):\n bingo.append(list(map(int, input().split())))\n\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 bingo[i][j] == b:\n bingo[i][j] = "o"\n\nfor i in range(3):\n flag = 0\n for j in range(3):\n if bingo[i][j] == "o":\n flag += 1\n if flag == 3:\n print("Yes")\n exit()\n flag = 0\n for j in range(3):\n if bingo[j][i] == "o":\n flag += 1\n if flag == 3:\n print("Yes")\n exit()\n\nif (\n bingo[0][0] == bingo[1][1] == bingo[2][2] == "o"\n or bingo[0][2] == bingo[1][1] == bingo[2][0] == "o"\n):\n print("Yes")\n exit()\nprint("No")\n'] | ['Runtime Error', 'Accepted'] | ['s751345310', 's599581022'] | [2940.0, 3064.0] | [18.0, 17.0] | [40, 727] |
p02760 | u446371873 | 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)]\nfor number in b:\n if b in a:\n a[a.index(b)] = 0\nif a[0][0] == a[1][1] == a[2][2] == 0:\n print('Yes')\nelse:\n for i in range(3):\n if a[i][0] == a[i][1] == a[i][2] == 0:\n print('Yes')\n break\n elif a[0][i] == a[1][i] == a[2][i] == 0:\n print('Yes')\n break\n else:\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 number in b:\n for i in range(3):\n if number in a[i]:\n a[i][a[i].index(number)] = 0\nif a[0][0] == a[1][1] == a[2][2] == 0\u3000or a[2][0] == a[1][1] == a[0][2]:\n print('Yes')\nelse:\n for i in range(3):\n if a[i][0] == a[i][1] == a[i][2] == 0:\n print('Yes')\n break\n elif a[0][i] == a[1][i] == a[2][i] == 0:\n print('Yes')\n break\n else:\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 number in b:\n for i in range(3):\n if number in a[i]:\n a[i][a[i].index(number)] = 0\nif a[0][0] == a[1][1] == a[2][2] == 0\u3000and a[2][0] == a[1][1] == a[0][2]:\n print('Yes')\nelse:\n for i in range(3):\n if a[i][0] == a[i][1] == a[i][2] == 0:\n print('Yes')\n break\n elif a[0][i] == a[1][i] == a[2][i] == 0:\n print('Yes')\n break\n else:\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 number in b:\n if b in a:\n a[a.index(b)] = 0\nif a[0][0] == a[1][1] == a[2][2]:\n print('Yes')\nelse:\n for i in range(3):\n if a[i][0] == a[i][1] == a[i][2]:\n print('Yes')\n break\n elif a[0][i] == a[1][i] == a[2][i]:\n print('Yes')\n break\n else:\n print('No')", "for number in b:\n for i in range(3):\n if number in a[i]:\n a[i][a[i].index(number)] = 0\nif a[0][0] == a[1][1] == a[2][2] == 0:\n print('Yes')\nelse:\n for i in range(3):\n if a[i][0] == a[i][1] == a[i][2] == 0:\n print('Yes')\n break\n elif a[0][i] == a[1][i] == a[2][i] == 0:\n print('Yes')\n break\n else:\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 number in b:\n for i in range(3):\n if number in a[i]:\n a[i][a[i].index(number)] = 0\nif a[0][0] == a[1][1] == a[2][2] == 0 or a[2][0] == a[1][1] == a[0][2] == 0:\n print('Yes')\nelse:\n for i in range(3):\n if a[i][0] == a[i][1] == a[i][2] == 0:\n print('Yes')\n break\n elif a[0][i] == a[1][i] == a[2][i] == 0:\n print('Yes')\n break\n else:\n print('No')"] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s461735068', 's685121254', 's845111343', 's890015550', 's919132562', 's049608348'] | [3064.0, 2940.0, 3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 18.0] | [463, 548, 549, 448, 404, 551] |
p02760 | u451076250 | 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\ncard = []\nfor i in range(3):\n card.append([int(x) for x in input().split()])\n\nN = int(input())\nnumbers = set()\nfor i in range(N):\n numbers.add(int(input()))\n\n\ndef checker(s):\n if len(s) == 1 and 'x' in s:\n print('YES')\n sys.exit()\n\n\nfor i in range(3):\n for j in range(3):\n if card[i][j] in numbers:\n card[i][j] = 'x'\n\n# checks to see if the rows\nfor row in card:\n s = set()\n for col in row:\n s.add(col)\n checker(s)\n\n# checks to see if the columns\nfor i in range(3):\n for j in range(3):\n s = set()\n s.add(card[j][i])\n checker(s)\n# diagonals\ns = set()\nfor i in range(3):\n s.add(card[i][i])\nchecker(s)\n\nfor i in range(2, -1, -1):\n s.add(card[i][i])\nchecker(s)\n\nprint('NO')\n", "import sys\n\ncard = []\nfor i in range(3):\n card.append([int(x) for x in input().split()])\n\nN = int(input())\nnumbers = set()\nfor i in range(N):\n numbers.add(int(input()))\n\n\ndef checker(aa):\n if len(aa) == 1 and 'x' in aa:\n print('Yes')\n sys.exit()\n\n\nfor i in range(3):\n for j in range(3):\n if card[i][j] in numbers:\n card[i][j] = 'x'\n\n# checks to see if the rows\nfor row in card:\n s = set()\n for col in row:\n s.add(col)\n checker(s)\n\n# checks to see if the columns\nfor i in range(3):\n s = set()\n for j in range(3):\n s.add(card[j][i])\n checker(s)\n# diagonals\ns = set()\nfor i in range(3):\n s.add(card[i][i])\nchecker(s)\n\na = set()\na.add(card[0][2])\na.add(card[1][1])\na.add(card[2][0])\nchecker(a)\n\n\nprint('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s595924233', 's251007136'] | [3064.0, 3188.0] | [17.0, 18.0] | [772, 783] |
p02760 | u452367775 | 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())\nnumbers = list()\nfor i in range(N):\n numbers.append(int(input()))\n\nbingo = False\nfor a in A:\n if a not in numbers:\n break\nelse:\n bingo = True\n\nfor b in B:\n if b not in numbers:\n break\nelse:\n bingo = True\n\nfor c in C:\n if c not in numbers:\n break\nelse:\n bingo = True\n\ncolumnA = [A[0],B[0],C[0]]\nfor i in columnA:\n if i not in numbers:\n break\nelse:\n bingo = True\n\ncolumnB = [A[1],B[1],C[1]]\nfor i in columnB:\n if i not in numbers:\n break\nelse:\n bingo = True\n\ncolumnC = [A[2],B[2],C[2]]\nfor i in columnB:\n if i not in numbers:\n break\nelse:\n bingo = True\n\ndiagA = [A[0],B[1],C[2]]\nfor i in diagA:\n if i not in numbers:\n break\nelse:\n bingo = True\n\ndiagB = [A[3],B[2],C[1]]\nfor i in diagB:\n if i not in numbers:\n break\nelse:\n bingo = True\n\nprint("Yes" if bingo else "No")', 'A = list(map(int,input().split()))\nB = list(map(int,input().split()))\nC = list(map(int,input().split()))\nN = int(input())\nnumbers = list()\nfor i in range(N):\n numbers.append(int(input()))\n\nbingo = False\nfor a in A:\n if a not in numbers:\n break\nelse:\n bingo = True\n\nfor b in B:\n if b not in numbers:\n break\nelse:\n bingo = True\n\nfor c in C:\n if c not in numbers:\n break\nelse:\n bingo = True\n\ncolumnA = [A[0],B[0],C[0]]\nfor i in columnA:\n if i not in numbers:\n break\nelse:\n bingo = True\n\ncolumnB = [A[1],B[1],C[1]]\nfor i in columnB:\n if i not in numbers:\n break\nelse:\n bingo = True\n\ncolumnC = [A[2],B[2],C[2]]\nfor i in columnC:\n if i not in numbers:\n break\nelse:\n bingo = True\n\ndiagA = [A[0],B[1],C[2]]\nfor i in diagA:\n if i not in numbers:\n break\nelse:\n bingo = True\n\ndiagB = [A[2],B[1],C[0]]\nfor i in diagB:\n if i not in numbers:\n break\nelse:\n bingo = True\n\nprint("Yes" if bingo else "No")'] | ['Runtime Error', 'Accepted'] | ['s120189978', 's055057827'] | [3064.0, 3064.0] | [17.0, 17.0] | [994, 994] |
p02760 | u455408345 | 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(" ")\nlista=[]\nlistmp=[]\nfor k in range(3):\n listmp+=[int(a1[i])]\nlista+=[listmp]\nlistmp=[]\nfor k in range(3):\n listmp+=[int(a2[i])]\nlista+=[listmp]\nlistmp=[]\nfor k in range(3):\n listmp+=[int(a3[i])]\nlista+=[listmp]\nn=int(input(""))\nlistn=[]\nfor i in range(n):\n t=int(input(""))\n listn+=[t]\nfor i in range(3):\n for k in range(3):\n if(lista[i][k] in listn):\n lista[i][k]=0\np=0\nfor i in range(3):\n s=0\n for k in range(3):\n s+=lista[i][k]\n\n if(s==0):\n p=1\nfor i in range(3):\n s=0\n for k in range(3):\n s+=lista[k][i]\n\n if(s==0):\n p=1\ns=0\nfor i in range(3):\n s+=lista[i][i]\nif(s==0):\n p=1\ns=0\nfor i in range(3):\n s+=lista[i][2-i]\nif(s==0):\n p=1\nif(p==1):\n print("Yes")\nelse:\n print("No")\n \n \n\n ', 'a1=input("").split(" ")\na2=input("").split(" ")\na3=input("").split(" ")\nlista=[]\nlistmp=[]\nfor k in range(3):\n listmp+=[int(a1[k])]\nlista+=[listmp]\nlistmp=[]\nfor k in range(3):\n listmp+=[int(a2[k])]\nlista+=[listmp]\nlistmp=[]\nfor k in range(3):\n listmp+=[int(a3[k])]\nlista+=[listmp]\nn=int(input(""))\nlistn=[]\nfor i in range(n):\n t=int(input(""))\n listn+=[t]\nfor i in range(3):\n for k in range(3):\n if(lista[i][k] in listn):\n lista[i][k]=0\np=0\nfor i in range(3):\n s=0\n for k in range(3):\n s+=lista[i][k]\n\n if(s==0):\n p=1\nfor i in range(3):\n s=0\n for k in range(3):\n s+=lista[k][i]\n\n if(s==0):\n p=1\ns=0\nfor i in range(3):\n s+=lista[i][i]\nif(s==0):\n p=1\ns=0\nfor i in range(3):\n s+=lista[i][2-i]\nif(s==0):\n p=1\nif(p==1):\n print("Yes")\nelse:\n print("No")\n \n \n\n \n'] | ['Runtime Error', 'Accepted'] | ['s925524456', 's302774912'] | [9096.0, 9256.0] | [26.0, 29.0] | [880, 873] |
p02760 | u455642216 | 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()))\nx=A+B+C\nn=int(input())\nfor i in range (n):\n y=int(input())\n if j==y:\n x='x'\n else:\n x=j\nif X[0]==X[3]==X[6]=='X':\n print('Yes')\nelif X[1]==X[4]==X[7]=='X':\n print('Yes')\nelif X[2]==X[5]==X[8]=='X':\n print('Yes')\nelif X[0]==X[1]==X[2]=='X':\n print('Yes')\nelif X[3]==X[4]==X[5]=='X':\n print('Yes')\nelif X[6]==X[7]==X[8]=='X':\n print('Yes')\nelif X[0]==X[4]==X[8]=='X':\n print('Yes')\nelif X[2]==X[4]==X[6]=='X':\n print('Yes')\nelse:\n print('No')", "A=list(map(int,input().split()))\nB=list(map(int,input().split()))\nC=list(map(int,input().split()))\nx=A+B+C\nn=int(input())\nfor i in range (n):\n y=int(input())\n if j==y:\n x='X'\n else:\n x=[j for j in x]\nif X[0]==X[3]==X[6]=='X':\n print('Yes')\nelif X[1]==X[4]==X[7]=='X':\n print('Yes')\nelif X[2]==X[5]==X[8]=='X':\n print('Yes')\nelif X[0]==X[1]==X[2]=='X':\n print('Yes')\nelif X[3]==X[4]==X[5]=='X':\n print('Yes')\nelif X[6]==X[7]==X[8]=='X':\n print('Yes')\nelif X[0]==X[4]==X[8]=='X':\n print('Yes')\nelif X[2]==X[4]==X[6]=='X':\n print('Yes')\nelse:\n print('No')", "A=list(map(int,input().split()))\nB=list(map(int,input().split()))\nC=list(map(int,input().split()))\nx=A+B+C\nn=int(input())\nfor i in range (n):\n y=int(input())\n x=['X' if j==y else j for j in x]\nif X[0]==X[3]==X[6]=='X':\n print('Yes')\nelif X[1]==X[4]==X[7]=='X':\n print('Yes')\nelif X[2]==X[5]==X[8]=='X':\n print('Yes')\nelif X[0]==X[1]==X[2]=='X':\n print('Yes')\nelif X[3]==X[4]==X[5]=='X':\n print('Yes')\nelif X[6]==X[7]==X[8]=='X':\n print('Yes')\nelif X[0]==X[4]==X[8]=='X':\n print('Yes')\nelif X[2]==X[4]==X[6]=='X':\n print('Yes')\nelse:\n print('No')", "A=list(map(int,input().split()))\nB=list(map(int,input().split()))\nC=list(map(int,input().split()))\nx=A+B+C\nn=int(input())\nfor i in range (n):\n y=int(input())\n if j==y:\n x='x'\n else:\n x=[j for j in x]\nif X[0]==X[3]==X[6]=='X':\n print('Yes')\nelif X[1]==X[4]==X[7]=='X':\n print('Yes')\nelif X[2]==X[5]==X[8]=='X':\n print('Yes')\nelif X[0]==X[1]==X[2]=='X':\n print('Yes')\nelif X[3]==X[4]==X[5]=='X':\n print('Yes')\nelif X[6]==X[7]==X[8]=='X':\n print('Yes')\nelif X[0]==X[4]==X[8]=='X':\n print('Yes')\nelif X[2]==X[4]==X[6]=='X':\n print('Yes')\nelse:\n print('No')", "A=list(map(int,input().split()))\nB=list(map(int,input().split()))\nC=list(map(int,input().split()))\nX=A+B+C\nn=int(input())\nfor i in range (n):\n y=int(input())\n X=['X' if j==y else j for j in x]\nif X[0]==X[3]==X[6]=='X':\n print('Yes')\nelif X[1]==X[4]==X[7]=='X':\n print('Yes')\nelif X[2]==X[5]==X[8]=='X':\n print('Yes')\nelif X[0]==X[1]==X[2]=='X':\n print('Yes')\nelif X[3]==X[4]==X[5]=='X':\n print('Yes')\nelif X[6]==X[7]==X[8]=='X':\n print('Yes')\nelif X[0]==X[4]==X[8]=='X':\n print('Yes')\nelif X[2]==X[4]==X[6]=='X':\n print('Yes')\nelse:\n print('No')", "A=list(map(int,input().split()))\nB=list(map(int,input().split()))\nC=list(map(int,input().split()))\nX=A+B+C\nn=int(input())\nfor i in range (n):\n y=int(input())\n X=['X' if j==y else j for j in X]\nif X[0]==X[3]==X[6]=='X':\n print('Yes')\nelif X[1]==X[4]==X[7]=='X':\n print('Yes')\nelif X[2]==X[5]==X[8]=='X':\n print('Yes')\nelif X[0]==X[1]==X[2]=='X':\n print('Yes')\nelif X[3]==X[4]==X[5]=='X':\n print('Yes')\nelif X[6]==X[7]==X[8]=='X':\n print('Yes')\nelif X[0]==X[4]==X[8]=='X':\n print('Yes')\nelif X[2]==X[4]==X[6]=='X':\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s135146246', 's251295154', 's362602157', 's573563981', 's870080003', 's616652378'] | [9260.0, 9228.0, 9256.0, 9184.0, 9216.0, 9200.0] | [28.0, 29.0, 26.0, 29.0, 26.0, 27.0] | [589, 602, 578, 602, 578, 578] |
p02760 | u460386402 | 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)]\nans=\'No\'\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,0]\n \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[0][2] + a[1][1] + a[2][0] == 0:\n ans = "Yes"\nprint(ans)\n', 'A=list(map(int,input().spliy()))\nB=list(map(int,input().spliy()))\nC=list(map(int,input().spliy()))\nn=input()\nfor i range(n):\n D[i]=int(input())\n\nAcount=0 \nBcount=0\nCcount=0\n \nfor i in range(0,n):\n if A[0]==D[i]:\n Acount+=1\n if A[1]==D[i]:\n Acount+=1\n if A[2]==D[i]:\n Acount+=1\n if(Acpunt)==3:\n exit()\nfor i in range(0,n):\n if B[0]==D[i]:\n Bcount+=1\n if B[1]==D[i]:\n Bcount+=1\n if B[2]==D[i]:\n Bcount+=1\n if(Bcpunt)==3:\n exit()\nfor i in range(0,n):\n if C[0]==D[i]:\n Ccount+=1\n if C[1]==D[i]:\n Ccount+=1\n if C[2]==D[i]:\n Ccount+=1\n if(Ccpunt)==3:\n exit()', 'a=[list(map(int,input().split()))for i in range(3)]\nn=int(input())\nb=[int(input())for i in range(n)]\nans=\'No\'\nfor i in range(3):\n for j in range(3):\n for k in range(n):\n a[i][j]==b[k]\n a[i][j]=[0,0]\n \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[0][2] + a[1][1] + a[2][0] == 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)]\nans=\'No\'\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,0]\n \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[0][2] + a[1][1] + a[2][0] == 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)]\nans=\'No\'\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 \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[0][2] + a[1][1] + a[2][0] == 0:\n ans = "Yes"\nprint(ans)\n'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s187744528', 's414755875', 's520087154', 's607254816', 's830948643'] | [3064.0, 2940.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [485, 602, 477, 485, 481] |
p02760 | u461833298 | 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)]\nB = [[0,0,0],[0,0,0],[0,0,0]]\n\nans = 'No'\nfor i, row in enumerate(A):\n for j, value in enumerate(row):\n if value in b:\n B[i][j] = 1\nprint(B)\nif B[0][0]==B[0][1]==B[0][2]==1 or B[1][0]==B[1][1]==B[1][2]==1 or B[2][0]==B[2][1]==B[2][2]==1:\n ans = 'Yes'\nelif B[0][0]==B[1][0]==B[2][0]==1 or B[0][1]==B[1][1]==B[2][1]==1 or B[0][2]==B[1][2]==B[2][2]==1:\n ans = 'Yes'\nelif B[0][0]==B[1][1]==B[2][2]==1 or B[0][2]==B[1][1]==B[2][0]==1:\n ans = 'Yes'\nprint(ans)", "A = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nb = [int(input()) for _ in range(N)]\nB = [[0,0,0],[0,0,0],[0,0,0]]\n\nans = 'No'\nfor i, row in enumerate(A):\n for j, value in enumerate(row):\n if value in b:\n B[i][j] = 1\n\nif aB[0][0]==B[0][1]==B[0][2]==1 or B[1][0]==B[1][1]==B[1][2]==1 or B[2][0]==B[2][1]==B[2][2]==1:\n ans = 'Yes'\nelif B[0][0]==B[1][0]==B[2][0]==1 or B[0][1]==B[1][1]==B[2][1]==1 or B[0][2]==B[1][2]==B[2][2]==1:\n ans = 'Yes'\nelif B[0][0]==B[1][1]==B[2][2]==1 or B[2][2]==B[1][1]==B[2][0]==1:\n ans = 'Yes'\nprint(ans)", "A = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nb = [int(input()) for _ in range(N)]\nB = [[0,0,0],[0,0,0],[0,0,0]]\n\nans = 'No'\nfor i, row in enumerate(A):\n for j, value in enumerate(row):\n if value in b:\n B[i][j] = 1\n\nif B[0][0]==B[0][1]==B[0][2]==1 or B[1][0]==B[1][1]==B[1][2]==1 or B[2][0]==B[2][1]==B[2][2]==1:\n ans = 'Yes'\nelif B[0][0]==B[1][0]==B[2][0]==1 or B[0][1]==B[1][1]==B[2][1]==1 or B[0][2]==B[1][2]==B[2][2]==1:\n ans = 'Yes'\nelif B[0][0]==B[1][1]==B[2][2]==1 or B[0][2]==B[1][1]==B[2][0]==1:\n ans = 'Yes'\nprint(ans)"] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s003255988', 's431704138', 's628601266'] | [3188.0, 3064.0, 3064.0] | [19.0, 17.0, 17.0] | [593, 586, 594] |
p02760 | u467307100 | 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())\n\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 A[i][j] == 0\n \nbingo = False\nfor row in A:\n if sum(row) == 0:\n bingo = True\nfor col in zip(*A):\n if sum(col) == 0:\n bingo= True\nif sum(A[i][i] for i in range(3) )== 0:\n bingo =True\nif sum(A[i][3 - i - 1] for i in range(3)) == 0:\n bingo = True\n \nprint("Yes" if bingo == True else "No")', 'A = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\n\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 A[i][j] = 0\n \nbingo = False\nfor row in A:\n if sum(row) == 0:\n bingo = True\nfor col in zip(*A):\n if sum(col) == 0:\n bingo = True\nif sum(A[i][i] for i in range(3)) == 0:\n bingo =True\nif sum(A[i][3 - i - 1] for i in range(3)) == 0:\n bingo = True\n \nprint("Yes" if bingo == True else "No")'] | ['Wrong Answer', 'Accepted'] | ['s244160763', 's082265171'] | [3316.0, 3064.0] | [21.0, 17.0] | [506, 506] |
p02760 | u468313559 | 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(0, 3):\n a = input().split(\' \')\n for j in a:\n A.append(int(j))\n\n# print(A)\nN = int(input())\n\nfor i in range(0, N):\n data = int(input())\n if data in A:\n A[A.index(data)] = 0\n\n\nif sum(A[0:3]) == 0 \\\nor sum(A[3:6]) == 0 \\\nor sum(A[6:9]) == 0 \\\n# diagonal\nor A[0] + A[4] + A[8] == 0 \\\nor A[2] + A[4] + A[6] == 0 \\\n# Virtical\nor A[0] + A[3] + A[6] == 0 \\\nor A[1] + A[4] + A[7] == 0 \\\nor A[2] + A[5] + A[8] == 0: \n print("Yes")\nelse:\n print("No")', 'A = []\nfor i in range(0, 3):\n a = input().split(\' \')\n for j in a:\n A.append(int(j))\n\n# print(A)\nN = int(input())\n\nfor i in range(0, N):\n data = int(input())\n if data in A:\n A[A.index(data)] = 0\n\nif sum(A[0:3]) == 0 \\\nor sum(A[3:6]) == 0 \\\nor sum(A[6:9]) == 0 \\\nor A[0] + A[4] + A[8] == 0 \\\nor A[2] + A[4] + A[6] == 0 \\\nor A[0] + A[3] + A[6] == 0 \\\nor A[1] + A[4] + A[7] == 0 \\\nor A[2] + A[5] + A[8] == 0: \n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s279995539', 's719103795'] | [3060.0, 3064.0] | [17.0, 18.0] | [484, 450] |
p02760 | u468972478 | 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)]\n\nfor i in range(3):\n for j in range(3):\n if a[i][j] in b:\n a[i][j] == 0\nprint("Yes" if any(i.count(0) == 3 for i in a) or any(i.count(0) == 3 for i in zip(*a)) else "No")\n\n', 'a = [list(map(int, input().split())) for i in range(3)]\nn = int(input())\nb = [i for i 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] == 0\nprint("Yes" if any(i.count(0) == 3 for i in a))\nprint("Yes" if any(i.count(0) == 3 for i in zip(*a)))\n', 'a = [list(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 if a[i][j] in b:\n a[i][j] == 0\n\nc = [[a[0][0], a[1][1], a[2][2]], [a[0][2], a[1][1], a[2][0]]]\n\nprint("Yes" if any(i.count(0) == 3 for i in a) or any(i.count(0) == 3 or any(i.count(0) == 3 for i in c) for i in zip(*a)) else "No")\n\n', 's = " 012 345 678 036 147 258 048 246 "\na = [input().split() for i in range(3)]\nb = a[0] + a[1] + a[2]\n\nfor i in [input()for i in range(int(input()))]:\n if i in b:\n s = s.replace(str(b.index(i)), "")\nprint("Yes" if " " in s else "No")'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s144445971', 's211716167', 's299813744', 's936911734'] | [9152.0, 9056.0, 9188.0, 9044.0] | [29.0, 22.0, 28.0, 27.0] | [291, 282, 391, 239] |
p02760 | u469574680 | 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=list(map(int,input().split()))\nBlist=list(map(int,input().split()))\nClist=list(map(int,input().split()))\n#print(Alist)\n#print(Blist)\n#print(Clist)\nN=int(input())\nmylist=[]\nflaglist=[0,0,0,0,0,0,0,0] \nfor i in range(N):\n mylist.append(int(input()))\n #print(mylist)\n \nfor i in range(3):\n for j in range(N):\n if Alist[i]==mylist[j]:\n flaglist[0]+=1\n \nfor i in range(3):\n for j in range(N):\n if Blist[i]==mylist[j]:\n flaglist[1]+=1\n \n \nfor i in range(3):\n for j in range(N):\n if Clist[i]==mylist[j]:\n flaglist[2]+=1\n\n\nfor i in range(N):\n if Alist[0]==mylist[i]:\n flaglist[3]+=1\n elif Blist[0]==mylist[i]:\n flaglist[3]+=1\n elif Clist[0]==mylist[i]:\n flaglist[3]+=1\n \nfor i in range(N):\n if Alist[1]==mylist[i]:\n flaglist[4]+=1\n elif Blist[1]==mylist[i]:\n flaglist[4]+=1\n elif Clist[1]==mylist[i]:\n flaglist[4]+=1\n\nfor i in range(N):\n if Alist[2]==mylist[i]:\n flaglist[5]+=1\n elif Blist[2]==mylist[i]:\n flaglist[5]+=1\n elif Clist[2]==mylist[i]:\n flaglist[5]+=1\n \nfor i in range(N):\n if Alist[2]==mylist[i]:\n flaglist[6]+=1\n elif Blist[1]==mylist[i]:\n flaglist[6]+=1\n elif Clist[0]==mylist[i]:\n flaglist[6]+=1\n \nfor i in range(N):\n if Alist[0]==mylist[i]:\n flaglist[7]+=1\n elif Blist[1]==mylist[i]:\n flaglist[7]+=1\n elif Clist[2]==mylist[i]:\n flaglist[7]+=1\n \nif max(flaglist)>3:\n print("Yes")\nelse:\n print("No")', 'Alist=list(map(int,input().split()))\nBlist=list(map(int,input().split()))\nClist=list(map(int,input().split()))\n#print(Alist)\n#print(Blist)\n#print(Clist)\nN=int(input())\nmylist=[]\nflaglist=[0,0,0,0,0,0,0,0] \nfor i in range(N):\n mylist.append(int(input()))\n #print(mylist)\n \nfor i in range(3):\n for j in range(N):\n if Alist[i]==mylist[j]:\n flaglist[0]+=1\n \nfor i in range(3):\n for j in range(N):\n if Blist[i]==mylist[j]:\n flaglist[1]+=1\n \n \nfor i in range(3):\n for j in range(N):\n if Clist[i]==mylist[j]:\n flaglist[2]+=1\n\n\nfor i in range(N):\n if Alist[0]==mylist[i]:\n flaglist[3]+=1\n elif Blist[0]==mylist[i]:\n flaglist[3]+=1\n elif Clist[0]==mylist[i]:\n flaglist[3]+=1\n \nfor i in range(N):\n if Alist[1]==mylist[i]:\n flaglist[4]+=1\n elif Blist[1]==mylist[i]:\n flaglist[4]+=1\n elif Clist[1]==mylist[i]:\n flaglist[4]+=1\n\nfor i in range(N):\n if Alist[2]==mylist[i]:\n flaglist[5]+=1\n elif Blist[2]==mylist[i]:\n flaglist[5]+=1\n elif Clist[2]==mylist[i]:\n flaglist[5]+=1\n \nfor i in range(N):\n if Alist[2]==mylist[i]:\n flaglist[6]+=1\n elif Blist[1]==mylist[i]:\n flaglist[6]+=1\n elif Clist[0]==mylist[i]:\n flaglist[6]+=1\n \nfor i in range(N):\n if Alist[0]==mylist[i]:\n flaglist[7]+=1\n elif Blist[1]==mylist[i]:\n flaglist[7]+=1\n elif Clist[2]==mylist[i]:\n flaglist[7]+=1\n \nif max(flaglist)>=3:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s712916099', 's318811913'] | [3192.0, 3192.0] | [18.0, 18.0] | [1651, 1652] |
p02760 | u469953228 | 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,m=map(int,input().split())\n# a,b,c=map(int,input().split())\n# s=input()\n# s,t=map(str,input().split())\nans=[0]*n\nanss=""\nl=[]\nL=[]\nfor i in range(m):\n s,c=map(int,input().split())\n l.append(str(s)+str(c))\n if s==1 and c==0:\n print(-1)\n exit()\n\nl=list(set(l))\nfor x in l:\n L.append([x[0],x[1]])\nX=[]\n\nfor i in range(len(L)):\n\n ans[int(L[i][0])-1] = int(L[i][1])\n if L[i][0] in X:\n print(-1)\n exit()\n else:\n X.append(L[i][0])\nprint(ans)\nif ans[0]==0:\n if n!=1:\n ans[0]="1"\n for x in ans:\n anss+=str(x)\n print(anss)\n else:\n print(0)\nelse:\n for x in ans:\n anss+=str(x)\n print(anss)', '\n# n,m=map(int,input().split())\n# a,b,c=map(int,input().split())\n# s=input()\n# s,t=map(str,input().split())\nA=list(map(int,input().split()))\nB=list(map(int,input().split()))\nC=list(map(int,input().split()))\nL=[]\nL.append(A)\nL.append(B)\nL.append(C)\nn=int(input())\n\nfor i in range(n):\n x=int(input())\n for a in range(3):\n for b in range(3):\n if L[a][b] == x:\n L[a][b]=0\n\nif L[0][0]==0 and L[0][1]==0 and L[0][2]==0:\n print("Yes")\n exit()\n\nif L[1][0]==0 and L[1][1]==0 and L[1][2]==0:\n print("Yes")\n exit()\n\nif L[2][0]==0 and L[2][1]==0 and L[2][2]==0:\n print("Yes")\n exit()\n\nif L[0][0]==0 and L[1][0]==0 and L[2][0]==0:\n print("Yes")\n exit()\nif L[0][1]==0 and L[1][1]==0 and L[2][1]==0:\n print("Yes")\n exit()\nif L[0][2]==0 and L[1][2]==0 and L[2][2]==0:\n print("Yes")\n exit() \nif L[0][0]==0 and L[1][1]==0 and L[2][2]==0:\n print("Yes")\n exit()\nif L[0][2]==0 and L[1][1]==0 and L[2][0]==0:\n print("Yes")\n exit()\n\n\nprint("No")\n \n '] | ['Runtime Error', 'Accepted'] | ['s862948840', 's621279563'] | [3188.0, 3188.0] | [19.0, 17.0] | [629, 965] |
p02760 | u482019060 | 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)]\n\n\n\nfor i in range(3):\n for j in range(3):\n if (A[i][j] in B):\n A[i][j] = True\n else:\n A[i][j] = False\n\nprint(A)\n\nfor i in range(3):\n if A[i][0] and A[i][1] and A[i][2]:\n print("Yes")\n exit()\n\n if A[0][i] and A[1][i] and A[2][i]:\n print("Yes")\n exit()\n\nif A[0][0] and A[1][1]and A[2][2]:\n print("Yes")\n exit()\n\nif A[2][0] and A[1][1] and A[0][2]:\n print("Yes")\n exit()\n\nprint("No")\n', 'A = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nB = [int(input()) for _ in range(N)]\n\n\n\nisBingo = False\n\n\nfor i in range(2):\n for j in range(2):\n if (A[i][j] in B):\n A[i][j] = True\n else:\n A[i][j] = False\n\ncnt = 0\n\n\nfor i in range(2):\n for j in range(2):\n if (A[i][j]):\n cnt += 1\n if (cnt == 2):\n print("retu")\n print("yes")\n exit()\n cnt = 0\n\n\nfor j in range(2):\n for i in range(2):\n if (A[i][j]):\n cnt += 1\n if (cnt == 2):\n print("gyo")\n print("yes")\n exit()\n cnt = 0\n\n\nfor i in range(2):\n if (A[i][j]):\n cnt += 1\n if (cnt == 2):\n print("naname")\n print("yes")\n exit()\n cnt = 0\n\n\nif (A[0][2] and A[1][1] and A[2][0]):\n print("migiue")\n print("yes")\n exit()\n\n\nprint("no")\n', 'A = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nB = [int(input()) for _ in range(N)]\n\n\n\nfor i in range(3):\n for j in range(3):\n if (A[i][j] in B):\n A[i][j] = True\n else:\n A[i][j] = False\n\n\nfor i in range(3):\n if A[i][0] and A[i][1] and A[i][2]:\n print("Yes")\n exit()\n\n if A[0][i] and A[1][i] and A[2][i]:\n print("Yes")\n exit()\n\nif A[0][0] and A[1][1]and A[2][2]:\n print("Yes")\n exit()\n\nif A[2][0] and A[1][1] and A[0][2]:\n print("Yes")\n exit()\n\nprint("No")\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s673153208', 's888116330', 's848270256'] | [3064.0, 3064.0, 3064.0] | [17.0, 18.0, 18.0] | [587, 939, 578] |
p02760 | u482743994 | 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=[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 b[k]==a[i][j]:\n a[i][j]=0\nif (a[0][0]==0 and a[1][0]==0 and a[2][0]==0) or (a[0][1]==0 and a[1][1]==0 and a[2][1]==0) or (a[0][2]==0 and a[1][2]==0 and a[2][2]==0) or a[0]==[0,0,0] or a[1]==[0,0,0] or a[2]==[0,0,0] or (a[0][0]==0 and a[1][1]==0 and a[2][2]==0) or (a[0][2]==0 and a[1][1]==0 and a[2][0]==0):\n print("Yes")\nelse:\n print("No")\n', 'a=[list(map(int,input().split())) for i in range(3)]\nn=int(input())\nb=[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 b[k]==a[i][j]:\n a[i][j]=0\nif (a[0][0]==0 and a[1][0]==0 and a[2][0]==0) or (a[0][1]==0 and a[1][1]==0 and a[2][1]) or (a[0][2]==0 and a[1][2]==0 and a[2][2]) or a[0]==[0,0,0] or a[1]==[0,0,0] or a[2]==[0,0,0] or (a[0][0]==0 and a[1][1]==0 and a[2][2]==0) or (a[0][2]==0 and a[1][1]==0 and a[2][0]==0):\n print("Yes")\nelse:print("No")', 'a=[list(map(int,input().split())) for i in range(3)]\nn=int(input())\nb=[int(input()) for i in range(n)]\nprint(b)\nfor i in range(3):\n for j in range(3):\n for k in range(n):\n if b[k]==a[i][j]:\n a[i][j]=0\nprint(a)\nif (a[0][0]==0 and a[1][0]==0 and a[2][0]==0) or (a[0][1]==0 and a[1][1]==0 and a[2][1]==0) or (a[0][2]==0 and a[1][2]==0 and a[2][2]==0) or a[0]==[0,0,0] or a[1]==[0,0,0] or a[2]==[0,0,0] or (a[0][0]==0 and a[1][1]==0 and a[2][2]==0) or (a[0][2]==0 and a[1][1]==0 and a[2][0]==0):\n print("Yes")\nelse:\n print("No")\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(n):\n if b[k]==a[i][j]:\n a[i][j]=0\nif (a[0][0]==0 and a[1][0]==0 and a[2][0]==0) or (a[0][1]==0 and a[1][1]==0 and a[2][1]==0) or (a[0][2]==0 and a[1][2]==0 and a[2][2]==0) or a[0]==[0,0,0] or a[1]==[0,0,0] or a[2]==[0,0,0] or (a[0][0]==0 and a[1][1]==0 and a[2][2]==0) or (a[0][2]==0 and a[1][1]==0 and a[2][0]==0):\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s390593072', 's899942802', 's990505560', 's899653462'] | [3064.0, 3064.0, 3064.0, 3064.0] | [18.0, 18.0, 18.0, 18.0] | [520, 510, 543, 525] |
p02760 | u485286322 | 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 = []\nfor i in range(3):\n row = [int(j) for j in input().split()]\n bingo.append(row)\nans = "No"\nn = int(input())\nfor i in range(n):\n lot = int(input())\n for j in range(len(bingo)):\n col = 0\n for k in range(len(bingo[j])):\n if bingo[j][k] == lot:\n \tbingo[j][k] = -1\n \tcol += bingo[j][k]\n if sum(bingo[j]) == -3:\n \t ans = "Yes"\n \tif col == -3:\n \tans = "Yes"\nif (bingo[0][0] + bingo[1][1] + bingo[2][2]) == -3:\n ans = "Yes"\nif (bingo[0][2] + bingo[1][1] + bingo[2][0]) == -3:\n ans = "Yes"\nprint(ans) ', 'bingo = []\nfor i in range(3):\n row = [int(j) for j in input().split()]\n bingo.append(row)\nans = "No"\nn = int(input())\nfor i in range(n):\n lot = int(input())\n for j in range(len(bingo)):\n for k in range(len(bingo[j])):\n if bingo[j][k] == lot:\n \tbingo[j][k] = -1\n \tcol += bingo[j][k]\n if sum(bingo[j]) == -3:\n \t ans = "Yes"\nif (bingo[0][0] + bingo[1][1] + bingo[2][2]) == -3:\n ans = "Yes"\nif (bingo[0][2] + bingo[1][1] + bingo[2][0]) == -3:\n ans = "Yes"\nif (bingo[0][0] + bingo[1][0] + bingo[2][0]) == -3:\n ans = "Yes"\nif (bingo[0][1] + bingo[1][1] + bingo[2][1]) == -3:\n ans = "Yes"\nif (bingo[0][2] + bingo[1][2] + bingo[2][2]) == -3:\n ans = "Yes"\nprint(ans) ', 'bingo = []\nfor i in range(3):\n row = [int(j) for j in input().split()]\n bingo.append(row)\nans = "No"\nn = int(input())\nfor i in range(n):\n lot = int(input())\n for j in range(len(bingo)):\n col = 0\n for k in range(len(bingo[j])):\n if bingo[j][k] == lot:\n \tbingo[j][k] = -1\n \tcol += bingo[j][k]\n if sum(bingo[j]) == -3:\n \t ans = "Yes"\n if col == -3:\n ans = "Yes"\nif (bingo[0][0] + bingo[1][1] + bingo[2][2]) == -3:\n ans = "No"\nif (bingo[0][2] + bingo[1][1] + bingo[2][0]) == -3:\n ans = "No"\nprint(ans) ', 'bingo = []\nfor i in range(3):\n row = [int(j) for j in input().split()]\n bingo.append(row)\n\nans = "No"\nn = int(input())\nfor i in range(n):\n lot = int(input())\n for j in range(len(bingo)):\n col = 0\n for k in range(len(bingo[j])):\n if bingo[j][k] == lot:\n \tbingo[j][k] = -1\n \tcol += bingo[j][k]\n if col == -3:\n ans = "Yes"\n if sum(bingo[k]) == -3:\n \t ans = "Yes"\n print(col)\nif (bingo[0][0] + bingo[1][1] + bingo[2][2]) == -3:\n ans = "Yes"\nif (bingo[0][2] + bingo[1][1] + bingo[2][0]) == -3:\n ans = "Yes"\n\nprint(ans) ', 'bingo = []\nfor i in range(3):\n row = [int(j) for j in input().split()]\n bingo.append(row)\nans = "No"\nn = int(input())\nfor i in range(n):\n lot = int(input())\n for j in range(len(bingo)):\n for k in range(len(bingo[j])):\n if bingo[j][k] == lot:\n \tbingo[j][k] = -1\n if sum(bingo[j]) == -3:\n \t ans = "Yes"\nif (bingo[0][0] + bingo[1][1] + bingo[2][2]) == -3:\n ans = "Yes"\nif (bingo[0][2] + bingo[1][1] + bingo[2][0]) == -3:\n ans = "Yes"\nif (bingo[0][0] + bingo[1][0] + bingo[2][0]) == -3:\n ans = "Yes"\nif (bingo[0][1] + bingo[1][1] + bingo[2][1]) == -3:\n ans = "Yes"\nif (bingo[0][2] + bingo[1][2] + bingo[2][2]) == -3:\n ans = "Yes"\nprint(ans) '] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s007815635', 's319797730', 's464387146', 's624587391', 's023954353'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0, 17.0, 18.0] | [538, 690, 534, 559, 664] |
p02760 | u486209657 | 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\nA1=np.array(list(map(int,input().split())))\nA2=np.array(list(map(int,input().split())))\nA3=np.array(list(map(int,input().split())))\nA=np.concatenate([A1,A2,A3]).reshape(3,3)\n\nN=int(input())\n\nfor i in range(N):\n b=int(input())\n A[np.where(A==b)] = 0\n\nif np.all(A[0,:]==0) or np.all(A[1,:]==0) or np.all(A[2,:]==0) or np.all(A[:,0]==0) or np.all(A[:,1]==0) \n\\or np.all(A[:,2]==0) or A[0,0]**2+A[1,1]**2+A[2,2]**2==0:\n print('Yes')\nelse:\n print('No')", "import numpy as np\n\nA1=np.array(list(map(int,input().split())))\nA2=np.array(list(map(int,input().split())))\nA3=np.array(list(map(int,input().split())))\nA=np.concatenate([A1,A2,A3]).reshape(3,3)\n\nN=int(input())\n\nfor i in range(N):\n b=int(input())\n A[np.where(A==b)] = 0\n\nif np.all(A[0,:]==0) or np.all(A[1,:]==0) or np.all(A[2,:]==0) or np.all(A[:,0]==0) or np.all(A[:,1]==0) \\\n or np.all(A[:,2]==0) or A[0,0]**2+A[1,1]**2+A[2,2]**2==0 or A[0,2]**2+A[1,1]**2+A[2,0]**2==0:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s724179608', 's639711846'] | [8852.0, 27248.0] | [25.0, 119.0] | [479, 519] |
p02760 | u486251525 | 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 = []\nout = []\nfor x in range(3):\n A.append(list(map(int, input().split())))\n out.append([0, 0, 0])\nN = int(input())\nb = []\nfor B in range(N):\n b.append(int(input()))\nfor pick in b:\n for y in range(3):\n for x in range(3):\n if pick == A[y][x]:\n out[y][x] = 1\n\nbingo = False\nfor x in range(3):\n if out[x][0] == 1 and out[x][1]\u3000== 1 and out[x][2] == 1:\n bingo = True\n\nfor x in range(3):\n if out[0][x] == 1 and out[1][x] == 1 and out[2][x] == 1:\n bingo = True\n\nfor x in range(3):\n if out[0][0] == 1 and out[1][1] == 1 and out[2][2] == 1:\n bingo = True\n\n if out[2][0] == 1 and out[1][1] == 1 and out[2][0] == 1:\n bingo = True\n\nif bingo:\n print("Yes")\nelse:\n print("No")\n', 'A = []\nout = []\nfor x in range(3):\n A.append(list(map(int, input().split())))\n out.append([0, 0, 0])\nN = int(input())\nb = []\nfor B in range(N):\n b.append(int(input()))\nfor pick in b:\n for y in range(3):\n for x in range(3):\n if pick == A[y][x]:\n out[y][x] = 1\n\nbingo = False\nfor x in range(3):\n if out[x][0] == 1 and out[x][1] == 1 and out[x][2] == 1:\n bingo = True\n\nfor x in range(3):\n if out[0][x] == 1 and out[1][x] == 1 and out[2][x] == 1:\n bingo = True\n\nfor x in range(3):\n if out[0][0] == 1 and out[1][1] == 1 and out[2][2] == 1:\n bingo = True\n\n if out[2][0] == 1 and out[1][1] == 1 and out[2][0] == 1:\n bingo = True\n\nif bingo:\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s679371813', 's695833076'] | [3064.0, 3064.0] | [17.0, 18.0] | [759, 757] |
p02760 | u487594898 | 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\na1 = list(map(str,input().split()))\na2 = list(map(str,input().split()))\na3 = list(map(str,input().split()))\nM=int(input())\nN = "N"\nif M <= 2:\n print(\'No\')\n sys.exit()\n\nNum=[] \nwhile True:\n try:\n Num.append(input())\n\n except:\n break;\n\nA1= ["N" if Num.count(i)!=0 else i for i in a1]\nA2= ["N" if Num.count(i)!=0 else i for i in a2]\nA3= ["N" if Num.count(i)!=0 else i for i in a3]\nprint(A1,A2,A3,Num)\nif A1[0] == N and A1[1] == N and A1[2] == N :\n print("Yes")\nelif A2[0] == N and A2[1] == N and A2[2] == N :\n print("Yes")\nelif A3[0] == N and A3[1] == N and A3[2] == N :\n print("Yes")\nelif A1[0] == N and A2[0] == N and A3[0] == N :\n print("Yes")\nelif A1[1] == N and A2[1] == N and A3[2] == N :\n print("Yes")\nelif A1[2] == N and A2[2] == N and A3[2] == N :\n print("Yes")\nelif A1[0] == N and A2[1] == N and A3[2] == N :\n print("Yes")\nelif A1[2] == N and A2[1] == N and A3[0] == N :\n print("Yes")\nelse:\n print("No")\n\n', 'import sys\na1 = list(map(str,input().split()))\na2 = list(map(str,input().split()))\na3 = list(map(str,input().split()))\nM=int(input())\nN = "N"\nif M <= 2:\n print(\'No\')\n sys.exit()\n\nNum=[] \nwhile True:\n try:\n Num.append(input())\n\n except:\n break;\n\nA1= ["N" if Num.count(i)!=0 else i for i in a1]\nA2= ["N" if Num.count(i)!=0 else i for i in a2]\nA3= ["N" if Num.count(i)!=0 else i for i in a3]\n\nif A1[0] == N and A1[1] == N and A1[2] == N :\n print("Yes")\nelif A2[0] == N and A2[1] == N and A2[2] == N :\n print("Yes")\nelif A3[0] == N and A3[1] == N and A3[2] == N :\n print("Yes")\nelif A1[0] == N and A2[0] == N and A3[0] == N :\n print("Yes")\nelif A1[1] == N and A2[1] == N and A3[2] == N :\n print("Yes")\nelif A1[2] == N and A2[2] == N and A3[2] == N :\n print("Yes")\nelif A1[0] == N and A2[1] == N and A3[2] == N :\n print("Yes")\nelif A1[2] == N and A2[1] == N and A3[0] == N :\n print("Yes")\nelse:\n print("No")\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s104906059', 's535264589'] | [3064.0, 3064.0] | [18.0, 17.0] | [1010, 992] |
p02760 | u490489966 | 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\na = [list(map(int, input().split())) for _ in range(3)]\nn = int(input())\nfor i in range(n):\n m = int(input())\n for j in range(3):\n for k in range(3):\n if a[j][k] == m:\n a[j][k] = 0\nf = False\nprint(a)\nfor j in range(3):\n if a[j][0] == 0 and a[j][1] == 0 and a[j][2] == 0:\n f = True\n if a[0][j] == 0 and a[1][j] == 0 and a[2][j] == 0:\n f = True\nif (a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0) or (a[2][0] == 0 and a[1][1] == 0 and a[0][2] == 0):\n f = True\nif f:\n print('Yes')\nelse:\n print('No')", "#B\na = [list(map(int, input().split())) for _ in range(3)]\nn = int(input())\nfor i in range(n):\n m = int(input())\n for j in range(3):\n for k in range(3):\n if a[j][k] == m:\n a[j][k] = 0\nf = False\nfor j in range(3):\n if a[j][0] == 0 and a[j][1] == 0 and a[j][2] == 0:\n f = True\n if a[0][j] == 0 and a[1][j] == 0 and a[2][j] == 0:\n f = True\nif (a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0) or (a[2][0] == 0 and a[1][1] == 0 and a[0][2] == 0):\n f = True\nif f:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s691480177', 's585247438'] | [9288.0, 9208.0] | [28.0, 27.0] | [567, 558] |
p02760 | u493373637 | 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. | ['n11, n12, n13 = (input().split())\nn21, n22, n23 = (input().split())\nn31, n32, n33 = (input().split())\n\nlines = [[n11,n12,n13],\n [n21,n22,n23],\n [n31,n32,n33],\n [n11,n21,n31],\n [n12,n22,n32],\n [n13,n23,n33],\n [n11,n22,n33],\n [n13,n22,n31]]\nnums = []\nfor(i in range(int(input()))):\n nums.append(input())\nflag = false', 'n11, n12, n13 = map(int,input().split())\nn21, n22, n23 = map(int,input().split())\nn31, n32, n33 = map(int,input().split())\nlines = [[n11,n12,n13],\n [n21,n22,n23],\n [n31,n32,n33],\n [n11,n21,n31],\n [n12,n22,n32],\n [n13,n23,n33],\n [n11,n22,n33],\n [n13,n22,n31]]\nnums = {}\nr = input()\nfor i in range(int(r)):\n nums[input()] = 0\nflag = False\nfor l in lines:\n if l[0] in nums:\n if l[1] in nums:\n if l[2] in nums:\n flag = True\nif flag:\n print("Yes")\nelse:\n print("No")', 'n11, n12, n13 = int(input().split())\nn21, n22, n23 = int(input().split())\nn31, n32, n33 = int(input().split())\nlines = [[n11,n12,n13],\n [n21,n22,n23],\n [n31,n32,n33],\n [n11,n21,n31],\n [n12,n22,n32],\n [n13,n23,n33],\n [n11,n22,n33],\n [n13,n22,n31]]\nnums = []\nfor(i in range(int(input()))):\n nums.append(input())\nflag = false\nfor(l in lines):\n if l[0] in nums:\n if l[1] in nums:\n if l[2] in nums:\n flag = True\nif flag:\n print("No")\nelse:\n print("Yes")\n \n', 'n11, n12, n13 = map(int,input().split())\nn21, n22, n23 = map(int,input().split())\nn31, n32, n33 = map(int,input().split())\nlines = [[n11,n12,n13],\n [n21,n22,n23],\n [n31,n32,n33],\n [n11,n21,n31],\n [n12,n22,n32],\n [n13,n23,n33],\n [n11,n22,n33],\n [n13,n22,n31]]\nnums = {}\nr = input()\nfor i in range(int(r)):\n nums[int(input())] = 0\nflag = False\nfor l in lines:\n if l[0] in nums:\n if l[1] in nums:\n if l[2] in nums:\n flag = True\nif flag:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s118421845', 's192460743', 's793228615', 's884496463'] | [3060.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0, 18.0] | [371, 536, 529, 541] |
p02760 | u493555013 | 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. | ['li1 = list(map(int,input().split()))\nli2 = list(map(int,input().split()))\nli3 = list(map(int,input().split()))\nN = int(input())\nb = [int(input()) for i in range(N)]\nA = li1+li2+li3\n\nhit = []\nfor i in b:\n if i in A:\n hit.append(A.index(i)+1)\n\nif (1 in hit and 2 in hit and 3 in hit)\\\nor (4 in hit and 5 in hit and 6 in hit)\\\nor (7 in hit and 8 in hit and 9 in hit)\\\nor (1 in hit and 4 in hit and 7 in hit)\\\nor (2 in hit and 5 in hit and 8 in hit)\\\nor (3 in hit and 6 in hit and 9 in hit)\\\nor (1 in hit and 5 in hit and 9 in hit)\\\nor (3 in hit and 5 in hit and 7 in hit):\n print("Tes")\nelse:\n print("No")', 'li1 = list(map(int,input().split()))\nli2 = list(map(int,input().split()))\nli3 = list(map(int,input().split()))\nN = int(input())\nb = [int(input()) for i in range(N)]\nA = li1+li2+li3\n\nhit = []\nfor i in b:\n if i in A:\n hit.append(A.index(i)+1)\n\nif (1 in hit and 2 in hit and 3 in hit)\\\nor (4 in hit and 5 in hit and 6 in hit)\\\nor (7 in hit and 8 in hit and 9 in hit)\\\nor (1 in hit and 4 in hit and 7 in hit)\\\nor (2 in hit and 5 in hit and 8 in hit)\\\nor (3 in hit and 6 in hit and 9 in hit)\\\nor (1 in hit and 5 in hit and 9 in hit)\\\nor (3 in hit and 5 in hit and 7 in hit):\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s245676961', 's116638351'] | [3064.0, 3064.0] | [18.0, 17.0] | [618, 618] |
p02760 | u498620941 | 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 = []\n for _ in range(3):\n a = map(int,input().split())\n A += a\n N = int(input())\n B = [int(input()) for _ in range(N)]\n for i in range(N):\n for j in range(9):\n if A[j] == B[i]:\n A[j] = -1\n ans = False\n \n for i in range(3):\n if A[i] == -1 and A[i + 3] == -1 and A[i + 6] == -1 :\n ans = True\n \n for i in range(3):\n if A[i] == - 1 and A[i + 1] == -1 and A[i +2] == -1 :\n ans = True\n \n for i in range(2,4):\n if A[4] == -1 and A[4 - i] == -1 and A[4 + i] == -1 :\n ans = True\n if ans :\n print("Yes")\n else:\n print("No")\n\nif __name__ == \'__main__\':\n main()', 'def main():\n A = []\n for _ in range(3):\n a = map(int,input().split())\n A += a\n N = int(input())\n B = [int(input()) for _ in range(N)]\n for i in range(N):\n for j in range(9):\n if A[j] == B[i]:\n A[j] = -1\n ans = False\n \n for i in range(3):\n if A[i] == -1 and A[i + 3] == -1 and A[i + 6] == -1 :\n ans = True\n \n for i in range(3):\n if A[3 * i] == - 1 and A[3 * i + 1] == -1 and A[3 * i +2] == -1 :\n ans = True\n \n for i in range(2,4):\n if A[4] == -1 and A[4 - i] == -1 and A[4 + i] == -1 :\n ans = True\n if ans :\n print("Yes")\n else:\n print("No")\n\nif __name__ == \'__main__\':\n main()', 'def main():\n A = []\n for _ in range(3):\n a = map(int,input().split())\n A += a\n N = int(input())\n B = [int(input()) for _ in range(N)]\n for i in range(N):\n for j in range(9):\n if A[j] == B[i]:\n A[j] = -1\n ans = False\n \n for i in range(3):\n if A[i] == -1 and A[i + 3] == -1 and A[i + 6] == -1 :\n ans = True\n \n for i in range(3):\n if A[3 * i] == - 1 and A[3 * i + 1] == -1 and A[3 * i + 2] == -1 :\n ans = True\n \n for i in [2, 4]:\n if A[4] == -1 and A[4 - i] == -1 and A[4 + i] == -1 :\n ans = True\n if ans :\n print("Yes")\n else:\n print("No")\n\nif __name__ == \'__main__\':\n main()'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s423536321', 's897742820', 's116162816'] | [3192.0, 3064.0, 3064.0] | [18.0, 17.0, 17.0] | [745, 757, 754] |
p02760 | u502247093 | 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\na = [list(map(int, input().split())) for _ in range(3)]\nn = int(input())\nb = list([int(input()) for _ in range(n)])\nans = "No"\n\n\nfor bi in b:\n print(bi)\n for i in range(3):\n for j in range(3):\n if a[i][j] == bi:\n a[i][j] = "hole"\n\n# tate bingo\nfor j in range(3):\n if a[0][j] == "hole":\n if a[1][j] == "hole" and a[2][j] == "hole":\n ans = "Yes"\n\n# yoko bingo\nfor i in range(3):\n if a[i][0] == "hole":\n if a[i][1] == "hole" and a[i][2] == "hole":\n ans = "Yes"\n\n# naname bingo\nif a[0][0] == "hole" and a[1][1] == "hole" and a[1][1] == "hole":\n ans = "Yes"\nif a[0][2] == "hole" and a[1][1] == "hole" and a[2][0] == "hole":\n ans = "Yes"\n\nprint(ans)\n', '# coding: utf-8\na = [list(map(int, input().split())) for _ in range(3)]\nn = int(input())\nb = list([int(input()) for _ in range(n)])\nans = "No"\n\n\nfor bi in b:\n print(bi)\n for i in range(3):\n for j in range(3):\n if a[i][j] == bi:\n a[i][j] = "hole"\n\n# tate bingo\nfor j in range(3):\n if a[0][j] == "hole":\n if a[1][j] == "hole" and a[2][j] == "hole":\n ans = "Yes"\n\n# yoko bingo\nfor i in range(3):\n if a[i][0] == "hole":\n if a[i][1] == "hole" and a[i][2] == "hole":\n ans = "Yes"\n\n# naname bingo\nif a[0][0] == "hole" and a[1][1] == "hole" and a[2][2] == "hole":\n ans = "Yes"\nif a[0][2] == "hole" and a[1][1] == "hole" and a[2][0] == "hole":\n ans = "Yes"\n\nprint(ans)\n', '# coding: utf-8\na = [list(map(int, input().split())) for _ in range(3)]\nn = int(input())\nb = list([int(input()) for _ in range(n)])\nans = "No"\n\n\nfor bi in b:\n for i in range(3):\n for j in range(3):\n if a[i][j] == bi:\n a[i][j] = "hole"\n\n# tate bingo\nfor j in range(3):\n if a[0][j] == "hole":\n if a[1][j] == "hole" and a[2][j] == "hole":\n ans = "Yes"\n\n# yoko bingo\nfor i in range(3):\n if a[i][0] == "hole":\n if a[i][1] == "hole" and a[i][2] == "hole":\n ans = "Yes"\n\n# naname bingo\nif a[0][0] == "hole" and a[1][1] == "hole" and a[2][2] == "hole":\n ans = "Yes"\nif a[0][2] == "hole" and a[1][1] == "hole" and a[2][0] == "hole":\n ans = "Yes"\n\nprint(ans)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s044964373', 's533888270', 's828432648'] | [3064.0, 3064.0, 3064.0] | [24.0, 18.0, 17.0] | [758, 758, 744] |
p02760 | u508061226 | 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\nA1 = list(map(int, input().split()));\nA2 = list(map(int, input().split()));\nA3 = list(map(int, input().split()));\n\nN = int(input());\n\n\nB = [];\nfor i in range(N):\n b = int(input())\n B.append(b);\n\n\nA = np.hstack([A1,A2,A3]);\n\nfor i in range(N):\n for j in range(len(A)):\n if B[i] == A[j]:\n A[j] = 0;\n break;\n else:\n pass;\n\n\nif A[0] == 0 and A[1] == 0 and A[2] == 0:\n print("Yes");\nelif A[3] == 0 and A[4] == 0 and A[5] == 0:\n print("Yes");\nelif A[6] == 0 and A[7] == 0 and A[8] == 0:\n print("Yes");\nelif A[0] == 0 and A[3] == 0 and A[6] == 0:\n print("Yes");\nelif A[1] == 0 and A[4] == 0 and A[7] == 0:\n print("Yes");\nelif A[2] == 0 and A[5] == 0 and A[8] == 0:\n print("Yes");\nelif A[0] == 0 and A[4] == 0 and A[7] == 0:\n print("Yes");\nelif A[2] == 0 and A[4] == 0 and A[6] == 0:\n print("Yes");\nelse:\n print("No");\n', 'import numpy as np\n\nA1 = list(map(int, input().split()));\nA2 = list(map(int, input().split()));\nA3 = list(map(int, input().split()));\n\nN = int(input());\n\n\nB = [];\nfor i in range(N):\n b = int(input())\n B.append(b);\n\n\nA = np.hstack([A1,A2,A3]);\n\nfor i in range(N):\n for j in range(len(A)):\n if B[i] == A[j]:\n A[j] = 0;\n break;\n else:\n pass;\n\n\nif A[0] == 0 and A[1] == 0 and A[2] == 0:\n print("Yes");\nelif A[3] == 0 and A[4] == 0 and A[5] == 0:\n print("Yes");\nelif A[6] == 0 and A[7] == 0 and A[8] == 0:\n print("Yes");\nelif A[0] == 0 and A[3] == 0 and A[6] == 0:\n print("Yes");\nelif A[1] == 0 and A[4] == 0 and A[7] == 0:\n print("Yes");\nelif A[2] == 0 and A[5] == 0 and A[8] == 0:\n print("Yes");\nelif A[0] == 0 and A[4] == 0 and A[8] == 0:\n print("Yes");\nelif A[2] == 0 and A[4] == 0 and A[6] == 0:\n print("Yes");\nelse:\n print("No");\n'] | ['Wrong Answer', 'Accepted'] | ['s339250062', 's983149266'] | [12520.0, 12520.0] | [153.0, 153.0] | [912, 912] |
p02760 | u509029769 | 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())\n\nfor i in range(N):\n b = int(input())\n for t in range(3):\n if A1[t] == b:\n A1[t] = -1\n elif A2[t] == b:\n A2[t] = -1\n elif A3[t] == b:\n A3[t] = -1\n\nif A1 == A2 == A3 == [-1, -1, -1] or A1[1] == A2[1] == A3[1] == -1 or A1[2] == A2[2] == A3[2] == -1\u3000or A1[0] == A2[0] == A3[0] == -1 or A1[0] == A2[1] == A3[2] == -1 or A1[2] == A2[1] == A3[0] == -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())\n\nfor i in range(N):\n b = int(input())\n for t in range(3):\n if A1[t] == b:\n A1[t] = -1\n elif A2[t] == b:\n A2[t] = -1\n elif A3[t] == b:\n A3[t] = -1\n\nif A1 == A2 == A3 == [-1, -1, -1] \\\n or A1[1] == A2[1] == A3[1] == -1 \\\n or A1[2] == A2[2] == A3[2] == -1 \\\n or A1[0] == A2[0] == A3[0] == -1 \\\n or A1[0] == A2[1] == A3[2] == -1 \\\n or A1[2] == A2[1] == A3[0] == -1 \\\n or A1[0] == A2[0] == A3[0] == -1 \\\n or A1[1] == A2[1] == A3[1] == -1 \\\n or A1[2] == A2[2] == A3[2] == -1:\n print('Yes')\nelse:\n print('No')\nprint(A1)\nprint(A2)\nprint(A3)", "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 t in range(3):\n if A1[t] == b:\n A1[t] = -1\n elif A2[t] == b:\n A2[t] = -1\n elif A3[t] == b:\n A3[t] = -1\n\nif A1 == [-1, -1, -1] \\\n or A2 == [-1, -1, -1] \\\n or A3 == [-1, -1, -1] \\\n or A1[1] == A2[1] == A3[1] == -1 \\\n or A1[2] == A2[2] == A3[2] == -1 \\\n or A1[0] == A2[0] == A3[0] == -1 \\\n or A1[0] == A2[1] == A3[2] == -1 \\\n or A1[2] == A2[1] == A3[0] == -1 \\\n or A1[0] == A2[0] == A3[0] == -1 \\\n or A1[1] == A2[1] == A3[1] == -1 \\\n or A1[2] == A2[2] == A3[2] == -1:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s189947160', 's546197269', 's513832304'] | [8928.0, 9212.0, 9148.0] | [28.0, 30.0, 34.0] | [573, 779, 801] |
p02760 | u511449169 | 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)]\na_hash = [[False, False, False] for _ in range(3)]\n\nfor i in b:\n for ind, j in enumerate(a):\n if i in j:\n a_hash[ind][j.index(i)] = True\n\nfor i in a_hash:\n if all(i):\n print("Yes")\n exit()\nfor num in range(3):\n if a_hash[num][0] and a_hash[num][1] and a_hash[num][2]:\n print("Yes")\n exit()\nprint("No")', 'a = [list(map(int, input().split())) for _ in range(3)]\nn = int(input())\nb = [int(input()) for _ in range(n)]\na_hash = [[False, False, False] for _ in range(3)]\n\nfor i in b:\n for ind, j in enumerate(a):\n if i in j:\n a_hash[ind][j.index(i)] = True\n\nfor i in a_hash:\n if all(i):\n print("Yes")\n exit()\n\nif a_hash[0][0] and a_hash[1][1] and a_hash[2][2]:\n print("Yes")\n exit()\nelif a_hash[0][2] and a_hash[1][1] and a_hash[2][0]:\n print("Yes")\n exit()\n\nfor num in range(3):\n if a_hash[0][num] and a_hash[1][num] and a_hash[2][num]:\n print("Yes")\n exit()\nprint("No")'] | ['Wrong Answer', 'Accepted'] | ['s216310943', 's169865452'] | [9152.0, 9220.0] | [30.0, 25.0] | [466, 628] |
p02760 | u511501183 | 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 = [int(a) for a in input().split()]\n A.append(a)\nN = int(input())\nfor _ in range(N):\n num = int(input())\n for i in range(3):\n for j in range(3):\n if A[i][j]==num:\n A[i][j] = -1\n\n# Rows\nfor row in range(3):\n bingo_row = True\n for col in range(3):\n if A[row][col]!=-1:\n bingo_row = False\n if bingo_row:\n print('rows Yes')\n exit()\n \n# Columns\nfor col in range(3):\n bingo_col = True\n for row in range(3):\n if A[row][col]!=-1:\n bingo_col = False\n if bingo_col:\n print('cols Yes')\n exit()\n\n# Naname\nbingo_naname = True\nfor i in range(3):\n col, row = i, i\n if A[row][col] != -1:\n bingo_naname = False\nif bingo_naname:\n print('naname1 Yes')\n exit()\nbingo_naname = True\nfor i in range(3):\n col, row = 2-i, i\n if A[row][col] != -1:\n bingo_naname = False\nif bingo_naname:\n print('naname2 Yes')\n exit()\n\nprint('No')\n", "A = []\nfor _ in range(3):\n a = [int(a) for a in input().split()]\n A.append(a)\nN = int(input())\nfor _ in range(N):\n num = int(input())\n for i in range(3):\n for j in range(3):\n if A[i][j]==num:\n A[i][j] = -1\n\n# Rows\nfor row in range(3):\n bingo_row = True\n for col in range(3):\n if A[row][col]!=-1:\n bingo_row = False\n if bingo_row:\n print('Yes')\n exit()\n \n# Columns\nfor col in range(3):\n bingo_col = True\n for row in range(3):\n if A[row][col]!=-1:\n bingo_col = False\n if bingo_col:\n print('Yes')\n exit()\n\n# Naname\nbingo_naname = True\nfor i in range(3):\n col, row = i, i\n if A[row][col] != -1:\n bingo_naname = False\nif bingo_naname:\n print('Yes')\n exit()\nbingo_naname = True\nfor i in range(3):\n col, row = 2-i, i\n if A[row][col] != -1:\n bingo_naname = False\nif bingo_naname:\n print('Yes')\n exit()\n\nprint('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s642763898', 's066334921'] | [9256.0, 9244.0] | [32.0, 29.0] | [1001, 975] |
p02760 | u513081876 | 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() for i in range(3)]\nN = int(input())\nb = [int(i) for i in input().split()]\ncheck = 0\n\nfor num in b:\n for i in range(3):\n for j in range(3):\n if S[i][j] == num:\n S[i][j] = '*'\n\nif len(set(S[0])) == 1 or len(set(S[1])) == 1 or len(set(S[2])) == 1:\n check = 1\n\nfor i in range(3):\n cnt = 0\n for j in range(3):\n if S[j][i] == '*':\n cnt += 1\n if cnt == 3:\n check = 1\n\nif S[0][0] == S[1][1] == S[2][2] == '*' or S[0][2] == S[1][1] == S[2][0] == '*':\n check = 1\n\nif check == 1:\n print('Yes')\nelse:\n print('No')", "S = [input().split() for i in range(3)]\nN = int(input())\nb = [int(i) for i in input().split()]\ncheck = 0\n\nfor num in b:\n for i in range(3):\n for j in range(3):\n if S[i][j] == num:\n S[i][j] = '*'\n\nif len(set(S[0])) == 1 or len(set(S[1])) == 1 or len(set(S[2])) == 1:\n check = 1\n\nfor i in range(3):\n cnt = 0\n for j in range(3):\n if S[j][i] == '*':\n cnt += 1\n if cnt == 3:\n check = 1\n\nif S[0][0] == S[1][1] == S[2][2] == '*' or S[0][2] == S[1][1] == S[2][0] == '*':\n check = 1\n\nif check == 1:\n print('Yes')\nelse:\n print('No')\n\nprint(S)", "S = [[int(i) for i in input().split()] for i in range(3)]\nN = int(input())\nb = [int(input()) for i in range(N)]\ncheck = 0\n\nfor num in b:\n for i in range(3):\n for j in range(3):\n if S[i][j] == num:\n S[i][j] = '*'\n\nif len(set(S[0])) == 1 or len(set(S[1])) == 1 or len(set(S[2])) == 1:\n check = 1\n\nfor i in range(3):\n cnt = 0\n for j in range(3):\n if S[j][i] == '*':\n cnt += 1\n if cnt == 3:\n check = 1\n\nif S[0][0] == S[1][1] == S[2][2] == '*' or S[0][2] == S[1][1] == S[2][0] == '*':\n check = 1\n\nif check == 1:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s315039231', 's812398758', 's175353027'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 18.0] | [604, 614, 621] |
p02760 | u514118270 | 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()))\nA = A1 + A2 + A3\nN = int(input())\nfor i in range(N):\n B = int(input())\n if B == A[i]:\n A[i] == 'AC'\nif A[0] == A[1] == A[2] == 'AC' or A[3] == A[4] == A[5] == 'AC' or A[6] == A[7] == A[8] == 'AC':\n print('Yes')\nelif A[0] == A[3] == A[6] == 'AC' or A[1] == A[4] == A[7] == 'AC' or A[2] == A[5] == A[8] == 'AC':\n print('Yes')\nelif A[0] == A[4] == A[8] == 'AC' or A[2] == A[4] == A[6] == 'AC':\n print('Yes')\nelse:\n print('No')", "A1 = list(input().split())\nA2 = list(input().split())\nA3 = list(input().split())\nA = [A1,A2,A3]\nN = int(input())\nfor i in range(N):\n C = input()\n for j in range(3):\n if C == A[0][j]:\n A[0][j] = 'AC'\n if C == A[1][j]:\n A[1][j] = 'AC'\n if C == A[2][j]:\n A[2][j] = 'AC'\nfor l in range(3):\n if A[l][0] == A[l][1] == A[l][2] == 'AC':\n print('Yes')\n exit()\n if A[0][l] == A[1][l] == A[2][l] == 'AC':\n print('Yes')\n exit()\nif A[0][0] == A[1][1] == A[2][2] == 'AC':\n print('Yes')\n exit()\nif A[0][2] == A[1][1] == A[2][0] == 'AC':\n print('Yes')\n exit()\nprint('No')"] | ['Runtime Error', 'Accepted'] | ['s996079319', 's824802861'] | [3064.0, 3064.0] | [18.0, 20.0] | [540, 611] |
p02760 | u518085378 | 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 = [list(map(int, input().split())) for _ in range(3)]\ns = []\nfor i in range(3):\n for j in range(3):\n s.append(S[i][j])\nn = int(input())\na = [int(input()) for i in range(n)]\nprint(s[0]in a and s[1] in a and s[2] in a)\nif (s[0]in a and s[1] in a and s[2] in a)or(s[3]in a and s[4] in a and s[5] in a)or(s[6]in a and s[7] in a and s[8] in a)or(s[0]in a and s[3] in a and s[6] in a)or(s[4]in a and s[1] in a and s[7] in a)or(s[2]in a and s[5] in a and s[8] in a)or(s[0]in a and s[4] in a and s[8] in a)or(s[2]in a and s[4] in a and s[6] in a):\n print("Yes")\nelse:\n print("No")', 'S = [list(map(int, input().split())) for _ in range(3)]\ns = []\nfor i in range(3):\n for j in range(3):\n s.append(S[i][j])\nn = int(input())\na = [int(input()) for i in range(n)]\nif (s[0]in a and s[1] in a and s[2] in a)or(s[3]in a and s[4] in a and s[5] in a)or(s[6]in a and s[7] in a and s[8] in a)or(s[0]in a and s[3] in a and s[6] in a)or(s[4]in a and s[1] in a and s[7] in a)or(s[2]in a and s[5] in a and s[8] in a)or(s[0]in a and s[4] in a and s[8] in a)or(s[2]in a and s[4] in a and s[6] in a):\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s570858925', 's678942325'] | [3188.0, 3064.0] | [19.0, 18.0] | [590, 547] |
p02760 | u518218959 | 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 contains(lista, n):\n for i in range(3):\n for j in range(3):\n if lista[i][j] == n:\n lista[i][j] = "x"\n\ndef busca(lista):\n for i in range(3):\n if(lista[i][0] == "x" and lista[i][1] == "x" and lista[i][2] == "x"):\n return "Yes"\n for i in range(3):\n if(lista[0][i] == "x" and lista[1][i] == "x" and lista[2][i] == "x"):\n return "Yes"\n if(lista[0][0] == "x" and lista[1][1] == "x" and lista[2][2] == "x"):\n return "Yes"\n if(lista[0][2] == "x" and lista[1][1] == "x" and lista[2][0] == "x"):\n return "Yes"\n return "No"\n\n \nlista = []\nfor i in range(3):\n x = list(map(float,input().split()))\n lista.append(x)\nfor i in range(int(input())):\n b = float(input())\n contains(lista,b)\nprint(busca(lista))\nprint(lista)\n \n', 'def contains(lista, n):\n for i in range(3):\n for j in range(3):\n if lista[i][j] == n:\n lista[i][j] = "x"\n\ndef busca(lista):\n for l in lista:\n if l == ["x","x","x"]:\n return "yes"\n for i in range(3):\n if(lista[0][i] == "x" and lista[1][i] == "x" and lista[2][i] == "x"):\n return "yes"\n if(lista[0][0] == "x" and lista[1][1] == "x" and lista[2][2] == "x"):\n return "yes"\n if(lista[0][2] == "x" and lista[1][1] == "x" and lista[2][0] == "x"):\n return "yes"\n return "no"\n\n \nlista = []\nfor i in range(3):\n x = list(map(float,input().split()))\n lista.append(x)\nfor i in range(int(input())):\n b = float(input())\n contains(lista,b)\nprint(busca(lista))\n \n', 'def contains(lista, n):\n for i in range(3):\n for j in range(3):\n if lista[i][j] == n:\n lista[i][j] = "x"\n\ndef busca(lista):\n for i in range(3):\n if(lista[i][0] == "x" and lista[i][1] == "x" and lista[i][2] == "x"):\n return "Yes"\n for i in range(3):\n if(lista[0][i] == "x" and lista[1][i] == "x" and lista[2][i] == "x"):\n return "Yes"\n if(lista[0][0] == "x" and lista[1][1] == "x" and lista[2][2] == "x"):\n return "Yes"\n if(lista[0][2] == "x" and lista[1][1] == "x" and lista[2][0] == "x"):\n return "Yes"\n return "No"\n\n \nlista = []\nfor i in range(3):\n x = list(map(float,input().split()))\n lista.append(x)\nfor i in range(int(input())):\n b = float(input())\n contains(lista,b)\nprint(busca(lista))\n\n \n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s121287869', 's703175083', 's486760975'] | [3064.0, 3064.0, 3064.0] | [18.0, 17.0, 17.0] | [824, 762, 812] |
p02760 | u518386853 | 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 = []\nfor i in range(3):\n ai = list(map(int, input().split()))\n a.append(ai)\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 if a[i][0] == 0 and a[i][1] == 0 and a[i][2] == 0:\n print("Yes")\n break\nelse:\n for i in range(3):\n if a[0][i] == 0 and a[1][i] == 0 and a[2][i] == 0:\n print("Yes")\n break\n else:\n if c[0][0] == 0 and c[1][1] == 0 and c[2][2] == 0:\n print("Yes")\n elif a[0][2] == 0 and a[1][1] == 0 and a[2][0] == 0:\n print("Yes")\n else:\n print("No")', 'a = []\nfor i in range(3):\n ai = list(map(int, input().split()))\n a.append(ai)\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\nans = "No"\nif sum(a[0]) == 0:\n ans = "Yes"\nelif sum(a[1]) == 0:\n ans = "Yes"\nelif sum(a[2]) == 0:\n ans = "Yes"\nelif a[0][0] + a[1][0] + a[2][0] == 0:\n ans = "Yes"\nelif a[0][1] + a[1][1] + a[2][1] == 0:\n ans = "Yes"\nelif a[0][2] + a[1][2] + a[2][2] == 0:\n ans = "Yes"\nelif a[0][0] + a[1][1] + a[2][2] == 0:\n ans = "Yes"\nelif a[0][2] + a[1][1] + a[2][0] == 0:\n ans = "Yes"\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s707742949', 's094033253'] | [3064.0, 3064.0] | [20.0, 18.0] | [713, 655] |
p02760 | u518581917 | 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 = []\n\nfor _ in range(3):\n card.extend(map(int, input().split(' ')))\n\njadge = [0] * 9\nN = int(input())\n\nfor _ in range(N):\n n = int(input())\n if n in card:\n jadge[card.index(n)] = 1\n\nprint(jadge)\n\nbingo = False\nfor i in range(3):\n if (jadge[3 * i] + jadge[3 * i+1] + jadge[3 * i+2]) == 3:\n bingo = True\n break\n if (jadge[i] + jadge[3 + i] + jadge[6 + i]) == 3:\n bingo = True\n break\n if (jadge[i] + jadge[4] + jadge[8-i]) == 3:\n bingo = True\n break\n\nif bingo:\n print('Yes')\nelse:\n print('No')\n\n", "card = []\n\nfor _ in range(3):\n card.extend(map(int, input().split(' ')))\n\njadge = [0] * 9\nN = int(input())\n\nfor _ in range(N):\n n = int(input())\n if n in card:\n jadge[card.index(n)] = 1\n\nbingo = False\nfor i in range(3):\n if (jadge[3 * i] + jadge[3 * i+1] + jadge[3 * i+2]) == 3:\n bingo = True\n break\n if (jadge[i] + jadge[3 + i] + jadge[6 + i]) == 3:\n bingo = True\n break\n if (jadge[i] + jadge[4] + jadge[8-i]) == 3:\n bingo = True\n break\n\nif bingo:\n print('Yes')\nelse:\n print('No')\n\n"] | ['Wrong Answer', 'Accepted'] | ['s099255973', 's357161168'] | [3064.0, 3064.0] | [17.0, 17.0] | [570, 556] |
p02760 | u519922200 | 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_1,A1_2,A1_3 = map(int, input().split())\nA2_1,A2_2,A2_3 = map(int, input().split()) \nA3_1,A3_2,A3_3 = map(int, input().split())\nN = int(input())\nB = []\nfor _ in range(N):\n B.append(input())\n\n', "A1_1,A1_2,A1_3 = map(int, input().split())\nA2_1,A2_2,A2_3 = map(int, input().split())\nA3_1,A3_2,A3_3 = map(int, input().split())\nN =int(input())\nB = []\nfor _ in range(N):\n B.append(int(input()))\n\na=str('yes')\nb=str('no')\nif A1_1 in B and A1_2 in B and A1_3 in B:\n print(a)\nelif A2_1 in B and A2_2 in B and A2_3 in B:\n print(a)\nelif A3_1 in B and A3_2 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_1 in B and A3_1 in B:\n print(a)\nelif A1_2 in B and A2_2 in B and A3_2 in B:\n print(a)\nelif A1_3 in B and A2_3 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_2 in B and A3_3 in B:\n print(a)\nelif A1_3 in B and A2_2 in B and A3_1 in B:\n print(a)\nelse:\n print(b)", "mport sys\ns = sys.stdin.readlines()\nA1_1,A1_2,A1_3= map(int, s[0].split())\nA2_1,A2_2,A2_3= map(int, s[1].split())\nA3_1,A3_2,A3_3= map(int, s[2].split())\nN=map(int, s[3].split())\nB=[]\nfor e in s[4:N + 4]:\n B.append(e)\na=str('yes')\nb=str('no')\nif A1_1 in B and A1_2 in B and A1_3 in B:\n print(a)\nelif A2_1 in B and A2_2 in B and A2_3 in B:\n print(a)\nelif A3_1 in B and A3_2 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_1 in B and A3_1 in B:\n print(a)\nelif A1_2 in B and A2_2 in B and A3_2 in B:\n print(a)\nelif A1_3 in B and A2_3 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_2 in B and A3_3 in B:\n print(a)\nelif A1_3 in B and A2_2 in B and A3_1 in B:\n print(a)\nelse:\n print(b)", "A1_1,A1_2,A1_3 = map(int, input().split())\nA2_1,A2_2,A2_3 = map(int, input().split())\nA3_1,A3_2,A3_3 = map(int, input().split())\nN =int(input())\nB = []\nfor _ in range(N):\n B+=[input()]\n\na=str('yes')\nb=str('no')\nif A1_1 in B and A1_2 in B and A1_3 in B:\n print(a)\nelif A2_1 in B and A2_2 in B and A2_3 in B:\n print(a)\nelif A3_1 in B and A3_2 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_1 in B and A3_1 in B:\n print(a)\nelif A1_2 in B and A2_2 in B and A3_2 in B:\n print(a)\nelif A1_3 in B and A2_3 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_2 in B and A3_3 in B:\n print(a)\nelif A1_3 in B and A2_2 in B and A3_1 in B:\n print(a)\nelse:\n print(b)", "A1_1=84 \nA1_2=97\nA1_3=66\nA2_1=79 \nA2_2=89\nA2_3=11\nA3_1=61\nA3_2=59\nA3_3=7\nB=[89,7,87,79,24,84,30]\nN=len(B)\na=str('yes')\nb=str('no')\nif A1_1 in B and A1_2 in B and A1_3 in B:\n print(a)\nelif A2_1 in B and A2_2 in B and A2_3 in B:\n print(a)\nelif A3_1 in B and A3_2 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_1 in B and A3_1 in B:\n print(a)\nelif A1_2 in B and A2_2 in B and A3_2 in B:\n print(a)\nelif A1_3 in B and A2_3 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_2 in B and A3_3 in B:\n print(a)\nelif A1_3 in B and A2_2 in B and A3_1 in B:\n print(a)\nelse:\n print(b)", "A1_1,A1_2,A1_3 = map(int, input().split())\nA2_1,A2_2,A2_3 = map(int, input().split())\nA3_1,A3_2,A3_3 = map(int, input().split())\nN =int(input())\nB = []\nfor _ in range(N+4):\n B.append(input())\n\na=str('yes')\nb=str('no')\nif A1_1 in B and A1_2 in B and A1_3 in B:\n print(a)\nelif A2_1 in B and A2_2 in B and A2_3 in B:\n print(a)\nelif A3_1 in B and A3_2 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_1 in B and A3_1 in B:\n print(a)\nelif A1_2 in B and A2_2 in B and A3_2 in B:\n print(a)\nelif A1_3 in B and A2_3 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_2 in B and A3_3 in B:\n print(a)\nelif A1_3 in B and A2_2 in B and A3_1 in B:\n print(a)\nelse:\n print(b)", "import sys\ns = sys.stdin.readlines()\nA1_1,A1_2,A1_3= map(int, s[0].split())\nA2_1,A2_2,A2_3= map(int, s[1].split())\nA3_1,A3_2,A3_3= map(int, s[2].split())\nN=int(s[3].split())\nB=[]\nfor e in s[4:N + 4]:\n B.append(e)\na=str('yes')\nb=str('no')\nif A1_1 in B and A1_2 in B and A1_3 in B:\n print(a)\nelif A2_1 in B and A2_2 in B and A2_3 in B:\n print(a)\nelif A3_1 in B and A3_2 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_1 in B and A3_1 in B:\n print(a)\nelif A1_2 in B and A2_2 in B and A3_2 in B:\n print(a)\nelif A1_3 in B and A2_3 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_2 in B and A3_3 in B:\n print(a)\nelif A1_3 in B and A2_2 in B and A3_1 in B:\n print(a)\nelse:\n print(b)", "A1_1,A1_2,A1_3 = map(int, input().split())\nA2_1,A2_2,A2_3 = map(int, input().split())\nA3_1,A3_2,A3_3 = map(int, input().split())\nN =int(input())\nB = []\nfor _ in range(N):\n B.append(input())\n\na=str('yes')\nb=str('no')\nif A1_1 in B and A1_2 in B and A1_3 in B:\n print(a)\nelif A2_1 in B and A2_2 in B and A2_3 in B:\n print(a)\nelif A3_1 in B and A3_2 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_1 in B and A3_1 in B:\n print(a)\nelif A1_2 in B and A2_2 in B and A3_2 in B:\n print(a)\nelif A1_3 in B and A2_3 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_2 in B and A3_3 in B:\n print(a)\nelif A1_3 in B and A2_2 in B and A3_1 in B:\n print(a)\nelse:\n print(b)", "A1_1,A1_2,A1_3 = map(int, input().split())\nA2_1,A2_2,A2_3 = map(int, input().split()) \nA3_1,A3_2,A3_3 = map(int, input().split())\nN = int(input())\nB = []\nfor _ in range(N):\n B.append(input())\n\na=str('yes')\nb=str('no')\nif A1_1 in B and A1_2 in B and A1_3 in B:\n print(a)\nelif A2_1 in B and A2_2 in B and A2_3 in B:\n print(a)\nelif A3_1 in B and A3_2 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_1 in B and A3_1 in B:\n print(a)\nelif A1_2 in B and A2_2 in B and A3_2 in B:\n print(a)\nelif A1_3 in B and A2_3 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_2 in B and A3_3 in B:\n print(a)\nelif A1_3 in B and A2_2 in B and A3_1 in B:\n print(a)\nelse:\n print(b)", "A1_1,A1_2,A1_3 = map(int, input().split())\nA2_1,A2_2,A2_3 = map(int, input().split()) \nA3_1,A3_2,A3_3 = map(int, input().split())\nN = int(input())\nB = list(map(int, input().split()))\n\na=str('yes')\nb=str('no')\nif A1_1 in B and A1_2 in B and A1_3 in B:\n print(a)\nelif A2_1 in B and A2_2 in B and A2_3 in B:\n print(a)\nelif A3_1 in B and A3_2 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_1 in B and A3_1 in B:\n print(a)\nelif A1_2 in B and A2_2 in B and A3_2 in B:\n print(a)\nelif A1_3 in B and A2_3 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_2 in B and A3_3 in B:\n print(a)\nelif A1_3 in B and A2_2 in B and A3_1 in B:\n print(a)\nelse:\n print(b)", "A1_1,A1_2,A1_3 = map(int, input().split())\nA2_1,A2_2,A2_3 = map(int, input().split())\nA3_1,A3_2,A3_3 = map(int, input().split())\nN = map(int, input().split())\nB = []\nfor _ in range(N):\n B.append(input())\n\na=str('yes')\nb=str('no')\nif A1_1 in B and A1_2 in B and A1_3 in B:\n print(a)\nelif A2_1 in B and A2_2 in B and A2_3 in B:\n print(a)\nelif A3_1 in B and A3_2 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_1 in B and A3_1 in B:\n print(a)\nelif A1_2 in B and A2_2 in B and A3_2 in B:\n print(a)\nelif A1_3 in B and A2_3 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_2 in B and A3_3 in B:\n print(a)\nelif A1_3 in B and A2_2 in B and A3_1 in B:\n print(a)\nelse:\n print(b)", "A1_1,A1_2,A1_3 = map(int, input().split())\nA2_1,A2_2,A2_3 = map(int, input().split()) \nA3_1,A3_2,A3_3 = map(int, input().split())\nN = int(input())\nB = []\nfor _ in range(N):\n S.append(input())\n\na=str('yes')\nb=str('no')\nif A1_1 in B and A1_2 in B and A1_3 in B:\n print(a)\nelif A2_1 in B and A2_2 in B and A2_3 in B:\n print(a)\nelif A3_1 in B and A3_2 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_1 in B and A3_1 in B:\n print(a)\nelif A1_2 in B and A2_2 in B and A3_2 in B:\n print(a)\nelif A1_3 in B and A2_3 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_2 in B and A3_3 in B:\n print(a)\nelif A1_3 in B and A2_2 in B and A3_1 in B:\n print(a)\nelse:\n print(b)", "A1_1,A1_2,A1_3 = map(int, input().split())\nA2_1,A2_2,A2_3 = map(int, input().split())\nA3_1,A3_2,A3_3 = map(int, input().split())\nN =int(input())\nB = []\nfor _ in range(N):\n B.append(int(input()))\n\na=str('Yes')\nb=str('No')\nif A1_1 in B and A1_2 in B and A1_3 in B:\n print(a)\nelif A2_1 in B and A2_2 in B and A2_3 in B:\n print(a)\nelif A3_1 in B and A3_2 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_1 in B and A3_1 in B:\n print(a)\nelif A1_2 in B and A2_2 in B and A3_2 in B:\n print(a)\nelif A1_3 in B and A2_3 in B and A3_3 in B:\n print(a)\nelif A1_1 in B and A2_2 in B and A3_3 in B:\n print(a)\nelif A1_3 in B and A2_2 in B and A3_1 in B:\n print(a)\nelse:\n print(b)"] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s064820426', 's079484524', 's256771056', 's351273591', 's353961811', 's415772670', 's518321735', 's768024360', 's787840908', 's858879087', 's862949052', 's916406462', 's691161459'] | [2940.0, 3064.0, 2940.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 18.0, 17.0, 17.0] | [199, 699, 720, 689, 606, 696, 716, 694, 699, 687, 708, 699, 699] |
p02760 | u519939795 | 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,b,c = map(int, input().split())\nd,e,f = map(int, input().split())\nl,m,k = map(int, input().split())\ng = [a, b, c, d, e, f, l, m, k]\nlis1 = []\nn = int(input())\nfor i in range(n):\n op = int(input())\n lis1.append(op)\n \nif lis1 == [a,b,c] or lis1 == [d,e,f] or lis1 == [l,m,k] or lis1 == [a,d,l] or lis1 == [b,e,m] or lis1 == [c,f,k] or lis1 == [a,e,k] or lis1 == [c,e,l]:\n print('Yes')\nelse:\n print('No')", "a,b,c = map(int, input().split())\nd,e,f = map(int, input().split())\nl,m,k = map(int, input().split())\ng = [a, b, c, d, e, f, l, m, k]\na1 = [a, b, c]\na2 = [d, e, f]\na3 = [l, m, k]\na4 = [a, d, l]\na5 = [b, e, m]\na6 = [c, f, k]\na7 = [a, e, k]\na8 = [c, e, l]\nlis1 = []\nn = int(input())\nfor i in range(n):\n op = int(input())\n lis1.append(op)\n \nif set(a1) <= set(lis1) or set(a2) <= set(lis1) or set(a3) <= set(lis1) or set(a4) <= set(lis1) or set(a5) <= set(lis1) or set(a6) <= set(lis1) or set(a7) <= set(lis1) or set(a8) <= set(lis1):\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s505422462', 's673630196'] | [3188.0, 3064.0] | [17.0, 17.0] | [418, 578] |
p02760 | u521518741 | 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\nS = [list(map(int, input().split())) for _ in range(N)]\nn_guess = int(input())\nguesses = set([int(input()) for _ in range(n_guess)])\ndic = {}\nfor r in range(N):\n for c in range(N):\n dic[S[r][c]]=(r,c)\n\nfor g in guesses:\n if g in dic:\n (r, c) = dic[g]\n S[r][c] = -1\nprint(S)\nif all([S[i][0]==-1 for i in range(N)]) or \\\n all([S[0][i]==-1 for i in range(N)]) or \\\n all([S[i][N-i-1]==-1 for i in range(N)]) or \\\n all([S[i][i]==-1 for i in range(N)]):\n \tprint('Yes')\nelse:\n\tprint('No')", "N = 3\nS = [list(map(int, input().split())) for _ in range(N)]\nn_guess = int(input())\nguesses = set([int(input()) for _ in range(n_guess)])\ndic = {}\nfor r in range(N):\n for c in range(N):\n dic[S[r][c]]=(r,c)\n\nfor g in guesses:\n if g in dic:\n (r, c) = dic[g]\n S[r][c] = -1\n\nans = 'No'\nfor i in range(N):\n if sum(S[i]) == -3:\n ans='Yes'\n \nfor i in range(N):\n if sum([S[_][i] for _ in range(N)]) == -3:\n ans='Yes'\n \nif all([S[i][N-i-1]==-1 for i in range(N)]) or \\\n all([S[i][i]==-1 for i in range(N)]):\n \tans = 'Yes'\nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s940564955', 's860748493'] | [3064.0, 3064.0] | [17.0, 17.0] | [506, 553] |
p02760 | u531220228 | 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([])\nfor i in range(3):\n A.append(list(map(int, input().split())))\n\nN = int(input())\n\nfor n in range(N):\n called_num = int(input())\n called_row = [called_num in A[i] for i in range(3)].index(True)\n \n A[called_row] = [0 if x==called_num else x for x in A[called_row]]\n \nsum_row = np.sum(A, axis=1)\nsum_col = np.sum(A, axis=0)\nsum_diag1 = np.diag(A).sum()\nsum_diag2 = A[0][2] + A[1][1] + A[2][0] \n\nif 0 in sum_row or 0 in sum_col or 0 in [sum_diag1, sum_diag2]: \n print('Yes')\nelse:\n print('No')", "import numpy as np\nA = []\nfor i in range(3):\n A.append(list(map(int, input().split())))\nA = np.array(A)\n\nN = int(input())\n \nfor n in range(N):\n called_num = int(input())\n exist_list = [called_num in A[i] for i in range(3)]\n if True in exist_list:\n \tcalled_row = exist_list.index(True)\n \tA[called_row] = [0 if x==called_num else x for x in A[called_row]]\n \nsum_row = np.sum(A, axis=1)\nsum_col = np.sum(A, axis=0)\nsum_diag1 = np.diag(A).sum()\nsum_diag2 = A[0][2] + A[1][1] + A[2][0] \n \nif 0 in sum_row or 0 in sum_col or 0 in [sum_diag1, sum_diag2]: \n print('Yes')\nelse:\n print('No')", "import numpy as np\nA = []\nfor i in range(3):\n A.append(list(map(int, input().split())))\nA = np.array(A)\n\nN = int(input())\n\nfor n in range(N):\n called_num = int(input())\n exist_list = [called_num in A[i] for i in range(3)]\n if True in exist_list:\n called_row = exist_list.index(True)\n A[called_row] = [0 if x==called_num else x for x in A[called_row]]\n \nsum_row = np.sum(A, axis=1)\nsum_col = np.sum(A, axis=0)\nsum_diag1 = np.diag(A).sum()\nsum_diag2 = A[0][2] + A[1][1] + A[2][0] \n\nif 0 in sum_row or 0 in sum_col or 0 in [sum_diag1, sum_diag2]: \n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s059148318', 's817846863', 's287506674'] | [12436.0, 2940.0, 12488.0] | [147.0, 17.0, 152.0] | [610, 675, 678] |
p02760 | u531456543 | 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. | ["lst = [ [ int(i) for i in input().split() ] for j in range(3) ]\n\nn = int(input())\n\nfor _ in range(n):\n x = int(input())\n for d in lst:\n if d[0] == x:\n d[0] = -1\n elif d[1] == x:\n d[1] = -1\n elif d[2] == x:\n d[2] = -1\nprint(lst)\nfor d in lst:\n if d[0] == d[1] == d[2] == -1:\n print('Yes')\n exit()\nfor i in range(3):\n if lst[0][i] == lst[1][i] == lst[2][i] == -1:\n print('Yes')\n exit()\nfor i in range(3):\n if lst[i][0] == lst[i][1] == lst[i][2] == -1:\n print('Yes')\n exit()\nif lst[0][0] == lst[1][1] == lst[2][2] == -1:\n print('Yes')\n exit()\nif lst[0][2] == lst[1][1] == lst[2][0] == -1:\n print('Yes')\n exit()\nprint('No')\n", "lst = [ [ int(i) for i in input().split() ] for j in range(3) ]\n\nn = int(input())\n\nfor _ in range(n):\n x = int(input())\n for d in lst:\n if d[0] == x:\n d[0] = -1\n elif d[1] == x:\n d[1] = -1\n elif d[2] == x:\n d[2] = -1\n\nfor d in lst:\n if d[0] == d[1] == d[2] == -1:\n print('Yes')\n exit()\nfor i in range(3):\n if lst[0][i] == lst[1][i] == lst[2][i] == -1:\n print('Yes')\n exit()\nfor i in range(3):\n if lst[i][0] == lst[i][1] == lst[i][2] == -1:\n print('Yes')\n exit()\nif lst[0][0] == lst[1][1] == lst[2][2] == -1:\n print('Yes')\n exit()\nif lst[0][2] == lst[1][1] == lst[2][0] == -1:\n print('Yes')\n exit()\nprint('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s117923613', 's580192987'] | [9268.0, 9252.0] | [27.0, 28.0] | [671, 661] |
p02760 | u531813438 | 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()))\nl=[[A11,A12,A13],[A21,A22,A23],[A31,A32,A33],[A11,A22,A33],[A13,A22,A11],[A11,A21,A31],[A12,A22,A32],[A13,A23,A33]]\nN = int(input())\nb = []\nfor i in range(N):\n b = int(input())\n for j in range(8):\n if b in l[j]:\n l[j].remove(b)\nf=1\nprint(l)\nfor i in range(8):\n if l[i]==[]:\n print('Yes')\n f-=1\n break\nif f==1:\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()))\nl=[[A11,A12,A13],[A21,A22,A23],[A31,A32,A33],[A11,A22,A33],[A13,A22,A31],[A11,A21,A31],[A12,A22,A32],[A13,A23,A33]]\nN = int(input())\nfor i in range(N):\n b = int(input())\n for j in range(8):\n if b in l[j]:\n l[j].remove(b)\nf=1\nfor i in range(8):\n if l[i]==[]:\n print('Yes')\n f-=1\n break\nif f==1:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s793452632', 's561401750'] | [3064.0, 3064.0] | [18.0, 18.0] | [511, 495] |
p02760 | u534308356 | 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 data = []\n for _ in range(3):\n data.append(list(map(int, input().split())))\n n = int(input())\n\n data_map = []\n for _ in range(3):\n data_map.append([0, 0, 0])\n\n for _ in range(n):\n x = int(input())\n if x == data[0][0]:\n data_map[0][0] = 1\n if x == data[0][1]:\n data_map[0][1] = 1\n if x == data[0][2]:\n data_map[0][2] = 1\n if x == data[1][0]:\n data_map[1][0] = 1\n if x == data[1][1]:\n data_map[1][1] = 1\n if x == data[1][2]:\n data_map[1][2] = 1\n if x == data[2][0]:\n data_map[2][0] = 1\n if x == data[2][1]:\n data_map[2][1] = 1\n if x == data[2][2]:\n data_map[2][2] = 1\n\n for i in range(3):\n print(*data_map[i])\n\n \n if sum(data_map[0]) == 3 or sum(data_map[1]) == 3 or sum(data_map[0]) == 3:\n print("Yes")\n return\n \n \n if data_map[0][0] + data_map[1][1] + data_map[2][2] == 3:\n print("Yes")\n return\n\n \n if data_map[0][2] + data_map[1][1] + data_map[2][0] == 3:\n print("Yes")\n return\n\n \n if data_map[0][0] + data_map[1][0] + data_map[2][0] == 3:\n print("Yes")\n return\n if data_map[0][1] + data_map[1][1] + data_map[2][1] == 3:\n print("Yes")\n return\n if data_map[0][2] + data_map[1][2] + data_map[2][2] == 3:\n print("Yes")\n return\n\n print("No")\n\nif __name__ == "__main__":\n main()\n', 'def main():\n data = []\n for _ in range(3):\n data.append(list(map(int, input().split())))\n\n n = int(input())\n\n data_map = []\n for _ in range(3):\n data_map.append([0, 0, 0])\n\n for _ in range(n):\n x = int(input())\n if x == data[0][0]:\n data_map[0][0] = 1\n if x == data[0][1]:\n data_map[0][1] = 1\n if x == data[0][2]:\n data_map[0][2] = 1\n if x == data[1][0]:\n data_map[1][0] = 1\n if x == data[1][1]:\n data_map[1][1] = 1\n if x == data[1][2]:\n data_map[1][2] = 1\n if x == data[2][0]:\n data_map[2][0] = 1\n if x == data[2][1]:\n data_map[2][1] = 1\n if x == data[2][2]:\n data_map[2][2] = 1\n\n \n # print(*data_map[i])\n\n \n if sum(data_map[0]) == 3 or sum(data_map[1]) == 3 or sum(data_map[2]) == 3:\n print("Yes")\n return\n \n \n if data_map[0][0] + data_map[1][1] + data_map[2][2] == 3:\n print("Yes")\n return\n \n if data_map[0][2] + data_map[1][1] + data_map[2][0] == 3:\n print("Yes")\n return\n\n \n if data_map[0][0] + data_map[1][0] + data_map[2][0] == 3:\n print("Yes")\n return\n if data_map[0][1] + data_map[1][1] + data_map[2][1] == 3:\n print("Yes")\n return\n if data_map[0][2] + data_map[1][2] + data_map[2][2] == 3:\n print("Yes")\n return\n\n print("No")\n\nif __name__ == "__main__":\n main()\n'] | ['Wrong Answer', 'Accepted'] | ['s168868788', 's888817543'] | [3192.0, 3192.0] | [17.0, 18.0] | [1380, 1384] |
p02760 | u536034761 | 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. | ['L = ()\nL.append(set(map(int, input().split())))\nL.append(set(map(int, input().split())))\nL.append(set(map(int, input().split())))\nL.append((L[0][0], L[1][0], L[2][0]))\nL.append((L[0][1], L[1][1], L[2][1]))\nL.append((L[0][2], L[1][2], L[2][2]))\nL.append((L[0][0], L[1][1], L[2][2]))\nL.append((L[0][2], L[1][1], L[2][0]))\nN = int(input())\nB = (int(input()) for i in range(N))\nif any(B >= l for l in L):\n print("Yes")\nelse:\n print("No")', 'L = []\nL.append(list(map(int, input().split())))\nL.append(list(map(int, input().split())))\nL.append(list(map(int, input().split())))\nL.append([L[0][0], L[1][0], L[2][0]])\nL.append([L[0][1], L[1][1], L[2][1]])\nL.append([L[0][2], L[1][2], L[2][2]])\nL.append([L[0][0], L[1][1], L[2][2]])\nL.append([L[0][2], L[1][1], L[2][0]])\nN = int(input())\nB = [int(input()) for i in range(N)]\nif any(l in B for l in L):\n print("Yes")\nelse:\n print("No")', 'a, b, c = map(int, input().split())\nd, e, f = map(int, input().split())\ng, h, i = map(int, input().split())\nL = []\nL.append({a, b, c})\nL.append({d, e, f})\nL.append({g, h, i})\nL.append({a, d, g})\nL.append({b, e, h})\nL.append({c, f, i})\nL.append({a, e, i})\nL.append({c, e, g})\nN = int(input())\nB = {int(input()) for i in range(N)}\nif any(l <= B for l in L):\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s340025172', 's373471566', 's060803973'] | [3064.0, 3064.0, 3064.0] | [18.0, 17.0, 17.0] | [435, 438, 390] |
p02760 | u536642030 | 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\nbingo = np.array([list(map(int,input().split())) for i in range(3)])\nn = int(input())\nnum = np.array([int(input()) for i in range(n)])\n\n \n \n', "bingo = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\nnum = [int(input()) for i in range(n)]\nfor i in num:\n for row in range(3):\n for col in range(3):\n if bingo[row][col] == i:\n bingo[row][col] = 0\nif sum(bingo[0]) == 0 or sum(bingo[1]) == 0 or sum(bingo[2]) == 0 or sum([hoge[0] for hoge in bingo]) == 0 or sum([hoge[1] for hoge in bingo]) == 0 or sum([hoge[2] for hoge in bingo]) == 0 or sum([bingo[i][i] for i in range(3)]) == 0 or sum([bingo[i][2-i] for i in range(3)]) == 0:\n print('Yes')\nelse:\n print('No')\n "] | ['Wrong Answer', 'Accepted'] | ['s413013043', 's992893215'] | [12460.0, 3064.0] | [155.0, 17.0] | [175, 559] |
p02760 | u537722973 | 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.append(input().split())\na.append(input().split())\na.append(input().split())\nn = int(input())\n\nfor i in range(n):\n b = 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 break\n else:\n continue\n break\nprint(a)\n\nfor i in range(3):\n if a[i][0] == a[i][1] == a[i][2] == "0":\n print("Yes")\n exit()\n if a[0][i] == a[1][i] == a[2][i] == "0":\n print("Yes")\n exit()\n\nif a[0][0] == a[1][1] == a[2][2] == "0":\n print("Yes")\n exit()\nif a[0][2] == a[1][1] == a[2][0] == "0":\n print("Yes")\n exit()\n\nprint("No")', 'a = []\na.append(input().split())\na.append(input().split())\na.append(input().split())\nn = int(input())\n\nfor i in range(n):\n b = 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 break\n else:\n continue\n break\n\nfor i in range(3):\n if a[i][0] == a[i][1] == a[i][2] == "0":\n print("Yes")\n exit()\n if a[0][i] == a[1][i] == a[2][i] == "0":\n print("Yes")\n exit()\n\nif a[0][0] == a[1][1] == a[2][2] == "0":\n print("Yes")\n exit()\nif a[0][2] == a[1][1] == a[2][0] == "0":\n print("Yes")\n exit()\n\nprint("No")'] | ['Wrong Answer', 'Accepted'] | ['s014571177', 's349178362'] | [9076.0, 9108.0] | [27.0, 27.0] | [588, 579] |
p02760 | u540698208 | 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 = [input().split() for _ in range(3)]\n\nn = int(input())\n\nnums = [[] for _ in range(3)]\n\ncheck = list()\n\nfor i in range(3):\n for j in range(3):\n check[i].append(False)\n if bingo[i][j] in nums:\n check[i][j] = True\n\nANS = "No"\n\nfor i in range(3):\n if (check[i][0]) and (check[i][1]) and (check[i][2]):\n ANS = "Yes"\nfor i in range(3):\n if (check[0][i]) and (check[1][i]) and (check[2][i]):\n ANS = "Yes"\nif (check[0][0]) and (check[1][1]) and (check[2][2]):\n ANS = "Yes"\nif (check[0][2]) and (check[1][1]) and (check[2][0]):\n ANS = "Yes"\n\nprint(ANS)\n', 'bingo = [input().split() for _ in range(3)]\n\nn = int(input())\n\nnums = [[] for _ in range(3)]\n\ncheck = [[] for _ in range(3)]\n\nfor i in range(3):\n for j in range(3):\n check[i].append(False)\n if bingo[i][j] in nums:\n check[i][j] = True\n\nANS = "No"\n\nfor i in range(3):\n if (check[i][0]) and (check[i][1]) and (check[i][2]):\n ANS = "Yes"\nfor i in range(3):\n if (check[0][i]) and (check[1][i]) and (check[2][i]):\n ANS = "Yes"\nif (check[0][0]) and (check[1][1]) and (check[2][2]):\n ANS = "Yes"\nif (check[0][2]) and (check[1][1]) and (check[2][0]):\n ANS = "Yes"\n\nprint(ANS)', 'bingo = [input().split() for _ in range(3)]\n\nn = int(input())\n\nnums = [input() for _ in range(n)]\n\ncheck = [[] for _ in range(3)]\n\nfor i in range(3):\n for j in range(3):\n if bingo[i][j] in nums:\n check[i].append(True)\n else:\n check[i].append(False)\n\nANS = "No"\n\nfor i in range(3):\n if (check[i][0]) and (check[i][1]) and (check[i][2]):\n ANS = "Yes"\nfor i in range(3):\n if (check[0][i]) and (check[1][i]) and (check[2][i]):\n ANS = "Yes"\nif (check[0][0]) and (check[1][1]) and (check[2][2]):\n ANS = "Yes"\nif (check[0][2]) and (check[1][1]) and (check[2][0]):\n ANS = "Yes"\n\nprint(ANS)\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s062828081', 's291032524', 's598354260'] | [3064.0, 3188.0, 3064.0] | [18.0, 17.0, 17.0] | [605, 620, 647] |
p02760 | u540761833 | 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)]\nfor i in range(N):\n for h in range(3):\n for w in range(3):\n if b[i] == A[h][w]:\n A[h][w] = 0\nif [0,0,0] in A:\n print('Yes')\nelse:\n ans = 'No'\n for i in zip(*A):\n if i == (0,0,0):\n ans = 'Yes'\n break\n print(ans)", "A = [list(map(int,input().split())) for i in range(3)]\nN = int(input())\nb = [int(input()) for i in range(N)]\n\nfor h in range(3):\n for w in range(3):\n for i in range(N):\n if b[i] == A[h][w]:\n A[h][w] = 0\nif [0,0,0] in A:\n print('Yes')\nelse:\n ans = 'No'\n for i in zip(*A):\n if i == (0,0,0):\n ans = 'Yes'\n break\n print(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(N):\n for h in range(3):\n for w in range(3):\n if b[i] == A[h][w]:\n A[h][w] = 0\nif [0,0,0] in A:\n print('Yes')\nelse:\n ans = 'No'\n for i in zip(*A):\n if i == [0,0,0]:\n ans = 'Yes'\n break\n print(ans)", "A = [list(map(int,input().split())) for i in range(3)]\nN = int(input())\nb = [int(input()) for i in range(N)]\n\nfor h in range(3):\n for w in range(3):\n for i in range(N):\n if b[i] == A[h][w]:\n A[h][w] = 0\nif [0,0,0] in A:\n print('Yes')\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 ans = 'No'\n for i in zip(*A):\n if i == (0,0,0):\n ans = 'Yes'\n break\n print(ans)"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s069782054', 's520403333', 's531228375', 's096999423'] | [3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 18.0, 18.0] | [396, 397, 396, 537] |
p02760 | u547115759 | 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 = [[],[],[]]\n \nfor i in range(3):\n a, b, c = map(int,input().split())\n bingo[i].append(a)\n bingo[i].append(b)\n bingo[i].append(c)\n \nN = int(input())\n \nfor i in range(N):\n S = int(input())\n for j in range(3):\n if S in bingo[j]:\n for k in range(3):\n if S == bingo[j][k]:\n bingo[j][k] = \'ok\'\n \nANS = 0\n \nfor i in range(3):\n for j in range(3):\n if bingo[i][j] == \'ok\':\n ANS += 1\n if ANS == 3:\n print("Yes")\n ANS = 0\n \nfor i in range(3):\n for j in range(3):\n if bingo[j][i] == \'ok\':\n ANS += 1\n if ANS == 3:\n print("Yes")\n ANS = 0\n \nif bingo[1][1] == \'ok\':\n if bingo[0][0] == \'ok\' and bingo[2][2] == \'ok\':\n print("Yse")\n elif bingo[0][2] == \'ok\' and bingo[2][0] == \'ok\':\n print("Yse")\n else:\n print("No")\n ', 'import sys\nbingo = [[],[],[]]\n \nfor i in range(3):\n a, b, c = map(int,input().split())\n bingo[i].append(a)\n bingo[i].append(b)\n bingo[i].append(c)\n \nN = int(input())\n \nfor i in range(N):\n S = int(input())\n for j in range(3):\n if S in bingo[j]:\n for k in range(3):\n if S == bingo[j][k]:\n bingo[j][k] = \'ok\'\n \nANS = 0\n \nfor i in range(3):\n for j in range(3):\n if bingo[i][j] == \'ok\':\n ANS += 1\n if ANS == 3:\n print("Yes")\n sys.exit()\n ANS = 0\n \nfor i in range(3):\n for j in range(3):\n if bingo[j][i] == \'ok\':\n ANS += 1\n if ANS == 3:\n print("Yes")\n sys.exit()\n ANS = 0\n \nif bingo[1][1] == \'ok\':\n if bingo[0][0] == \'ok\' and bingo[2][2] == \'ok\':\n print("Yse")\n sys.exit()\n elif bingo[0][2] == \'ok\' and bingo[2][0] == \'ok\':\n print("Yse")\n sys.exit()\n else:\n print("No")\n sys.exit()\nprint("No")', 'import sys\nbingo = [[],[],[]]\n \nfor i in range(3):\n a, b, c = map(int,input().split())\n bingo[i].append(a)\n bingo[i].append(b)\n bingo[i].append(c)\n \nN = int(input())\n \nfor i in range(N):\n S = int(input())\n for j in range(3):\n if S in bingo[j]:\n for k in range(3):\n if S == bingo[j][k]:\n bingo[j][k] = \'ok\'\n \nANS = 0\n \nfor i in range(3):\n for j in range(3):\n if bingo[i][j] == \'ok\':\n ANS += 1\n if ANS == 3:\n print("Yes")\n sys.exit()\n ANS = 0\n\nANS = 0\nfor i in range(3):\n for j in range(3):\n if bingo[j][i] == \'ok\':\n ANS += 1\n if ANS == 3:\n print("Yes")\n sys.exit()\n ANS = 0\n \nif bingo[1][1] == \'ok\':\n if bingo[0][0] == \'ok\' and bingo[2][2] == \'ok\':\n print("Yse")\n sys.exit()\n elif bingo[0][2] == \'ok\' and bingo[2][0] == \'ok\':\n print("Yse")\n sys.exit()\n else:\n print("No")\n sys.exit()\nprint("No")', 'import sys\nbingo = [[],[],[]]\n \nfor i in range(3):\n a, b, c = map(int,input().split())\n bingo[i].append(a)\n bingo[i].append(b)\n bingo[i].append(c)\n \nN = int(input())\n \nfor i in range(N):\n S = int(input())\n for j in range(3):\n if S in bingo[j]:\n for k in range(3):\n if S == bingo[j][k]:\n bingo[j][k] = \'ok\'\n \nANS = 0\n \nfor i in range(3):\n for j in range(3):\n if bingo[i][j] == \'ok\':\n ANS += 1\n if ANS == 3:\n print("Yes")\n sys.exit()\n ANS = 0\n \nfor i in range(3):\n for j in range(3):\n if bingo[j][i] == \'ok\':\n ANS += 1\n if ANS == 3:\n print("Yes")\n sys.exit()\n ANS = 0\n \nif bingo[1][1] == \'ok\':\n if bingo[0][0] == \'ok\' and bingo[2][2] == \'ok\':\n print("Yse")\n sys.exit()\n elif bingo[0][2] == \'ok\' and bingo[2][0] == \'ok\':\n print("Yse")\n sys.exit()\nprint("No")\n', 'import sys\nbingo = [[],[],[]]\n \nfor i in range(3):\n a, b, c = map(int,input().split())\n bingo[i].append(a)\n bingo[i].append(b)\n bingo[i].append(c)\n \nN = int(input())\n \nfor i in range(N):\n S = int(input())\n for j in range(3):\n if S in bingo[j]:\n for k in range(3):\n if S == bingo[j][k]:\n bingo[j][k] = \'ok\'\n \nANS = 0\n \nfor i in range(3):\n for j in range(3):\n if bingo[i][j] == \'ok\':\n ANS += 1\n if ANS == 3:\n print("Yes")\n sys.exit()\n ANS = 0\n \nfor i in range(3):\n for j in range(3):\n if bingo[j][i] == \'ok\':\n ANS += 1\n if ANS == 3:\n print("Yes")\n sys.exit()\n ANS = 0\n \nif bingo[1][1] == \'ok\':\n if bingo[0][0] == \'ok\' and bingo[2][2] == \'ok\':\n print("Yse")\n sys.exit()\n elif bingo[0][2] == \'ok\' and bingo[2][0] == \'ok\':\n print("Yse")\n sys.exit()\n else:\n print("No")\n sys.exit()\n ', 'bingo = [[],[],[]]\n\nfor i in range(3):\n a, b, c = map(int,input().split())\n bingo[i].append(a)\n bingo[i].append(b)\n bingo[i].append(c)\n \nN = int(input())\nif N < 9:\n print("No")\n \nfor i in range(N):\n S = int(input())\n for j in range(3):\n if S in bingo[j]:\n for k in range(3):\n if S == bingo[j][k]:\n bingo[j][k] = \'ok\'\n \nANS = 0\n\nfor i in range(3):\n for j in range(3):\n if bingo[i][j] == \'ok\':\n ANS += 1\n if ANS == 3:\n print("Yes")\n ANS = 0\n\nfor i in range(3):\n for j in range(3):\n if bingo[j][i] == \'ok\':\n ANS += 1\n if ANS == 3:\n print("Yes")\n ANS = 0\n\nif bingo[1][1] == \'ok\':\n if bingo[0][0] == \'ok\' and bingo[2][2] == \'ok\':\n print("Yse")\n elif bingo[0][2] == \'ok\' and bingo[2][0] == \'ok\':\n print("Yse")\n \n\nprint("No")', 'import sys\nbingo = [[],[],[]]\n \nfor i in range(3):\n a, b, c = map(int,input().split())\n bingo[i].append(a)\n bingo[i].append(b)\n bingo[i].append(c)\n \nN = int(input())\n \nfor i in range(N):\n S = int(input())\n for j in range(3):\n if S in bingo[j]:\n for k in range(3):\n if S == bingo[j][k]:\n bingo[j][k] = \'ok\'\n \nANS = 0\n \nfor i in range(3):\n for j in range(3):\n if bingo[i][j] == \'ok\':\n ANS += 1\n if ANS == 3:\n print("Yes")\n sys.exit()\n ANS = 0\n \nfor i in range(3):\n for j in range(3):\n if bingo[j][i] == \'ok\':\n ANS += 1\n if ANS == 3:\n print("Yes")\n sys.exit()\n ANS = 0\n \nif bingo[1][1] == \'ok\':\n if bingo[0][0] == \'ok\' and bingo[2][2] == \'ok\':\n print("Yes")\n sys.exit()\n elif bingo[0][2] == \'ok\' and bingo[2][0] == \'ok\':\n print("Yes")\n sys.exit()\n else:\n print("No")\n sys.exit()\nprint("No")'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s206404238', 's210455081', 's335966235', 's533027250', 's844742335', 's948030735', 's269944827'] | [3064.0, 3064.0, 3192.0, 3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 18.0, 18.0, 17.0, 17.0, 17.0] | [803, 907, 914, 869, 897, 812, 907] |
p02760 | u548093253 | 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)]\nfor i in range(3):\n for j in range(3):\n for k in b:\n if a[j][i] == k:\n a[j][i] = 'o'\na1 = list(set(a[0]))\na2 = list(set(a[1]))\na3 = list(set(a[2]))\na4 = list(set((a[0][0],a[1][1],a[2][2])))\na5 = list(set((a[0][2],a[1][1],a[2][0])))\na6 = list(set((a[0][0],a[1][0],a[2][0])))\na7 = list(set((a[0][1],a[1][1],a[2][1])))\na8 = list(set((a[0][2],a[1][2],a[2][2])))\np = ['o']\nA = [a1,a2,a3,a4,a5,a6,a7,a8]\nfor i in A:\n ans = 'No'\n if i == p:\n ans = 'Yes'\n break\nprint(ans)\nprint(A)", "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 b:\n if a[j][i] == k:\n a[j][i] = 'o'\na1 = list(set(a[0]))\na2 = list(set(a[1]))\na3 = list(set(a[2]))\na4 = list(set((a[0][0],a[1][1],a[2][2])))\na5 = list(set((a[0][2],a[1][1],a[2][0])))\na6 = list(set((a[0][0],a[1][0],a[2][0])))\na7 = list(set((a[0][1],a[1][1],a[2][1])))\na8 = list(set((a[0][2],a[1][2],a[2][2])))\np = ['o']\nA = [a1,a2,a3,a4,a5,a6,a7,a8]\nfor i in A:\n ans = 'No'\n if i == p:\n ans = 'Yes'\n break\nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s601329149', 's666093532'] | [3064.0, 3064.0] | [18.0, 18.0] | [623, 614] |
p02760 | u550835660 | 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 = [list(map(int,input().split())) for i in range(3)]\nn= int(input())\nbs = [int(input()) for i in range(n)]\n\nbingo.append([bingo[0][0], bingo[1][1], bingo[2][2]])\nbingo.append([bingo[0][2], bingo[1][1], bingo[2][0]])\nbingo.append([bingo[0][0], bingo[1][0], bingo[2][0]])\nbingo.append([bingo[0][1], bingo[1][1], bingo[2][1]])\nbingo.append([bingo[0][2], bingo[1][2], bingo[2][2]])\n\n\nprint(any([len([j for j in k if j in bs])==3 for k in bingo]))', 'bingo = [list(map(int,input().split())) for i in range(3)]\nn= int(input())\nbs = [int(input()) for i in range(n)]\n\nbingo.append([bingo[0][0], bingo[1][1], bingo[2][2]])\nbingo.append([bingo[0][2], bingo[1][1], bingo[2][0]])\nbingo.append([bingo[0][0], bingo[1][0], bingo[2][0]])\nbingo.append([bingo[0][1], bingo[1][1], bingo[2][1]])\nbingo.append([bingo[0][2], bingo[1][2], bingo[2][2]])\n\n\nprint("Yes" if any([len([j for j in k if j in bs])==3 for k in bingo]) else "No")'] | ['Wrong Answer', 'Accepted'] | ['s261522386', 's759054149'] | [3064.0, 3064.0] | [17.0, 17.0] | [448, 467] |
p02760 | u551437236 | 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())\nfor i in range(n):\n b = int(input())\n for j in a:\n if b in j:\n a[a.index(j)][j.index(b)] = 0\n\nans = 0\nfor i in range(3):\n if a[0][i] == a[1][i] == a[2][i] == 0:\n ans = 1\n elif a[i][0] == a[i][1] == a[i][2] == 0:\n ans = 1\nif a[0][0] == a[1][1] == a[2][2] == 0:\n ans = 1\nif a[0][3] == a[1][1] == a[2][0] == 0:\n ans = 1\nif ans == 1:\n print("Yes")\nelse:\n print("No")\n', 'a = []\nfor i in range(3):\n a.append(list(map(int, input().split())))\n\nn = int(input())\nfor i in range(n):\n b = int(input())\n for j in a:\n if b in j:\n a[a.index(j)][j.index(b)] = 0\n\nans = 0\nfor i in range(3):\n if a[0][i] == a[1][i] == a[2][i] == 0:\n ans = 1\n elif a[i][0] == a[i][1] == a[i][2] == 0:\n ans = 1\nif a[0][0] == a[1][1] == a[2][2] == 0:\n ans = 1\nif a[0][2] == a[1][1] == a[2][0] == 0:\n ans = 1\n\nif ans == 1:\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s016742448', 's201770697'] | [3064.0, 3064.0] | [18.0, 17.0] | [509, 510] |
p02760 | u553308611 | 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):\n for i in range(3):\n if A[i,0] == 0 and A[i,1] == 0 and A[i,2] == 0:\n return True\n if A[0,i] == 0 and A[1,i] == 0 and A[2,i] == 0:\n return True\n if A[0,0] == 0 and A[1,1] == 0 and A[2,2] == 0:\n return True\n if A[0,2] == 0 and A[1,1] == 0 and A[2,0] == 0:\n return True\n\n return False\n\n\n\na = list(map(int, input().split()))\nA = a\na = list(map(int, input().split()))\nA = np.vstack((A, a))\na = list(map(int, input().split()))\nA = np.vstack((A, a))\nN = int(input())\nb = []\nfor i in range(N):\n b.append(int(input()))\n\nfor i in range(N):\n for m in range(3):\n for n in range(3):\n if b[i] == A[m,n]:\n A[m,n] = 0\n\nif check(A):\n print("yes")\nelse:\n print("no")\n', 'import numpy as np\n\ndef check(A):\n for i in range(3):\n if A[i,0] == 0 and A[i,1] == 0 and A[i,2] == 0:\n return True\n if A[0,i] == 0 and A[1,i] == 0 and A[2,i] == 0:\n return True\n if A[0,0] == 0 and A[1,1] == 0 and A[2,2] == 0:\n return True\n if A[0,2] == 0 and A[1,1] == 0 and A[2,0] == 0:\n return True\n\n return False\n\n\n\na = list(map(int, input().split()))\nA = a\na = list(map(int, input().split()))\nA = np.vstack((A, a))\na = list(map(int, input().split()))\nA = np.vstack((A, a))\nN = int(input())\nb = []\nfor i in range(N):\n b.append(int(input()))\n\nfor i in range(N):\n for m in range(3):\n for n in range(3):\n if b[i] == A[m,n]:\n A[m,n] = 0\n\nif check(A):\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s252730303', 's317036935'] | [21268.0, 21284.0] | [333.0, 1916.0] | [791, 791] |
p02760 | u556069480 | 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 as it\ndic={}\nbing=[[1 for i in range(3)] for j in range(3)]\nfor i in range(3):\n f=list(map(int,input().split()))\n for each in f:\n dic.update({each:(i,f.index(each))})\nn=int(input())\nfor i in range(n):\n m=int(input())\n place=dic[m]\n bing[place[0]][place[1]]=0\nflag=False\ncode="000102101112202122"\ncode=code+code[::-1]\ncode=code+"001122021120"\n\nfor i in range(8):\n code_sep=code[6*i:6*i+6]\n p=0\n for j in range(3):\n cords=code_sep[2*j:2*j+2]\n p+=bing[int(cords[0])][int(cords[1])]\n if p==0:\n flag=True\n break\n \nprint("Yes")if flag else print("No")', 'import itertools as it\ndic={}\nbing=[[1 for i in range(3)] for j in range(3)]\nfor i in range(3):\n f=list(map(int,input().split()))\n for each in f:\n dic.update({each:(i,f.index(each))})\nn=int(input())\nfor i in range(n):\n m=int(input())\n if m in dic.keys():\n place=dic[m]\n bing[place[0]][place[1]]=0\nflag=False\ncode="000102101112202122"\ncode=code+code[::-1]\ncode=code+"001122021120"\n\nfor i in range(8):\n code_sep=code[6*i:6*i+6]\n p=0\n for j in range(3):\n cords=code_sep[2*j:2*j+2]\n p+=bing[int(cords[0])][int(cords[1])]\n if p==0:\n flag=True\n break\n \nprint("yes")if flag else print("No")', 'import itertools as it\ndic={}\nbing=[[0 for i in range(3)] for j in range(3)]\nfor i in range(3):\n f=list(map(int,input().split()))\n for each in f:\n dic.update({each:(i,f.index(each))})\nn=int(input())\nfor i in range(n):\n m=int(input())\n place=dic[m]\n bing[place[0]][place[1]]=1\nflag=False\ncode="000102101112202122"\ncode=code+code[::-1]\ncode=code+"001122021120"\n\nfor i in range(8):\n code_sep=code[6*i:6*i+6]\n p=1\n for j in range(3):\n cords=code_sep[2*j:2*j+2]\n p*=bing[int(cords[0])][int(cords[1])]\n if p==1:\n flag=True\n break\n \nprint("Yes")if flag else print("No")', 'bing=[]\nfor i in range(3):\n bing.append(list(map(int,input().aplit())))\nimport itertools as it\ndic={}\nbing=[[1 for i in range(3)] for j in range(3)]\nfor i in range(3):\n f=list(map(int,input().split()))\n for each in f:\n dic.update({each:(i,f.index(each))})\nn=int(input())\nfor i in range(n):\n m=int(input())\n place=dic[m]\n bing[place[0]][place[1]]=0\nflag=False\ncode="000102101112202122"\ncode=code+code[::-1]\ncode=code+"001122021120"\n\nfor i in range(8):\n code_sep=code[6*i:6*i+6]\n p=0\n for j in range(3):\n cords=code_sep[2*j:2*j+2]\n p+=bing[int(cords[0])][int(cords[1])]\n if p==0:\n flag=True\n break\n \nprint("yes")if flag else print("No")', 'import itertools as it\ndic={}\nbing=[[0 for i in range(3)] for j in range(3)]\nfor i in range(3):\n f=list(map(int,input().split()))\n for each in f:\n dic.update({each:(i,f.index(each))})\nn=int(input())\nfor i in range(n):\n m=int(input())\n if m in dic.keys():\n place=dic[m]\n bing[place[0]][place[1]]=1\nflag=False\ncode="000102101112202122"\ncode=code+code[::-1]\ncode=code+"001122021120"\n\nfor i in range(8):\n code_sep=code[6*i:6*i+6]\n p=1\n for j in range(3):\n cords=code_sep[2*j:2*j+2]\n p*=bing[int(cords[0])][int(cords[1])]\n if p==1:\n flag=True\n break\n \nprint("Yes")if flag else print("No")'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s013490948', 's582820708', 's775745750', 's831086856', 's314384075'] | [3064.0, 3192.0, 3064.0, 3064.0, 3064.0] | [18.0, 18.0, 18.0, 17.0, 18.0] | [627, 655, 627, 700, 659] |
p02760 | u558717347 | 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. | ["first_line = input().split()\nsecond_line = input().split()\nthird_line = input().split()\n \nfirst_line = [int(i) for i in first_line]\nsecond_line = [int(i) for i in second_line]\nthird_line = [int(i) for i in third_line]\n\nN = input()\nN = int(N)\n\n\n\nB = []\nfor i in range(N):\n inp =input()\n inp = int(inp)\n B.append(inp)\n\n\n\nfor i in range(3):\n arr[0][i]= first_line[i]\nfor i in range(3):\n arr[0][i]= second_line[i]\nfor i in range(3):\n arr[0][i]= third_line[i]\n\ncarr = [[False]*3]*3\nfor b in B:\n for i in range(3):\n for j in range(3):\n if b == arr[i][j]:\n carr[i][j] = True\n\n\ndef yoko(carr):\n for i in range(3):\n for j in range(3):\n if carr[i][j] != True:\n break\n return True\n \n return False\n\n\ndef tate(carr):\n for i in range(3):\n for j in range(3):\n if carr[j][i] != True:\n break\n return True\n \n return False\n\ndef naname (carr):\n for i in range(3):\n if carr[i] != True:\n for j in range(3):\n if carr[3-j-1] != True:\n return False\n return True \n return True\n\n\ndef checker(carr):\n if not tate and not yoko and not naname:\n return 'No'\n else:\n return 'Yes' \n\n\n\nprint(checker(carr))", "first_line = input().split()\nsecond_line = input().split()\nthird_line = input().split()\n \nfirst_line = [int(i) for i in first_line]\nsecond_line = [int(i) for i in second_line]\nthird_line = [int(i) for i in third_line]\n\nN = input()\nN = int(N)\n\n\n\nB = [] \nfor i in range(N):\n inp =input()\n inp = int(inp)\n B.append(inp)\n\n\n# arr = [[0]*3]*3\n# print(arr)\n\n# arr[0][i]= first_line[i]\n# print(arr)\n# print(arr)\n\n# arr[1][i]= second_line[i]\n\n# arr[2][i]= third_line[i]\n\narr = []\narr.append(first_line)\narr.append(second_line)\narr.append(third_line)\ncarr = [[False for i in range(3)] for j in range(3)]\n\nfor b in B:\n for i in range(3):\n for j in range(3):\n if b == arr[i][j]:\n carr[i][j] = True\n\ndef yoko(carr):\n for i in range(3):\n flag = 0\n for j in range(3):\n if carr[i][j] != True:\n flag = 1\n if flag == 0 :\n return True \n return False\n\n\ndef tate(carr):\n for i in range(3):\n flag = 0\n for j in range(3):\n if carr[j][i] != True:\n flag = 1\n break\n if flag == 0:\n\n return True\n \n return False\n\ndef naname (carr):\n flag2 = 0\n flag1 = 0\n for i in range(3):\n if carr[i][i] != True:\n flag1 = 1\n\n if carr[i][3-i-1] != True:\n flag2 = 1;\n if flag1==0 or flag2 ==0:\n return True\n else:\n return False\n\ndef checker(carr):\n # print(tate(carr))\n # print(yoko(carr))\n # print(naname(carr))\n \n if not tate(carr) and not yoko(carr) and not naname(carr):\n return 'No'\n else:\n return 'Yes' \nprint(checker(carr))"] | ['Runtime Error', 'Accepted'] | ['s534554143', 's828781493'] | [3064.0, 3188.0] | [18.0, 19.0] | [1321, 1758] |
p02760 | u562550538 | 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. | ["#157b\na=[[int(i) for i in input().split()] for _ in range(3)]\n\nn=int(input())\nb=[[int(i) for i in input().split()] for _ in range(n)]\nfor i in range(3):\n\tfor j in range(3):\n\t\tfor e in b:\n\t\t\tif a[i][j]==e:\n\t\t\t\ta[i][j]=0\nans='No'\nfor i in range(3):\n\tif a[i][0]==a[i][1]==[i][2]:\n\t\tans='Yes'\n\telif a[0][i]==a[1][i]==a[2][i]:\n\t\tans='Yes'\n\telif a[0][0]==a[1][1]==a[2][2]:\n\t\tans='Yes'\n\telif a[0][2]==a[1][1]==a[2][0]:\n\t\tans='Yes'\nprint(ans)", '#157b\na=[[int(i) for i in input().split()] for _ 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\nprint("a", a)\nans=\'No\'\nfor i in range(3):\n if a[i][0]==a[i][1]==a[i][2]:\n ans=\'Yes\'\n elif a[0][i]==a[1][i]==a[2][i]:\n ans=\'Yes\'\n elif a[0][0]==a[1][1]==a[2][2]:\n ans=\'Yes\'\n elif a[0][2]==a[1][1]==a[2][0]:\n ans=\'Yes\'\nprint(ans)\n', '#157b\na=[[int(i) for i in input().split()] for _ in range(3)]\n# print("a",a)\n# print(a[0][0])\nn=int(input())\n#print("b:",b)\nfor i in range(n):\n b=int(input())\n\tfor j in range(3):\n\t\tfor k in range(3):\n\t\t\t#print("e",e)\n\t\t\tif a[j][k]==e:\n\t\t\t\ta[j][k]=0\n\t\t\t\t#print("a:",a)\nans=\'No\'\nfor i in range(3):\n\tif a[i][0]==a[i][1]==[i][2]:\n\t\tans=\'Yes\'\n\telif a[0][i]==a[1][i]==a[2][i]:\n\t\tans=\'Yes\'\n\telif a[0][0]==a[1][1]==a[2][2]:\n\t\tans=\'Yes\'\n\telif a[0][2]==a[1][1]==a[2][0]:\n\t\tans=\'Yes\'\nprint(ans)', "#157b\na=[[int(i) for i in input().split()] for _ in range(3)]\n\nn=int(input())\nb=[[int(i) for i in input().split()] for _ in range(n)]\nfor i in range(3):\n\tfor j in range(3):\n\t\tfor e in b:\n\t\t\tif a[i][j]==e:\n\t\t\t\ta[i][j]=0\nans='No'\nfor i in range(3):\n\tif a[i][0]==a[i][1]==[i][2]:\n\t\tans='Yes'\n\telif a[0][i]==a[1][i]==a[2][i]:\n\t\tans='Yes'\n\telif a[0][0]==a[1][1]==a[2][2]:\n\t\tans='Yes'\n\telif a[0][2]==a[1][1]==a[2][0]:\n\t\tans='Yes'\nprint(ans)", '#157b\na=[[int(i) for i in input().split()] for _ in range(3)]\n# print("a",a)\n# print(a[0][0])\nn=int(input())\n#print("b:",b)\nfor i in range(n):\n b=int(input())\n\tfor j in range(3):\n\t\tfor k in range(3):\n\t\t\t#print("e",e)\n\t\t\tif a[j][k]==b:\n\t\t\t\ta[j][k]=0\n\t\t\t\t#print("a:",a)\nans=\'No\'\nfor i in range(3):\n\tif a[i][0]==a[i][1]==[i][2]:\n\t\tans=\'Yes\'\n\telif a[0][i]==a[1][i]==a[2][i]:\n\t\tans=\'Yes\'\n\telif a[0][0]==a[1][1]==a[2][2]:\n\t\tans=\'Yes\'\n\telif a[0][2]==a[1][1]==a[2][0]:\n\t\tans=\'Yes\'\nprint(ans)\n', "#157b\na=[[int(i) for i in input().split()] for _ in range(3)]\n\nn=int(input())\nb=[int(i) for i in input().split()]\nfor i in range(3):\n\tfor j in range(3):\n\t\tfor e in b:\n\t\t\tif a[i][j]==e:\n\t\t\t\ta[i][j]=0\nans='No'\nfor i in range(3):\n\tif a[i][0]==a[i][1]==[i][2]:\n\t\tans='Yes'\n\telif a[0][i]==a[1][i]==a[2][i]:\n\t\tans='Yes'\n\telif a[0][0]==a[1][1]==a[2][2]:\n\t\tans='Yes'\n\telif a[0][2]==a[1][1]==a[2][0]:\n\t\tans='Yes'\nprint(ans)", '#157b\na=[[int(i) for i in input().split()] for _ in range(3)]\n# print("a",a)\n# print(a[0][0])\nn=int(input())\n#print("b:",b)\nfor i in range(n):\n b=int(input())\n\tfor j in range(3):\n\t\tfor k in range(3):\n\t\t\t#print("e",e)\n\t\t\tif a[j][k]==b:\n\t\t\t\ta[j][k]=0\n\t\t\t\t#print("a:",a)\nans=\'No\'\nfor i in range(3):\n\tif a[i][0]==a[i][1]==[i][2]:\n\t\tans=\'Yes\'\n\telif a[0][i]==a[1][i]==a[2][i]:\n\t\tans=\'Yes\'\n\telif a[0][0]==a[1][1]==a[2][2]:\n\t\tans=\'Yes\'\n\telif a[0][2]==a[1][1]==a[2][0]:\n\t\tans=\'Yes\'\nprint(ans)\n', "#157b\na=[[int(i) for i in input().split()] for _ in range(3)]\nn=int(input())\n\nfor i in range(n):\n\tb=int(input())\n\tfor j in range(3):\n\t\tfor k in range(3):\n\t\t\tif a[j][k]==b:\n\t\t\t\ta[j][k]=0\n\nans='No'\nfor i in range(3):\n\tif a[i][0]==a[i][1]==[i][2]:\n\t\tans='Yes'\n\telif a[0][i]==a[1][i]==a[2][i]:\n\t\tans='Yes'\n\telif a[0][0]==a[1][1]==a[2][2]:\n\t\tans='Yes'\n\telif a[0][2]==a[1][1]==a[2][0]:\n\t\tans='Yes'\nprint(ans)\n", "#157b\na=[[int(i) for i in input().split()] for _ 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\nans='No'\nfor i in range(3):\n if a[i][0]==a[i][1]==a[i][2]:\n ans='Yes'\n elif a[0][i]==a[1][i]==a[2][i]:\n ans='Yes'\n elif a[0][0]==a[1][1]==a[2][2]:\n ans='Yes'\n elif a[0][2]==a[1][1]==a[2][0]:\n ans='Yes'\nprint(ans)\n"] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s309987652', 's420964053', 's431898848', 's518860774', 's614169059', 's717469422', 's826868663', 's855797145', 's291059466'] | [3064.0, 3188.0, 2940.0, 3064.0, 2940.0, 3064.0, 2940.0, 3064.0, 3064.0] | [17.0, 19.0, 16.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [434, 484, 486, 434, 487, 414, 487, 403, 470] |
p02760 | u564770050 | 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 _ in range(n)]\n\nprint(a,n,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\nfor i in range(3):\n if a[i] == [0,0,0]:\n print('Yes')\n exit()\nfor j in range(3):\n for i in range(3):\n if a[j][i] == 0 and a[j][i] == 0 and a[j][i] == 0:\n print('Yes')\n exit()\nif a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0:\n print('Yes')\n exit()\nif a[2][0] == 0 and a[1][1] == 0 and a[0][2] == 0:\n print('Yes')\n exit()\nprint('No')", "a = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\nb = [int(input() )for _ in range(n)]\n\nprint(a,n,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\nfor i in range(3):\n if a[i] == [0,0,0]:\n print('Yes')\n exit()\nfor i in range(3):\n if a[j0][i] == 0 and a[1][i] == 0 and a[2][i] == 0:\n print('Yes')\n exit()\nif a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0:\n print('Yes')\n exit()\nif a[2][0] == 0 and a[1][1] == 0 and a[0][2] == 0:\n print('Yes')\n exit()\nprint('No')", "a = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\nb = [int(input() )for _ in range(n)]\n\nprint(a,n,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\nfor i in range(3):\n if a[i][0] == 0 and a[i][1] == 0 and a[i][2] == 0:\n print('Yes')\n exit()\nfor i in range(3):\n if a[0][i] == 0 and a[1][i] == 0 and a[2][i] == 0:\n print('Yes')\n exit()\nif a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0:\n print('Yes')\n exit()\nif a[2][0] == 0 and a[1][1] == 0 and a[0][2] == 0:\n print('Yes')\n exit()\nprint('No')", "a = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\nb = [int(input() )for _ in range(n)]\n\nprint(a,n,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\nfor i in range(3):\n if a[i] == [0,0,0]:\n print('Yes')\n exit()\nfor i in range(3):\n if a[0][i] == 0 and a[1][i] == 0 and a[2][i] == 0:\n print('Yes')\n exit()\nif a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0:\n print('Yes')\n exit()\nif a[2][0] == 0 and a[1][1] == 0 and a[0][2] == 0:\n print('Yes')\n exit()\nprint('No')", "a = [list(map(int,input().split())) for i 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] = 0\n\nfor i in range(3):\n if a[i][0] == 0 and a[i][1] == 0 and a[i][2] == 0:\n print('Yes')\n exit()\nfor i in range(3):\n if a[0][i] == 0 and a[1][i] == 0 and a[2][i] == 0:\n print('Yes')\n exit()\nif a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0:\n print('Yes')\n exit()\nif a[2][0] == 0 and a[1][1] == 0 and a[0][2] == 0:\n print('Yes')\n exit()\nprint('No')"] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s294981307', 's321838362', 's498339340', 's739622730', 's883463977'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [18.0, 18.0, 17.0, 17.0, 17.0] | [608, 574, 604, 573, 591] |
p02760 | u569776981 | 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 = []\n\nfor i in range(1,n + 1):\n bc = int(input())\n b.append(bc)\n\nfor i in range(n):\n for m in range(3):\n if a1[m] == b[i]:\n a1[m] = 0\n elif a2[m] == b[i]:\n a2[m] = 0\n elif a3[m] == b[i]:\n a3[m] = 0\n\nfor i in range(3):\n if a1[i] == 0 and a2[i] == 0 and a3[i] == 0:\n print('縦')\n exit()\n\nif a1.count(0) == 3 or a2.count(0) ==3 or a3.count(0) == 3:\n print('横')\n exit()\n\nif a2[2] == 0:\n if a1[1] == 0 and a3[3] == 0 or a3[1] ==0 and a1[3] == 0:\n print('斜め')\n exit()\n\nprint('No')", "A = []\na1 = []\na2 = []\na3 = []\nfor i in range(3):\n a = list(map(int,input().split()))\n for K in range(3):\n A.append(a[K])\n\n\nN = int(input())\nfor i in range(N):\n b = int(input())\n for k in range(9):\n if b == A[k]:\n A[k] = 0\n\n\n\n\nfor i in range(9):\n if 0 <= i <= 2:\n a1.append(A[i])\n elif 3 <= i <= 5:\n a2.append(A[i])\n else:\n a3.append(A[i])\n\nx = 0\ny = 0\nz = 0\nfor i in range(3):\n if a1[i] == 0:\n x += 1\n if a2[i] == 0:\n y += 1\n if a3[i] == 0:\n z += 1\n\nif x == 3 or y == 3 or z == 3:\n print('Yes')\n exit()\n\nfor i in range(3):\n if a1[i] == 0 and a2[i] == 0 and a3[i] == 0:\n print('Yes')\n exit()\n\nif a2[1] == 0:\n if a1[0] == 0 and a3[2] == 0 or a1[2] == 0 and a3[0] == 0:\n print('Yes')\n exit()\n\nprint('No')\n"] | ['Runtime Error', 'Accepted'] | ['s756533214', 's754653323'] | [9208.0, 9256.0] | [26.0, 30.0] | [709, 840] |
p02760 | u571647099 | 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\nli = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\ncnt = 0\nfor i in range(2):\n for j in range(2):\n for k in int(input()):\n if li[i][j] == k:\n li[i][j] == -1\n else:\n pass\n\nfor a in range(2):\n if li[a][0] == li[a][1] == li[a][2] == -1:\n print("Yes")\n sys.exit()\n else:\n pass\nfor b in range(2):\n if li[0][[b] == li[1][[b] == li[2][[b] == -1:\n print("Yes")\n sys.exit()\n else:\n pass\nif li[0][[0] == li[1][[1] == li[2][[2] == -1:\n print("Yes")\n sys.exit()\nelse:\n pass\nif li[0][[2] == li[1][[1] == li[2][[0] == -1:\n print("Yes")\n sys.exit()\nelse:\n print("No")', 'import sys\nli = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\nk = [int(input()) for i in range(n)]\ncnt = 0\nfor i in range(3):\n for j in range(3):\n if li[i][j] in k:\n li[i][j] = -1\n else:\n pass\nfor a in range(3):\n if li[a][0] == li[a][1] == li[a][2] == -1:\n print("Yes")\n exit()\n else:\n pass\nfor b in range(3):\n if li[0][b] == li[1][b] == li[2][b] == -1:\n print("Yes")\n exit()\n else:\n pass\nif li[0][0] == li[1][1] == li[2][2] == -1:\n print("Yes")\n exit()\n\nelif li[0][2] == li[1][1] == li[2][0] == -1:\n print("Yes")\n exit()\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s572669027', 's355039512'] | [3064.0, 3192.0] | [17.0, 18.0] | [719, 670] |
p02760 | u572138437 | 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 = [list(map(int, input().split())) for _ in range(3)]\nmarked = [[False, False, False] for _ in range(3)]\n\nQ = int(input())\nfor i in range(Q):\n b = int(input())\n for j in range(3):\n for k in range(3):\n if a[j][k] == b:\n marked[j][k] = True\n\nprint(marked)\n\nfor i in range(3):\n if marked[i][0] == marked[i][1] == marked[i][2] == True:\n print("Yes")\n exit()\n if marked[0][i] == marked[1][i] == marked[2][i] == True:\n print("Yes")\n exit()\nif marked[0][0] == marked[1][1] == marked[2][2] == True:\n print("Yes")\n exit()\nif marked[0][2] == marked[1][1] == marked[2][0] == True:\n print("Yes")\n exit()\nprint("No")\n', 'import sys\n\ninput = sys.stdin.readline\n\na = [list(map(int, input().split())) for _ in range(3)]\nmarked = [[False, False, False] for _ in range(3)]\n\nQ = int(input())\nfor i in range(Q):\n b = int(input())\n for j in range(3):\n for k in range(3):\n if a[j][k] == b:\n marked[j][k] = True\n \nfor i in range(3):\n if marked[i][0] == marked[i][1] == marked[i][2] == True:\n print("Yes")\n exit()\n if marked[0][i] == marked[1][i] == marked[2][i] == True:\n print("Yes")\n exit()\nif marked[0][0] == marked[1][1] == marked[2][2] == True:\n print("Yes")\n exit()\nif marked[0][2] == marked[1][1] == marked[2][0] == True:\n print("Yes")\n exit()\nprint("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s737552513', 's901514199'] | [3064.0, 3064.0] | [18.0, 18.0] | [731, 732] |
p02760 | u572425901 | 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. | ['flag = 0\nfor i in a:\n if i in A:\n A[A.index(i)] = "0"\nB = []\nC = []\nD = []\nE = []\nF = []\nfor i in range(3):\n B.append(A[4*i])\n C.append(A[2*(i+1)])\n D.append(A[3*i])\n E.append(A[3*i+1])\n F.append(A[3*i+2])\n if "0" in A[i*3:i*3+3]:\n if A[i*3:i*3+3].count("0") == 3:\n flag = 1\nif "0" in B:\n if B.count("0") == 3:\n flag = 1\nif"0"in C:\n if C.count("0") == 3:\n flag = 1\nif"0"in D:\n if D.count("0") == 3:\n flag = 1\nif"0"in E:\n if E.count("0") == 3:\n flag = 1\nif"0"in F:\n if F.count("0") == 3:\n flag = 1\nif flag == 1:\n print("Yes")\nelse:\n print("No")', 'A = list(map(str, input().split()))\nA += list(map(str, input().split()))\nA += list(map(str, input().split()))\na = []\nN = int(input())\nfor i in range(N):\n a.append(input())\nflag = 0\nfor i in a:\n if i in A:\n A[A.index(i)] = "0"\nB = []\nC = []\nD = []\nE = []\nF = []\nfor i in range(3):\n B.append(A[4*i])\n C.append(A[2*(i+1)])\n D.append(A[3*i])\n E.append(A[3*i+1])\n F.append(A[3*i+2])\n if "0" in A[i*3:i*3+3]:\n if A[i*3:i*3+3].count("0") == 3:\n flag = 1\nif "0" in B:\n if B.count("0") == 3:\n flag = 1\nif"0"in C:\n if C.count("0") == 3:\n flag = 1\nif"0"in D:\n if D.count("0") == 3:\n flag = 1\nif"0"in E:\n if E.count("0") == 3:\n flag = 1\nif"0"in F:\n if F.count("0") == 3:\n flag = 1\nif flag == 1:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s620286666', 's311478322'] | [3064.0, 3064.0] | [17.0, 17.0] | [646, 821] |
p02760 | u576320075 | 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)]\n\nn = int(input())\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 a[i][j] = 0\n\nok = True\n\nfor i in range(3):\n count = 0\n for j in range(3):\n count += a[i][j]\n if count != 0:\n ok = False\nfor i in range(3):\n count = 0\n for j in range(3):\n count += a[j][i]\n if count != 0:\n ok = False\ncount = 0\nfor i in range(3):\n count += a[i][i]\n if count != 0:\n ok = False\ncount = 0\nfor i in range(3):\n count += a[2-i][i]\n if count != 0:\n ok = False\n\nprint("Yes" if ok else "No")\n', 'a = [list(map(int, input().split())) for _ in range(3)]\n\nn = int(input())\n\nbingo = [[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 bingo[i][j] = 1\n\nok = False\n\nfor i in range(3):\n count = 0\n for j in range(3):\n count += bingo[i][j]\n if count == 3:\n ok = True\nfor i in range(3):\n count = 0\n for j in range(3):\n count += bingo[j][i]\n if count == 3:\n ok = True\ncount = 0\nfor i in range(3):\n count += bingo[i][i]\n if count == 3:\n ok = True\ncount = 0\nfor i in range(3):\n count += bingo[2-i][i]\n if count == 3:\n ok = True\n\nprint("Yes" if ok else "No")\n'] | ['Wrong Answer', 'Accepted'] | ['s592483833', 's957886418'] | [3064.0, 3064.0] | [17.0, 18.0] | [696, 734] |
p02760 | u577725859 | 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\nA = []\na = [int(x) for x in input().split()]\nA.append(a)\nA_len = len(a)\nstate = True\n\nfor s in range(A_len - 1):\n A.append([int(x) for x in input().split()])\n\nA = np.array(A)\n\nN = int(input())\nB = []\n\n\n\n\nfor i in range(N):\n B.append(int(input()))\n\nfor i in range(N):\n A = np.where(A==B[i], 0, A)\n\n\nfor i in range(A_len):\n if (A[i].sum() == 0) or (A[:,i].sum() == 0):\n print('Yes')\n exit()\n\n if (A[i,i] != 0) or (A[i,A_len-i-1] != 0):\n state = False\n\nif state:\n print('Yes')\nelse:\n print('No')\n", "import numpy as np\n\nA = []\na = [int(x) for x in input().split()]\nA.append(a)\nA_len = len(a)\nnaname1 = 0\nnaname2 = 0\n\nfor s in range(A_len - 1):\n A.append([int(x) for x in input().split()])\n\nA = np.array(A)\n\nN = int(input())\nB = []\n\n\n\n\nfor i in range(N):\n B.append(int(input()))\n\nfor i in range(N):\n A = np.where(A==B[i], 0, A)\n\n\nfor i in range(A_len):\n if (A[i].sum() == 0) or (A[:,i].sum() == 0):\n print('Yes')\n exit()\n\nfor i in range(A_len):\n naname1 += A[i,i]\n naname2 += A[i,A_len-i-1]\n\n\nif naname1==0 or naname2==0:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s998628317', 's066102576'] | [12508.0, 21912.0] | [155.0, 323.0] | [555, 591] |
p02760 | u580372796 | 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 = []\n ans = "No"\n hit_examples = [[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 for i in range(3):\n a.extend(list(map(int, input().split())))\n n = int(input())\n b = []\n for i in range(n):\n b.append(int(input()))\n for b_value in b:\n for i in range(len(a)):\n if b_value == a[i]:\n a[i] = -1\n\n for hit_example in hit_examples:\n cnt = 0\n for i in range(len(a)):\n if a[i] == -1 and i in hit_example:\n cnt += 1\n if cnt == 3:\n ans = "Yes"\n print(ans)\n return\n print(ans)', 'def main():\n a = []\n ans = "No"\n hit_examples = [[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 for i in range(3):\n a.extend(list(map(int, input().split())))\n n = int(input())\n b = []\n for i in range(n):\n b.append(int(input()))\n for b_value in b:\n for i in range(len(a)):\n if b_value == a[i]:\n a[i] = -1\n \n for hit_example in hit_examples:\n for i in range(len(a)):\n if a[i] == -1 and i in hit_example:\n ans = "Yes"\n return\n print(ans)\n\nif __name__ == \'__main__\':\n main()', 'a = []\nans = "No"\nhit_examples = [[0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4, 6]]\nfor i in range(3):\n a.extend(list(map(int, input().split())))\nn = int(input())\nb = []\nfor i in range(n):\n b.append(int(input()))\nfor b_value in b:\n for i in range(len(a)):\n if b_value == a[i]:\n a[i] = -1\n\nfor hit_example in hit_examples:\n for i in range(len(a)):\n print(i in hit_example, a[i] == -1)\n if a[i] == -1 and i in hit_example:\n ans = "Yes"\n break\n else:\n continue\n break\nprint(ans)', 'def main():\n a = []\n ans = "No"\n hit_examples = [[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 for i in range(3):\n a.extend(list(map(int, input().split())))\n n = int(input())\n b = []\n for i in range(n):\n b.append(int(input()))\n for b_value in b:\n for i in range(len(a)):\n if b_value == a[i]:\n a[i] = -1\n\n for hit_example in hit_examples:\n cnt = 0\n for i in range(len(a)):\n if a[i] == -1 and i in hit_example:\n cnt += 1\n if cnt == 3:\n ans = "Yes"\n print(ans)\n return\n print(ans)\n\nif __name__ == \'__main__\':\n main()'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s563507681', 's644946959', 's655059216', 's189945916'] | [3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 18.0, 18.0] | [595, 567, 550, 632] |
p02760 | u581603131 | 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 = list(map(int, input().split()))\nN = int(input())\nB = [int(input()) for i in range(N)]\nfor i in range(N):\n for j in range(9):\n if B[i] == A[j] :\n A[j] = 'a'\nif A[0]==A[1]==A[2]=='a' or A[3]==A[4]==A[5]=='a' or A[6]==A[7]==A[8]=='a' or A[0]==A[3]==A[6]=='a' or A[1]==A[4]==A[7]=='a' or A[2]==A[5]==A[8]=='a' or A[0]==A[4]==A[8]=='a' or A[2]==A[4]==A[6]=='a' :\n print('Yes')\nelse:\n print('No')", "A = []\nfor _ in range(3):\n A += list(map(int, input().split()))\nN = int(input())\nB = [int(input()) for i in range(N)]\n\nfor i in range(0,N):\n for j in range(9):\n if B[i] == A[j]:\n A[j] = 0\n\nif A[0]==A[1]==A[2]==0 or A[3]==A[4]==A[5]==0 or A[6]==A[7]==A[8]==0 or A[0]==A[3]==A[6]==0 or A[1]==A[4]==A[7]==0 or A[2]==A[5]==A[8]==0 or A[0]==A[4]==A[8]==0 or A[2]==A[4]==A[6]==0 :\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s015382849', 's002172261'] | [3064.0, 3064.0] | [18.0, 17.0] | [453, 439] |
p02760 | u583276018 | 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 d, b, c = map(int, input().split())\n a.append(d)\n a.append(b)\n a.append(c)\nfor _ in range(int(input())):\n n = int(input())\n if(n in a):\n a[a.index(n)] = 0\nretsu = [[0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4, 6]]\nfrag = False\nfor i in range(8):\n frag1 = True\n for s in retsu[i]:\n if(a[s] > 0):\n frag1 = False\nif(frag):\n print("Yes")\nelse:\n print("No")', 'a = []\nfor i in range(3):\n d, b, c = map(int, input().split())\n a.append(d)\n a.append(b)\n a.append(c)\nfor _ in range(int(input())):\n n = int(input())\n if(n in a):\n a[a.index(n)] = 0\nretsu = [[0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4, 6]]\nfrag = False\nfor i in range(8):\n frag1 = True\n for s in range(3):\n if(a[retsu[i][s]] > 0):\n frag1 = False\n frag = frag1 or frag\nif(frag):\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s392152338', 's170401917'] | [9160.0, 9248.0] | [29.0, 30.0] | [438, 472] |
p02760 | u583455650 | 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 = []\n[A.extend(map(int, input().split())) for _ in range(3)]\n_, *B = map(int, open(0).read().split())\nfor b in B:\n try:\n i = A.index(b)\n A[i] = 0\n except Exception:\n pass\nlines = [\n [0, 1, 2],\n [3, 4, 5],\n [6, 7, 8],\n [0, 3, 6],\n [1, 4, 7],\n [2, 5, 8],\n [0, 4, 8],\n [2, 4, 6],\n]\nans = "No"\nfor line in lines:\n a, b, c = line\n if A[a] == 0 and A[a] == A[b] and A[a] == A[c]:\n ans = "Yes"\nprint(ans)\n', 'A = []\n[A.extend(map(int, input().split())) for _ in range(3)]\n_, *B = map(int, open(0).read().split())\nfor b in B:\n try:\n i = A.index(b)\n A[i] = 0\n except:\n pass\nlines = [\n [0, 1, 2],\n [3, 4, 5],\n [6, 7, 8],\n [0, 3, 6],\n [1, 4, 7],\n [2, 5, 8],\n [0, 4, 8],\n [2, 4, 6],\n]\nans = "No"\nfor line in lines:\n a, b, c = line\n if A[a] == 0 and A[a] == A[b] and A[a] == A[c]:\n ans = "Yes"\nprint(ans)\n', 'A = []\n[A.extend(map(int, input().split())) for _ in range(3)]\nN = int(input())\nB = [int(input()) for _ in range(N)]\nfor b in B:\n try:\n i = A.index(b)\n A[i] = 0\n except:\n pass\nlines = [\n [0, 1, 2],\n [3, 4, 5],\n [6, 7, 8],\n [0, 3, 6],\n [1, 4, 7],\n [2, 5, 8],\n [0, 4, 8],\n [2, 4, 6],\n]\nans = "No"\nfor line in lines:\n a, b, c = line\n if A[a] == 0 and A[a] == A[b] and A[a] == A[c]:\n ans = "Yes"\nprint(ans)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s457629520', 's989188475', 's674564519'] | [3064.0, 3064.0, 3064.0] | [17.0, 18.0, 20.0] | [464, 454, 467] |
p02760 | u585963734 | 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. | ["i = list(map(int, input().split()))\nj = [int(0)] * 9\n\nn=i[9]\n\n#print(j)\n\nfor b in range(9):\n for c in range(n):\n if i[b]==i[10+c]:\n j.insert(b,1)\n\n#print(j) \n\nif j[0]==1 and j[3]==1 and j[6]==1\\\nor j[1]==1 and j[4]==1 and j[7]==1\\\nor j[2]==1 and j[5]==1 and j[8]==1\\\nor j[0]==1 and j[1]==1 and j[2]==1\\\nor j[3]==1 and j[4]==1 and j[5]==1\\\nor j[6]==1 and j[7]==1 and j[8]==1\\\nor j[0]==1 and j[4]==1 and j[8]==1\\\nor j[2]==1 and j[4]==1 and j[6]==1:\n print('yes')\nelse:\n print('no')", "i = list(map(int, input().split()))\nj = [int(0)] * 9\n\nn=i[9]\n\nfor b in range(9):\n for c in range(n):\n if i[b]==i[10+c]:\n j.insert(b,1) \n\nif j[0]==1 and j[3]==1 and j[6]==1\\\nor j[1]==1 and j[4]==1 and j[7]==1\\\nor j[2]==1 and j[5]==1 and j[8]==1\\\nor j[0]==1 and j[1]==1 and j[2]==1\\\nor j[3]==1 and j[4]==1 and j[5]==1\\\nor j[6]==1 and j[7]==1 and j[8]==1\\\nor j[0]==1 and j[4]==1 and j[8]==1\\\nor j[2]==1 and j[4]==1 and j[6]==1:\n print('yes')\nelse:\n print('no')", "i = list(map(int, input().split()))\nj = [int(0)] * 9\n \nn=i[9]\n \nfor b in range(9):\n for c in range(n):\n if i[b]==i[10+c]:\n j.insert(b,1) \n \nif j[0]==1 and j[3]==1 and j[6]==1\\\nor j[1]==1 and j[4]==1 and j[7]==1\\\nor j[2]==1 and j[5]==1 and j[8]==1\\\nor j[0]==1 and j[1]==1 and j[2]==1\\\nor j[3]==1 and j[4]==1 and j[5]==1\\\nor j[6]==1 and j[7]==1 and j[8]==1\\\nor j[0]==1 and j[4]==1 and j[8]==1\\\nor j[2]==1 and j[4]==1 and j[6]==1:\n print('Yes')\nelse:\n print('No')", "#import numpy as np\n\ni=[input().split() for l in range(4)]\n\nn=int(i[3][0])\n\nj = [input() for i in range(n)]\n\n#i=np.array(i)\n#print(i)\n\n\nk = [['0' for o in range(3)] for p in range(3)]\n\nfor b in range(3):\n #print('b:',b)\n for c in range(3):\n #print('c:',c)\n for d in range(n):\n #print('d:',d)\n if i[b][c]==j[d]:\n k[b][c]='1'\n \n \n \n#print(i)\n#print(j)\n#print(k)\n\n\nif k[0][0]=='1' and k[0][1]=='1' and k[0][2]=='1'\\\nor k[1][0]=='1' and k[1][1]=='1' and k[1][2]=='1'\\\nor k[2][0]=='1' and k[2][1]=='1' and k[2][2]=='1'\\\nor k[0][0]=='1' and k[1][0]=='1' and k[2][0]=='1'\\\nor k[0][1]=='1' and k[1][1]=='1' and k[2][1]=='1'\\\nor k[0][2]=='1' and k[1][2]=='1' and k[2][2]=='1'\\\nor k[0][0]=='1' and k[1][1]=='1' and k[2][2]=='1'\\\nor k[2][0]=='1' and k[1][1]=='1' and k[0][2]=='1':\n\tprint('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s326432730', 's363637639', 's525947220', 's626284649'] | [3188.0, 3188.0, 3064.0, 3064.0] | [19.0, 18.0, 17.0, 17.0] | [511, 488, 491, 938] |
p02760 | u590825760 | 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()\nfor i in range(3):\n a.append([int(x) for x in input().split()])\nn = int(input())\nb = list()\nfor i in range(n):\n b.append(int(input()))\nappear = [[0,0,0],[0,0,0],[0,0,0]]\nfor i in range(3):\n for j in range(3):\n for k in b:\n if (a[i][j] == k):\n appear[i][j] == 1\n\ndef x ():\n for i in range(3):\n if (appear[i][0] and appear[i][1] and appear[i][2] ):\n return "Yes"\n for i in range(3):\n if (appear[0][i] and appear[1][i] and appear[2][i]):\n return "Yes"\n if (appear[0][0] and appear[1][1] and appear[2][2]):\n return "Yes"\n if (appear[0][2] and appear[1][1] and appear[2][0]):\n return "Yes"\n return "No"\nprint(x())', 'a = list()\nfor i in range(3):\n a.append([int(x) for x in input().split()])\nn = int(input())\nb = list()\nfor i in range(n):\n b.append(int(input()))\nappear = [[0,0,0],[0,0,0],[0,0,0]]\nfor i in range(3):\n for j in range(3):\n for k in b:\n if (a[i][j] == k):\n appear[i][j] = 1\n\ndef x ():\n for i in range(3):\n if (appear[i][0] and appear[i][1] and appear[i][2] ):\n return "Yes"\n for i in range(3):\n if (appear[0][i] and appear[1][i] and appear[2][i]):\n return "Yes"\n if (appear[0][0] and appear[1][1] and appear[2][2]):\n return "Yes"\n if (appear[0][2] and appear[1][1] and appear[2][0]):\n return "Yes"\n return "No"\nprint(x())'] | ['Wrong Answer', 'Accepted'] | ['s071926943', 's999624415'] | [3064.0, 3064.0] | [17.0, 18.0] | [726, 725] |
p02760 | u592035627 | 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 = []\nfor i in range(3):\n array = list(map(int,input().split()))\n s.append(array)\nN = int(input())\nt = [int(input()) for i in range(N)]\n\nfor i in range(N):\n for j in range(3):\n for l in range(3):\n if t[i] == s[j][l]\n s[j][l] = 0\n\nif sum(s[0]) == 0 or sum(s[1]) == 0 or sum(s[2]) == 0 or s[0][0]+s[1][0]+s[2][0] == 0 or s[0][1]+s[1][1]+s[2][1] == 0 or s[0][2]+s[1][2]+s[2][2] == 0 or s[0][0]+s[1][1]+s[2][2] == 0 or s[2][0]+s[1][1]+s[0][2] == 0:\n print("Yes")\nelse:\n print("No")', 's = []\nfor i in range(3):\n array = list(map(int,input().split()))\n s.append(array)\nN = int(input())\nt = [int(input()) for i in range(N)]\n \nfor i in range(N):\n for j in range(3):\n for l in range(3):\n if t[i] == s[j][l]:\n s[j][l] = 0\n \nif sum(s[0]) == 0 or sum(s[1]) == 0 or sum(s[2]) == 0 or s[0][0]+s[1][0]+s[2][0] == 0 or s[0][1]+s[1][1]+s[2][1] == 0 or s[0][2]+s[1][2]+s[2][2] == 0 or s[0][0]+s[1][1]+s[2][2] == 0 or s[2][0]+s[1][1]+s[0][2] == 0:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s515792358', 's419162598'] | [2940.0, 3064.0] | [17.0, 18.0] | [522, 529] |
p02760 | u593364182 | 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())\n\nfor i in range(n):\n o=int(input())\n for x in range(3):\n for y in range(3):\n if o == A[x][y]:\n A[x][y]=-1\nfor x in range(3):\n if A[x][0]==-1:\n f=True\n for y in range(3):\n if A[x][y]!=-1:\n f=False\n if f:\n print('Yes')\n exit()\nfor y in range(3):\n if A[0][y] == -1:\n f=True\n for x in range(3):\n if A[y][x]!=-1:\n f=False\n if f:\n print('Yes')\n exit()\nf=True\nfor i in range(3):\n if A[i][i]!=-1:\n f=False\nif f:\n print('Yes')\nf=True\nfor i in range(1,3):\n if A[-i][-i]!=-1:\n f=False\nif f:\n print('Yes')", "A=[list(map(int,input().split())) for i in range(3)]\nn=int(input())\n\nfor i in range(n):\n o=int(input())\n for x in range(3):\n for y in range(3):\n if o == A[x][y]:\n A[x][y]=-1\nfor x in range(3):\n if A[x][0]==-1:\n f=True\n for y in range(3):\n if A[x][y]!=-1:\n f=False\n if f:\n print('Yes')\n exit()\nfor y in range(3):\n if A[0][y] == -1:\n f=True\n for x in range(3):\n if A[y][[x] != -1:\n f=False\n if f:\n print('Yes')\n exit()\nf=True\nfor i in range(3):\n if A[i][i]!=-1:\n f=False\nif f:\n print('Yes')\nf=True\nfor i in range(1,3):\n if A[-i][-i]!=-1:\n f=False\nif f:\n print('Yes')\n", "A=[list(map(int,input().split())) for i in range(3)]\nn=int(input())\n\nfor i in range(n):\n o=int(input())\n for x in range(3):\n for y in range(3):\n if o == A[x][y]:\n A[x][y]=-1\nfor x in range(3):\n if A[x][0]==-1:\n f=True\n for y in range(3):\n if A[x][y]!=-1:\n f=False\n if f:\n print('Yes')\n exit()\nfor y in range(3):\n if A[0][y] == -1:\n f=True\n for x in range(3):\n if A[y][x]!=-1:\n f=False\n if f:\n print('Yes')\n exit()\nf=True\nfor i in range(3):\n if A[i][i]!=-1:\n f=False\nif f:\n print('Yes')\nf=True\nfor i in range(1,3):\n if A[-i][-i]!=-1:\n f=False\nif f:\n print('Yes')\n", "A=[list(map(int,input().split())) for i in range(3)]\nn=int(input())\n\nfor i in range(n):\n o=int(input())\n for x in range(3):\n for y in range(3):\n if o == A[x][y]:\n A[x][y]=-1\nfor x in range(3):\n if A[x][0]==-1:\n f=True\n for y in range(3):\n if A[x][y]!=-1:\n f=False\n if f:\n print('Yes')\n exit()\nfor y in range(3):\n if A[0][y] == -1:\n f=True\n for x in range(3):\n if A[y][[x] != -1:\n f=False\n if f:\n print('Yes')\n exit()\nf=True\nfor i in range(3):\n if A[i][i]!=-1:\n f=False\nif f:\n print('Yes')\nf=True\nfor i in range(1,3):\n if A[-i][-i]!=-1:\n f=False\nif f:\n print('Yes')", "A=[list(map(int,input().split())) for i in range(3)]\nn=int(input())\n\nfor i in range(n):\n o=int(input())\n for x in range(3):\n for y in range(3):\n if o == A[y][x]:\n A[y][x]=-1\n\nfor x in range(3):\n f=True\n for y in range(3):\n if A[y][x]!=-1:\n f=False\n if f:\n print('Yes')\n exit()\n\nfor y in range(3):\n f=True\n for x in range(3):\n if A[y][x]!=-1:\n f=False\n if f:\n print('Yes')\n exit()\n\n\nf=True\nfor i in range(3):\n if A[i][i]!=-1:\n f=False\nif f:\n print('Yes')\n exit()\nf=True\n\n\nfor i in range(3):\n if A[i][2-i]!=-1:\n f=False\nif f:\n print('Yes')\n exit()\n\nprint('No')\n"] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s184830920', 's416205151', 's499607651', 's792634467', 's575888436'] | [3064.0, 3064.0, 3064.0, 3064.0, 3188.0] | [18.0, 18.0, 18.0, 17.0, 21.0] | [652, 656, 677, 655, 622] |
p02760 | u594477812 | 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()))\nx=[[0 for i in range(3)] for j in range(3)]\nN=int(input())\nif N>=3:\n for i in range(N):\n b=int(input())\n for j in range(3):\n if A[j]==b:\n x[0][j]=1\n elif B[j]==b:\n x[1][j]=1\n elif C[j]==b:\n x[2][j]=1\n flag=0\n if x[0][0]==1:\n if x[0][1]==1 and x[0][2]==1:\n flag=1\n elif x[1][0]==1 and x[2][0]==1:\n flag=1\n elif x[1][1]==1 and x[2][2]==1:\n flag=1\n elif x[1][1]==1:\n if x[0][1]==1 and x[2][1]==1:\n flag=1\n elif x[1][0]==1 and x[2][0]==1:\n flag=1\n elif x[0][2]==1 and x[2][0]==1:\n flag=1\n elif x[2][2]==1:\n if x[2][0]==1 and x[2][1]==1:\n flag=1\n elif x[0][2]==1 and x[1][2]==1:\n flag=1\n if flag==1:\n print("Yes")\n else:\n print("No")\n print(x)\nelse:\n print("No")', 'A=list(map(int,input().split()))\nB=list(map(int,input().split()))\nC=list(map(int,input().split()))\nx=[[0 for i in range(3)] for j in range(3)]\nN=int(input())\nif N>=3:\n for i in range(N):\n b=int(input())\n for j in range(3):\n if A[j]==b:\n x[0][j]=1\n elif B[j]==b:\n x[1][j]=1\n elif C[j]==b:\n x[2][j]=1\n flag=0\n if x[0][0]==1:\n if x[0][1]==1 and x[0][2]==1:\n flag=1\n if x[1][0]==1 and x[2][0]==1:\n flag=1\n if x[1][1]==1 and x[2][2]==1:\n flag=1\n if x[1][1]==1:\n if x[0][1]==1 and x[2][1]==1:\n flag=1\n if x[1][0]==1 and x[1][2]==1:\n flag=1\n if x[0][2]==1 and x[2][0]==1:\n flag=1\n if x[2][2]==1:\n if x[2][0]==1 and x[2][1]==1:\n flag=1\n if x[0][2]==1 and x[1][2]==1:\n flag=1\n if flag==1:\n print("Yes")\n else:\n print("No")\n #print(x)\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s734466735', 's375216373'] | [3188.0, 3188.0] | [18.0, 17.0] | [877, 864] |
p02760 | u598924163 | 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(input().split())\nprint(a)\nn = int(input())\n\n\n\nfor k in range(n):\n b = input()\n for i in range(3):\n for j in range(3):\n if(b in a[i][j]):\n a[i][j] = 'maru'\n #print('OK')\n \n\nfrag = False\n\n\nfor i in range(3):\n if((a[i][0] == 'maru') and (a[i][1] == 'maru')and(a[i][2] == 'maru')):\n frag = True\n\nfor i in range(3):\n if((a[0][i] == 'maru') and (a[1][i] == 'maru')and(a[2][i] == 'maru')):\n frag = True\n\n\n\n\n\nif((a[0][0] == 'maru')and(a[1][1] == 'maru')and(a[2][2]=='maru')):\n frag = True\nif((a[2][0] == 'maru')and(a[1][1] == 'maru')and(a[0][2]=='maru')):\n frag = True\n \n\nif(frag == True):\n print('Yes')\nelse:\n print('No')\n\n\n", "a =[]\nfor i in range(3):\n a.append(input().split())\nprint(a)\nn = int(input())\n\n\n\nfor k in range(n):\n b = input()\n for i in range(3):\n for j in range(3):\n if(b in a[i][j]):\n a[i][j] = 'maru'\n #print('OK')\n \n\nfrag = False\n\n\nfor k in range(3):\n i = 0\n \n if((a[i][k] == 'maru') and (a[i+1][k] == 'maru')and(a[i+2][k] == 'maru')):\n frag = True\n\n\nfor k in range(3):\n j = 0\n \n if((a[k][j] == 'maru') and (a[k][j+1] == 'maru')and(a[k][j+2] == 'maru')):\n frag = True\n\n\n\nif((a[0][0] == 'maru')and(a[1][1] == 'maru')and(a[2][2]=='maru')):\n frag = True\n\n \n\nif(frag == True):\n print('Yes')\nelse:\n print('No')", "a =[]\nfor i in range(3):\n a.append(input().split())\n#print(a)\nn = int(input())\n\n\n\nfor k in range(n):\n b = input()\n for i in range(3):\n for j in range(3):\n if(b == a[i][j]):\n a[i][j] = 'maru'\n\n#print(a) \n\nfrag = False\n\n\nfor i in range(3):\n if((a[i][0] == 'maru') and (a[i][1] == 'maru')and(a[i][2] == 'maru')):\n frag = True\n\nfor i in range(3):\n if((a[0][i] == 'maru') and (a[1][i] == 'maru')and(a[2][i] == 'maru')):\n frag = True\n\nif((a[0][0] == 'maru')and(a[1][1] == 'maru')and(a[2][2]=='maru')):\n frag = True\nif((a[2][0] == 'maru')and(a[1][1] == 'maru')and(a[0][2]=='maru')):\n frag = True\n \n\nif(frag == True):\n print('Yes')\nelse:\n print('No')\n\n\n\n\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s253870494', 's688780019', 's234575268'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [1027, 702, 727] |
p02760 | u599925824 | 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. | ['As = [list(map(int, input().split())) for x in range(3)]\nN = int(input())\nbs = [int(input()) for x in range(N)]\n\n\ndef create_bingo_card():\n result = [[0, 0, 0] for x in range(3)]\n i = 0\n while True:\n i2 = 0\n while True:\n if bs[i2] in As[i]:\n result[i][As[i].index(bs[i2])] += 1\n i2 += 1\n if i2 == len(bs):\n break\n i += 1\n if i == len(As):\n break\n return result\n\n\ndef solvd(bingo):\n tmp = [bingo[0][0], bingo[1][1], bingo[2][2]]\n if check1(tmp):\n print("Yes")\n return\n\n tmp = [bingo[0][2], bingo[1][1], bingo[2][0]]\n if check1(tmp):\n print("Yes")\n return\n\n r = 0\n for x in range(3):\n tmp = [bingo[0][x], bingo[1][x], bingo[2][x]]\n if check1(tmp):\n print("Yes")\n return\n\n bingoSet = set(bingo[x])\n if check2(bingoSet):\n r += 1\n\n if r == 3:\n print("Yes")\n return\n print("No")\n\n\ndef check1(s):\n return s.count(1) == 3\n\n\ndef check2(s):\n return not (0 in list(s))\n\n\ndef main():\n Cs = create_bingo_card()\n print(Cs)\n solvd(Cs)\n\n\nif __name__ == "__main__":\n main()\n\n', 'As = [list(map(int, input().split())) for x in range(3)]\nN = int(input())\nbs = [int(input()) for x in range(N)]\n\n\ndef create_bingo_card():\n result = [[0, 0, 0] for x in range(3)]\n i = 0\n while True:\n i2 = 0\n while True:\n if bs[i2] in As[i]:\n result[i][As[i].index(bs[i2])] += 1\n i2 += 1\n if i2 == len(bs):\n break\n i += 1\n if i == len(As):\n break\n return result\n\n\ndef solvd(bingo):\n tmp = [bingo[0][0], bingo[1][1], bingo[2][2]]\n if check1(tmp):\n print("Yes")\n return\n\n tmp = [bingo[0][2], bingo[1][1], bingo[2][0]]\n if check1(tmp):\n print("Yes")\n return\n\n r = 0\n for x in range(3):\n tmp = [bingo[0][x], bingo[1][x], bingo[2][x]]\n if check1(tmp):\n print("Yes")\n return\n\n bingoSet = set(bingo[x])\n if check2(bingoSet):\n r += 1\n\n if r >= 1:\n print("Yes")\n return\n print("No")\n\n\ndef check1(s):\n return s.count(1) == 3\n\n\ndef check2(s):\n return not (0 in list(s))\n\n\ndef main():\n Cs = create_bingo_card()\n solvd(Cs)\n\n\nif __name__ == "__main__":\n main()'] | ['Wrong Answer', 'Accepted'] | ['s662655352', 's936450569'] | [3192.0, 3188.0] | [19.0, 17.0] | [1069, 1055] |
p02760 | u600995315 | 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="012 345 678 036 147 258 048 246 "\nA=sum([input().split()for i in range(4)],[])\nfor b in [input()for i in range(int(A[9]))]:\n if b in A:\n S=S.replace(str(A.index(b)),"")\nprint("YNeos"[1-" "in S::2])', 'S="012 345 678 036 147 258 048 246 "\nA=sum([input().split()for i in range(4)],[])\nfor b in [input()for i in range(int(A[10]))]:\n if b in A:\n S=S.replace(str(A.index(b)),"")\nprint("YNeos"[S.find(" ")<0::2])', 'S="012 345 678 036 147 258 048 246 "\nA=sum([input().split()for i in range(4)],[])\nfor b in [input()for i in range(int(A[9]))]:\n if b in A:\n S=S.replace(str(A.index(b)),"")\nprint("NYoe s"[" "in S::2])'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s723410612', 's919083281', 's331939795'] | [3060.0, 3060.0, 3060.0] | [17.0, 18.0, 19.0] | [205, 210, 204] |
p02760 | u601344838 | 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# @Time : 2020/3/1 19:59\n# @Author : DIRICHLET\n# @File : main.py\n\n\nb=[[0,0,0]]*3\n#print(b)\nm={}\nfor i in range(3):\n t=list(map(int,input().split()))\n k=0\n for j in t:\n m[j]=(i,k)\n k+=1\nn=int(input())\nfor i in n:\n t=int(input())\n if t in m:\n #print(m[t])\n b[m[t][0]][m[t][1]]=1\nfor i in b:\n ans=1\n for j in i:\n ans*=j\n if ans==1:\n print('Yes')\n exit()\nfor i in range(3):\n ans=1\n for j in range(3):\n ans*=b[j][i]\n if ans==1:\n print('Yes')\n exit()\nif b[0][0]*b[1][1]*b[2][2]==1:\n print('Yes')\n exit()\nif b[0][2]*b[1][1]*b[2][0]==1:\n print('Yes')\n exit()\nprint('No')", "# -*- coding: utf-8 -*-\n# @Time : 2020/3/1 19:59\n# @Author : DIRICHLET\n# @File : main.py\n\n\nb=[[0,0,0],[0,0,0],[0,0,0]]\n#print(b)\nm={}\nfor i in range(3):\n t=list(map(int,input().split()))\n k=0\n for j in t:\n m[j]=(i,k)\n k+=1\nn=int(input())\nfor i in range(n):\n t=int(input())\n if t in m:\n #print(m[t])\n b[m[t][0]][m[t][1]]=1\nfor i in b:\n ans=1\n for j in i:\n ans*=j\n if ans==1:\n print('Yes')\n exit()\nfor i in range(3):\n ans=1\n for j in range(3):\n ans*=b[j][i]\n if ans==1:\n print('Yes')\n exit()\nif b[0][0]*b[1][1]*b[2][2]==1:\n print('Yes')\n exit()\nif b[0][2]*b[1][1]*b[2][0]==1:\n print('Yes')\n exit()\nprint('No')"] | ['Runtime Error', 'Accepted'] | ['s923977098', 's831404820'] | [3064.0, 3192.0] | [17.0, 18.0] | [708, 729] |
p02760 | u601575292 | 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\tb.append(int(input()))\n\t\nyoko = A\ntate = [[], [], []]\nfor row in A:\n\tfor i in range(3):\n\t\ttate[i].append(row[i])\nnaname = [[A[0][0], A[1][1], A[2][2]]]\n\nall = yoko + tate + naname\n\ny = 0\nfor kumi in all:\n\tchk = 0\n\tfor i in range(3):\n\t\tfor n in b:\n\t\t\tif kumi[i] == n:\n\t\t\t\tchk += 1\n\tif chk == 3:\n\t\tprint("Yes")\n\t\ty = 1\n\tbreak\n\nif y == 0:\n\tprint("No")', 'A = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\nb = []\nfor i in range(N):\n\tb.append(int(input()))\n\t\nyoko = A\ntate = [[], [], []]\nfor row in A:\n\tfor i in range(3):\n\t\ttate[i].append(row[i])\nnaname = [[A[0][0], A[1][1], A[2][2]], [A[0][3], A[1][1], A[2][0]]]\n\nall = yoko + tate + naname\n\ny = 0\nchk = 0\nfor kumi in all:\n\tfor k in kumi:\n\t\tif k in b:\n\t\t\tchk += 1\n\t\telse:\n\t\t\tcontinue\n\tif chk == 3:\n\t\tprint("Yes")\n\t\ty = 1\n\t\tbreak\n\telse:\n\t\tchk = 0\n\t\t\nif y == 0:\n\tprint("No")', 'A = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\nb = []\nfor i in range(N):\n\tb.append(int(input()))\n\t\nyoko = A\ntate = [[], [], []]\nfor row in A:\n\tfor i in range(3):\n\t\ttate[i].append(row[i])\nnaname = [[A[0][0], A[1][1], A[2][2]]]\n\nall = yoko + tate + naname\n\n\n\nfor kumi in all:\n\tfor i in range(3):\n\t\tchk = 0\n\t\tif kumi[i] in b:\n\t\t\tchk += 1\n\t\tif chk == 3:\n\t\t\tprint("Yes")\n\t\tbreak\n\tif chk == 3:\n\t\tbreak\n\nif chk != 3:\n\tprint("No")', 'A = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\nb = []\nfor i in range(N):\n\tb.append(int(input()))\n\t\nyoko = A\ntate = [[], [], []]\nfor row in A:\n\tfor i in range(3):\n\t\ttate[i].append(row[i])\nnaname = [[A[0][0], A[1][1], A[2][2]], [A[0][2], A[1][1], A[2][0]]]\n\nall = yoko + tate + naname\n\ny = 0\nchk = 0\nfor kumi in all:\n\tfor k in kumi:\n\t\tif k in b:\n\t\t\tchk += 1\n\t\telse:\n\t\t\tcontinue\n\tif chk == 3:\n\t\tprint("Yes")\n\t\ty = 1\n\t\tbreak\n\telse:\n\t\tchk = 0\n\t\t\nif y == 0:\n\tprint("No")'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s267548903', 's524041074', 's939503627', 's124705510'] | [3064.0, 3064.0, 3064.0, 3064.0] | [19.0, 17.0, 17.0, 17.0] | [448, 490, 448, 490] |
p02760 | u602500004 | 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 bisect,collections,copy,heapq,itertools,math,numpy,string\nimport sys\nsys.setrecursionlimit(10**7)\n \ndef _S(): return sys.stdin.readline().rstrip()\ndef I(): return int(sys.stdin.readline().rstrip())\ndef LI(): return list(map(int,sys.stdin.readline().rstrip().split()))\ndef LS(): return list(sys.stdin.readline().rstrip().split())\n \ndef main():\n A = [LI() for _ in range(3)]\n N = I()\n B = [I() for _ in range(N)]\n \n \n for 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 break\n\n ans = 'No'\n for i in range(3):\n if (A[i][0]==0 and A[i][1]==0 and A[i][2]==0) or (A[0][i]==0 and A[1][i]==0 and A[2][i]==0):\n ans = 'Yes'\n break \n if (A[0][2]==0 and A[1][1]==0 and A[2][0]==0) or A[0][0]==0 and A[1][1]==0 and A[2][2]:\n ans = 'Yes'\n print(ans)\nmain()", "import bisect,collections,copy,heapq,itertools,math,numpy,string\nimport sys\nsys.setrecursionlimit(10**7)\n \ndef _S(): return sys.stdin.readline().rstrip()\ndef I(): return int(sys.stdin.readline().rstrip())\ndef LI(): return list(map(int,sys.stdin.readline().rstrip().split()))\ndef LS(): return list(sys.stdin.readline().rstrip().split())\n \ndef main():\n A = [LI() for _ in range(3)]\n N = I()\n B = [I() for _ in range(N)]\n \n \n Hit = [[False] * 3, [False] * 3, [False] * 3]\n for i in range(3):\n for j in range(3):\n for k in range(N):\n if A[i][j]== B[k]:\n Hit[i][j] = True\n break\n \n ans = False\n for i in range(3):\n if (Hit[i][0] and Hit[i][1] and Hit[i][2]) or (Hit[0][i] and Hit[1][i] and Hit[2][i]):\n ans = True\n break \n if (A[0][2] and Hit[1][1] and Hit[2][0]) or (Hit[0][0] and Hit[1][1] and Hit[2][2]):\n ans = True\n\n if ans:\n print('Yes')\n else:\n print('No')\nmain()"] | ['Wrong Answer', 'Accepted'] | ['s583515083', 's924609041'] | [27224.0, 27212.0] | [120.0, 119.0] | [947, 1045] |
p02760 | u603324902 | 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. | ['L_yoko = [list(map(int,input().split())) for _ in range(3)]\n\nans = [int(input()) for _ in range(9)]\n\n\nL_tate = list(zip(*L_yoko))\n\nL_naname = []\nL_naname.append([L_yoko[0][0],L_yoko[1][1],L_yoko[2][2]])\nL_naname.append([L_yoko[0][2],L_yoko[1][1],L_yoko[2][0]])\n\na = int(0)\nfor x in L_tate:\n if z[0] in ans and z[1] in ans and z[2] in ans:\n a = 1\n break\n else:\n continue\n\nfor y in L_yoko:\n if z[0] in ans and z[1] in ans and z[2] in ans:\n a = 1\n break\n else:\n continue\n\nfor z in L_naname:\n if z[0] in ans and z[1] in ans and z[2] in ans:\n a = 1\n break\n else:\n continue\n\n\nif a == 0:\n print("No")\nelse:\n print("Yes")\n', 'L_yoko = []\nfor i in range(3):\n x = list(map(int,input().split()))\n L_yoko.append(x)\n\nans = []\nfor i in range(9):\n x = int(input())\n ans.append(x)\n\n\nL_tate = list(zip(*L_yoko))\n\nL_naname = []\nL_naname.append([L_yoko[0][0],L_yoko[1][1],L_yoko[2][2]])\nL_naname.append([L_yoko[0][2],L_yoko[1][1],L_yoko[2][0]])\n\na = int(0)\nfor z in L_tate:\n if z[0] in ans and z[1] in ans and z[2] in ans:\n a = 1\n break\n\nfor z in L_yoko:\n if z[0] in ans and z[1] in ans and z[2] in ans:\n a = 1\n break\n\nfor z in L_naname:\n if z[0] in ans and z[1] in ans and z[2] in ans:\n a = 1\n break\n\n\nif a == 1:\n print("Yes")\nelse:\n print("No")\n', 'L_yoko = [list(map(int,input().split())) for i in range(3)]\n\nn = 9\nans = [int(input()) for _ in range(n)]\n\nL_tate = list(zip(*L_yoko))\n\nL_naname = []\nL_naname.append([L_yoko[0][0],L_yoko[1][1],L_yoko[2][2]])\nL_naname.append([L_yoko[0][2],L_yoko[1][1],L_yoko[2][0]])\n\na = int(0)\nfor z in L_tate:\n if z[0] in ans and z[1] in ans and z[2] in ans:\n a = 1\n break\n\nfor z in L_yoko:\n if z[0] in ans and z[1] in ans and z[2] in ans:\n a = 1\n break\n\nfor z in L_naname:\n if z[0] in ans and z[1] in ans and z[2] in ans:\n a = 1\n break\n\nif a == 0:\n print("No")\nelse:\n print("Yes")\n', 'L_yoko = [list(map(int,input().split())) for _ in range(3)]\n\n\nL_tate = list(zip(*L_yoko))\n\nL_naname = []\nL_naname.append([L_yoko[0][0],L_yoko[1][1],L_yoko[2][2]])\nL_naname.append([L_yoko[0][2],L_yoko[1][1],L_yoko[2][0]])\n\nn = int(input())\nans = [int(input()) for _ in range(n)]\n\na = int(0)\nfor z in L_tate:\n if z[0] in ans and z[1] in ans and z[2] in ans:\n a = 1\n break\n\nfor z in L_yoko:\n if z[0] in ans and z[1] in ans and z[2] in ans:\n a = 1\n break\n\nfor z in L_naname:\n if z[0] in ans and z[1] in ans and z[2] in ans:\n a = 1\n break\n\n\nif a == 0:\n print("No")\nelse:\n print("Yes")\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s051347256', 's344704701', 's715358962', 's659459020'] | [3064.0, 3064.0, 3064.0, 3064.0] | [18.0, 17.0, 20.0, 18.0] | [707, 689, 630, 643] |
p02760 | u606146341 | 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\nlst = []\nnums = []\nfor _ in range(3):\n l = []\n l = list(map(int, input().split()))\n lst.append(l)\n lst = np.array(lst)\nn = int(input())\nfor _ in range(n):\n nums.append(int(input()))\n\nfor h in range(3):\n for w in range(3):\n if array[h][w] in nums:\n array[h][w] = 0\n\ni = 0\nfor h in range(3):\n if sum(array[:, h]) == 0:\n i = 1\nfor w in range(3):\n if sum(array[w]) == 0:\n i = 1\nif sum(np.diag(np.fliplr(array))) == 0:\n i = 1\nif sum(np.diag(array)) == 0:\n i = 1\n\nif i == 1:\n print("Yes")\nelse:\n print(\'No\')', 'import numpy as np\nlst = []\nnums = []\nfor _ in range(3):\n l = []\n l = list(map(int, input().split()))\n lst.append(l)\n array = np.array(lst)\n \nn = int(input())\nfor _ in range(n):\n nums.append(int(input()))\n\nfor h in range(3):\n for w in range(3):\n if array[h][w] in nums:\n array[h][w] = 0\n\ni = 0\nfor h in range(3):\n if sum(array[:, h]) == 0:\n i = 1\nfor w in range(3):\n if sum(array[w]) == 0:\n i = 1\nif sum(np.diag(np.fliplr(array))) == 0:\n i = 1\nif sum(np.diag(array)) == 0:\n i = 1\n\nif i == 1:\n print("Yes")\nelse:\n print(\'No\')\n'] | ['Runtime Error', 'Accepted'] | ['s280973048', 's445286990'] | [12500.0, 12500.0] | [150.0, 150.0] | [588, 593] |
p02760 | u606393507 | 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\ndef main():\n a=[]\n b=[]\n c=[]\n for i in range(3):\n tmp = input().replace('\\n','').split(' ')\n tmp = list(map(int, tmp))\n a.append([tmp[0],False])\n a.append([tmp[1],False])\n a.append([tmp[2],False])\n c.append(tmp[0])\n c.append(tmp[1])\n c.append(tmp[2])\n n = int(input().replace('\\n',''))\n for i in range(n):\n try:\n tmp = c.index(int(input().replace('\\n','')))\n a[tmp][1] = True\n except ValueError:\n pass\n for i in range(3):\n if a[i][1] and a[i+3][1] and a[i+6][1]:\n res = 'Yes'\n break\n elif a[i*3][1] and a[i*3+1][1] and a[i*3+2][1]:\n res = 'Yes'\n break\n elif a[0][1] and a[4][1] and a[7][1] or a[2][1] and a[4][1] and a[6][1]:\n res = 'Yes'\n break\n else:\n res = 'No'\n break\n print(res)\nif __name__ == '__main__':\n input = sys.stdin.readline\n main()", "import sys\n\ndef main():\n a=[]\n b=[]\n c=[]\n for i in range(3):\n tmp = input().replace('\\n','').split(' ')\n tmp = list(map(int, tmp))\n a.append([tmp[0],False])\n a.append([tmp[1],False])\n a.append([tmp[2],False])\n c.append(tmp[0])\n c.append(tmp[1])\n c.append(tmp[2])\n n = int(input().replace('\\n',''))\n for i in range(n):\n try:\n tmp = c.index(int(input().replace('\\n','')))\n a[tmp][1] = True\n except ValueError:\n pass\n for i in range(3):\n if a[i][1] and a[i+3][1] and a[i+6][1]:\n res = 'Yes'\n break\n elif a[i*3][1] and a[i*3+1][1] and a[i*3+2][1]:\n res = 'Yes'\n break\n elif a[0][1] and a[4][1] and a[7][1] or a[2][1] and a[4][1] and a[6][1]:\n res = 'Yes'\n break\n else:\n res = 'No'\n print(res)\nif __name__ == '__main__':\n input = sys.stdin.readline\n main()", "import sys\n\ndef main():\n a=[]\n b=[]\n c=[]\n for i in range(3):\n tmp = input().replace('\\n','').split(' ')\n tmp = list(map(int, tmp))\n a.append([tmp[0],False])\n a.append([tmp[1],False])\n a.append([tmp[2],False])\n c.append(tmp[0])\n c.append(tmp[1])\n c.append(tmp[2])\n n = int(input().replace('\\n',''))\n for i in range(n):\n try:\n tmp = c.index(int(input().replace('\\n','')))\n a[tmp][1] = True\n except ValueError:\n pass\n for i in range(3):\n if a[i][1] and a[i+3][1] and a[i+6][1]:\n res = 'Yes'\n break\n elif a[i*3][1] and a[i*3+1][1] and a[i*3+2][1]:\n res = 'Yes'\n break\n elif a[0][1] and a[4][1] and a[8][1] or a[2][1] and a[4][1] and a[6][1]:\n res = 'Yes'\n break\n else:\n res = 'No'\n print(res)\nif __name__ == '__main__':\n input = sys.stdin.readline\n main()"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s066106094', 's158545742', 's373141612'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [1008, 990, 990] |
p02760 | u607563136 | 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\n# a = [list(map(int,input().split())) for _ in range(3)]\n\n# n = int(input())\n\n# b = list([int(input()) for _ in range(n)])\n\nc = [[0]*3]*3\n\nfor k in b:\n# print("k={}".format(k))\n for i in range(3):\n for j in range(3):\n# print(" a={}".format(a[i][j]))\n if k == a[i][j]:\n c[i][j]=1\n\nc = np.array(c)\n\nif (max(c.sum(axis=0))==3) or (max(c.sum(axis=1))==3) or \\\n (sum([a[i,i] for i in range(3)])==3) or (sum(a[2,0]+a[1,1]+a[0,2])==3):\n print("Yes")\nelse:\n print("No")', 'import numpy as np\n\na = [list(map(int,input().split())) for _ in range(3)]\n\nn = int(input())\n\nb = list([int(input()) for _ in range(n)])\n\nc = np.zeros(9).reshape(3,3)\n\nfor k in b:\n for i in range(3):\n for j in range(3):\n if k == a[i][j]:\n c[i,j]=1\n\nif (max(c.sum(axis=0))==3) or (max(c.sum(axis=1))==3) or \\\n (sum([c[i,i] for i in range(3)])==3) or (c[2,0]+c[1,1]+c[0,2]==3):\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s755388610', 's802416700'] | [27148.0, 27064.0] | [111.0, 119.0] | [543, 453] |
p02760 | u607729897 | 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\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\n\ndef main():\n import numpy as np\n A = [list(map(int,readline().split())) for _ in range(3)]\n N, *b = map(int, read().split())\n A = np.array(A)\n B = np.zeros(A.shape)\n for i in A.reshape(-1):\n if i in b:\n print(np.where(A == i))\n B[np.where(A == i)] = 1\n for i in range(3):\n if np.all(B[i, :] == 1):\n print('Yes')\n break\n if np.all(B[:, i] == 1):\n print('Yes')\n break\n else:\n if B[0,0]==B[1,1]==B[2,2]==1:\n print('Yes')\n elif B[0,2]==B[1,1]==B[2,0]==1:\n print('Yes')\n else:\n print('No')\n print(B)\n return\nif __name__ == '__main__':\n main()\n\n", "import sys\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\n\ndef main():\n import numpy as np\n A = [list(map(int,readline().split())) for _ in range(3)]\n N, *b = map(int, read().split())\n A = np.array(A)\n B = np.zeros(A.shape)\n for i in A.reshape(-1):\n if i in b:\n B[np.where(A == i)] = 1\n for i in range(3):\n if np.all(B[i, :] == 1):\n print('Yes')\n break\n if np.all(B[:, i] == 1):\n print('Yes')\n break\n else:\n if B[0,0]==B[1,1]==B[2,2]==1:\n print('Yes')\n elif B[0,2]==B[1,1]==B[2,0]==1:\n print('Yes')\n else:\n print('No')\n return\nif __name__ == '__main__':\n main()\n\n"] | ['Wrong Answer', 'Accepted'] | ['s820244593', 's577390253'] | [20892.0, 12232.0] | [346.0, 148.0] | [791, 742] |
p02760 | u610326327 | 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 = [input().split(' '), input().split(' '), input().split(' ')]\ncount = int(input())\n\nresult = [[0 for _ in range(3)] for _ in range(3)]\n\nfor _ in range(count):\n b = int(input())\n for i, cc in enumerate(card):\n for j, c in enumerate(cc):\n if c == b:\n result[i][j] = 1\n\nfor i in range(3):\n if card[i][0] == card[i][1] == card[i][2] == 1:\n print('Yes')\n exit(0)\n if card[0][i] == card[1][i] == card[2][i] == 1:\n print('Yes')\n exit(0)\nif card[0][0] == card[1][1] == card[2][2] == 1:\n print('Yes')\n exit(0)\nif card[0][2] == card[1][1] == card[2][0] == 1:\n print('Yes')\n exit(0)\nprint('No')", "card = [\n list(map(int, input().split(' '))),\n list(map(int, input().split(' '))),\n list(map(int, input().split(' ')))\n]\n\ncount = int(input())\n\nresult = [[0 for _ in range(3)] for _ in range(3)]\n\nfor _ in range(count):\n b = int(input())\n for i, cc in enumerate(card):\n for j, c in enumerate(cc):\n if c == b:\n result[i][j] = 1\n\nfor i in range(3):\n if result[i][0] == result[i][1] == result[i][2] == 1:\n print('Yes')\n exit(0)\n if result[0][i] == result[1][i] == result[2][i] == 1:\n print('Yes')\n exit(0)\nif result[0][0] == result[1][1] == result[2][2] == 1:\n print('Yes')\n exit(0)\nif result[0][2] == result[1][1] == result[2][0] == 1:\n print('Yes')\n exit(0)\nprint('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s091537139', 's398727595'] | [3064.0, 3064.0] | [18.0, 18.0] | [674, 762] |
p02760 | u610801172 | 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 bingo(A, B):\n for i in range(3):\n if A[i][0] == "o" and A[i][1] == "o" and A[i][2] == "o":\n return True\n elif A[0][i] == "o" and A[1][i] == "o" and A[2][i] == "o":\n return True\n \n if A[0][0] == "o" and A[1][1] == "o" and A[2][2] == "o":\n return True\n elif A[0][2] == "o" and A[1][1] == "o" and A[2][0] == "o":\n return True\n \n return False\n\nA = []\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\nfor b in B:\n for i in range(3):\n for j in range(3):\n if A[i][j] == b:\n A[i][j] = "o"\n\nif bingo(A, B):\n print("YES")\nelse:\n print("No")', 'def bingo(A, B):\n for i in range(3):\n if A[i][0] == "o" and A[i][1] == "o" and A[i][2] == "o":\n return True\n elif A[0][i] == "o" and A[1][i] == "o" and A[2][i] == "o":\n return True\n \n if A[0][0] == "o" and A[1][1] == "o" and A[2][2] == "o":\n return True\n elif A[0][2] == "o" and A[1][1] == "o" and A[2][0] == "o":\n return True\n \n return False\n\nA = []\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\nfor b in B:\n for i in range(3):\n for j in range(3):\n if A[i][j] == b:\n A[i][j] = "o"\n\nif bingo(A, B):\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s424044048', 's012038494'] | [3064.0, 3064.0] | [17.0, 18.0] | [679, 679] |
p02760 | u611090896 | 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 a in range(3)]\nN = int(input())\nfor i in range(N):\n B = int(input())\n for t in range(3):\n for s in range(3):\n if B == A[t][s]:\n A[t][s] == 0\n\nif A[0][0] == A[0][1] == A[0][2] or A[1][0] == A[1][1] == A[1][2] or A[2][0] == A[2][1] == A[2][2] or A[0][0] == A[1][0] == A[2][0] or A[1][0] == A[1][1] == A[1][2] or A[2][0] == A[2][1] == A[2][2] or A[0][0] == A[1][1] == A[2][2] or A[0][2] == A[1][1] == A[2][0]:\n print('Yes')\nelse:\n print('No')", 'a=[list(map(int,input().split())) for A in range(3)]\nn=int(input())\n\nfor i in range(n):\n b=int(input())\n for j in range(3):\n for k in range(3):\n if b==a[j][k]:\n a[j][k]=0\n\nif a[0][0]==a[0][1]==a[0][2] or a[1][0]==a[1][1]==a[1][2] or a[2][0]==a[2][1]==a[2][2]\\\nor a[0][0]==a[1][0]==a[2][0] or a[0][1]==a[1][1]==a[2][1] or a[0][2]==a[1][2]==a[2][2]\\\nor a[0][0]==a[1][1]==a[2][2] or a[2][0]==a[1][1]==a[0][2]:\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s947090213', 's288367169'] | [9252.0, 9228.0] | [28.0, 29.0] | [498, 459] |
p02760 | u616468898 | 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\ntmps = []\nfor i in range(3):\n tmp = list(map(int, input().split(' ')))\n tmps.append(tmp)\nbingo = np.array(tmps)\nN = int(input())\nfor i in range(N):\n bingo = np.where(bingo==i, -1, bingo)\nc = 2\nx1 = 0\nx2 = 0\nret = []\nfor i in range(3):\n row = np.sum(bingo[i, :])\n col = np.sum(bingo[:, i])\n x1 += np.sum(bingo[i, i])\n x2 += np.sum(bingo[i, c-i])\n ret.append(row)\n ret.append(col)\nret.append(x1)\nret.append(x2)\nif -3 in ret:\n print('Yes')\nelse:\n print('No')", "import numpy as np\ntmps = []\nfor i in range(3):\n tmp = list(map(int, input().split(' ')))\n tmps.append(tmp)\nbingo = np.array(tmps)\nN = int(input())\nfor i in range(N):\n bingo = np.where(bingo==int(input()), -1, bingo)\nc = 2\nx1 = 0\nx2 = 0\nret = []\nfor i in range(3):\n row = np.sum(bingo[i, :])\n col = np.sum(bingo[:, i])\n x1 += np.sum(bingo[i, i])\n x2 += np.sum(bingo[i, c-i])\n ret.append(row)\n ret.append(col)\nret.append(x1)\nret.append(x2)\nif -3 in ret:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s602581259', 's909042338'] | [12508.0, 12504.0] | [151.0, 152.0] | [507, 518] |
p02760 | u617037231 | 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\nL = []\nbingo = set()\nNumbers = []\ntestor = 0\nfor i in range(3):\n a,b,c = map(int,input().split())\n L.append((a,b,c)) #00 10 20/ 01 11 21/ 02 12 22/00 11 22/ 20 11 02/\nN = int(input())\nfor i in range(3):\n a = L[0][i] \n b = L[1][i]\n c = L[2][i]\n L.append((a,b,c))\na = L[0][0]\nb = L[1][1]\nc = L[2][2]\nL.append((a,b,c))\na = L[2][0] \nb = L[1][1]\nc = L[0][2]\nL.append((a,b,c))\nprint(L)\nfor i in range(N):\n Numbers.append(int(input()))\nfor i in range(8): \n bingo = L[i]\n for k in range(N):\n if Numbers[k] in bingo:\n testor += 1\n if testor == 3:\n print('Yes')\n sys.exit(0)\n testor = 0\nprint('No')", "import sys\nL = []\nbingo = set()\nNumbers = []\ntestor = 0\nfor i in range(3):\n a,b,c = map(int,input().split())\n L.append((a,b,c)) #00 10 20/ 01 11 21/ 02 12 22/00 11 22/ 20 11 02/\nN = int(input())\nfor i in range(3):\n a = L[0][i] \n b = L[1][i]\n c = L[2][i]\n L.append((a,b,c))\na = L[0][0]\nb = L[1][1]\nc = L[2][2]\nL.append((a,b,c))\na = L[2][0] \nb = L[1][1]\nc = L[0][2]\nL.append((a,b,c))\nfor i in range(N):\n Numbers.append(int(input()))\nfor i in range(8): \n bingo = L[i]\n for k in range(N):\n if Numbers[k] in bingo:\n testor += 1\n if testor == 3:\n print('Yes')\n sys.exit(0)\n testor = 0\nprint('No')"] | ['Wrong Answer', 'Accepted'] | ['s813995318', 's624324720'] | [3064.0, 3064.0] | [18.0, 18.0] | [651, 642] |
p02760 | u617659131 | 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. | ['l = []\nflag = 0\nfor i in range(3):\n for j in input().split():\n l.append(j)\nn = int(input())\nfor i in range(n):\n a = input()\n if a in l:\n l[l.index(a)] = 0\nif l[0:3] == 0 or l[3:6] == 0 or l[6:9] == 0:\n flag = 1\nif l[0::3] == 0 or l[1::3] == 0 or l[2::3] == 0:\n flag = 1\nif l[0::4] == 0 or l[2::2] == 0:\n flag = 1\nif flag:\n print("Yes")\nelse:\n print("No")', 'l = []\nflag = 0\nfor i in range(3):\n l.append(list(input().split()))\nn = int(input())\nfor i in range(n):\n a = int(input())\n for j in range(3):\n for m in l[j]:\n if m == a:\n l[j][l.index(m)] = 0\nfor i in range(3):\n if not any(l[i]):\n flag = 1\nif l[0][0] == l[1][0] == l[2][0] or l[0][1] == l[1][1] == l[2][1] or l[0][2] == l[1][2] == l[2][2]:\n flag = 1\nif l[0][0] == l[1][1] == l[2][2] or l[0][2] == l[1][1] == l[2][0]:\n flag = 1\nif flag == 1:\n print("Yes")\nelse:\n print("No")', 'l = []\nflag = 0\nfor i in range(3):\n for j in input().split():\n l.append(j)\nn = int(input())\nfor i in range(n):\n a = input()\n if a in l:\n l[l.index(a)] = 0\nif not any(l[0:3]) or not any(l[3:6]) or not any(l[6:9]):\n flag = 1\nif not any(l[0::3]) or not any(l[1::3]) or not any(l[2::3]):\n flag = 1\nif not any(l[0::4]) or not any(l[2:7:2]):\n flag = 1\nif flag:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s626519412', 's761930739', 's147391391'] | [3064.0, 3188.0, 3064.0] | [18.0, 19.0, 17.0] | [368, 499, 402] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.