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 | u832871520 | 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. | ["BingoRow = 3\nBingoList = [list(map(int,input().split())) for i in range(BingoRow)]\n\nTargetRow = int(input())\nTargetList = [int(input()) for i in range(TargetRow)]\n\nansList = []\nx = 0\nflg = false\nfor row in BingoList:\n for num in row:\n flg = false\n for target in TargetList:\n if num == target:\n ansList.append(1)\n flg = true\n if !flg:\n ansList.append(0)\n\nif (ansList[0] + ansList[1] + ansList[2]) == 3:\n print('Yes')\nelif (ansList[3] + ansList[4] + ansList[5]) == 3:\n print('Yes')\nelif (ansList[6] + ansList[7] + ansList[8]) == 3:\n print('Yes')\nelif (ansList[0] + ansList[3] + ansList[6]) == 3:\n print('Yes')\nelif (ansList[1] + ansList[4] + ansList[7]) == 3:\n print('Yes')\nelif (ansList[2] + ansList[5] + ansList[8]) == 3:\n print('Yes')\nelif (ansList[0] + ansList[4] + ansList[8]) == 3:\n print('Yes')\nelif (ansList[2] + ansList[4] + ansList[6]) == 3:\n print('Yes')\nelse:\n print('No')\n", "BingoRow = 3\nBingoList = [list(map(int,input().split())) for i in range(BingoRow)]\n \nTargetRow = int(input())\nTargetList = [int(input()) for i in range(TargetRow)]\n \nansList = []\nx = 0\nflg = False\nfor row in BingoList:\n for num in row:\n flg = False\n for target in TargetList:\n if num == target:\n ansList.append(1)\n flg = True\n if not flg:\n ansList.append(0)\n \nif (ansList[0] + ansList[1] + ansList[2]) == 3:\n print('Yes')\nelif (ansList[3] + ansList[4] + ansList[5]) == 3:\n print('Yes')\nelif (ansList[6] + ansList[7] + ansList[8]) == 3:\n print('Yes')\nelif (ansList[0] + ansList[3] + ansList[6]) == 3:\n print('Yes')\nelif (ansList[1] + ansList[4] + ansList[7]) == 3:\n print('Yes')\nelif (ansList[2] + ansList[5] + ansList[8]) == 3:\n print('Yes')\nelif (ansList[0] + ansList[4] + ansList[8]) == 3:\n print('Yes')\nelif (ansList[2] + ansList[4] + ansList[6]) == 3:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s736638816', 's676839967'] | [2940.0, 3064.0] | [17.0, 18.0] | [926, 931] |
p02760 | u833436666 | 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. | ['ans="No"\nA=3\nt=[0]*A\nx=[0]*A\ny=[0]*A\nfor i in range(A):\n t[i], x[i], y[i] = map(int, input().split())\n#print(x[1])\n\nN=int(input())\nS=[]\nfor _ in range(N):\n S.append(input())\n#print(S[0])\nS1=[int(s) for s in S]\nfor i in range(A):\n if t[i] in S1:\n t[i]=0\n if x[i] in S1:\n x[i]=0\n if y[i] in S1:\n y[i]=0\nprint(t[0])\nif t.count(0)==3:\n ans="Yes"\nif x.count(0)==3:\n ans="Yes"\nif y.count(0)==3:\n ans="Yes"\nif t[0]==0 and x[1]==0 and y[2]==0:\n ans="Yes"\nif t[2]==0 and x[1]==0 and y[0]==0:\n ans="Yes"\nprint(ans)', 'ans="No"\nA=3\nt=[0]*A\nx=[0]*A\ny=[0]*A\nfor i in range(A):\n t[i], x[i], y[i] = map(int, input().split())\n#print(x[1])\n\nN=int(input())\nS=[]\nfor _ in range(N):\n S.append(input())\n#print(S[0])\nS1=[int(s) for s in S]\nfor i in range(A):\n if t[i] in S1:\n t[i]=0\n if x[i] in S1:\n x[i]=0\n if y[i] in S1:\n y[i]=0\n#print(t[0])\nif t.count(0)==3:\n ans="Yes"\nif x.count(0)==3:\n ans="Yes"\nif y.count(0)==3:\n ans="Yes"\nif t[0]==0 and x[1]==0 and y[2]==0:\n ans="Yes"\nif t[2]==0 and x[1]==0 and y[0]==0:\n ans="Yes"\nif t[0]==0 and x[0]==0 and y[0]==0:\n ans="Yes"\nif t[1]==0 and x[1]==0 and y[1]==0:\n ans="Yes"\nif t[2]==0 and x[2]==0 and y[2]==0:\n ans="Yes"\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s808314176', 's196521373'] | [3064.0, 3064.0] | [17.0, 18.0] | [526, 671] |
p02760 | u834269725 | 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 functools import reduce\n\na = reduce(lambda a, b: a + b, [list(map(int, input().split())) for _ in range(3)])\nprint(a)\nn = int(input())\nb = {int(input()): None for _ in range(n)}\n\nr = [(ai in b) for ai in a]\n\ncombs = [\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]\nif any([all([r[c] for c in comb]) for comb in combs]):\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()): None for _ in range(n)}\n\nr = [(ai in b) for ai in a]\n\ncombs = [\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]\nif any([all([r[c] for c in comb]) for comb in combs]):\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s695163857', 's578315483'] | [3572.0, 3064.0] | [22.0, 17.0] | [422, 367] |
p02760 | u835283937 | 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 = [[int(a) for a in input().split()] for i in range(3)]\n N = int(input())\n b = [int(input()) for i in range(N)]\n print(A, N, b)\n for k in b:\n for i in range(3):\n for j in range(3):\n if A[i][j] == k:\n A[i][j] = "x"\n bingo = False\n if A[0][0] == A[0][1] == A[0][2] == "x" or \\\n A[1][0] == A[1][1] == A[1][2] == "x" or \\\n A[2][0] == A[2][1] == A[2][2] == "x" or \\\n A[0][0] == A[1][0] == A[2][0] == "x" or \\\n A[0][1] == A[1][1] == A[2][1] == "x" or \\\n A[0][2] == A[1][2] == A[2][2] == "x" or \\\n A[0][0] == A[1][1] == A[2][2] == "x" or \\\n A[0][2] == A[1][1] == A[2][0] == "x":\n bingo = True\n\n if bingo:\n print("Yes")\n else:\n print("No")\nmain()', 'def main():\n A = [[int(a) for a in input().split()] for i in range(3)]\n N = int(input())\n b = [int(input()) for i in range(N)]\n for k in b:\n for i in range(3):\n for j in range(3):\n if A[i][j] == k:\n A[i][j] = "x"\n bingo = False\n if A[0][0] == A[0][1] == A[0][2] == "x" or \\\n A[1][0] == A[1][1] == A[1][2] == "x" or \\\n A[2][0] == A[2][1] == A[2][2] == "x" or \\\n A[0][0] == A[1][0] == A[2][0] == "x" or \\\n A[0][1] == A[1][1] == A[2][1] == "x" or \\\n A[0][2] == A[1][2] == A[2][2] == "x" or \\\n A[0][0] == A[1][1] == A[2][2] == "x" or \\\n A[0][2] == A[1][1] == A[2][0] == "x":\n bingo = True\n \n if bingo:\n print("Yes")\n else:\n print("No")\nmain()'] | ['Wrong Answer', 'Accepted'] | ['s218453572', 's644331526'] | [3064.0, 3064.0] | [18.0, 18.0] | [794, 782] |
p02760 | u836737505 | 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 n = int(input())\n b = [int(input()) for i in range(n)]\n ai = [[1]*3 for _ in range(3)]\n for i in range(3):\n for j in range(3):\n if a[i][j] in b:\n ai[i][j] = 0\n ans = "No"\n for k in range(3):\n if sum(ai[k])== 0:\n ans = "Yes"\n for l in range(3):\n if ai[0][k]+ai[1][k]+ai[2][k] == 0:\n ans = "Yes"\n if ai[0][0]+ai[1][1]+ai[2][2] == 0 or ai[0][2]+ai[2][0]+ai[1][1] == 0:\n ans = "Yes"\n print(ans)', 'c = list(map(int,input().split())) + list(map(int,input().split())) + list(map(int,input().split()))\nn = int(input())\nd = [0]*9\nfor i in range(n):\n m = int(input())\n for j in range(9):\n if c[j] == m:\n d[j] = 1\nif (d[0],d[1],d[2]) == (1,1,1) or (d[3],d[4],d[5]) == (1,1,1) or (d[6],d[7],d[8]) == (1,1,1)\\\n or (d[0],d[3],d[6]) == (1,1,1) or (d[1],d[4],d[7]) == (1,1,1) or (d[2],d[5],d[8]) == (1,1,1)\\\n or (d[0],d[4],d[8]) == (1,1,1) or (d[2],d[4],d[6]) == (1,1,1):\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s908658495', 's909126744'] | [2940.0, 3064.0] | [17.0, 18.0] | [550, 539] |
p02760 | u844895214 | 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\nfrom collections import deque\nimport numpy as np\nimport math\nsys.setrecursionlimit(10**6)\ndef S(): return sys.stdin.readline().rstrip()\ndef SL(): return map(str,sys.stdin.readline().rstrip().split())\ndef I(): return int(sys.stdin.readline().rstrip())\ndef IL(): return map(int,sys.stdin.readline().rstrip().split())\n\ndef solve():\n bingo = [True]*9\n dic = dict()\n c = 0\n for _ in range(3):\n tmp = list(IL())\n for rep in tmp:\n dic[rep] = c\n c += 1\n n = I()\n for _ in range(n):\n b = I()\n idx = dic.get(b)\n if idx is None:\n continue\n bingo[idx] = True\n \n\n print(bingo)\n \n flag = False\n for i in range(0,3):\n for j in range(0,7,3):\n if not bingo[i+j]:\n break\n else:\n flag = True\n if flag:\n print('Yes')\n return\n \n for i in range(0,7,3):\n for j in range(0,3):\n if not bingo[i+j]:\n break\n else:\n flag = True\n if flag:\n print('Yes')\n return\n\n if (bingo[2] and bingo[4] and bingo[6]) or (bingo[0] and bingo[4] and bingo[8]):\n print('Yes')\n else:\n print('No')\n return\n\nif __name__=='__main__':\n solve()", "import sys\nfrom collections import deque\nimport numpy as np\nimport math\nsys.setrecursionlimit(10**6)\ndef S(): return sys.stdin.readline().rstrip()\ndef SL(): return map(str,sys.stdin.readline().rstrip().split())\ndef I(): return int(sys.stdin.readline().rstrip())\ndef IL(): return map(int,sys.stdin.readline().rstrip().split())\n\ndef solve():\n bingo = [False]*9\n dic = dict()\n c = 0\n for _ in range(3):\n tmp = list(IL())\n for rep in tmp:\n dic[rep] = c\n c += 1\n n = I()\n for _ in range(n):\n b = I()\n idx = dic.get(b)\n if idx is None:\n continue\n bingo[idx] = True\n print(bingo)\n flag = False\n for i in range(0,3):\n for j in range(0,7,3):\n if not bingo[i+j]:\n break\n else:\n flag = True\n if flag:\n print('Yes')\n return\n \n for i in range(0,7,3):\n for j in range(0,3):\n if not bingo[i+j]:\n break\n else:\n flag = True\n if flag:\n print('Yes')\n return\n\n if (bingo[2] and bingo[4] and bingo[6]) or (bingo[0] and bingo[4] and bingo[8]):\n print('Yes')\n else:\n print('No')\n return\n\nif __name__=='__main__':\n solve()", "import sys\nfrom collections import deque\nimport numpy as np\nimport math\nsys.setrecursionlimit(10**6)\ndef S(): return sys.stdin.readline().rstrip()\ndef SL(): return map(str,sys.stdin.readline().rstrip().split())\ndef I(): return int(sys.stdin.readline().rstrip())\ndef IL(): return map(int,sys.stdin.readline().rstrip().split())\n\ndef solve():\n bingo = [False]*9\n dic = dict()\n c = 0\n for _ in range(3):\n tmp = list(IL())\n for rep in tmp:\n dic[rep] = c\n c += 1\n n = I()\n for _ in range(n):\n b = I()\n idx = dic.get(b)\n if idx is None:\n continue\n bingo[idx] = True\n \n flag = False\n for i in range(0,3):\n for j in range(0,7,3):\n if not bingo[i+j]:\n break\n else:\n flag = True\n if flag:\n print('Yes')\n return\n \n for i in range(0,7,3):\n for j in range(0,3):\n if not bingo[i+j]:\n break\n else:\n flag = True\n if flag:\n print('Yes')\n return\n\n if (bingo[2] and bingo[4] and bingo[6]) or (bingo[0] and bingo[4] and bingo[8]):\n print('Yes')\n else:\n print('No')\n return\n\nif __name__=='__main__':\n solve()"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s440749569', 's990463871', 's924078995'] | [27088.0, 27096.0, 26876.0] | [116.0, 117.0, 119.0] | [1282, 1272, 1260] |
p02760 | u845148770 | 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\nfor i in range(0,3):\n A[i] = list(map(int, input().split()))\nN = int(input())\nb = [int(input()) for i in range(N)]\n\ncount = 0\nwhile count < N:\n for i in range(0,3):\n for j in range(0,3):\n if b[count] == A[i][j]:\n A[i][j] = 0\n count += 1\n \nprint(A)\nsum_y = [0]*3 \nfor i in range(0,3):\n for j in range(0,3):\n sum_y[i] += A[i][j]\n\nsum_t = [0]*3\nfor i in range(0,3):\n for j in range(0,3):\n sum_t[i] += A[j][i]\n \n\nsum1 = A[0][0] + A[1][1] + A[2][2]\nsum2 = A[0][2] + A[1][1] + A[0][2]\n\nif sum_y[0] == 0:\n print("Yes")\nelif sum_y[1] == 0:\n print("Yes")\nelif sum_y[2] == 0:\n print("Yes")\nelif sum_t[0] == 0:\n print("Yes") \nelif sum_t[1] == 0:\n print("Yes") \nelif sum_t[2] == 0:\n print("Yes") \nelif sum1 == 0:\n print("Yes")\nelif sum2 == 0:\n print("Yes")\nelse:\n print("No")\n', 'A = [0]*3\nfor i in range(0,3):\n A[i] = list(map(int, input().split()))\nN = int(input())\nb = [int(input()) for i in range(N)]\n \ncount = 0\nwhile count < N:\n for i in range(0,3):\n for j in range(0,3):\n if b[count] == A[i][j]:\n A[i][j] = 0\n count += 1\n \n\nsum_y = [0]*3 \nfor i in range(0,3):\n for j in range(0,3):\n sum_y[i] += A[i][j]\n \nsum_t = [0]*3\nfor i in range(0,3):\n for j in range(0,3):\n sum_t[i] += A[j][i]\n \n \nsum1 = A[0][0] + A[1][1] + A[2][2]\nsum2 = A[0][2] + A[1][1] + A[0][2]\n \nif sum_y[0] == 0:\n print("Yes")\nelif sum_y[1] == 0:\n print("Yes")\nelif sum_y[2] == 0:\n print("Yes")\nelif sum_t[0] == 0:\n print("Yes") \nelif sum_t[1] == 0:\n print("Yes") \nelif sum_t[2] == 0:\n print("Yes") \nelif sum1 == 0:\n print("Yes")\nelif sum2 == 0:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s280228965', 's733334881'] | [3064.0, 3064.0] | [18.0, 18.0] | [866, 861] |
p02760 | u846226907 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['\na = list(list(map(int,input().split())) for _ in range(3))\n\nN = int(input())\n\nb = list(int(input()) for _ in range(N))\n\n\nax = [[0]*3]*3\n\nfor k in range(N):\n for i in range(3):\n for j in range(3):\n if a[i][j] == b[k]:ax[i][j]= 1\n\n\nfor i in range(3):\n xcnt = 0\n ycnt = 0\n for j in range(3):\n if ax[i][j] == 1:xcnt +=1\n if ax[j][i] == 1:ycnt +=1\n\n\nxxcnt = 0\nfor i in range(3):\n if ax[i][i] == 1:xxcnt+=1\n\nfor i in range(3):\n if ax[3-i][i] == 1:xycnt+=1\n\nfor i in range(3):\n if ax[i][3-i] == 1:yxcnt+=1\n\nif xcnt == 3 or ycnt == 3 or xxcnt == 3 or xycnt == 3 or yxcnt == 3:\n print("Yes")\n\nelse:\n print("No")\n\n', '# -*- coding:utf-8 -*-\nA = []\nbingo = 0\nfor i in range(3):\n a = list(map(int, input().split()))\n A.append(a)\n\nn = int(input())\n\nfor i in range(n):\n b = int(input())\n for ai in A:\n if b in ai:\n ai[ai.index(b)] = None\n\nfor i in range(3):\n if A[i] == [None, None, None]:\n bingo = 1\n\n if [A[0][i], A[1][i], A[2][i]] == [None, None, None]:\n bingo = 1\n\nif [A[0][0], A[1][1], A[2][2]] == [None, None, None] or [A[0][2], A[1][1], A[2][0]] == [None, None, None]:\n bingo = 1\n\nprint("Yes") if bingo == 1 else print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s280128515', 's220862523'] | [3064.0, 3064.0] | [17.0, 17.0] | [664, 563] |
p02760 | u846808272 | 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. | ["t = [0] * 3\nx = [0] * 3\ny = [0] * 3\na=[]\nfor i in range(3):\n t[i], x[i], y[i] = map(int, input().split())\na.append(t)\na.append(x)\na.append(y)\nn=int(input())\nli=[input() for i in range(n)]\n\nctr=[[0,0,0],[0,0,0],[0,0,0]]\nfor i in range(3):\n for j in range(3):\n for k in range(n):\n if int(a[i][j])==int(li[k]):\n ctr[i][j]+=1\nprint(ctr)\nif ctr[0][0]==ctr[0][1]==ctr[0][2]==1:\n print('Yes')\nelif ctr[1][0]==ctr[1][1]==ctr[1][2]==1:\n print('Yes')\nelif ctr[2][0]==ctr[2][1]==ctr[2][2]==1:\n print('Yes')\nelif ctr[0][0]==ctr[1][0]==ctr[2][0]==1:\n print('Yes')\nelif ctr[0][1]==ctr[1][1]==ctr[2][1]==1:\n print('Yes')\nelif ctr[0][2]==ctr[1][2]==ctr[2][2]==1:\n print('Yes')\nelif ctr[0][0]==ctr[1][1]==ctr[2][2]==1:\n print('Yes')\nelif ctr[0][2]==ctr[1][1]==ctr[2][0]==1:\n print('Yes')\nelse:\n print('No')\n", "t = [0] * 3\nx = [0] * 3\ny = [0] * 3\na=[]\nfor i in range(3):\n t[i], x[i], y[i] = map(int, input().split())\na.append(t)\na.append(x)\na.append(y)\nn=int(input())\nli=[input() for i in range(n)]\n\nctr=[[0,0,0],[0,0,0],[0,0,0]]\nfor i in range(3):\n for j in range(3):\n for k in range(n):\n if int(a[i][j])==int(li[k]):\n ctr[i][j]+=1\nif ctr[0][0]==ctr[0][1]==ctr[0][2]==1:\n print('Yes')\nelif ctr[1][0]==ctr[1][1]==ctr[1][2]==1:\n print('Yes')\nelif ctr[2][0]==ctr[2][1]==ctr[2][2]==1:\n print('Yes')\nelif ctr[0][0]==ctr[1][0]==ctr[2][0]==1:\n print('Yes')\nelif ctr[0][1]==ctr[1][1]==ctr[2][1]==1:\n print('Yes')\nelif ctr[0][2]==ctr[1][2]==ctr[2][2]==1:\n print('Yes')\nelif ctr[0][0]==ctr[1][1]==ctr[2][2]==1:\n print('Yes')\nelif ctr[0][2]==ctr[1][1]==ctr[2][0]==1:\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s797064897', 's289617439'] | [3188.0, 3188.0] | [17.0, 18.0] | [965, 954] |
p02760 | u848535504 | 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\n\nfor i in range(3):\n if A[i][0] == A[i][1] == A[i][2]:\n print("Yes")\n exit(0)\n if A[0][1] == A[1][i] == A[2][i]:\n print("Yes")\n exit(0)\n\nelif A[0][0] == A[1][1] == A[2][2]:\n print("Yes")\nelif A[0][2] == A[1][1] == A[2][0]:\n print("Yes")\nelse:\n print("No")', 'A = [list(map(int,input().split())) for i in range(3)]\nN = int(input())\nb = [int(input()) for i in range(N)]\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\nif A[0][0] == A[1][0] == A[2][0]:\n print("Yes")\nelif A[0][0] == A[0][1] == A[0][2]:\n print("Yes")\nelif A[0][1] == A[1][1] == A[2][1]:\n print("Yes")\nelif A[0][2] == A[1][2] == A[2][2]:\n print("Yes")\nelif A[1][0] == A[1][1] == A[1][2]:\n print("Yes")\nelif A[2][0] == A[2][1] == A[2][2]:\n print("Yes")\nelif A[0][0] == A[1][1] == A[2][2]:\n print("Yes")\nelif A[0][2] == A[1][1] == A[2][0]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s101699613', 's993743599'] | [9072.0, 9220.0] | [23.0, 25.0] | [499, 645] |
p02760 | u849756457 | 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. | ['nums = []\n\nfor i in range(3):\n nums.append([int(n) for n in input().split(" ")])\nprint(nums)\n\nbingo_list = []\n\nbingo_list.extend(nums)\nfor i in range(3):\n bingo_list.append([nums[0][i], nums[1][i], nums[2][i]])\nbingo_list.append([nums[0][0], nums[1][1], nums[2][2]])\nbingo_list.append([nums[2][0], nums[1][1], nums[0][2]])\n\nprint(bingo_list)\n\nis_bingo = False\nn = int(input())\nfor i in range(n):\n num = int(input())\n for bingo in bingo_list:\n if num in bingo:\n bingo.remove(num)\n if not bingo:\n is_bingo = True\n\nif is_bingo:\n print("Yes")\nelse:\n print("No")', 'nums = []\n\nfor i in range(3):\n nums.append([int(n) for n in input().split(" ")])\nprint(nums)\n\nbingo_list = []\n\nbingo_list.extend(nums)\nfor i in range(3):\n bingo_list.append([nums[0][i], nums[1][i], nums[2][i]])\nbingo_list.append([nums[0][0], nums[1][1], nums[2][2]])\nbingo_list.append([nums[2][0], nums[1][1], nums[0][2]])\n\nprint(bingo_list)\n\nis_bingo = False\nn = int(input())\nfor i in range(n):\n num = int(input())\n for bingo in bingo_list:\n if num in bingo:\n bingo.remove(num)\n if not bingo:\n print("Yes")\n is_bingo = True\n\nif not is_bingo:\n print("No")', 'nums = []\n\nfor i in range(3):\n nums.append([int(n) for n in input().split(" ")])\n\nbingo_list = []\n\nbingo_list.extend(nums)\nfor i in range(3):\n bingo_list.append([nums[0][i], nums[1][i], nums[2][i]])\nbingo_list.append([nums[0][0], nums[1][1], nums[2][2]])\nbingo_list.append([nums[2][0], nums[1][1], nums[0][2]])\n\nis_bingo = False\nn = int(input())\nfor i in range(n):\n num = int(input())\n for bingo in bingo_list:\n if num in bingo:\n bingo.remove(num)\n if not bingo:\n is_bingo = True\n\nif is_bingo:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s775837930', 's937948781', 's181003691'] | [3064.0, 3064.0, 3064.0] | [18.0, 17.0, 18.0] | [619, 629, 588] |
p02760 | u857673087 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["a1,a2,a3 = map(int,input().split())\nb1,b2,b3 = map(int,input().split())\nc1,c2,c3 = map(int,input().split())\nN = int(input())\nb = [int(input()) for _ in range(N)]\n\nif a1 and a2 and a3 in b or\n b1 and b2 and b3 in b or\n c1 and c2 and c3 in b or\n a1 and b1 and c1 in b or\n a2 and b2 and c2 in b or\n a3 and b3 and c3 in b or\n a1 and b2 and c3 in b or\n a3 and b2 and c1 in b:\n print('Yes')\nelse:\n print('No')", "A = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nB = [int(input()) for _ in range(N)]\n\nfor b in B:\n if i in range(3):\n for j in range(3):\n if A[i][j] == b:\n A[i][j] = 0\n\nfor i in range(3):\n if A[i][0] == A[i][1] == A[i][2] == 0:\n print('Yes')\n exit()\n\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()\n \n\nif A[0][2] == A[1][1] == A[2][0] == 0:\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\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] = 0\n\nfor i in range(3):\n if A[i][0] == A[i][1] == A[i][2] == 0:\n print('Yes')\n exit()\n\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()\n \n\nif A[0][2] == A[1][1] == A[2][0] == 0:\n print('Yes')\n exit()\n \n \nprint('No')\n"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s013238704', 's456104687', 's965537774'] | [2940.0, 9232.0, 9028.0] | [17.0, 27.0, 31.0] | [431, 531, 532] |
p02760 | u861071267 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["import sys\nA = [list(map(int,input().split())) for i in range(3)]\nN = int(input())\nb = [int(input()) for i in range(N)]\nans_flag = True\nans_flag2 = True\nans = [[False, False, False], [False, False, False], [False, False, False]]\n\nfor i in range(3):\n for j in range(3):\n if A[i][j] in b:\n ans[i][j] = True\n\nfor i in range(3):\n if ans[0][i] and ans[1][i] and ans[2][i]:\n print('Yes')\n sys.exit()\n if ans[i][0] and ans[i][1] and ans[i][2]:\n print('Yes')\n sys.exit()\n if not ans[i][i]:\n ans_flag = False\n if not ans[i][2-i]:\n ans_flag2 = False\n\nprint(ans)\n\nif ans_flag or ans_flag2:\n print('Yes')\nelse:\n print('No')", "import sys\nA = [list(map(int,input().split())) for i in range(3)]\nN = int(input())\nb = [int(input()) for i in range(N)]\nans_flag = True\nans = [[False, False, False], [False, False, False], [False, False, False]]\n\nfor i in range(3):\n for j in range(3):\n if A[i][j] in b:\n ans[i][j] = True\n\nprint(ans)\n\nfor i in range(3):\n if ans[0][i] and ans[1][i] and ans[2][i]:\n print('Yes')\n sys.exit()\n if ans[i][0] and ans[i][1] and ans[i][2]:\n print('Yes')\n sys.exit()\n if not ans[i][i]:\n ans_flag = False\n\nif ans_flag:\n print('Yes')\nelse:\n print('No')", "import sys\nA = [list(map(int,input().split())) for i in range(3)]\nN = int(input())\nb = [int(input()) for i in range(N)]\nans_flag = True\nans_flag2 = True\nans = [[False, False, False], [False, False, False], [False, False, False]]\n\nfor i in range(3):\n for j in range(3):\n if A[i][j] in b:\n ans[i][j] = True\n\nfor i in range(3):\n if ans[0][i] and ans[1][i] and ans[2][i]:\n print('Yes')\n sys.exit()\n if ans[i][0] and ans[i][1] and ans[i][2]:\n print('Yes')\n sys.exit()\n if not ans[i][i]:\n ans_flag = False\n if not ans[i][2-i]:\n ans_flag2 = False\n\nif ans_flag or ans_flag2:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s053498780', 's393500377', 's451104479'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 18.0] | [692, 612, 680] |
p02760 | u861109991 | 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\na = np.array(a)\nb = np.array(b)\n\nafter = np.zeros((3,3))\nfor i in range(N):\n after += a == b[i]\n \nbool1 = (np.sum(after, axis=0)==3).sum()\nbool2 = (np.sum(after, axis=1)==3).sum()\nbool3 = (after[0,0]+after[1,1]+after[2,2])==3\nbool4 = (after[0,2]+after[1,1]+after[2,0])==3\n\nif bool1+bool2+bool3+bool4>0:\n ans = 'Yes'\nelse:\n ans = 'No'\n \nprint(ans)", "import numpy as np\n\na = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\nb = [int(input()) for i in range(N)]\n\na = np.array(a)\nb = np.array(b)\n\nafter = np.zeros((3,3))\nfor i in range(N):\n after += a == b[i]\n \nbool1 = (np.sum(after, axis=0)==3).sum()\nbool2 = (np.sum(after, axis=1)==3).sum()\nbool3 = (after[0,0]+after[1,1]+after[2,2])==3\nbool4 = (after[0,2]+after[1,1]+after[2,0])==3\n\nif bool1+bool2+bool3+bool4>0:\n ans = 'Yes'\nelse:\n ans = 'No'\n \nprint(ans)"] | ['Runtime Error', 'Accepted'] | ['s085949213', 's159468793'] | [3064.0, 14468.0] | [18.0, 160.0] | [472, 492] |
p02760 | u863964720 | 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. | ["Array = [list(map(int,input().split())) for _ in range(3)]\nArrayBingo = [[0,0,0],[0,0,0,],[0,0,0]]\nN = int(input())\nB = []\ncheckR = 0\ncheckG = 0\ncheckN = 0\nfor i in range (N):\n B.append(int(input()))\nfor l in range (N):\n for j in range (3):\n for k in range (3):\n if Array[j][k]==B[l]:\n ArrayBingo[j][k]=1\nfor i in range (3): \n if (ArrayBingo[i][0] == 1):\n checkR+=1\nif checkG ==3:\n print(Yes)\ncheckR=0\nfor i in range (3): \n if (ArrayBingo[i][1] == 1):\n checkR+=1\nif checkG ==3:\n print(Yes)\ncheckR=0\nfor i in range (3): \n if (ArrayBingo[i][2] == 1):\n checkR+=1\nif checkG ==3:\n print(Yes)\n else:\n checkR=0\nfor j in range (3):\n if (ArrayBingo[0][j] == 1):\n checkG+=1\nif checkG ==3:\n print(Yes)\ncheckG=0\nfor j in range (3):\n if (ArrayBingo[1][j] == 1):\n checkG+=1\nif checkG ==3:\n print(Yes)\ncheckG=0\nfor j in range (3): \n if (ArrayBingo[2][j] == 1):\n checkG+=1\nif checkG ==3:\n print(Yes)\n else:\n checkG=0\nif (ArrayBingo[0][0] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][2] == 1) or (ArrayBingo[0][2] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][0] == 1):\n checkN = 1\nelse:\n checkN = 0\nif checkN == 1:\n print('Yes')\nelse:\n print('No')", "Array = [list(map(int,input().split())) for _ in range(3)]\nArrayBingo = [[0,0,0],[0,0,0,],[0,0,0]]\nN = int(input())\nB = []\ncheckR = 0\ncheckG = 0\ncheckN = 0\nfor i in range (N):\n B.append(int(input()))\n print(B)\nfor l in range (N):\n for j in range (3):\n for k in range (3):\n if Array[j][k]==B[l]:\n ArrayBingo[j][k]=1\nfor i in range (3): \n if ArrayBingo[i][0] == 1 and ArrayBingo[i][1] == 1 and ArrayBingo[i][2] == 1:\n checkR=1\n else:\n checkR=0\nfor i in range (3):\n if ArrayBingo[0][i]== 1 and ArrayBingo[1][i] ==1 and ArrayBingo[2][i] == 1:\n checkG=1\n else:\n checkG=0\nif (ArrayBingo[0][0] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][2] == 1) or (ArrayBingo[0][2] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][0] == 1):\n checkN = 1\nelse:\n checkN = 0\nif checkR==1 or checkG == 1 or checkN == 1:\n print('Yes')\nelse:\n print('No')", 'Array = [list(map(str,input().split())) for _ in range(3)]\nArrayBingo = [[0,0,0][0,0,0,][0,0,0]]\nN = int(input())\nB = []\ncheckR = 0\ncheckG = 0\ncheckN = 0\nfor i in range (N):\n B.append(int(input()))\nfor j in range (3):\n for k in range (3):\n for l in range (N):\n if Array[j][k]==B[l]:\n ArrayBingo[j][k]=1\nfor i in range (3): \n if [line[i] for line in ArrayBingo] != [1,1,1]:\n checkR=0\n else:\n checkR=1\nfor i in range (3):\n if [row[i] for row in ArrayBingo] != [1,1,1]:\n checkG=0\n else:\n checkG=1\nif (ArrayBingo[1][1] == 1 and ArrayBingo[2][2] == 1 and ArrayBingo [3][3] == 1) or (ArrayBingo[1][3] == 1 and ArrayBingo[2][2] == 1 and ArrayBingo [3][1] == 1):\n checkN = 1\nelse:\n checkN = 0\nif checkR==1 or checkG == 1 or checkN == 1:\n print(Yes)\nelse:\n print(No)\n', "Array = [list(map(int,input().split())) for _ in range(3)]\nArrayBingo = [[0,0,0],[0,0,0,],[0,0,0]]\nN = int(input())\nB = []\ncheckR = 0\ncheckG = 0\ncheckN = 0\nfor i in range (N):\n B.append(int(input()))\nfor l in range (N):\n for j in range (3):\n for k in range (3):\n if Array[j][k]==B[l]:\n ArrayBingo[j][k]=1\nfor i in range (3): \n if (ArrayBingo[i][0] == 1):\n checkR+=1\nif checkR ==3:\n print('Yes')\n checkR=4\n if checkR !=4:\n checkR=0\nfor i in range (3): \n if (ArrayBingo[i][1] == 1):\n checkR+=1\nif checkR ==3:\n print('Yes')\n checkR=4\nif checkR!=4: \n checkR=0\nfor i in range (3): \n if (ArrayBingo[i][2] == 1):\n checkR+=1\nif checkR ==3:\n print('Yes')\n checkR =4\nelse:\n checkR=0\nfor j in range (3):\n if (ArrayBingo[0][j] == 1):\n checkG+=1\nif checkG ==3:\n print('Yes')\n checkG =4\nif checkG !=4:\n checkG=0\nfor j in range (3):\n if (ArrayBingo[1][j] == 1):\n checkG+=1\nif checkG ==3:\n print('Yes')\n checkG =4\nif checkG !=4:\n checkG=0\nfor j in range (3): \n if (ArrayBingo[2][j] == 1):\n checkG+=1\nif checkG ==3:\n print('Yes')\n checkG =4\nelse:\n checkG=0\nif (ArrayBingo[0][0] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][2] == 1) or (ArrayBingo[0][2] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][0] == 1):\n checkN = 1\nelse:\n checkN = 0\nif checkR != 4 and checkG !=4 and checkN==1:\n print('Yes')\nif checkR == 0 and checkG ==0 and checkN==0:\n print('No')\n", "Array = [list(map(int,input().split())) for _ in range(3)]\nArrayBingo = [[0,0,0],[0,0,0,],[0,0,0]]\nN = int(input())\nB = []\ncheckR = 0\ncheckG = 0\ncheckN = 0\nfor i in range (N):\n B.append(int(input()))\nfor l in range (N):\n for j in range (3):\n for k in range (3):\n if Array[j][k]==B[l]:\n ArrayBingo[j][k]=1\ni=0\nfor i in range (3): \n if ArrayBingo[i][0] == 1 and ArrayBingo[i][1] == 1 and ArrayBingo[i][2] == 1:\n checkR=1\n else:\n checkR=0\nj=0\nfor j in range (3):\n if ArrayBingo[0][j] == 1 and ArrayBingo[1][j] == 1 and ArrayBingo[2][j] == 1:\n checkG=1\n else:\n checkG=0\nif (ArrayBingo[0][0] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][2] == 1) or (ArrayBingo[0][2] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][0] == 1):\n checkN = 1\nelse:\n checkN = 0\nif checkR==1:\n print('Yes')\n break\nelif checkG == 1:\n print('Yes')\n break\nelif checkN == 1:\n print('Yes')\n break\nelse:\n print('No')", "Array = [list(map(int,input().split())) for _ in range(3)]\nArrayBingo = [[0,0,0],[0,0,0,],[0,0,0]]\nN = int(input())\nB = []\ncheckR = 0\ncheckG = 0\ncheckN = 0\nfor i in range (N):\n B.append(int(input()))\nfor l in range (N):\n for j in range (3):\n for k in range (3):\n if Array[j][k]==B[l]:\n ArrayBingo[j][k]=1\nfor i in range (3): \n if (ArrayBingo[i][0] == 1):\n checkR+=1\nif checkR ==3:\n print('Yes')\n checkR=4\n if checkR !=4:\n checkR=0\nfor i in range (3): \n if (ArrayBingo[i][1] == 1):\n checkR+=1\nif checkR ==3:\n print('Yes')\n checkR=4\nif checkR!=4 \n checkR=0\nfor i in range (3): \n if (ArrayBingo[i][2] == 1):\n checkR+=1\nif checkR ==3:\n print('Yes')\n checkR =4\nelse:\n checkR=0\nfor j in range (3):\n if (ArrayBingo[0][j] == 1):\n checkG+=1\nif checkG ==3:\n print('Yes')\n checkG =4\nif checkG !=4:\n checkG=0\nfor j in range (3):\n if (ArrayBingo[1][j] == 1):\n checkG+=1\nif checkG ==3:\n print('Yes')\n checkG =4\nif checkG !=4:\n checkG=0\nfor j in range (3): \n if (ArrayBingo[2][j] == 1):\n checkG+=1\nif checkG ==3:\n print('Yes')\n checkG =4\nelse:\n checkG=0\nif (ArrayBingo[0][0] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][2] == 1) or (ArrayBingo[0][2] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][0] == 1):\n checkN = 1\nelse:\n checkN = 0\nif checkR != 4 and checkG !=4 and checkN==1:\n print('Yes')\nif checkR == 0 and checkG ==0 and checkN==0:\n print('No')\n", "A = []\nA_1 = list(map(int,input().split()))\nA_2 = list(map(int,input().split()))\nA_3 = list(map(int,input().split()))\nA.append(A_1)\nA.append(A_2)\nA.append(A_3)\nB = []\ncheck=0\nBingocountR=0\nBingocountG=0\nN = int(input())\nArrayBingo =[[0,0,0],[0,0,0],[0,0,0]]\nfor i in range(N):\n B.append(int(input()))\nfor j in range (3):\n for k in range (3):\n for l in range (N):\n if A[j][k]==B[l]:\n ArrayBingo[j][k]=1\nfor i in range(3):\n for j in range(3):\n if ArrayBingo[j][i]==1:\n BingocountR+=1\n if BingocountR ==3:\n check+=1\n BingocountR = 0\nfor i in range(3):\n for j in range(3):\n if ArrayBingo[i][j]==1:\n BingocountG+=1\n if BingocountG ==3:\n check+=1\n BingocountG = 0\nif (ArrayBingo[0][0] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][2] == 1) or (ArrayBingo[0][2] == 1 and ArrayBingo[1][1] == 1 and ArrayBingo [2][0] == 1):\n check += 1\nif check>0:\n print('Yes')\nelse:\n print('No')\n "] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s171423761', 's486344260', 's553962539', 's605122113', 's797930558', 's998773512', 's267133963'] | [3064.0, 3064.0, 3064.0, 3192.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0, 18.0, 17.0, 17.0, 18.0] | [1292, 927, 849, 1526, 994, 1525, 1028] |
p02760 | u864276028 | 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())\nL = []\nfor i in range (N):\n K = int(input())\n L.append(K)\nck = 'No'\nif A[1] in L and A[2]in L and A[3] in L:\n ck == 'Yes'\nelif B[1] in L and B[2]in L and B[3] in L:\n ck == 'Yes'\nelif C[1] in L and C[2]in L and C[3] in L:\n ck == 'Yes'\nelif A[1] in L and B[1]in L and C[1] in L:\n ck == 'Yes'\nelif A[2] in L and B[2]in L and C[2] in L:\n ck == 'Yes'\nelif A[3] in L and B[3]in L and C[3] in L:\n ck == 'Yes'\nelif A[1] in L and B[2] in L and C[3] in L:\n ck = 'Yes'\nelif A[3] in L and B[2] in L and C[1] in L:\n ck = 'Yes'\nprint(ck)", "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())\nL = []\nfor i in range (N):\n K = int(input())\n L.append(K)\nck = 'No'\nif A[0] in L and A[1]in L and A[2] in L:\n ck = 'Yes'\nelif B[0] in L and B[1]in L and B[2] in L:\n ck = 'Yes'\nelif C[0] in L and C[1]in L and C[2] in L:\n ck = 'Yes'\nelif A[0] in L and B[0]in L and C[0] in L:\n ck = 'Yes'\nelif A[1] in L and B[1]in L and C[1] in L:\n ck = 'Yes'\nelif A[2] in L and B[2]in L and C[2] in L:\n ck = 'Yes'\nelif A[0] in L and B[1] in L and C[2] in L:\n ck = 'Yes'\nelif A[2] in L and B[1] in L and C[0] in L:\n ck = 'Yes'\nprint(ck)"] | ['Runtime Error', 'Accepted'] | ['s037241575', 's971086751'] | [9288.0, 9228.0] | [29.0, 31.0] | [672, 666] |
p02760 | u864711178 | 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. | ['yoko_1 = [int(i) for i in input().split()]\nyoko_2 = [int(i) for i in input().split()]\nyoko_3 = [int(i) for i in input().split()]\ntate_1 = [yoko_1[0], yoko_2[0], yoko_3[0]]\ntate_2 = [yoko_1[1], yoko_2[1], yoko_3[1]]\ntate_3 = [yoko_1[2], yoko_2[2], yoko_3[2]]\nnaname_1 = [yoko_1[0], yoko_2[1], yoko_3[2]]\nnaname_2 = [yoko_1[2], yoko_2[1], yoko_3[0]]\n\nn = int(input())\nbs = [int(input()) for i in range(n)]\n\ndef bingo(card, call):\n cnt = 0\n for i in card:\n for j in call:\n if i == j:\n cnt += 1\n break\n if cnt == 3:\n return 1\n else:\n return 0\n\nif bingo(yoko_1, bs) + \\\nbingo(yoko_2, bs) + \\\nbingo(yoko_3, bs) + \\\nbingo(tate_1, bs) + \\\nbingo(tate_2, bs) + \\\nbingo(tate_3, bs) + \\\nbingo(naname_2, bs) + \\\nbingo(naname_2, bs) > 0:\n print("Yes")\nelse:\n print("No")', '# coding: utf-8\n# Your code here!\n\nyoko_1 = [int(i) for i in input().split()]\nyoko_2 = [int(i) for i in input().split()]\nyoko_3 = [int(i) for i in input().split()]\ntate_1 = [yoko_1[0], yoko_2[0], yoko_3[0]]\ntate_2 = [yoko_1[1], yoko_2[1], yoko_3[1]]\ntate_3 = [yoko_1[2], yoko_2[2], yoko_3[2]]\nnaname_1 = [yoko_1[0], yoko_2[1], yoko_3[2]]\nnaname_2 = [yoko_1[2], yoko_2[1], yoko_3[0]]\n\nn = int(input())\nbs = [int(input()) for i in range(n)]\n\ndef bingo(card, call):\n cnt = 0\n for i in card:\n for j in call:\n if i == j:\n cnt += 1\n break\n if cnt == 3:\n return 1\n else:\n return 0\n\nif bingo(yoko_1, bs) + \\\nbingo(yoko_2, bs) + \\\nbingo(yoko_3, bs) + \\\nbingo(tate_1, bs) + \\\nbingo(tate_2, bs) + \\\nbingo(tate_3, bs) + \\\nbingo(naname_1, bs) + \\\nbingo(naname_2, bs) > 0:\n print("Yes")\nelse:\n print("No")\n\n# print(bingo(yoko_1, bs))\n \n\n'] | ['Wrong Answer', 'Accepted'] | ['s195291259', 's349864931'] | [3192.0, 3064.0] | [18.0, 17.0] | [836, 906] |
p02760 | u869917163 | 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_list=[]\nfor i in range(N):\n b_list.append(int(input))\n\nfor i in b_list:\n A1 = [x in A1 if x != i else -1]\n A2 = [y in A2 if y != i else -1]\n A3 = [z in A3 if z != i else -1]\n\nif sum(A1)==-3 or sum(A2)==-3 or sum(A3)==-3:\n print('Yes')\n exit()\nfor t in range(3)\n if A1[t]+A2[t]+A3[t] == -3:\n print('Yes')\n exit()\nif A1[0]+A2[1]+A3[2] == -3 or A1[2]+A2[1]+A3[0] == -3:\n print('Yes')\n exit()\nprint('No')", "import sys\nA1 = list(map(int,input().split()))\nA2 = list(map(int,input().split()))\nA3 = list(map(int,input().split()))\nN = int(input())\nb_list=[]\nfor i in range(N):\n b_list.append(int(input()))\n \nfor i in b_list:\n A1 = [x if x != i else -1 for x in A1]\n A2 = [y if y != i else -1 for y in A2]\n A3 = [z if z != i else -1 for z in A3]\n \nif sum(A1)==-3 or sum(A2)==-3 or sum(A3)==-3:\n print('Yes')\n sys.exit()\nfor t in range(3):\n if A1[t]+A2[t]+A3[t] == -3:\n print('Yes')\n sys.exit()\nif A1[0]+A2[1]+A3[2] == -3 or A1[2]+A2[1]+A3[0] == -3:\n print('Yes')\n sys.exit()\nprint('No')"] | ['Runtime Error', 'Accepted'] | ['s907687491', 's200322316'] | [3064.0, 3064.0] | [17.0, 18.0] | [542, 588] |
p02760 | u870684607 | 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.extend(list(map(int, input().split())))\nN = int(input())\nn=[]\nwhile N>0:\n inp = int(input())\n if inp in A:\n n.append(inp)\n N-=1\nA = [A[:3],A[3:6],A[6:9], [A[0], A[4], A[8]], [A[2], A[4], A[6]], [A[0], A[3], A[6]], [A[1], A[4], A[7]], [A[2], A[5], A[8]]]\nfor ele in A:\n if ele[0] in n and ele[1]in n and ele[2]in n:\n print ("Yes")\nprint ("No")', "def bingo(): \n A=[]\n for i in range(3):\n A.extend(list(map(int, input().split())))\n N = int(input())\n n=[]\n while N>0:\n inp = int(input())\n if inp in A:\n n.append(inp)\n N-=1\n A = [A[:3],A[3:6],A[6:9], [A[0], A[4], A[8]], [A[2], A[4], A[6]], [A[0], A[3], A[6]], [A[1], A[4], A[7]], [A[2], A[5], A[8]]]\n for ele in A:\n if ele[0] in n and ele[1]in n and ele[2]in n:\n return 'Yes'\n return 'No'\nprint(bingo())"] | ['Wrong Answer', 'Accepted'] | ['s420822627', 's002010137'] | [3064.0, 3064.0] | [18.0, 18.0] | [398, 488] |
p02760 | u871867619 | 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 = []\nfor _ in range(3):\n A.append([int(x) for x in input().split()])\nA = np.array(A)\nR = np.zeros((3,3))\nN = int(input())\nB = []\n\nfor _ in range(N):\n b = int(input())\n x, y = np.where(A == b)\n if len(x) > 0:\n for i in range(len(x)):\n R[x[i], y[i]] = 1\n\n\nrow1 = (np.sum(R, axis=1) > 3).sum()\nrow2 = (np.sum(R, axis=0) > 3).sum()\n\n\nc1 = R[0][0] + R[1][1] + R[2][2]\nc2 = R[0][2] + R[1][1] + R[2][0]\n\nif row1 > 0 or row2 > 0 or c1 > 3 or c2 > 3:\n print('Yes')\nelse:\n print('No')\n", "import numpy as np\n\nA = []\nfor _ in range(3):\n A.append([int(x) for x in input().split()])\nA = np.array(A)\nR = np.zeros((3,3))\nN = int(input())\nB = []\n\nfor _ in range(N):\n b = int(input())\n x, y = np.where(A == b)\n if len(x) > 0:\n for i in range(len(x)):\n R[x[i], y[i]] = 1\n\n\nrow1 = np.sum(R, axis=1).sum()\nrow2 = np.sum(R, axis=0).sum()\n\n\nc1 = R[0][0] + R[1][1] + R[2][2]\nc2 = R[0][2] + R[1][1] + R[2][0]\nprint(R)\nif row1 > 0 or row2 > 0 or c1 > 3 or c2 > 3:\n print('Yes')\nelse:\n print('No')\n\n\n", "import numpy as np\n\nA = []\nfor _ in range(3):\n A.append([int(x) for x in input().split()])\nA = np.array(A)\nR = np.zeros((3,3))\nN = int(input())\nB = []\n\nfor _ in range(N):\n b = int(input())\n x, y = np.where(A == b)\n if len(x) > 0:\n for i in range(len(x)):\n R[x[i], y[i]] = 1\n\n\nrow1 = (np.sum(R, axis=1) >= 3).sum()\nrow2 = (np.sum(R, axis=0) >= 3).sum()\n\nc1 = R[0][0] + R[1][1] + R[2][2]\nc2 = R[0][2] + R[1][1] + R[2][0]\nif row1 > 0 or row2 > 0 or c1 >= 3 or c2 >= 3:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s421392704', 's615173670', 's706042388'] | [21408.0, 12440.0, 21664.0] | [335.0, 153.0, 303.0] | [544, 542, 538] |
p02760 | u871934301 | 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())\nG,H,I=map(int,input().split())\nN=int(input())\nb=[input() for i in range(N)]\nif b.count(A)>0 and b.count(B)>0 and b.count(C)>0:\n print("Yes")\n exit()\nif b.count(D)>0 and b.count(E)>0 and b.count(F)>0:\n print("Yes")\n exit()\nif b.count(G)>0 and b.count(H)>0 and b.count(I)>0:\n print("Yes")\n exit()\nif b.count(A)>0 and b.count(D)>0 and b.count(G)>0:\n print("Yes")\n exit()\nif b.count(B)>0 and b.count(E)>0 and b.count(H)>0:\n print("Yes")\n exit()\nif b.count(C)>0 and b.count(F)>0 and b.count(I)>0:\n print("Yes")\n exit()\nif b.count(A)>0 and b.count(E)>0 and b.count(I)>0:\n print("Yes")\n exit()\nif b.count(C)>0 and b.count(E)>0 and b.count(G)>0:\n print("Yes")\n exit()\nelse:\n print("No")\n\n \n\n\n', 'X=list(map(int,input().split()))\nY=list(map(int,input().split()))\nZ=list(map(int,input().split()))\nN=int(input())\nb=[input() for i in range(N)]\nif b.count(X[0])>0 and b.count(X[1])>0 and b.count(X[2])>0:\n print("Yes")\n exit()\nif b.count(Y[0])>0 and b.count(Y[1])>0 and b.count(Y[2])>0:\n print("Yes")\n exit()\nif b.count(Z[0])>0 and b.count(Z[1])>0 and b.count(Z[2])>0:\n print("Yes")\n exit()\nif b.count(X[0])>0 and b.count(Y[0])>0 and b.count(Z[0])>0:\n print("Yes")\n exit()\nif b.count(X[1])>0 and b.count(Y[1])>0 and b.count(Z[1])>0:\n print("Yes")\n exit()\nif b.count(X[2])>0 and b.count(Y[2])>0 and b.count(Z[2])>0:\n print("Yes")\n exit()\nif b.count(X[0])>0 and b.count(Y[1])>0 and b.count(Z[2])>0:\n print("Yes")\n exit()\nif b.count(X[2])>0 and b.count(Y[1])>0 and b.count(Z[0])>0:\n print("Yes")\n exit()\nelse:\n print("No")\n\n \n\n\n', 'l=[list(map(int,input().split())) for i in ramge(3)]\nN=int(input())\nb=[input() for i in range(N)]\nif b.count(l[0][0])>0 and b.count(l[0][1])>0 and b.count(l[0][2])>0:\n print("Yes")\n exit()\nif b.count(l[1][0])>0 and b.count(l[1][1])>0 and b.count(l[1][2])>0:\n print("Yes")\n exit()\nif b.count(l[2][0])>0 and b.count(l[2][1])>0 and b.count(l[2][2])>0:\n print("Yes")\n exit()\nif b.count(l[0][0])>0 and b.count(l[1][0])>0 and b.count(l[2][0])>0:\n print("Yes")\n exit()\nif b.count(l[0][1])>0 and b.count(l[1][1])>0 and b.count(l[2][1])>0:\n print("Yes")\n exit()\nif b.count(l[0][2])>0 and b.count(l[1][2])>0 and b.count(l[2][2])>0:\n print("Yes")\n exit()\nif b.count(l[0][0])>0 and b.count(l[1][1])>0 and b.count(l[2][2])>0:\n print("Yes")\n exit()\nif b.count(l[0][2])>0 and b.count(l[1][1])>0 and b.count(l[2][0])>0:\n print("Yes")\n exit()\nelse:\n print("No")\n\n \n\n\n', 'A,B,C=map(int,input().split())\nD,E,F=map(int,input().split())\nG,H,I=map(int,input().split())\nN=int(input())\nb=[input() for i in range(N+1)]\nif b.count(A)>0 and b.count(B)>0 and b.count(C)>0:\n print("Yes")\n exit()\nif b.count(D)>0 and b.count(E)>0 and b.count(F)>0:\n print("Yes")\n exit()\nif b.count(G)>0 and b.count(H)>0 and b.count(I)>0:\n print("Yes")\n exit()\nif b.count(A)>0 and b.count(D)>0 and b.count(G)>0:\n print("Yes")\n exit()\nif b.count(B)>0 and b.count(E)>0 and b.count(H)>0:\n print("Yes")\n exit()\nif b.count(C)>0 and b.count(F)>0 and b.count(I)>0:\n print("Yes")\n exit()\nif b.count(A)>0 and b.count(E)>0 and b.count(I)>0:\n print("Yes")\n exit()\nif b.count(C)>0 and b.count(E)>0 and b.count(G)>0:\n print("Yes")\n exit()\nelse:\n print("No")\n\n \n\n\n', 'l=[list(map(int,input().split())) for i in range(3)]\nN=int(input())\nb=[input() for i in range(N)]\nif b.count(l[0][0])>0 and b.count(l[0][1])>0 and b.count(l[0][2])>0:\n print("Yes")\n exit()\nif b.count(l[1][0])>0 and b.count(l[1][1])>0 and b.count(l[1][2])>0:\n print("Yes")\n exit()\nif b.count(l[2][0])>0 and b.count(l[2][1])>0 and b.count(l[2][2])>0:\n print("Yes")\n exit()\nif b.count(l[0][0])>0 and b.count(l[1][0])>0 and b.count(l[2][0])>0:\n print("Yes")\n exit()\nif b.count(l[0][1])>0 and b.count(l[1][1])>0 and b.count(l[2][1])>0:\n print("Yes")\n exit()\nif b.count(l[0][2])>0 and b.count(l[1][2])>0 and b.count(l[2][2])>0:\n print("Yes")\n exit()\nif b.count(l[0][0])>0 and b.count(l[1][1])>0 and b.count(l[2][2])>0:\n print("Yes")\n exit()\nif b.count(l[0][2])>0 and b.count(l[1][1])>0 and b.count(l[2][0])>0:\n print("Yes")\n exit()\nelse:\n print("No")\n\n \n\n\n', 'A,B,C=map(int,input().split())\nD,E,F=map(int,input().split())\nG,H,I=map(int,input().split())\nN=int(input())\nb=[input() for i in range(N-1)]\nif b.count(A)>0 and b.count(B)>0 and b.count(C)>0:\n print("Yes")\n exit()\nif b.count(D)>0 and b.count(E)>0 and b.count(F)>0:\n print("Yes")\n exit()\nif b.count(G)>0 and b.count(H)>0 and b.count(I)>0:\n print("Yes")\n exit()\nif b.count(A)>0 and b.count(D)>0 and b.count(G)>0:\n print("Yes")\n exit()\nif b.count(B)>0 and b.count(E)>0 and b.count(H)>0:\n print("Yes")\n exit()\nif b.count(C)>0 and b.count(F)>0 and b.count(I)>0:\n print("Yes")\n exit()\nif b.count(A)>0 and b.count(E)>0 and b.count(I)>0:\n print("Yes")\n exit()\nif b.count(C)>0 and b.count(E)>0 and b.count(G)>0:\n print("Yes")\n exit()\nelse:\n print("No")\n\n \n\n\n', 'A,B,C=map(int,input().split())\nD,E,F=map(int,input().split())\nG,H,I=map(int,input().split())\nN=input()\nb=[input() for i in range(N)]\nif b.count(A)>0 and b.count(B)>0 and b.count(C)>0:\n print("Yes")\n exit()\nif b.count(D)>0 and b.count(E)>0 and b.count(F)>0:\n print("Yes")\n exit()\nif b.count(G)>0 and b.count(H)>0 and b.count(I)>0:\n print("Yes")\n exit()\nif b.count(A)>0 and b.count(D)>0 and b.count(G)>0:\n print("Yes")\n exit()\nif b.count(B)>0 and b.count(E)>0 and b.count(H)>0:\n print("Yes")\n exit()\nif b.count(C)>0 and b.count(F)>0 and b.count(I)>0:\n print("Yes")\n exit()\nif b.count(A)>0 and b.count(E)>0 and b.count(I)>0:\n print("Yes")\n exit()\nif b.count(C)>0 and b.count(E)>0 and b.count(G)>0:\n print("Yes")\n exit()\nelse:\n print("No")\n\n \n\n\n', 'A,B,C=map(int,input().split())\nD,E,F=map(int,input().split())\nG,H,I=map(int,input().split())\nN=int(input())\nb=[input() for i in range(N)]\nif b.count(A)>0 and b.count(B)>0 and b.count(C)>0:\n print("Yes")\n exit()\nif b.count(D)>0 and b.count(E)>0 and b.count(F)>0:\n print("Yes")\n exit()\nif b.count(G)>0 and b.count(H)>0 and b.count(I)>0:\n print("Yes")\n exit()\nif b.count(A)>0 and b.count(D)>0 and b.count(G)>0:\n print("Yes")\n exit()\nif b.count(B)>0 and b.count(E)>0 and b.count(H)>0:\n print("Yes")\n exit()\nif b.count(C)>0 and b.count(F)>0 and b.count(I)>0:\n print("Yes")\n exit()\nif b.count(A)>0 and b.count(E)>0 and b.count(I)>0:\n print("Yes")\n exit()\nif b.count(C)>0 and b.count(E)>0 and b.count(G)>0:\n print("Yes")\n exit()\nelse:\n print("No")\n\n \n\n\n', 'l=[list(map(int,input().split())) for i in range(3)]\nN=int(input())\nb=[int(input()) for i in range(N)]\nif b.count(l[0][0])>0 and b.count(l[0][1])>0 and b.count(l[0][2])>0:\n print("Yes")\n exit()\nif b.count(l[1][0])>0 and b.count(l[1][1])>0 and b.count(l[1][2])>0:\n print("Yes")\n exit()\nif b.count(l[2][0])>0 and b.count(l[2][1])>0 and b.count(l[2][2])>0:\n print("Yes")\n exit()\nif b.count(l[0][0])>0 and b.count(l[1][0])>0 and b.count(l[2][0])>0:\n print("Yes")\n exit()\nif b.count(l[0][1])>0 and b.count(l[1][1])>0 and b.count(l[2][1])>0:\n print("Yes")\n exit()\nif b.count(l[0][2])>0 and b.count(l[1][2])>0 and b.count(l[2][2])>0:\n print("Yes")\n exit()\nif b.count(l[0][0])>0 and b.count(l[1][1])>0 and b.count(l[2][2])>0:\n print("Yes")\n exit()\nif b.count(l[0][2])>0 and b.count(l[1][1])>0 and b.count(l[2][0])>0:\n print("Yes")\n exit()\nelse:\n print("No")\n\n \n\n\n'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s076980516', 's128403132', 's150821129', 's182195264', 's238404257', 's468690342', 's810860302', 's985034812', 's710197448'] | [3064.0, 3064.0, 3188.0, 3064.0, 3188.0, 3064.0, 3064.0, 3064.0, 3188.0] | [17.0, 18.0, 17.0, 17.0, 18.0, 19.0, 19.0, 18.0, 18.0] | [800, 878, 904, 802, 904, 802, 795, 800, 909] |
p02760 | u873736356 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["A = list(list(map(int, input().split())) for i in range(3))\nN = int(input())\nB = [int(input()) for i in range(N)]\nresult = [[0]*3 for i in range(3)]\nprint(A,N,B,result)\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 result[i][j] = 1\n break\n else:\n result[i][j] = 0\n\n\nif (result[0][0]==1 and result[0][1]==1 and result[0][2]==1) \\\nor (result[1][0]==1 and result[1][1]==1 and result[1][2]==1) \\\nor (result[2][0]==1 and result[2][1]==1 and result[2][2]==1) \\\nor (result[0][0]==1 and result[1][0]==1 and result[2][0]==1) \\\nor (result[0][1]==1 and result[1][1]==1 and result[2][1]==1) \\\nor (result[0][2]==1 and result[1][2]==1 and result[2][2]==1) \\\nor (result[0][0]==1 and result[1][1]==1 and result[2][2]==1) \\\nor (result[0][2]==1 and result[1][1]==1 and result[2][0]==1) :\n print('Yes')\nelse:\n print('No')\n", "A = list(list(map(int, input().split())) for i in range(3))\nN = int(input())\nB = [int(input()) for i in range(N)]\nresult = [[0]*3 for i in range(3)]\nprint(A,N,B,result)\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 result[i][j] = 1\n break\n else:\n result[i][j] = 0\n\n\nif (result[0][0]==1 and result[0][1]==1 and result[0][2]==1) \\\nor (result[1][0]==1 and result[1][1]==1 and result[1][2]==1) \\\nor (result[2][0]==1 and result[2][1]==1 and result[2][2]==1) \\\nor (result[0][0]==1 and result[1][0]==1 and result[2][0]==1) \\\nor (result[0][1]==1 and result[1][1]==1 and result[2][1]==1) \\\nor (result[0][2]==1 and result[1][2]==1 and result[2][2]==1) \\\nor (result[0][0]==1 and result[1][1]==1 and result[2][2]==1) \\\nor (result[0][2]==1 and result[1][1]==1 and result[2][0]==1) :\n print('Yes')\nelse:\n print('No')\n", "\nA = list(list(map(int, input().split())) for i in range(3))\nN = int(input())\nB = [int(input()) for i in range(N)]\nresult = [[0]*3 for i in range(3)]\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 result[i][j] = 1\n break\n else:\n result[i][j] = 0\n\nif (result[0][0]==1 and result[0][1]==1 and result[0][2]==1) \\\nor (result[1][0]==1 and result[1][1]==1 and result[1][2]==1) \\\nor (result[2][0]==1 and result[2][1]==1 and result[2][2]==1) \\\nor (result[0][0]==1 and result[1][0]==1 and result[2][0]==1) \\\nor (result[0][1]==1 and result[1][1]==1 and result[2][1]==1) \\\nor (result[0][2]==1 and result[1][2]==1 and result[2][2]==1) \\\nor (result[0][0]==1 and result[1][1]==1 and result[2][2]==1) \\\nor (result[0][2]==1 and result[1][1]==1 and result[2][0]==1) :\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s116262939', 's151691992', 's472121903'] | [3064.0, 3064.0, 3064.0] | [17.0, 18.0, 17.0] | [922, 922, 902] |
p02760 | u875541136 | 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\nS = np.array([list(map(int, input().split())) for _ in range(3)])\nn = int(input())\nfor _ in range(n):\n S = np.where(S==int(input()), 0, S)\nif min(np.sum(S, axis=0))==0 or min(np.sum(S, axis=1))==0:\n print('Yes')\n exit()\nif (S[0][0] == 0 and S[1][1] == 0 and S[2][2]) or (S[2][0] == 0 and S[1][1] == 0 and S[0][2]):\n print('Yes')\n exit()\nprint('No')", "import numpy as np\nS = np.array([list(map(int, input().split())) for _ in range(3)])\nn = int(input())\nfor _ in range(n):\n S = np.where(S==int(input()), 0, S)\n HBingo = min(np.sum(S, axis=0)) == 0\n WBingo = min(np.sum(S, axis=1)) == 0\n SBingo = S[2][0] == 0 and S[1][1] == 0 and S[0][2] == 0\n BSBingo = S[0][0] == 0 and S[1][1] == 0 and S[2][2] == 0\nif HBingo or WBingo or SBingo or BSBingo:\n print('Yes')\n exit()\nprint('No')"] | ['Wrong Answer', 'Accepted'] | ['s491854249', 's815117794'] | [14536.0, 14448.0] | [155.0, 148.0] | [382, 445] |
p02760 | u884679979 | 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. | ["row1=list(map(int,input().split()))\nrow2=list(map(int,input().split()))\nrow3=list(map(int,input().split()))\nbingo=row1+row2+row3\nnum=int(input())\nnum_list=set()\nfor i in range(num):\n num_list.add(int(input()))\n\nbingo_list=[[0,3,6],[1,4,7],[2,5,8],[0,1,2],[3,4,5],[6,7,8],[0,4,8],[2,4,6]]\nnum_list=list(num_list)\nfor i in num_list:\n if i in bingo:\n bingo[bingo.index(i)] = True\n\nfor i in bingo_list:\n if bingo[i[0]] ==True and bingo[i[1]] == True and bingo[i[2]] == True:\n print('Yes')\n break\n\nprint('No')\n", "row1=list(map(int,input().split()))\nrow2=list(map(int,input().split()))\nrow3=list(map(int,input().split()))\nbingo=row1+row2+row3\nnum=int(input())\nnum_list=set()\nfor i in range(num):\n num_list.add(int(input()))\n\nbingo_list=[[0,3,6],[1,4,7],[2,5,8],[0,1,2],[3,4,5],[6,7,8],[0,4,8],[2,4,6]]\nnum_list=list(num_list)\nfor i in num_list:\n if i in bingo:\n bingo[bingo.index(i)] = True\n\nfor i in bingo_list:\n if bingo[i[0]] is True and bingo[i[1]] is True and bingo[i[2]] is True:\n print('Yes')\n return 0\n\nprint('No')\n", "row1=list(map(int,input().split()))\nrow2=list(map(int,input().split()))\nrow3=list(map(int,input().split()))\nbingo=row1+row2+row3\nnum=int(input())\nnum_list={}\nfor i in range(num):\n num_list.add(int(input()))\n\nbingo_list=[[0,3,6],[1,4,7],[2,5,8],[0,1,2],[3,4,5],[6,7,8],[0,4,8],[2,4,6]]\n \nfor i in num_list:\n if i in bingo:\n bingo[bingo.index(i)] = True\n\nfor i in bingo_list:\n if bingo[i[0]] is True and bingo[i[1]] is True and bingo[i[2]] is True:\n print('Yes')\n return 0\n\nprint('No')\n", "row1=list(map(int,input().split()))\nrow2=list(map(int,input().split()))\nrow3=list(map(int,input().split()))\nbingo=row1+row2+row3\nnum=int(input())\nnum_list=set()\nfor i in range(num):\n num_list.add(int(input()))\n\nbingo_list=[[0,3,6],[1,4,7],[2,5,8],[0,1,2],[3,4,5],[6,7,8],[0,4,8],[2,4,6]]\nnum_list=list(num_list)\nfor i in num_list:\n if i in bingo:\n bingo[bingo.index(i)] = True\n\nfor i in bingo_list:\n if bingo[i[0]] ==True and bingo[i[1]] == True and bingo[i[2]] == True:\n print('Yes')\n return 0\n\nprint('No')", "row1=list(map(int,input().split()))\nrow2=list(map(int,input().split()))\nrow3=list(map(int,input().split()))\nbingo=row1+row2+row3\nnum=int(input())\nnum_list=set()\nfor i in range(num):\n num_list.add(int(input()))\n\nbingo_list=[[0,3,6],[1,4,7],[2,5,8],[0,1,2],[3,4,5],[6,7,8],[0,4,8],[2,4,6]]\n \nfor i in num_list:\n if i in bingo:\n bingo[bingo.index(i)] = True\n\nfor i in bingo_list:\n if bingo[i[0]] is True and bingo[i[1]] is True and bingo[i[2]] is True:\n print('Yes')\n return 0\n\nprint('No')\n", "row1=list(map(int,input().split()))\nrow2=list(map(int,input().split()))\nrow3=list(map(int,input().split()))\nbingo=row1+row2+row3\nnum=int(input())\nnum_list=set()\nfor i in range(num):\n num_list.add(int(input()))\n\nbingo_list=[[0,3,6],[1,4,7],[2,5,8],[0,1,2],[3,4,5],[6,7,8],[0,4,8],[2,4,6]]\nnum_list=list(num_list)\nfor i in num_list:\n if i in bingo:\n bingo[bingo.index(i)] = True\n\nfor i in bingo_list:\n if bingo[i[0]] ==True and bingo[i[1]] == True and bingo[i[2]] == True:\n print('Yes')\n break\n if i == [2,4,6]:\n print('No')\n\n"] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s098087502', 's120976257', 's480395674', 's554568123', 's957550664', 's848108191'] | [3188.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [19.0, 17.0, 17.0, 18.0, 17.0, 18.0] | [517, 521, 497, 519, 500, 540] |
p02760 | u884692162 | 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 get(A, ar, ac):\n if ar > 2 or ar < -2 or ac > 2 or ar < -2:\n return 0\n return A[ar][ac]\n\ndef check(A, ar, ac):\n if 0 == get(A, ar-1, ac-1) and 0 == get(A, ar-2, ac-2) and 0 == get(A, ar+1, ac+1) and 0 == get(A, ar+2, ac+2):\n return True\n if 0 == get(A, ar+1, ac-1) and 0 == get(A, ar+2, ac-2) and 0 == get(A, ar-1, ac+1) and 0 == get(A, ar-2, ac+2):\n return True\n if 0 == get(A, ar+1, ac) and 0 == get(A, ar+2, ac) and 0 == get(A, ar-1, ac) and 0 == get(A, ar-2, ac):\n return True\n if 0 == get(A, ar, ac+1) and 0 == get(A, ar, ac+2) and 0 == get(A, ar, ac-1) and 0 == get(A, ar, ac-2):\n return True\n return False\n\nA = [[0 for i in range(3)] for i in range(3)]\nfor i in range(3):\n A[i] = list(map(int, input().split()))\nN = int(input())\nfor n in range(N):\n b = int(input())\n for ar in range(3):\n for ac in range(3):\n if A[ar][ac] == b:\n A[ar][ac] = 0\n if check(A, ar, ac):\n print("Yes")\n print(A)\n import sys\n sys.exit(0)\n continue\nprint("No")\nprint(A)\n', 'def get(A, ar, ac):\n if ar > 2 or ar < 0 or ac > 2 or ac < 0:\n return 0\n if A[ar][ac] == 0:\n return 1\n return 0\n\ndef check(A, ar, ac):\n \n if 2 == get(A, ar-1, ac-1) + get(A, ar-2, ac-2) + get(A, ar+1, ac+1) + get(A, ar+2, ac+2):\n return True\n if 2 == get(A, ar+1, ac-1) + get(A, ar+2, ac-2) + get(A, ar-1, ac+1) + get(A, ar-2, ac+2):\n return True\n if 2 == get(A, ar+1, ac) + get(A, ar+2, ac) + get(A, ar-1, ac) + get(A, ar-2, ac):\n return True\n if 2 == get(A, ar, ac+1) + get(A, ar, ac+2) + get(A, ar, ac-1) + get(A, ar, ac-2):\n return True\n return False\n\nA = [[0 for i in range(3)] for i in range(3)]\nfor i in range(3):\n A[i] = list(map(int, input().split()))\nN = int(input())\nfor n in range(N):\n b = int(input())\n for ar in range(3):\n for ac in range(3):\n if A[ar][ac] == b:\n A[ar][ac] = 0\n if check(A, ar, ac):\n print("Yes")\n # print(A)\n import sys\n sys.exit(0)\n continue\nprint("No")\n# print(A)\n'] | ['Wrong Answer', 'Accepted'] | ['s463709683', 's920188614'] | [3192.0, 3064.0] | [18.0, 18.0] | [1160, 1206] |
p02760 | u886655280 | 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_list = []\n\nfor i in range(3):\n a = list(map(int, input().split()))\n A_list.append(a)\n\nN = int(input())\nnarray = np.zeros((3, 3), dtype=np.int)\n\n\nfor j in range(N):\n b = int(input())\n\n for n in range(3):\n for m in range(3): \n if A_list[n][m] == b:\n narray[n, m] = 1\n\n\nn_list = np.count_nonzero(narray == 1, axis = 0)\nm_list = np.count_nonzero(narray == 1, axis = 1)\n\nif np.any(n_list == 3) or np.any(m_list == 3):\n print('Yes')\n exit()\n\nif narray[0, 0] == 1 and narray[1, 1] == 1 and narray[2, 2] == 1:\n print('Yes')\n exit()\n\nif narray[0, 2] == 1 and narray[1, 1] == 1 and narray[2, 0] == 1:\n print('Yes')\n exit()\n\nprint('No')", "import numpy as np\n\nA_list = []\n\nfor i in range(3):\n a = list(map(int, input().split()))\n A_list.append(a)\n\nN = int(input())\nnarray = np.zeros((3, 3), dtype=np.int)\n\n\nfor j in range(N):\n b = int(input())\n\n for n in range(3):\n for m in range(3): \n if A_list[n][m] == b:\n narray[n, m] = 1\n\n\nn_list = np.count_nonzero(narray == 1, axis = 0)\nm_list = np.count_nonzero(narray == 1, axis = 1)\n\nif np.any(n_list == 3) or np.any(m_list == 3):\n print('Yes')\n exit()\n\nif narray[0, 0] == 1 and narray[1, 1] == 1 and narray[2, 2] == 1:\n print('Yes')\n exit()\n\nif narray[0, 2] == 1 and narray[1, 1] == 1 and narray[2, 0] == 1:\n print('Yes')\n exit()\n\nprint('No')", "import numpy as np\n\nA_list = []\n\nfor i in range(3):\n a = list(map(int, input().split()))\n A_list.append(a)\n\nN = int(input())\nnarray = np.zeros((3, 3), dtype=np.int)\n\n\nfor j in range(N):\n b = int(input())\n\n for n in range(3):\n for m in range(3): \n if A_list[n][m] == b:\n narray[n, m] = 1\n\n\nn_list = np.count_nonzero(narray == 1, axis = 0)\nm_list = np.count_nonzero(narray == 1, axis = 1)\n\nif np.any(n_list == 3) or np.any(n_list == 3):\n print('Yes')\n exit()\n\nif narray[0, 0] == 1 and narray[1, 1] == 1 and narray[2, 2] == 1:\n print('Yes')\n exit()\n\nif narray[0, 2] == 1 and narray[1, 1] == 1 and narray[2, 0] == 1:\n print('Yes')\n exit()\n\nprint('No')", "import numpy as np\n\nA_list = []\n\nfor i in range(3):\n a = list(map(int, input().split()))\n A_list.append(a)\n\nN = int(input())\nnarray = np.zeros((3, 3), dtype=np.int)\n\n\nfor j in range(N):\n b = int(input())\n\n for n in range(3):\n for m in range(3): \n if A_list[n][m] == b:\n narray[n, m] = 1\n\n\nn_list = np.count_nonzero(narray == 1, axis = 0)\nm_list = np.count_nonzero(narray == 1, axis = 1)\n\nif 3 in n_list or 3 in m_list:\n print('Yes')\n exit()\n\nif narray[0, 0] == 1 and narray[1, 1] == 1 and narray[2, 2] == 1:\n print('Yes')\n exit()\n\nif narray[0, 2] == 1 and narray[1, 1] == 1 and narray[2, 0] == 1:\n print('Yes')\n exit()\n\nprint('No')", "import numpy as np\n\nA_list = []\n\nfor i in range(3):\n a = list(map(int, input().split()))\n A_list.append(a)\n\nN = int(input())\nnarray = np.zeros((3, 3), dtype=np.int)\n\n\nfor j in range(N):\n b = int(input())\n\n for n in range(3):\n for m in range(3): \n if A_list[n][m] == b:\n narray[n, m] = 1\n\n\nn_list = np.count_nonzero(narray == 1, axis = 0)\nm_list = np.count_nonzero(narray == 1, axis = 1)\n\nif np.any(n_list == 3) or np.any(m_list == 3):\n print('Yes')\n exit()\n\nif narray[0, 0] == 1 and narray[1, 1] == 1 and narray[2, 2] == 1:\n print('Yes')\n exit()\n\nif narray[0, 2] == 1 and narray[1, 1] == 1 and narray[2, 0] == 1:\n print('Yes')\n exit()\n\nprint('No')", "import numpy as np\n\nA_list = []\n\nfor i in range(3):\n a = list(map(int, input().split()))\n A_list.append(a)\n\nN = int(input())\nnarray = np.zeros((3, 3), dtype=np.int)\n\n\nfor j in range(N):\n b = int(input())\n\n for n in range(3):\n for m in range(3): \n if A_list[n][m] == b:\n narray[n, m] = 1\n\n\nn_list = np.count_nonzero(narray == 1, axis = 0)\nm_list = np.count_nonzero(narray == 1, axis = 1)\n\nprint(narray)\nprint(n_list)\nprint(m_list)\n\nif np.any(n_list == 3) or np.any(m_list == 3):\n print('Yes')\n exit()\n\nif narray[0, 0] == 1 and narray[1, 1] == 1 and narray[2, 2] == 1:\n print('Yes')\n exit()\n\nif narray[0, 2] == 1 and narray[1, 1] == 1 and narray[2, 0] == 1:\n print('Yes')\n exit()\n\nprint('No')", "import numpy as np\n\nA_list = []\n\nfor i in range(3):\n a = list(map(int, input().split()))\n A_list.append(a)\n\nN = int(input())\nnarray = np.zeros((3, 3), dtype=np.int)\n\n\nfor j in range(N):\n b = int(input())\n\n for n in range(3):\n for m in range(3): \n if A_list[n][m] == b:\n narray[n, m] = 1\n\n\nn_list = np.count_nonzero(narray == 1, axis = 0)\nm_list = np.count_nonzero(narray == 1, axis = 1)\n\nprint(narray)\nprint(n_list)\nprint(m_list)\n\nif np.any(n_list == 3) or np.any(m_list == 3):\n print('Yes')\n exit()\n\nif narray[0, 0] == 1 and narray[1, 1] == 1 and narray[2, 2] == 1:\n print('Yes')\n exit()\n\nif narray[0, 2] == 1 and narray[1, 1] == 1 and narray[2, 0] == 1:\n print('Yes')\n exit()\n\nprint('No')", "import numpy as np\n\nA_list = []\n\nfor i in range(3):\n a = list(map(int, input().split()))\n A_list.append(a)\n\nN = int(input())\nnarray = np.zeros((3, 3), dtype=np.int)\n\n\nfor j in range(N):\n b = int(input())\n\n for n in range(3):\n for m in range(3): \n if A_list[n][m] == b:\n narray[n, m] = 1\n\n\nn_list = np.count_nonzero(narray == 1, axis = 0)\nm_list = np.count_nonzero(narray == 1, axis = 1)\n\nif np.any(n_list == 3) or np.any(m_list == 3):\n print('Yes')\n exit()\n\nif narray[0, 0] == 1 and narray[1, 1] == 1 and narray[2, 2] == 1:\n print('Yes')\n exit()\n\nif narray[0, 2] == 1 and narray[1, 1] == 1 and narray[2, 0] == 1:\n print('Yes')\n exit()\n\nprint('No')", "import numpy as np\n\nA_list = []\n\nfor i in range(3):\n a = list(map(int, input().split()))\n A_list.append(a)\n\nN = int(input())\nnarray = np.zeros((3, 3), dtype=np.int)\n\n\nfor j in range(N):\n b = int(input())\n\n for n in range(3):\n for m in range(3): \n if A_list[n][m] == b:\n narray[n, m] = 1\n\n\nn_list = np.count_nonzero(narray == 1, axis = 0)\nm_list = np.count_nonzero(narray == 1, axis = 1)\nprint(n_list)\nprint(m_list)\n\nprint(narray)\n\nif np.any(n_list == 3) or np.any(m_list == 3):\n print('Yes')\n exit()\n\nif narray[0, 0] == 1 and narray[1, 1] == 1 and narray[2, 2] == 1:\n print('Yes')\n exit()\n\nif narray[0, 2] == 1 and narray[1, 1] == 1 and narray[2, 0] == 1:\n print('Yes')\n exit()\n\nprint('No')", "\n\nA_list = [[] for _ in range(3)]\n\nfor i in range(3):\n A1, A2, A3 = map(int, input().split())\n A_list[i] += [A1, A2, A3]\n\nN = int(input())\n\nset1 = {A_list[0][0], A_list[0][1], A_list[0][2]}\nset2 = {A_list[1][0], A_list[1][1], A_list[1][2]}\nset3 = {A_list[2][0], A_list[2][1], A_list[2][2]}\nset4 = {A_list[0][0], A_list[1][0], A_list[2][0]}\nset5 = {A_list[0][1], A_list[1][1], A_list[2][1]}\nset6 = {A_list[0][2], A_list[1][2], A_list[2][2]}\nset7 = {A_list[0][0], A_list[1][1], A_list[2][2]}\nset8 = {A_list[0][2], A_list[1][1], A_list[2][0]}\n\n\nb_set = set()\n\nfor n in range(N):\n b = int(input())\n b_set.add(b)\n\nif (set1 <= b_set or \n set2 <= b_set or\n set3 <= b_set or\n set4 <= b_set or\n set5 <= b_set or\n set6 <= b_set or\n set7 <= b_set or\n set8 <= b_set):\n\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s061138212', 's157556966', 's180380496', 's377748217', 's500475259', 's513577693', 's746152205', 's885146969', 's928884947', 's858814787'] | [14480.0, 12516.0, 21332.0, 12500.0, 12516.0, 14564.0, 12432.0, 14480.0, 12516.0, 9164.0] | [149.0, 157.0, 301.0, 149.0, 149.0, 149.0, 148.0, 151.0, 151.0, 30.0] | [710, 710, 710, 694, 710, 753, 753, 710, 753, 880] |
p02760 | u890461092 | 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 = []\nans = 'No'\n\na.append(list(map(int,input().split())))\na.append(list(map(int,input().split())))\na.append(list(map(int,input().split())))\n\nn = int(input())\n\nfor i in range(n):\n d = int(input())\n for j in range(3):\n for k in range(3):\n if a[j][k] == n:\n a[j][k] = 0\n\nif a[0][0] == a[1][0] == a[2][0]:\n ans = 'Yes'\nelif a[0][1] == a[1][1] == a[2][1]:\n ans = 'Yes'\nelif a[0][2] == a[1][2] == a[2][2]:\n ans = 'Yes'\nelif a[0][0] == a[0][1] == a[0][2]:\n ans = 'Yes'\nelif a[1][0] == a[1][1] == a[1][2]:\n ans = 'Yes'\nelif a[2][0] == a[2][1] == a[2][2]:\n ans = 'Yes'\nelif a[0][0] == a[1][1] == a[2][2]:\n ans = 'Yes'\nelif a[2][0] == a[1][1] == a[0][2]:\n ans = 'Yes'\n\nprint(ans)", "import numpy as np\n\na = []\nans = 'No'\n\na.append(list(map(int,input().split())))\na.append(list(map(int,input().split())))\na.append(list(map(int,input().split())))\n\nn = int(input())\n\nfor i in range(n):\n d = int(input())\n for j in range(3):\n for k in range(3):\n if a[j][k] == d:\n a[j][k] = 0\n\nif 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[0][1] == a[0][2] == 0:\n ans = 'Yes'\nelif a[1][0] == a[1][1] == a[1][2] == 0:\n ans = 'Yes'\nelif a[2][0] == a[2][1] == a[2][2] == 0:\n ans = 'Yes'\nelif a[0][0] == a[1][1] == a[2][2] == 0:\n ans = 'Yes'\nelif a[2][0] == a[1][1] == a[0][2] == 0:\n ans = 'Yes'\n\nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s757154199', 's505681609'] | [13088.0, 12508.0] | [159.0, 153.0] | [716, 756] |
p02760 | u891422384 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["A = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\nfor j in range(n):\n b = int(input())\n for j in range(3):\n for k in range(3): \n \tif b==A[j][k]:\n \t\tA[j][k]=-1\n\nfor k in range(3):\n if A[k][:]==[-1,-1,-1]:\n print('Yes')\n exit(0)\n \nfor k in range(3):\n if sum(A[:][k])==[-1,-1,-1]:\n print('Yes')\n exit(0)\n \nif (A[0][0]==A[1][1]==A[2][2]==[-1,-1,-1])or(A[2][0]==A[1][1]==A[0][2]==[-1,-1,-1]): \n print('Yes')\n exit(0)\n \nprint('No')", "lis = []\nfor i in range(3):\n a= list(map(int,input().split()))\n lis.append(a)\nn = int(input())\nfor j in range(n):\n b = int(input())\n for li in lis:\n if b in li:\n li[li.index(b)]=0\nprint(lis)\nfor k in range(8):\n if k<3:\n if sum(lis[k][:])==0:\n print('Yes')\n exit(0)\n elif (3<=k)and(k<6):\n if sum(lis[:][k-3])==0:\n print('Yes')\n exit(0)\n elif 6<=k:\n if (lis[0][0]+lis[1][1]+lis[2][2]==0)or(lis[2][0]+lis[1][1]+lis[0][2]==0): \n print('Yes')\n exit(0)\nprint('No')", "lis = []\nfor i in range(3):\n a= list(map(int,input().split()))\n lis.append(a)\nn = int(input())\nfor j in range(n):\n b = int(input())\n for li in lis:\n if b in li:\n li[li.index(b)]=0\nprint(lis)\nfor k in range(7):\n print(k)\n if k<3:\n if sum(lis[k][:])==0:\n print('Yes')\n exit(0)\n elif (3<=k)and(k<6):\n if sum(lis[:][k-3])==0:\n print('Yes')\n exit(0)\n elif 6<=k:\n if (lis[0][0]+lis[1][1]+lis[2][2]==0)or(lis[2][0]+lis[1][1]+lis[0][2]==0): \n print('Yes')\n exit(0)\nprint('No')", "lis = []\nfor i in range(3):\n a= list(map(int,input().split()))\n lis.append(a)\nn = int(input())\nfor j in range(n):\n b = int(input())\n for li in lis:\n if b in li:\n li[li.index(b)]=0\n\nprint(lis)\nfor k in range(3):\n if sum(lis[k][:])==0:\n print('Yes')\n exit(0)\n\nfor k in range(k):\n if sum(lis[:][k])==0:\n print('Yes')\n exit(0)\n\nif (lis[0][0]+lis[1][1]+lis[2][2]==0)or(lis[2][0]+lis[1][1]+lis[0][2]==0): \n print('Yes')\n exit(0)\n \nprint('No')", "A = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\nfor j in range(n):\n b = int(input())\n for j in range(3):\n for k in range(3): \n \tif b==A[j][k]:\n \t\tA[j][k]=-1\nprint(A)\nfor k in range(3):\n if A[k][:]==[-1,-1,-1]:\n print('Yes')\n exit(0)\n \nfor k in range(3):\n if sum(A[:][k])==[-1,-1,-1]:\n print('Yes')\n exit(0)\n \nif (A[0][0]==A[1][1]==A[2][2]==[-1,-1,-1])or(A[2][0]==A[1][1]==A[0][2]==[-1,-1,-1]): \n print('Yes')\n exit(0)\n \nprint('No')", "lis = []\nA = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\nfor j in range(n):\n b = int(input())\n for li in A:\n if b in li:\n li[li.index(b)]=-1\n \nfor k in range(3):\n if sum(A[k][:])==-3:\n print('Yes')\n exit(0)\n \nfor k in range(3):\n if sum(A[:][k])==-3:\n print('Yes')\n exit(0)\n \nif (A[0][0]==A[1][1]==A[2][2]==-3)or(A[2][0]==A[1][1]==A[0][2]==-3): \n print('Yes')\n exit(0)\n \nprint('No')", "lis = []\nfor i in range(3):\n a= list(map(int,input().split()))\n lis.append(a)\nn = int(input())\nfor j in range(n):\n b = int(input())\n for li in lis:\n if b in li:\n li[li.index(b)]=0\nprint(lis)\nfor k in range(6):\n if k<3 and sum(lis[k][:])==0: \n print('Yes')\n exit(0)\n elif (3<=k or k<6) and sum(lis[:][k-3])==0:\n print('Yes')\n exit(0)\n elif (lis[0][0]+lis[1][1]+lis[2][2]==0)or(lis[2][0]+lis[1][1]+lis[0][2]==0): \n print('Yes')\n exit(0)\nprint('No')", "lis = []\nA = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\nfor j in range(n):\n b = int(input())\n for j in range(3):\n for k in range(3): \n \tif b==A[j][k]:\n \t\tA[j][k]=-1\n \nfor k in range(3):\n if sum(A[k][:])==-3:\n print('Yes')\n exit(0)\n \nfor k in range(3):\n if sum(A[:][k])==-3:\n print('Yes')\n exit(0)\n \nif (A[0][0]==A[1][1]==A[2][2]==-3)or(A[2][0]==A[1][1]==A[0][2]==-3): \n print('Yes')\n exit(0)\n \nprint('No')", "A = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\nfor j in range(n):\n b = int(input())\n for j in range(3):\n for k in range(3): \n \tif b==A[j][k]:\n \t\tA[j][k]=0\n\nfor k in range(3):\n if sum(A[k][:])==0:\n print('Yes')\n exit(0)\n\nri = [[a[k] for a in A]for k in range(3)]\n\nfor k in range(3):\n if sum(ri[:][k])==0:\n print('Yes')\n exit(0)\n \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')\n exit(0)\n \nprint('No')"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s124820994', 's202619670', 's242351530', 's251755798', 's507662233', 's651211087', 's659041442', 's931054374', 's382659949'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [18.0, 19.0, 18.0, 18.0, 18.0, 18.0, 18.0, 18.0, 18.0] | [483, 512, 523, 471, 491, 438, 479, 466, 493] |
p02760 | u893661063 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['Aij= [input().split() for l in range(3)]\nN=int(input())\nb= [int(input()) for i in range(N)]\nfor j in range(3):\n for k in range(3):\n for n in range(N):\n if int(Aij[j][k])==b[n]:\n Aij[j][k]=0\n\n\nif (Aij[0][0] == Aij[0][1] == Aij[0][2] == "0") or (Aij[1][0] == Aij[1][1] == Aij[1][2] == "0") or (Aij[2][0] == Aij[2][1] == Aij[2][2] == "0"):\n print(\'Yes\')\nelif Aij[0][0]==\'0\' and Aij[0][1]==\'0\' and Aij[0][2]==\'0\':\n print(\'Yes\')\nelif Aij[1][0]==\'0\' and Aij[1][1]==\'0\' and Aij[1][2]==\'0\':\n print(\'Yes\')\nelif Aij[2][0]==\'0\' and Aij[2][1]==\'0\' and Aij[2][2]==\'0\':\n print(\'Yes\')\nelif Aij[0][0]==\'0\'and Aij[1][1]==\'0\'and Aij[2][2]==\'0\':\n print(\'Yes\')\nelif Aij[0][2]==\'0\' and Aij[1][1]==\'0\'and Aij[2][0]==\'0\':\n print(\'Yes\')\nelse:\n print(\'No\')', "Aij= [input().split() for l in range(3)]\nN=int(input())\nb= [int(input()) for i in range(N)]\nfor j in range(3):\n for k in range(3):\n for n in range(N):\n if int(Aij[j][k])==b:\n Aij[j][k]='0'\n\n\nif (Aij[0][0] == Aij[0][1] == Aij[0][2] == 0) or (Aij[1][0] == Aij[1][1] == Aij[1][2] == 0) or (Aij[2][0] == Aij[2][1] == Aij[2][2] == 0):\n print('Yes')\nelif Aij[0][0]=='0' and Aij[0][1]=='0' and Aij[0][2]=='0':\n print('Yes')\nelif Aij[1][0]=='0' and Aij[1][1]=='0' and Aij[1][2]=='0':\n print('Yes')\nelif Aij[2][0]=='0' and Aij[2][1]=='0' and Aij[2][2]=='0':\n print('Yes')\nelif Aij[0][0]=='0'and Aij[1][1]=='0'and Aij[2][2]=='0':\n print('Yes')\nelif Aij[0][2]=='0' and Aij[1][1]=='0'and Aij[2][0]=='0':\n print('Yes')\nelse:\n print('No')", 'Aij= [int(input().split()) for l in range(3)]\nN=int(input())\nb= [int(input()) for i in range(N)]\nfor j in range(3):\n for k in range(3):\n for n in range(N):\n if int(Aij[j][k])==b[n]:\n Aij[j][k]="0"\n\n\nif (Aij[0][0] == Aij[0][1] == Aij[0][2] == "0") or (Aij[1][0] == Aij[1][1] == Aij[1][2] == "0") or (Aij[2][0] == Aij[2][1] == Aij[2][2] == "0"):\n print(\'Yes\')\nelif Aij[0][0]==\'0\' and Aij[0][1]==\'0\' and Aij[0][2]==\'0\':\n print(\'Yes\')\nelif Aij[1][0]==\'0\' and Aij[1][1]==\'0\' and Aij[1][2]==\'0\':\n print(\'Yes\')\nelif Aij[2][0]==\'0\' and Aij[2][1]==\'0\' and Aij[2][2]==\'0\':\n print(\'Yes\')\nelif Aij[0][0]==\'0\'and Aij[1][1]==\'0\'and Aij[2][2]==\'0\':\n print(\'Yes\')\nelif Aij[0][2]==\'0\' and Aij[1][1]==\'0\'and Aij[2][0]==\'0\':\n print(\'Yes\')\nelse:\n print(\'No\')', 'A = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\n\nfor k in range(N):\n B = int(input())\n for l in range(3):\n for m in range(3):\n if A[l][m] == B:\n A[l][m] = 0\n\nif (A[0][0] == A[0][1] == A[0][2] == 0) or (A[1][0] == A[1][1] == A[1][2] == 0) or (A[2][0] == A[2][1] == A[2][2] == 0):\n print ("Yes")\nelif (A[0][0] == A[1][0] == A[2][0] == 0) or (A[0][1] == A[1][1] == A[2][1] == 0) or (A[0][2] == A[1][2] == A[2][2] == 0):\n print ("Yes")\nelif (A[0][0] == A[1][1] == A[2][2] == 0) or (A[0][2] == A[1][1] == A[2][0] == 0):\n print ("Yes")\nelse:\n print ("No")'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s435278738', 's565883336', 's826508001', 's440151850'] | [9312.0, 9224.0, 9256.0, 9296.0] | [30.0, 29.0, 22.0, 27.0] | [788, 781, 795, 625] |
p02760 | u896741788 | 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=[list(map(int,input().split())) for i in range(3)]\nl=sum(l,[])\nn=int(input())\nli=set([input() for ini in range(n)])\nd=[0 for i in range(9)]\nfor g in range(9):\n if l[g] in li:d[g]=1\nif set([1]) in [set(d[h::3])for h in range(3)]+[set(d[h:h+3])for h in range(3)]+[set([d[0],d[4],d[8]]),set([d[2],d[4],d[6]])]:\n print("Yes")\nelse:print("No")\n', 'l=[list(map(int,input().split())) for i in range(3)]\nn=int(input())\nli=set(input() for ini in range(n))\nd=[0 for i in range(9)]\nfor j in range(3):\n for i in range(3):\n if l[j][i] in li:d[3*j+i]=1\nif set(1) in [set(l[h::3])for h in range(3)]+[set(l[h:h+3])for h in range(3)]+[set([l[0],l[4],l[8]]),set([l[2],l[4],l[6]])]:\n print("Yes")\nelse:print("No")', 'l=[list(map(int,input().split())) for i in range(3)]\nl=sum(l,[])\nn=int(input())\nli=set([input() for ini in range(n)])\nd=[0 for i in range(9)]\nfor g in range(9):\n if l[g] in li:d[g]=1\nfor a,s,x in [(0,1,2),(3,4,5),(6,7,8),(0,4,8),(2,4,6),(0,3,6),(1,4,7),(2,5,8)]:\n if d[a]==d[x]==d[s]==1:\n print("Yes");exit()\nprint("No")', 'l=[list(map(int,input().split())) for i in range(3)]\nl=sum(l,[])\nn=int(input())\nli=set([input() for ini in range(n)])\nd=[0 for i in range(9)]\nfor g in range(9):\n if l[g] in li:d[g]=1\nif set([1]) in [set(d[h::3])for h in range(3)]+[set(d[h:h+3])for h in {0,3,6}]+[set([d[0],d[4],d[8]]),set([d[2],d[4],d[6]])]:\n print("Yes")\nelse:print("No")\n', 'l=[list(map(int,input().split())) for i in range(3)]\nl=sum(l,[])\nn=int(input())\nli=set([int(input()) for ini in range(n)])\nd=[0 for i in range(9)]\nfor g in range(9):\n if l[g] in li:d[g]=1\n\nfor a,s,x in [(0,1,2),(3,4,5),(6,7,8),(0,4,8),(2,4,6),(0,3,6),(1,4,7),(2,5,8)]:\n if d[a]==d[x]==d[s]==1:\n print("Yes");exit()\nprint("No")\n'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s006619948', 's099450637', 's559157953', 's780483735', 's984956056'] | [3064.0, 3064.0, 3188.0, 3064.0, 3064.0] | [17.0, 18.0, 17.0, 17.0, 17.0] | [343, 356, 325, 342, 332] |
p02760 | u896941378 | 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. | ['#include <bits/stdc++.h>\nusing namespace std;\nvoid print() {\n cout << endl;\n}\ntemplate <class Head, class... Tail>\nvoid print(Head &&head, Tail &&... tail) {\n cout << head;\n if (sizeof...(tail) != 0)\n cout << " ";\n print(forward<Tail>(tail)...);\n}\ntemplate <class T>\nvoid print(vector<T> &vec) {\n for (auto &a : vec) {\n cout << a;\n if (&a != &vec.back())\n cout << " ";\n }\n cout << endl;\n}\ntemplate <class T>\nvoid print(vector<vector<T>> &df) {\n for (auto &vec : df) {\n print(vec);\n }\n}\n\n\nusing ll = long long;\nconst int INF = 100100100;\n\nvector<vector<int>> A(3);\n\nbool bingo(vector<int> B) {\n int cnt1 = 0;\n for(int b: B) {\n rep(y, 3) {\n rep(x, 3) {\n if(A[y][x]==b) {\n ++cnt1;\n }\n }\n }\n }\n if(cnt1==3) return true;\n int cnt2 = 0;\n for(int b: B) {\n rep(y, 3) {\n rep(x, 3) {\n if(A[x][y]==b) {\n ++cnt2;\n }\n }\n }\n }\n if(cnt2==3) return true;\n int cnt3 = 0;\n for(int b: B) {\n rep(i, 3) {\n if(b==A[i][i]) ++cnt3;\n }\n }\n if(cnt3==3) {\n return true;\n }\n\n int cnt4 = 0;\n for(int b: B) {\n rep(i, 3) {\n if(b==A[2-i][i]) ++cnt4;\n }\n }\n if(cnt4==3) {\n return true;\n }\n return false; \n}\n\nint main() {\n vector<int> row(3);\n rep(i, 3) {\n rep(j, 3) {\n cin >> row[j];\n }\n A[i] = row;\n }\n int N;\n cin >> N;\n vector<int> B(N);\n rep(i, N) {\n cin >> B[i];\n }\n\n bool flag = bingo(B);\n\n if(flag) {\n print("Yes");\n }\n else {\n print("No");\n }\n\n\n\n return 0;\n}', "if __name__ == '__main__':\n A = []\n for i in range(3):\n row = list(map(int, input().split()))\n A.append(row)\n \n N = int(input())\n B = []\n\n for i in range(N):\n B.append(int(input())) \n \n for i in range(3):\n cnt = 0\n for j in range(3):\n if A[i][j] in B:\n cnt += 1\n if cnt==3:\n print('Yes')\n quit()\n \n for i in range(3):\n cnt = 0\n for j in range(3):\n if A[j][i] in B:\n cnt += 1\n if cnt==3:\n print('Yes')\n quit()\n\n if A[0][0] in B and A[1][1] in B and A[2][2] in B:\n print('Yes')\n quit()\n \n if A[0][2] in B and A[1][1] in B and A[2][0] in B:\n print('Yes')\n quit()\n \n print('No')"] | ['Runtime Error', 'Accepted'] | ['s530233580', 's025320130'] | [8820.0, 9124.0] | [24.0, 28.0] | [1910, 814] |
p02760 | u898428248 | 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 = map(int, input().split())\nA21,A22,A23 = map(int, input().split())\nA31,A32,A33 = map(int, input().split())\nN = int(input())\nb = []\nfor i in range(N):\n b.append(int(input()))\n\ndef check_bingo(bingo_card):\n bingo_cnt = 0\n bingo_list = [[0, 1, 2],\n [3, 4, 5],\n [6, 7, 8],\n [0, 3, 6],\n [1, 4, 5],\n [2, 5, 8],\n [0, 4, 8],\n [2, 4, 6],] \n\n for i in range(len(bingo_list)):\n for j in range(len(bingo_list[i])):\n if bingo_card[bingo_list[i][j]] == 0:\n bingo_cnt +=1\n else:\n break\n \n if bingo_cnt == 3:\n return(True)\n break\n else:\n bingo_cnt = 0\n return(False)\n\ndef main():\n bingo_card = [A11,A12,A13,A21,A22,A23,A31,A32,A33]\n cnt = 0\n for i in range(N):\n if b[i] in bingo_card:\n bingo_card[i] = 0\n cnt += 1\n else:\n pass\n\n if cnt <= 2:\n print(\'No\') \n \n elif 3 <= cnt <= 6:\n judge_bingo = check_bingo(bingo_card)\n if judge_bingo == True:\n print(\'Yes\')\n else:\n print(\'No\')\n else:\n print(\'Yes\') \n \nif __name__ == "__main__":\n main()\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 = []\nfor i in range(N):\n b.append(int(input()))\n\ndef check_bingo(bingo_card):\n bingo_cnt = 0\n bingo_list = [[0, 1, 2],\n [3, 4, 5],\n [6, 7, 8],\n [0, 3, 6],\n [1, 4, 5],\n [2, 5, 8],\n [0, 4, 8],\n [2, 4, 6],] \n\n for i in range(len(bingo_list)):\n for j in range(len(bingo_list[i])):\n if bingo_card[bingo_list[i][j]] == 0:\n bingo_cnt +=1\n else:\n break\n \n if bingo_cnt == 3:\n return(True)\n break\n else:\n bingo_cnt = 0\n return(False)\n\ndef main():\n bingo_card = [A11,A12,A13,A21,A22,A23,A31,A32,A33]\n cnt = 0\n for i in range(N):\n for j in range(len(bingo_card)):\n if b[i] == bingo_card[j]:\n bingo_card[j] = 0\n cnt += 1\n break\n else:\n pass\n\n if cnt <= 2:\n print(\'No\') \n \n elif 3 <= cnt <= 6:\n judge_bingo = check_bingo(bingo_card)\n if judge_bingo == True:\n print(\'Yes\')\n else:\n print(\'No\')\n else:\n print(\'Yes\') \n \nif __name__ == "__main__":\n main()\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 = []\nfor i in range(N):\n b.append(int(input()))\n\ndef check_bingo(bingo_card):\n bingo_cnt = 0\n ret = False\n bingo_list = [[0, 1, 2],\n [3, 4, 5],\n [6, 7, 8],\n [0, 3, 6],\n [1, 4, 5],\n [2, 5, 8],\n [0, 4, 8],\n [2, 4, 6],] \n\n for i in range(len(bingo_list)):\n for j in range(len(bingo_list[i])):\n if bingo_card[bingo_list[i][j]] == 0:\n bingo_cnt +=1\n else:\n break\n \n if bingo_cnt == 3:\n ret = True\n break\n else:\n bingo_cnt = 0\n \n return(ret)\n\ndef main():\n bingo_card = [A11,A12,A13,A21,A22,A23,A31,A32,A33]\n cnt = 0\n for i in range(N):\n for j in range(len(bingo_card)):\n if b[i] == bingo_card[j]:\n bingo_card[j] = 0\n cnt += 1\n break\n else:\n pass\n\n if cnt <= 2:\n print(\'No\') \n \n elif 3 <= cnt <= 6:\n judge_bingo = check_bingo(bingo_card)\n if judge_bingo == True:\n print(\'Yes\')\n else:\n print(\'No\')\n else:\n print(\'Yes\') \n \nif __name__ == "__main__":\n main()\n\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s024751655', 's403067454', 's557998615'] | [3064.0, 3192.0, 3064.0] | [17.0, 17.0, 18.0] | [1357, 1443, 1452] |
p02760 | u899953001 | 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 python\n\na = []\na.append([int(i) for i in input().split()])\na.append([int(i) for i in input().split()])\na.append([int(i) for i in input().split()])\nn = int(input())\nc = [[0,0,0],[0,0,0],[0,0,0]]\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 c[j][k] = 1\n\nprint(c)\nflag = False\n\nfor i in range(3):\n if c[0][i] + c[1][i] + c[2][i] == 3 and flag == False:\n print("Yes")\n flag = True\n break\n if c[i][0] + c[i][1] + c[i][2] == 3 and flag == False:\n print("Yes")\n flag = True\n break\n if c[i%3][0] + c[(i+1)%3][1] + c[(i+2)%3][2] == 3 and flag == False:\n print("Yes")\n flag = True\n break\n', '#!/usr/bin/env python\n\na = []\na.append([int(i) for i in input().split()])\na.append([int(i) for i in input().split()])\na.append([int(i) for i in input().split()])\nn = int(input())\nc = [[0,0,0],[0,0,0],[0,0,0]]\n\nfor i in range(n):\n b = int(input())\n for j in range(3):\n for k in range(3):\n if a[j][k] == b:\n c[j][k] = 1\n\nflag = False\n\nfor i in range(3):\n if c[0][i] + c[1][i] + c[2][i] == 3 and flag == False:\n print("Yes")\n flag = True\n break\n \n if c[i][0] + c[i][1] + c[i][2] == 3 and flag == False:\n print("Yes")\n flag = True\n break\n\n """\n if c[i%3][0] + c[(i+1)%3][1] + c[(i+2)%3][2] == 3 and flag == False:\n print("Yes")\n flag = True\n break\n """\n if c[0][0] + c[1][1] + c[2][2] == 3 and flag == False:\n print("Yes")\n flag = True\n break\n\n if c[0][2] + c[1][1] + c[2][0] == 3 and flag == False:\n print("Yes")\n flag = True\n break\n\nif flag == False:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s897856844', 's173731598'] | [3064.0, 3188.0] | [18.0, 19.0] | [755, 1036] |
p02760 | u904081717 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["import sys\nimport numpy as np\n\nbingo_list = np.array([list(map(int, input().split())) for _ in range(3)])\nN = int(input())\nn = [int(input()) for _ in range(N)]\n\nA = np.array([[41,7,46],[26,89,2],[78,92,8]])\n\nfor i in range(3):\n for j in range(N):\n if A[i,0] == n[j]:\n for k in range(N):\n if A[i,1] == n[k]:\n for l in range(N):\n if A[i,2] == n[l]:\n print('Yes')\n sys.exit()\n\nfor j in range(N):\n if A[0,0] == n[j]:\n for k in range(N):\n if A[1,1] == n[k]:\n for l in range(N):\n if A[2,2] == n[l]:\n print('Yes')\n sys.exit()\n\nfor j in range(N):\n if A[2,0] == n[j]:\n for k in range(N):\n if A[1,1] == n[k]:\n for l in range(N):\n if A[2,0] == n[l]:\n print('Yes')\n sys.exit()\n\nprint('No')\n", "import sys\nimport numpy as np\n\nA = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nn = [int(input()) for _ in range(N)]\n\nfor i in range(3):\n for j in range(N):\n if A[i][0] == n[j]:\n for k in range(N):\n if A[i][1] == n[k]:\n for l in range(N):\n if A[i][2] == n[l]:\n print('Yes')\n sys.exit()\n\nfor i in range(3):\n for j in range(N):\n if A[0][i] == n[j]:\n for k in range(N):\n if A[1][i] == n[k]:\n for l in range(N):\n if A[2][i] == n[l]:\n print('Yes')\n sys.exit()\n\nfor j in range(N):\n if A[0][0] == n[j]:\n for k in range(N):\n if A[1][1] == n[k]:\n for l in range(N):\n if A[2][2] == n[l]:\n print('Yes')\n sys.exit()\n\nfor j in range(N):\n if A[2][0] == n[j]:\n for k in range(N):\n if A[1][1] == n[k]:\n for l in range(N):\n if A[2][0] == n[l]:\n print('Yes')\n sys.exit()\n\nprint('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s167727451', 's657027027'] | [17208.0, 12448.0] | [243.0, 150.0] | [1012, 1256] |
p02760 | u906501980 | 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)]\nis_bingo = [[False]*3 for _ in range(3)]\nn = int(input())\nfor _ in range(n):\n b = int(input())\n for i, ai in enumerate(a):\n for j, aii in enumerate(ai):\n if aii == b:\n is_bingo[i][j] = True\nis_bingo_flat = [j for i in is_bingo for j in i]\nfor i in range(3):\n if all(is_bingo[i]) or all(list(zip(*is_bingo))[i]):\n print("Yes")\n break\nelse:\n if all(is_bingo_flat[::3]) or all(is_bingo_flat[2:7::2]):\n print("Yes")\n print("No")\n\n ', 'a = [list(map(int, input().split())) for _ in range(3)]\nis_bingo = [[False]*3 for _ in range(3)]\nn = int(input())\nfor _ in range(n):\n b = int(input())\n for i, ai in enumerate(a):\n for j, aii in enumerate(ai):\n if aii == b:\n is_bingo[i][j] = True\nis_bingo_flat = [j for i in is_bingo for j in i]\nfor i in range(3):\n if all(is_bingo[i]) or all(list(zip(*is_bingo))[i]):\n print("Yes")\n break\nelse:\n if all(is_bingo_flat[::4]) or all(is_bingo_flat[2:7:2]):\n print("Yes")\n else:\n print("No")\n\n '] | ['Runtime Error', 'Accepted'] | ['s209920674', 's578073417'] | [3064.0, 3188.0] | [17.0, 19.0] | [559, 572] |
p02760 | u907403674 | 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. | ['array= []\nfor i in range(3):\n array.append(list(map(int,input().split())))\nn= int(input())\nnumber=[]\nanswer = "No"\nfor i in range(n):\n number.append(input())\n\nfor i in range (3):\n for j in range(3):\n for k in range(n):\n print(array[i][j])\n print(number[k])\n if int(array[i][j]) == int(number[k]):\n array[i][j] = 8101919\n\nfor i in range (3):\n if array[i][0] & array[i][1] & array[i][2] == 8101919: \n answer = "Yes"\n\nfor i in range(3):\n if array[0][i] & array[1][i] & array[2][i] == 8101919:\n answer = "Yes"\n\nif array[0][0] & array[1][1] & array[2][2] == 8101919:\n answer = "Yes"\n \nif array[2][0] & array[1][1] & array [0][2] == 8101919:\n answer = "Yes"\n\nprint(answer)', 'array= []\nfor i in range(3):\n array.append(list(map(int,input().split())))\nn= int(input())\nnumber=[]\nanswer = "No"\nfor i in range(n):\n number.append(input())\n\nfor i in range (3):\n for j in range(3):\n for k in range(n):\n if int(array[i][j]) == int(number[k]):\n array[i][j] = 8101919\n\nfor i in range (3):\n if array[i][0] & array[i][1] & array[i][2] == 8101919: \n answer = "Yes"\n\nfor i in range(3):\n if array[0][i] & array[1][i] & array[2][i] == 8101919:\n answer = "Yes"\n\nif array[0][0] & array[1][1] & array[2][2] == 8101919:\n answer = "Yes"\n \nif array[2][0] & array[1][1] & array [0][2] == 8101919:\n answer = "Yes"\n\nprint(answer)'] | ['Wrong Answer', 'Accepted'] | ['s828337628', 's796260559'] | [3064.0, 3064.0] | [18.0, 17.0] | [773, 713] |
p02760 | u915647268 | 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. | ['number = []\nresult = "No"\n\nfor i in range(3):\n\tfor n in input().split():\n\t\tn = int(n)\n\t\tnumber.append(n)\n\nbingo = [None for _ in range(9)]\n\nN = int(input())\nfor i in range(N):\n\tb = int(input())\n\tfor j in range(9):\n\t\tif b == number[j]:\n\t\t\tbingo[j] = True\n\nprint(bingo)\n\nfor i in range(3):\n\tif bingo[3*i] == bingo[3*i+1] and bingo[3*i+1] == bingo[3*i+2] and bingo[3*i] == True:\n\t\tresult = "Yes"\n\nfor i in range(3):\n\tif bingo[i] == bingo[3+i] and bingo[3+i] == bingo[6+i] and bingo[i] == True:\n\t\tresult = "Yes"\n\nif bingo[0] == bingo[4] and bingo[4] == bingo[8] and bingo[0] == True:\n\tresult = "Yes"\n\nif bingo[2] == bingo[4] and bingo[4] == bingo[6] and bingo[2] == True:\n\tresult = "Yes"\n\nprint(result)\n', 'number = []\nresult = "No"\n\nfor i in range(3):\n\tfor n in input().split():\n\t\tn = int(n)\n\t\tnumber.append(n)\n\nbingo = [None for _ in range(9)]\n\nN = int(input())\nfor i in range(N):\n\tb = int(input())\n\tfor j in range(9):\n\t\tif b == number[j]:\n\t\t\tbingo[j] = True\n\n\nfor i in range(3):\n\tif bingo[3*i] == bingo[3*i+1] and bingo[3*i+1] == bingo[3*i+2] and bingo[3*i] == True:\n\t\tresult = "Yes"\n\nfor i in range(3):\n\tif bingo[i] == bingo[3+i] and bingo[3+i] == bingo[6+i] and bingo[i] == True:\n\t\tresult = "Yes"\n\nif bingo[0] == bingo[4] and bingo[4] == bingo[8] and bingo[0] == True:\n\tresult = "Yes"\n\nif bingo[2] == bingo[4] and bingo[4] == bingo[6] and bingo[2] == True:\n\tresult = "Yes"\n\nprint(result)\n'] | ['Wrong Answer', 'Accepted'] | ['s783511872', 's457897782'] | [3064.0, 3192.0] | [18.0, 17.0] | [700, 687] |
p02760 | u917733926 | 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 = list()\nA.extend(A1)\nA.extend(A2)\nA.extend(A3)\nN = int(input())\nB = list()\nresult = list()\nfor _ in range(N):\n B.append(int(input()))\nfor e in B:\n if e in A:\n result.append(A.index(e))\nloopflag = False\nif N >= 3:\n for i in range(len(result)):\n for j in range(len(result)):\n for k in range(len(result)):\n if (i==j or j==k or k==i):\n break \n if((result[i] % 3 == result[j] % 3 == result[k] % 3 ) or (result[i] // 3 == result[j] // 3 == result[k] // 3) or (result[i] == 0 and result[j] == 4 and result[k] ==8 ) or (result[i] == 2 and result[j] == 4 and result[k] == 6 )):\n loopflag = True\n if loopflag:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", "A1 = list(map(int, input().split()))\nA2 = list(map(int, input().split()))\nA3 = list(map(int, input().split()))\nA = list()\nA.extend(A1)\nA.extend(A2)\nA.extend(A3)\nN = int(input())\nB = list()\nresult = list()\nfor _ in range(N):\n B.append(int(input()))\nfor e in B:\n if e in A:\n result.append(A.index(e))\nloopflag = False\nresult.sort()\nprint(result)\nif N >= 3:\n for i in range(len(result)):\n for j in range(len(result)):\n for k in range(len(result)):\n if (i==j or j==k or k==i):\n continue \n if((result[i] % 3 == result[j] % 3 == result[k] % 3 ) or (result[i] // 3 == result[j] // 3 == result[k] // 3) or (result[i] == 0 and result[j] == 4 and result[k] ==8 ) or (result[i] == 2 and result[j] == 4 and result[k] == 6 )):\n loopflag = True\n if loopflag:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", "A1 = list(map(int, input().split()))\nA2 = list(map(int, input().split()))\nA3 = list(map(int, input().split()))\nA = list()\nA.extend(A1)\nA.extend(A2)\nA.extend(A3)\nN = int(input())\nB = list()\nresult = list()\nfor _ in range(N):\n B.append(int(input()))\nfor e in B:\n if e in A:\n result.append(A.index(e))\nloopflag = False\nresult.sort()\nif N >= 3:\n for i in range(len(result)):\n for j in range(len(result)):\n for k in range(len(result)):\n if (i==j or j==k or k==i):\n break \n if((result[i] % 3 == result[j] % 3 == result[k] % 3 ) or (result[i] // 3 == result[j] // 3 == result[k] // 3) or (result[i] == 0 and result[j] == 4 and result[k] ==8 ) or (result[i] == 2 and result[j] == 4 and result[k] == 6 )):\n loopflag = True\n if loopflag:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", "A1 = list(map(int, input().split()))\nA2 = list(map(int, input().split()))\nA3 = list(map(int, input().split()))\nA = list()\nA.extend(A1)\nA.extend(A2)\nA.extend(A3)\nN = int(input())\nB = list()\nresult = list()\nfor _ in range(N):\n B.append(int(input()))\nfor e in B:\n if e in A:\n result.append(A.index(e))\nprint(result)\nloopflag = False\nif N >= 3:\n for i in range(len(result)):\n for j in range(len(result)):\n for k in range(len(result)):\n if (i==j or j==k or k==i):\n break \n if((result[i] % 3 == result[j] % 3 == result[k] % 3 ) or (result[i] // 3 == result[j] // 3 == result[k] // 3) or (result[i] == 0 and result[j] == 4 and result[k] ==8 ) or (result[i] == 2 and result[j] == 4 and result[k] == 6 )):\n loopflag = True\n if loopflag:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", "A1 = list(map(int, input().split()))\nA2 = list(map(int, input().split()))\nA3 = list(map(int, input().split()))\nA = list()\nA.extend(A1)\nA.extend(A2)\nA.extend(A3)\nN = int(input())\nB = list()\nresult = list()\nfor _ in range(N):\n B.append(int(input()))\nfor e in B:\n if e in A:\n result.append(A.index(e))\nloopflag = False\nresult.sort()\nprint(result)\nif N >= 3:\n for i in range(len(result)):\n for j in range(len(result)):\n for k in range(len(result)):\n if (i!=j and j!=k and k!=i):\n if((result[i] % 3 == result[j] % 3 == result[k] % 3 ) or (result[i] // 3 == result[j] // 3 == result[k] // 3) or (result[i] == 0 and result[j] == 4 and result[k] ==8 ) or (result[i] == 2 and result[j] == 4 and result[k] == 6 )):\n loopflag = True\n if loopflag:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", "A1 = list(map(int, input().split()))\nA2 = list(map(int, input().split()))\nA3 = list(map(int, input().split()))\nA = list()\nA.extend(A1)\nA.extend(A2)\nA.extend(A3)\nN = int(input())\nB = list()\nresult = list()\nfor _ in range(N):\n B.append(int(input()))\nfor e in B:\n if e in A:\n result.append(A.index(e))\nloopflag = False\nresult.sort()\n# print(result)\nif N >= 3:\n for i in range(len(result)):\n for j in range(len(result)):\n for k in range(len(result)):\n if (i!=j and j!=k and k!=i):\n if((result[i] % 3 == result[j] % 3 == result[k] % 3 ) or (result[i] // 3 == result[j] // 3 == result[k] // 3) or (result[i] == 0 and result[j] == 4 and result[k] ==8 ) or (result[i] == 2 and result[j] == 4 and result[k] == 6 )):\n loopflag = True\n if loopflag:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s002964682', 's583233306', 's648903382', 's731122837', 's906564580', 's993983986'] | [3064.0, 3192.0, 3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 18.0, 18.0, 17.0, 18.0, 18.0] | [892, 923, 906, 906, 903, 905] |
p02760 | u922487073 | 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\nbingo = np.zeros((3,3))\nbin_bingo = np.zeros((3,3))\n\n\nfor i in range(3):\n bingo[i] = list(map(int, input().split()))\n\nN = int(input())\n\nfor _ in range(N):\n num = int(input())\n bin_bingo = np.logical_or(bin_bingo, bingo == num)\n\n# find bingo\nlin1 = np.array([[True, True, True], [False, False, False], [False, False, False]])\nlin2 = np.array([[False, False, False],[True, True, True], [False, False, False]])\nlin3 = np.array([[False, False, False], [False, False, False], [True, True, True]])\ncol1 = lin1.T\ncol2 = lin2.T\ncol3 = lin3.T\n\nsla1 = np.array([[True, False, False], [False, True, False], [False, False, True]])\nsla2 = np.array([[False, False, True], [False, True, False], [True, False, False]])\n\ndef is_bingo(src, tmp):\n return (np.logical_and(bin_bingo, sla1) == sla1).all()\n\nflg = False\nif is_bingo(bin_bingo, lin1):\n flg = True\nelif is_bingo(bin_bingo, lin2):\n flg = True\n \nelif is_bingo(bin_bingo, lin3):\n flg = True\n\nelif is_bingo(bin_bingo, col1):\n flg = True\nelif is_bingo(bin_bingo, col2):\n flg = True\nelif is_bingo(bin_bingo, col3):\n flg = True\nelif is_bingo(bin_bingo, sla1):\n flg = True\nelif is_bingo(bin_bingo, sla2):\n flg = True\n\nif flg:\n print('Yes')\nelse:\n print('No')", "import numpy as np\n\nbingo = np.zeros((3,3))\nbin_bingo = np.zeros((3,3))\n\nfor i in range(3):\n bingo[i] = list(map(int, input().split()))\n\n\n\nN = int(input())\n\nfor _ in range(N):\n num = int(input())\n bin_bingo = np.logical_or(bin_bingo, bingo == num)\n\n# find bingo\nlin1 = np.array([[True, True, True], [False, False, False], [False, False, False]])\nlin2 = np.array([[False, False, False],[True, True, True], [False, False, False]])\nlin3 = np.array([[False, False, False], [False, False, False], [True, True, True]])\ncol1 = lin1.T\ncol2 = lin2.T\ncol3 = lin3.T\n\nsla1 = np.array([[True, False, False], [False, True, False], [False, False, True]])\nsla2 = np.array([[False, False, True], [False, True, False], [True, False, False]])\n\ndef is_bingo(src, tmp):\n return (np.logical_and(src, tmp) == tmp).all()\n\nflg = False\nif is_bingo(bin_bingo, lin1):\n flg = True\nelif is_bingo(bin_bingo, lin2):\n flg = True\nelif is_bingo(bin_bingo, lin3):\n flg = True\nelif is_bingo(bin_bingo, col1):\n flg = True\nelif is_bingo(bin_bingo, col2):\n flg = True\nelif is_bingo(bin_bingo, col3):\n flg = True\nelif is_bingo(bin_bingo, sla1):\n flg = True\nelif is_bingo(bin_bingo, sla2):\n flg = True\n\nif flg:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s603455983', 's828059941'] | [3192.0, 12448.0] | [18.0, 151.0] | [1258, 1243] |
p02760 | u923270446 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["A = [input().split() for x in range(3)]\nN = int(input())\nB = [int(input()) for y in range(N)]\nindex1 = 0\nindex2 = 0\ncount1 = 0\ncount2 = 0\nMatch = {}\nfor number in B:\n for n in A:\n for m in n:\n if number == m:\n March['A[count1][count2]'] = m\n count2 += 1\n count1 += 1\n count2 = 0\n \n ", 'a = [list(map(int, input().split())) for i in range(3)]\nd = [[0] * 3 for i in range(3)]\nn = int(input())\nb = [int(input()) for i in range(n)]\ndef bingo(l1, l2):\n global d\n for i in l2:\n for j in range(3):\n for k in range(3):\n if l1[j][k] == i:\n d[j][k] = 1\n for i in range(3):\n if d[i][0] == 1 and d[i][1] == 1 and d[i][2] == 1:\n return "Yes"\n elif d[0][i] == 1 and d[1][i] == 1 and d[2][i] == 1:\n return "Yes"\n if d[0][0] == 1 and d[1][1] == 1 and d[2][2]:\n return "Yes"\n elif d[2][0] == 1 and d[1][1] == 1 and d[0][2]:\n return "Yes"\n else:\n return "No"\nprint(bingo(a,b))'] | ['Wrong Answer', 'Accepted'] | ['s604130094', 's579445556'] | [3060.0, 3064.0] | [19.0, 17.0] | [321, 699] |
p02760 | u933341648 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["a = [input().split() for _ in range(3)]\nn = int(input())\nb = [input() for _ in range(n)]\n\np = []\np += a\np += [list(a_) for a_ in zip(*a)]\np += [[a[x][x] for x in range(3)]]\np += [[a[x][2-x] for x in range(3)]]\n\nfor p_ in p:\n for x in p_:\n if x in b:\n continue\n else:\n break\n else:\n print('Yes')\nelse:\n print('No')", "a = [input().split() for _ in range(3)]\nn = int(input())\nb = [input() for _ in range(n)]\n\np = []\np += a\np += [list(a_) for a_ in zip(*a)]\np += [[a[x][x] for x in range(3)]]\np += [[a[x][2-x] for x in range(3)]]\n\nfor p_ in p:\n for x in p_:\n if x in b:\n continue\n else:\n break\n else:\n print('Yes')\n break\nelse:\n print('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s802277814', 's007536546'] | [3064.0, 3064.0] | [18.0, 20.0] | [365, 380] |
p02760 | u934052933 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['def main():\n a = [list(map(int, input().split())) for _ in range(3)]\n n = int(input())\n b = [int(input()) for _ in range(n)]\n card = [[0]*3]*3\n for i in range(n):\n for j in range(n):\n card[i][j] == False\n for k in range(n):\n if a[i][j] == b[k]:\n card[i][j] = True\n ans = "No"\n for i in range(3): \n if card[i][0] and card[i][1] and card[i][2]:\n ans = "Yes"\n for i in range(3): \n if card[0][i] and card[1][i] and card[2][i]:\n ans = "Yes"\n if card[0][0] and card[1][1] and card[2][2]:\n ans = "Yes"\n if card[0][2] and card[1][1] and card[2][0]:\n ans = "Yes"\n print(ans)\n\n \nif __name__ == "__main__":\n main()', 'def main():\n a = [list(map(int, input().split())) for _ in range(3)]\n n = int(input())\n b = [int(input()) for _ in range(n)]\n card = [[False]*3 for _ in range(3)]\n for i in range(3):\n for j in range(3):\n if a[i][j] in b:\n card[i][j] = True\n\n ans = "No"\n for i in range(3): \n if card[i][0] and card[i][1] and card[i][2]:\n ans = "Yes"\n for i in range(3): \n if card[0][i] and card[1][i] and card[2][i]:\n ans = "Yes"\n if card[0][0] and card[1][1] and card[2][2]:\n ans = "Yes"\n if card[0][2] and card[1][1] and card[2][0]:\n ans = "Yes"\n print(ans)\n\n \nif __name__ == "__main__":\n main()'] | ['Runtime Error', 'Accepted'] | ['s812292786', 's472144571'] | [3064.0, 3064.0] | [17.0, 17.0] | [789, 735] |
p02760 | u936285815 | 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. | ["f = list(map(int, input().split()))\ns = list(map(int, input().split()))\nt = list(map(int, input().split()))\nn = int(input())\nk = []\nfor i in range(n):\n k.append(int(input()))\n\nlis = []\n\nlis.append(f)\nlis.append(s)\nlis.append(t)\n\nans = 0\n\nfor i in lis:\n c =0\n for n in range(len(i)):\n if i[n] in k:\n i[n] = 'X'\n c += 1\n if c == 3:\n ans +=1\n break\n\nif f[0] == 'X' and s[0] == 'X' and t[0] == 'X':\n ans +=1\nelif f[1] == 'X' and s[1] == 'X' and t[1] == 'X':\n ans += 1\nelif f[2] == 'X' and s[2] == 'X' and t[2] == 'X':\n ans += 1\nelif f[0] == 'X' and s[1] == 'X' and t[3] == 'X':\n ans += 1\nelif f[3] == 'X' and s[2] == 'X' and t[1] == 'X':\n ans += 1\n \nif ans >= 1:\n print('Yes')\nelse:\n print('No')", "f = list(map(int, input().split()))\ns = list(map(int, input().split()))\nt = list(map(int, input().split()))\nn = int(input())\nk = []\nfor i in range(n):\n k.append(int(input()))\n\nlis = []\n\nlis.append(f)\nlis.append(s)\nlis.append(t)\n\nans = 0\n\nfor i in lis:\n c =0\n for n in range(len(i)):\n if i[n] in k:\n i[n] = 'X'\n c += 1\n if c == 3:\n ans +=1\n break\n\nif f[0] == 'X' and s[0] == 'X' and t[0] == 'X':\n ans +=1\nelif f[1] == 'X' and s[1] == 'X' and t[1] == 'X':\n ans += 1\nelif f[2] == 'X' and s[2] == 'X' and t[2] == 'X':\n ans += 1\nelif f[0] == 'X' and s[1] == 'X' and t[3] == 'X':\n ans += 1\nelif f[2] == 'X' and s[1] == 'X' and t[0] == 'X':\n ans += 1\n \nif ans >= 1:\n print('Yes')\nelif ans == 0:\n print('No')\n ", "f = list(map(int, input().split()))\ns = list(map(int, input().split()))\nt = list(map(int, input().split()))\nn = int(input())\nk = []\nfor i in range(n):\n k.append(int(input()))\n\nlis = []\n\nlis.append(f)\nlis.append(s)\nlis.append(t)\n\nans = 0\n\nfor i in lis:\n c =0\n for n in range(len(i)):\n if i[n] in k:\n i[n] = 'X'\n c += 1\n if c == 3:\n ans +=1\n break\n\nif f[0] == 'X' and s[0] == 'X' and t[0] == 'X':\n ans +=1\nelif f[1] == 'X' and s[1] == 'X' and t[1] == 'X':\n ans += 1\nelif f[2] == 'X' and s[2] == 'X' and t[2] == 'X':\n ans += 1\nelif f[0] == 'X' and s[1] == 'X' and t[3] == 'X':\n ans += 1\nelif f[3] == 'X' and s[2] == 'X' and t[1] == 'X':\n ans += 1\n \nif ans < 1:\n print('Yes')\nelse:\n print('No')", "\nf = list(map(int, input().split()))\ns = list(map(int, input().split()))\nt = list(map(int, input().split()))\nn = int(input())\nk = []\nfor i in range(n):\n k.append(int(input()))\n\nlis = []\n\nlis.append(f)\nlis.append(s)\nlis.append(t)\n\nans = 0\n\nfor i in lis:\n c =0\n for n in range(len(i)):\n if i[n] in k:\n i[n] = 'X'\n c += 1\n if c == 3:\n ans +=1\n break\n\nif f[0] == 'X' and s[0] == 'X' and t[0] == 'X':\n ans +=1\nelif f[1] == 'X' and s[1] == 'X' and t[1] == 'X':\n ans += 1\nelif f[2] == 'X' and s[2] == 'X' and t[2] == 'X':\n ans += 1\nelif f[0] == 'X' and s[1] == 'X' and t[3] == 'X':\n ans += 1\nelif f[3] == 'X' and s[2] == 'X' and t[1] == 'X':\n ans += 1\n \nif ans >= 1:\n print('Yes')\nelif ans == 0:\n print('No')", "f = list(map(int, input().split()))\ns = list(map(int, input().split()))\nt = list(map(int, input().split()))\nn = int(input())\nk = []\nfor i in range(n):\n k.append(int(input()))\n\nlis = []\n\nlis.append(f)\nlis.append(s)\nlis.append(t)\n\nans = 0\n\nfor i in lis:\n c =0\n for n in range(len(i)):\n if i[n] in k:\n i[n] = 'X'\n c += 1\n if c == 3:\n ans +=1\n break\n\nif f[0] == 'X' and s[0] == 'X' and t[0] == 'X':\n ans +=1\nelif f[1] == 'X' and s[1] == 'X' and t[1] == 'X':\n ans += 1\nelif f[2] == 'X' and s[2] == 'X' and t[2] == 'X':\n ans += 1\nelif f[0] == 'X' and s[1] == 'X' and t[2] == 'X':\n ans += 1\nelif f[2] == 'X' and s[1] == 'X' and t[0] == 'X':\n ans += 1\n \nif ans >= 1:\n print('Yes')\nelif ans == 0:\n print('No')"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s020517723', 's211396271', 's299435997', 's485589389', 's562453606'] | [3192.0, 3064.0, 3192.0, 3064.0, 3064.0] | [18.0, 18.0, 18.0, 18.0, 18.0] | [794, 812, 793, 804, 803] |
p02760 | u937782958 | 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 = []\nfor i in range(3):\n tmp = input()\n a.append(list(map(int, tmp.split())))\n\nn = int(input())\n# print('n', n)\nb = []\nfor j in range(n):\n b.append(int(input()))\n\n# print('a', a)\n# print('b', b)\n\ndef rep(a):\n for i in range(3):\n for j in range(3):\n if a[i][j] in b:\n a[i][j] = 0\n\ndef check(a):\n \n \n if a[0][0] == 0 & a[1][1] == 0 & a[2][2] == 0:\n print('Yes')\n exit()\n if a[0][2] == 0 & a[1][1] == 0 & a[2][0] == 0:\n print('Yes')\n exit()\n for i in range(3):\n if (a[0][i] == 0 & a[1][i] == 0 & a[2][i] == 0):\n print('Yes')\n exit()\n if a[i] == [0, 0, 0]:\n print('Yes')\n exit()\n print('No')\n\nrep(a)\ncheck(a)", "# -*- coding: utf-8 -*-\na = []\nfor i in range(3):\n tmp = input()\n a.append(list(map(int, tmp.split())))\n\nn = int(input())\n# print('n', n)\nb = []\nfor j in range(n):\n b.append(int(input()))\n\n# print('a', a)\n# print('b', b)\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\ndef check(a):\n \n \n if a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0:\n print('Yes')\n exit()\n if a[0][2] == 0 and a[1][1] == 0 and a[2][0] == 0:\n print('Yes')\n exit()\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 exit()\n if a[i] == [0, 0, 0]:\n print('Yes')\n exit()\n print('No')\n\ncheck(a)"] | ['Runtime Error', 'Accepted'] | ['s965494629', 's511260697'] | [2940.0, 3064.0] | [17.0, 17.0] | [814, 795] |
p02760 | u941438707 | 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)]\nb=[int(input()) for _ in range(int(input()))]\nfor i in range(3):\n for j in range(3):\n if a[i][j] in b:\n a[i][j]=0\nans="No" \nfor i in range(3):\n if a[i][0]==a[i][1]==a[i][2]==0:\n ans="Yes"\nfor i in range(3):\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) \nfor i in a:\n print(i)', 'a=[list(map(int,input().split())) for _ in range(3)]\nb=[int(input()) for _ in range(int(input()))]\nfor i in range(3):\n for j in range(3):\n if a[i][j] in b:\n a[i][j]=0\nans="No" \nfor i in range(3):\n if a[i][0]==a[i][1]==a[i][2]==0:\n ans="Yes"\nfor i in range(3):\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)'] | ['Wrong Answer', 'Accepted'] | ['s134632092', 's100449254'] | [3064.0, 3064.0] | [17.0, 17.0] | [490, 461] |
p02760 | u946346344 | 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 input():\n return sys.stdin.readline().strip()\n\ndef main():\n \n a = [[0]*3 for i in range(3)]\n for i in range(3):\n a[i] = list(map(int, input().split()))\n n = int(input())\n b = [0]*n\n bingo = "No"\n for i in range(n):\n b[i] = int(input())\n for k in range(3):\n if a[k][0] == b[i]:\n a[k][0] = 0\n if a[k][1] == b[i]:\n a[k][1] = 0\n if a[k][2] == b[i]:\n a[k][2] = 0\n for i in range(3):\n if a[i][0]+a[i][1]+a[i][2] == 0:\n bingo = "Yes"\n for i in range(3):\n if a[0][i]+a[1][i]+a[2][i] == 0:\n bingo = "Yes"\n if a[0][0]+a[1][1]+a[2][2] == 0:\n bingo = "Yes"\n if a[2][0]+a[1][1]+a[0][2] == 0:\n bingo = "Yes"\n \n print(bingo)\n', 'import sys\n\ndef input():\n return sys.stdin.readline().strip()\n\n\n \na = [[0]*3 for i in range(3)]\nfor i in range(3):\n a[i] = list(map(int, input().split()))\nn = int(input())\nb = [0]*n\nbingo = "No"\nfor i in range(n):\n b[i] = int(input())\n for k in range(3):\n if a[k][0] == b[i]:\n a[k][0] = 0\n if a[k][1] == b[i]:\n a[k][1] = 0\n if a[k][2] == b[i]:\n a[k][2] = 0\nfor i in range(3):\n if a[i][0]+a[i][1]+a[i][2] == 0:\n bingo = "Yes"\nfor i in range(3):\n if a[0][i]+a[1][i]+a[2][i] == 0:\n bingo = "Yes"\nif a[0][0]+a[1][1]+a[2][2] == 0:\n bingo = "Yes"\nif a[2][0]+a[1][1]+a[0][2] == 0:\n bingo = "Yes"\n \nprint(bingo)\n\n'] | ['Wrong Answer', 'Accepted'] | ['s138543500', 's763391091'] | [3064.0, 3064.0] | [17.0, 17.0] | [818, 700] |
p02760 | u946517952 | 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 = []\nfor i in range(3):\n a1,a2,a3 = map(int,input().split())\n card.append([a1,a2,a3])\nprint(card)\n\nn = int(input())\n\nfor i in range(n):\n num = int(input())\n for j in [0,1,2]:\n for k in [0,1,2]:\n if num == card[j][k]:\n card[j][k] = 0\nif card[0] == [0,0,0] or card[1] == [0,0,0] or card[2] == [0,0,0]:\n print('Yes')\nelif [card[i][0] for i in range(3)] == [0,0,0] or [card[i][1] for i in range(3)] == [0,0,0] or [card[i][2] for i in range(3)] == [0,0,0]:\n print('Yes')\nelif [card[0][0],card[1][1],card[2][2]] == [0,0,0] or [card[0][2],card[1][1],card[2][0]] == [0,0,0]:\n print('Yes')\nelse:\n print('No')\n", "card = []\nfor i in range(3):\n a1,a2,a3 = map(int,input().split())\n card.append([a1,a2,a3])\n\nn = int(input())\n\nfor i in range(n):\n num = int(input())\n for j in [0,1,2]:\n for k in [0,1,2]:\n if num == card[j][k]:\n card[j][k] = 0\nif card[0] == [0,0,0] or card[1] == [0,0,0] or card[2] == [0,0,0]:\n print('Yes')\nelif [card[i][0] for i in range(3)] == [0,0,0] or [card[i][1] for i in range(3)] == [0,0,0] or [card[i][2] for i in range(3)] == [0,0,0]:\n print('Yes')\nelif [card[0][0],card[1][1],card[2][2]] == [0,0,0] or [card[0][2],card[1][1],card[2][0]] == [0,0,0]:\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s195957631', 's457401205'] | [3064.0, 3064.0] | [17.0, 17.0] | [656, 644] |
p02760 | u947101138 | 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(N):\n b.append(int(input()))\n\nallnum=[]\nallnum.append(a1)\nallnum.append(a2)\nallnum.append(a3)\n\n\nbingo=[[0,0,0],[0,0,0],[0,0,0]]\n\nfor k in b:\n for i in range(3):\n for j in range(3):\n if(k==allnum[i][j]):\n bingo[i][j]=1\n\nfor i in range(3):\n if(bingo[i][0] and bingo[i][1] and bingo[i][2]):\n print("yes")\n exit()\nfor i in range(3):\n if(bingo[0][i] and bingo[1][i] and bingo[2][i]):\n print("yes")\n exit()\nif(bingo[0][0] and bingo[1][1] and bingo[2][2]):\n print("yes")\n exit()\n\nif(bingo[2][1] and bingo[1][1] and bingo[1][2]):\n print("yes")\n exit()\nprint("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=[]\n\nfor i in range(N):\n b.append(int(input()))\n\nallnum=[]\nallnum.append(a1)\nallnum.append(a2)\nallnum.append(a3)\n\n\nbingo=[[0,0,0],[0,0,0],[0,0,0]]\n\nfor k in b:\n for i in range(3):\n for j in range(3):\n if(k==allnum[i][j]):\n bingo[i][j]=1\n\nfor i in range(3):\n if(bingo[i][0] and bingo[i][1] and bingo[i][2]):\n print("Yes")\n exit()\nfor i in range(3):\n if(bingo[0][i] and bingo[1][i] and bingo[2][i]):\n print("Yes")\n exit()\nif(bingo[0][0] and bingo[1][1] and bingo[2][2]):\n print("Yes")\n exit()\n\nif(bingo[2][0] and bingo[1][1] and bingo[0][2]):\n print("Yes")\n exit()\nprint("No")'] | ['Wrong Answer', 'Accepted'] | ['s542957830', 's011075014'] | [3064.0, 3064.0] | [17.0, 17.0] | [796, 786] |
p02760 | u948779457 | 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())\nfor _ in range(N):\n b = int(input())\n for i in range(3):\n if A1[i] == b:\n A1[i] = 0\n for j in range(3):\n if A2[j] == b:\n A2[j] = 0\n for k in range(3):\n if A3[k] == b:\n A3[k] = 0\nprint(A1,A2,A3)\nif A1[0] == 0:\n if (A1[1]==0 and A1[2]==0) or (A2[0]==0 and A3[0]==0) or (A2[1]==0 and A3[2]==0):\n print('Yes')\n exit()\nif A2[0] == 0:\n if (A2[1]==0 and A2[2]==0):\n print('Yes')\n exit()\nif A3[0] == 0:\n if (A3[1]==0 and A3[2]==0) or (A2[1]==0 and A1[2]==0):\n print('Yes')\n exit()\nif A1[1] == 0:\n if (A2[1]==0 and A3[1]==0):\n print('Yes')\n exit()\nif A1[2] == 0:\n if (A2[2]==0 and A3[2]==0):\n print('Yes')\n exit()\nprint('No')", "A1 = list(map(int,input().split()))\nA2 = list(map(int,input().split()))\nA3 = list(map(int,input().split()))\nN = int(input())\nfor _ in range(N):\n b = int(input())\n for i in range(3):\n if A1[i] == b:\n A1[i] = 0\n for j in range(3):\n if A2[j] == b:\n A2[j] = 0\n for k in range(3):\n if A3[k] == b:\n A3[k] = 0\n\nif A1[0] == 0:\n if (A1[1]==0 and A1[2]==0) or (A2[0]==0 and A3[0]==0) or (A2[1]==0 and A3[2]==0):\n print('Yes')\n exit()\nif A2[0] == 0:\n if (A2[1]==0 and A2[2]==0):\n print('Yes')\n exit()\nif A3[0] == 0:\n if (A3[1]==0 and A3[2]==0) or (A2[1]==0 and A1[2]==0):\n print('Yes')\n exit()\nif A1[1] == 0:\n if (A2[1]==0 and A3[1]==0):\n print('Yes')\n exit()\nif A1[2] == 0:\n if (A2[2]==0 and A3[2]==0):\n print('Yes')\n exit()\nprint('No')"] | ['Wrong Answer', 'Accepted'] | ['s356476264', 's888302841'] | [3064.0, 3064.0] | [17.0, 17.0] | [804, 789] |
p02760 | u951401193 | 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\nb = [[0]*3]*3\nfor i in range(3):\n\ta[i] = list(map(int,input().split()))\n\nn = int(input())\n\nfor i in range(n):\n tmp = int(input())\n for j in range(3):\n for k in range(3):\n if a[i][j] == tmp:\n b[i][j] = 1\n if b[i][0]==1 and b[i][1]==1 and b[i][2]==1:\n print('Yes')\n exit()\n elif b[0][j]==1 and b[1][j]==1 and b[2][j] ==1:\n print('Yes')\n exit()\n elif b[0][0]==1 and b[1][1]==1 and b[2][2] ==1:\n print('Yes')\n exit()\n elif b[0][2]==1 and b[1][1]==1 and b[2][0] ==1:\n print('Yes')\n exit()\nprint('No')\n", 'ary=[list(map(int,input().split()))for p in range(3)]\nfor i in range(int(input())):\n data=int(input())\n for j in range(3):\n for k in range(3):\n if ary[j][k]==data:\n ary[j][k]=0\nans="No"\nfor i in range(3):\n if ary[i][0]==ary[i][1]==ary[i][2]==0 or ary[0][i]==ary[1][i]==ary[2][i]==0:\n ans="Yes"\nif ary[0][0]==ary[1][1]==ary[2][2]==0 or ary[2][0]==ary[1][1]==ary[0][2]==0:\n ans="Yes"\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s864182290', 's679567420'] | [3064.0, 3064.0] | [17.0, 17.0] | [623, 421] |
p02760 | u952708174 | 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 c_guess_the_number():\n N, M = [int(i) for i in input().split()]\n Conds = [[int(i) for i in input().split()] for j in range(M)]\n\n digit = [-1] * N\n \n for s, c in Conds:\n if digit[s - 1] not in (-1, c):\n return -1\n digit[s - 1] = c\n\n \n \n if digit[0] == 0:\n return -1 if N >= 2 else 0\n\n \n \n if N == 1 and M == 0:\n return 0\n for d, value in enumerate(digit):\n if value == -1:\n digit[d] = 0 if d != 0 else 1\n return ''.join(map(str, digit))\n\nprint(c_guess_the_number())", "SIZE = 3\nA = [[int(i) for i in input().split()] for j in range(SIZE)]\nN = int(input())\nB = [int(input()) for j in range(N)]\n\n\ndef rotate_counterclockwise(matrix):\n \n return list(map(list, zip(*matrix)))[::-1]\n\n\nfor b in B:\n for row in range(SIZE):\n for col in range(SIZE):\n if A[row][col] == b:\n A[row][col] = 0\nans = 'No'\nfor _ in range(2):\n \n for row in range(SIZE):\n if sum(A[row]) == 0:\n ans = 'Yes'\n if sum(A[k][k] for k in range(SIZE)) == 0:\n ans = 'Yes'\n \n A = rotate_counterclockwise(A)\n\nprint(ans)"] | ['Runtime Error', 'Accepted'] | ['s432326571', 's712794055'] | [3064.0, 3188.0] | [19.0, 19.0] | [966, 797] |
p02760 | u952854963 | 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=[]\nfor i in range(3):\n l.append(list(map(int, input().split())))\nn = int(input())\nfor i in range(n):\n m = int(input())\n\n for j in range(3):\n for k in range(3):\n if l[j][k] == m:\n l[j][k] = -1\no=0\np=0\nfor j in range(3):\n for k in range(3):\n o+=l[j][k]\n p+=l[k][j]\n if o==-3 or p==-3:\n print('Yes')\n exit()\n o=0\n p=0\nif l[0][0]+l[1][1]+l[2][2]==-3 or l[0][2]+l[1][1]+l[2][0]==-3:\n print('Yes2')\nelse:\n print('No')", "l=[]\nfor i in range(3):\n l.append(list(map(int, input().split())))\nn = int(input())\nfor i in range(n):\n m = int(input())\n\n for j in range(3):\n for k in range(3):\n if l[j][k] == m:\n l[j][k] = -1\no=0\np=0\nfor j in range(3):\n for k in range(3):\n o+=l[j][k]\n p+=l[k][j]\n if o==-3 or p==-3:\n print('Yes')\n exit()\n o=0\n p=0\nif l[0][0]+l[1][1]+l[2][2]==-3 or l[0][2]+l[1][1]+l[2][0]==-3:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s320036749', 's417117047'] | [3188.0, 3064.0] | [19.0, 17.0] | [501, 500] |
p02760 | u956257368 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["import numpy as np\nA = np.zeros((3,3), dtype=int)\nfor i in range(3):\n A[i,:] = list(map(int, input().split()))\nN = int(input())\nB = [int(input()) for _ in range(N)]\n\nA = A.flatten()\nfor a in range(len(A)):\n\n for b in range(N):\n if A[a] == B[b]:\n A[a] = -1\n\nprint(A.reshape(3,3))\n\nif A[0] == -1 and A[1] == -1 and A[2] == -1:\n print('Yes')\nelif A[3] == -1 and A[4] == -1 and A[5] == -1:\n print('Yes')\nelif A[6] == -1 and A[7] == -1 and A[8] == -1:\n print('Yes')\nelif A[0] == -1 and A[3] == -1 and A[6] == -1:\n print('Yes')\nelif A[1] == -1 and A[4] == -1 and A[6] == -1:\n print('Yes')\nelif A[2] == -1 and A[5] == -1 and A[8] == -1:\n print('Yes')\nelif A[0] == -1 and A[4] == -1 and A[8] == -1:\n print('Yes')\nelif A[2] == -1 and A[4] == -1 and A[6] == -1:\n print('Yes')\nelse:\n print('No')\n\n", "import numpy as np\nA = np.zeros((3,3), dtype=int)\nfor i in range(3):\n A[i,:] = list(map(int, input().split()))\nN = int(input())\nB = [int(input()) for _ in range(N)]\n\nA = A.flatten()\nfor a in range(len(A)):\n\n for b in range(N):\n if A[a] == B[b]:\n A[a] = -1\n\n\n\nif A[0] == -1 and A[1] == -1 and A[2] == -1:\n print('Yes')\nelif A[3] == -1 and A[4] == -1 and A[5] == -1:\n print('Yes')\nelif A[6] == -1 and A[7] == -1 and A[8] == -1:\n print('Yes')\nelif A[0] == -1 and A[3] == -1 and A[6] == -1:\n print('Yes')\nelif A[1] == -1 and A[4] == -1 and A[6] == -1:\n print('Yes')\nelif A[2] == -1 and A[5] == -1 and A[8] == -1:\n print('Yes')\nelif A[0] == -1 and A[4] == -1 and A[8] == -1:\n print('Yes')\nelif A[2] == -1 and A[4] == -1 and A[6] == -1:\n print('Yes')\nelse:\n print('No')\n\n"] | ['Wrong Answer', 'Accepted'] | ['s136760024', 's774506045'] | [12444.0, 12528.0] | [152.0, 147.0] | [837, 816] |
p02760 | u956547804 | 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())\nq=[[0,0,0],[0,0,0],[0,0,0]]\nb=[]\nb=[int(input()) for i in range(n)]\nfor i in b:\n for c in range(3):\n for x in range(3):\n if b==a[c][x]:\n q[c][x]==1\n\nresult='No'\nfor t in range(3):\n if q[t][0]==q[t][1]==q[t][2]==1:\n result='Yes'\n elif q[0][t]==q[1][t]==q[2][t]==1:\n result='Yes'\n elif q[0][0]==q[1][1]==q[2][2]==1:\n result='Yes'\n elif q[0][2]==q[1][1]==q[2][0]==1:\n result='Yes'\nprint(result)\n", "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())\nq=[[0,0,0],[0,0,0],[0,0,0]]\nfor i in range(n):\n b=int(input())\n for c in range(3):\n for x in range(3):\n if b==a[c][x]:\n q[c][x]=1\n\nresult='No'\nfor t in range(3):\n if q[t][0]==q[t][1]==q[t][2]==1:\n result='Yes'\n break\n elif q[0][t]==q[1][t]==q[2][t]==1:\n result='Yes'\n break\nif q[0][0]==q[1][1]==q[2][2]==1:\n result='Yes'\nelif q[0][2]==q[1][1]==q[2][0]==1:\n result='Yes'\n\nprint(result)\n"] | ['Wrong Answer', 'Accepted'] | ['s658186720', 's704910973'] | [3064.0, 3064.0] | [18.0, 17.0] | [598, 598] |
p02760 | u965095643 | 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\nbingo=[]\n\nfor _ in range(3):\n bingo.append(list(map(int, input().split())))\n\nn=int(input())\n\nfor i in range(n):\n a=int(input())\n for j in range(3):\n for k in range(3):\n if bingo[j][k] == a:\n bingo[j][k]=0\n\nprint(bingo)\n\nfor i in range(3):\n if bingo[i][0]==0 & bingo[i][1]==0 & bingo[i][2]==0:\n print('Yes')\n sys.exit()\n if bingo[0][i]==0 & bingo[1][i]==0 & bingo[2][i]==0:\n print('Yes')\n sys.exit()\n\nif bingo[0][0]==0 & bingo[1][1]==0 & bingo[2][2]==0:\n print('Yes')\n sys.exit()\n\nif bingo[0][2]==0 & bingo[1][1]==0 & bingo[2][0]==0:\n print('Yes')\n sys.exit()\n\nprint('No')", "import sys\n\nbingo=[]\n\nfor _ in range(3):\n bingo.append(list(map(int, input().split())))\n\nn=int(input())\n\nfor i in range(n):\n a=int(input())\n for j in range(3):\n for k in range(3):\n if bingo[j][k] == a:\n bingo[j][k]=0\n\n#print(bingo)\n\nfor i in range(3):\n if (bingo[i][0]==0) & (bingo[i][1]==0) & (bingo[i][2]==0):\n print('Yes')\n sys.exit()\n \n if (bingo[0][i]==0) & (bingo[1][i]==0) & (bingo[2][i]==0):\n print('Yes')\n sys.exit()\n\nif (bingo[0][0]==0) & (bingo[1][1]==0) & (bingo[2][2]==0):\n print('Yes')\n sys.exit()\n\nif (bingo[0][2]==0) & (bingo[1][1]==0) & (bingo[2][0]==0):\n print('Yes')\n sys.exit()\n\nprint('No')"] | ['Wrong Answer', 'Accepted'] | ['s957441500', 's708871770'] | [3064.0, 3064.0] | [17.0, 17.0] | [619, 647] |
p02760 | u968404618 | 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\nfor i in range(3):\n for j in range(3):\n if A[i][j] in B:\n A[i][j] = -1\n\nfor i in range(3):\n ans1, ans2 = 0, 0\n for j in range(3):\n if A[i][j] == -1:\n ans1 += 1\n if A[j][i] == -1:\n ans2 += 1\n if ans1 == 3 or ans2 == 3:\n print("Yes")\n exit()\n\nif (A[0][0] == -1 and A[1][1] == -1 and A[2][2] != -1) or \\\n (A[0][2] == -1 and A[1][1] != -1 and A[2][0] != -1):\n print("Yes")\nelse:\n print("No")', 'A = [list(map(int, input().split())) for _ in range(3)]\nn = int(input())\nB = [int(input()) for _ in range(n)]\n\nfor i in range(3):\n for j in range(3):\n if A[i][j] in B:\n A[i][j] = -1\n\nfor i in range(3):\n ans1, ans2 = 0, 0\n for j in range(3):\n if A[i][j] == -1:\n ans1 += 1\n if A[j][i] == -1:\n ans2 += 1\n if ans1 == 3 or ans2 == 3:\n print("Yes")\n exit()\n\nif (A[0][0] != -1 or A[1][1] != -1 or A[2][2] != -1) or \\\n (A[0][2] != -1 or A[1][1] != -1 or A[2][0] != -1):\n print("No")\nelse:\n print("Yes")', 'A = [list(map(int, input().split())) for _ in range(3)]\nn = int(input())\nB = [int(input()) for _ in range(n)]\n\nfor i in range(3):\n for j in range(3):\n if A[i][j] in B:\n A[i][j] = -1\n\nfor i in range(3):\n ans1, ans2 = 0, 0\n for j in range(3):\n if A[i][j] == -1:\n ans1 += 1\n if A[j][i] == -1:\n ans2 += 1\n if ans1 == 3 or ans2 == 3:\n print("Yes")\n exit()\n\nif (A[0][0] == -1 and A[1][1] == -1 and A[2][2] == -1) or \\\n (A[0][2] == -1 and A[1][1] == -1 and A[2][0] == -1):\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s055009886', 's563210936', 's647347426'] | [9144.0, 9116.0, 9144.0] | [28.0, 29.0, 30.0] | [591, 587, 591] |
p02760 | u968846084 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['import sys\nA=[[0]*3 for i in range(3)]\nfor i in range(3):\n A[i]=list(map(int,input().split()))\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]=10**10\nfor i in range(3):\n if sum(A[i])==3*10**10:\n print("Yes")\n sys.exit()\na=0\nfor i in range(3):\n a=a+A[i][0]\nif a==3**10**10:\n print("Yes")\n sys.exit()\na=0\nfor i in range(3):\n a=a+A[i][1]\nif a==3*10**10:\n print("Yes")\n sys.exit()\na=0\nfor i in range(3):\n a=a+A[i][2]\nif a==3*10**10:\n print("Yes")\n sys.exit()\nif A[0][0]+A[1][1]+A[2][2]==3*10**10 or A[0][2]+A[1][1]+A[2][0]==3*10**10:\n print("Yes")\n sys.exit()\nprint("No")', 'import sys\nA=[[0]*3 for i in range(3)]\nfor i in range(3):\n A[i]=list(map(int,input().split()))\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]=10**10\nfor i in range(3):\n if sum(A[i])==3*10**10:\n print("Yes")\n sys.exit()\na=0\nfor i in range(3):\n a=a+A[i][0]\nif a==3*10**10:\n print("Yes")\n sys.exit()\na=0\nfor i in range(3):\n a=a+A[i][1]\nif a==3*10**10:\n print("Yes")\n sys.exit()\na=0\nfor i in range(3):\n a=a+A[i][2]\nif a==3*10**10:\n print("Yes")\n sys.exit()\nif A[0][0]+A[1][1]+A[2][2]==3*10**10 or A[0][2]+A[1][1]+A[2][0]==3*10**10:\n print("Yes")\n sys.exit()\nprint("No")'] | ['Time Limit Exceeded', 'Accepted'] | ['s233757063', 's518328483'] | [9432.0, 3064.0] | [2104.0, 17.0] | [670, 669] |
p02760 | u970133396 | 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 isBingo(isOpen):\n if np.any(np.all(isOpen==1,axis=0)==True) or \\\n np.any(np.all(isOpen==1,axis=1)==True):\n return "Yes"\n cnt1=0\n cnt2=0\n for i in range(3):\n print(isOpen[i][i])\n if isOpen[i][i]==1:\n cnt1+=1\n if isOpen[i][2-i]==1:\n cnt2+=1\n if cnt1==3 or cnt2==3:\n return "Yes"\n else:\n return "No"\n\nbingo = [list(map(int, input().split())) for _ in range(3)]\nn = int(input().strip())\n\nisOpen=np.zeros([3,3],dtype=int)\nfor _ in range(n):\n b=int(input().strip())\n for i in range(3):\n for j in range(3):\n if b==bingo[i][j]:\n isOpen[i][j]=1\nprint(isBingo(isOpen))', 'import numpy as np\n\ndef isBingo(isOpen):\n if np.any(np.all(isOpen==1,axis=0)==True) or \\\n np.any(np.all(isOpen==1,axis=1)==True):\n return "Yes"\n cnt1=0\n cnt2=0\n for i in range(3):\n if isOpen[i][i]==1:\n cnt1+=1\n if isOpen[i][2-i]==1:\n cnt1+=1\n if cnt1==3 or cnt2==3:\n return "Yes"\n else:\n return "No"\n\nbingo = [list(map(int, input().split())) for _ in range(3)]\nn = int(input().strip())\n\nisOpen=np.zeros([3,3])\nfor _ in range(n):\n b=int(input().strip())\n for i in range(3):\n for j in range(3):\n if b==bingo[i][j]:\n isOpen[i][j]=1\nprint(isBingo(isOpen))', 'import numpy as np\n\ndef isBingo(isOpen):\n if np.any(np.all(isOpen==1,axis=0)==True) or \\\n np.any(np.all(isOpen==1,axis=1)==True):\n return "Yes"\n cnt1=0\n cnt2=0\n for i in range(3):\n if isOpen[i][i]==1:\n cnt1+=1\n if isOpen[i][2-i]==1:\n cnt2+=1\n if cnt1==3 or cnt2==3:\n return "Yes"\n else:\n return "No"\n\nbingo = [list(map(int, input().split())) for _ in range(3)]\nn = int(input().strip())\n\nisOpen=np.zeros([3,3],dtype=int)\nfor _ in range(n):\n b=int(input().strip())\n for i in range(3):\n for j in range(3):\n if b==bingo[i][j]:\n isOpen[i][j]=1\nprint(isBingo(isOpen))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s673664095', 's677551664', 's209313943'] | [12516.0, 12496.0, 14436.0] | [148.0, 149.0, 148.0] | [710, 672, 682] |
p02760 | u970899068 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["a= [list(map(int, input().split())) for i in range(3)]\nn=int(input())\nb=list(int(input()) for i in range(n))\nc=[[0,0,0] for i in range(3)]\n\nfor i in range(n):\n for j in range(3):\n for k in range(3):\n if b[i]==a[j][k]:\n c[j][k]=1\n\nif sum(c[0])==3 or sum(c[1])==3 or sum(c[2])==3:\n print('Yes')\n\nelif sum(list(map(lambda x: x[0], c)))==3 or sum(list(map(lambda x: x[1], c)))==3 or sum(list(map(lambda x: x[2], c)))==3:\n print('Yes')\n\nelif (c[0][0]==1 and c[1][1]==1 and c[2][2]==1) or (c[0][2]==1 and c[1][1]==1 and c[2][0]==1):\n print('Yes')\n\nelse:\n print('No')\n\nprint(sum(list(map(lambda x: x[0], c))))", "a= [list(map(int, input().split())) for i in range(3)]\nn=int(input())\nb=list(int(input()) for i in range(n))\nc=[[0,0,0] for i in range(3)]\n\nfor i in range(n):\n for j in range(3):\n for k in range(3):\n if b[i]==a[j][k]:\n c[j][k]=1\n\nif sum(c[0])==3 or sum(c[1])==3 or sum(c[2])==3:\n print('Yes')\n\nelif sum(list(map(lambda x: x[0], c)))==3 or sum(list(map(lambda x: x[1], c)))==3 or sum(list(map(lambda x: x[2], c)))==3:\n print('Yes')\n\nelif (c[0][0]==1 and c[1][1]==1 and c[2][2]==1) or (c[0][2]==1 and c[1][1]==1 and c[2][0]==1):\n print('Yes')\n\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s790734322', 's667619479'] | [3064.0, 3064.0] | [17.0, 17.0] | [650, 608] |
p02760 | u971124021 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["import numpy as np\nA = []\nfor 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 i,a in enumerate(A):\n for j,x in enumerate(a):\n if x in B:\n A[i][j] = 0\n\ndef bingo(x):\n if sum(x) == 0:\n print('yes')\n exit()\n\nfor x in A:\n bingo(x)\n\nAT = [list(x) for x in zip(*A)]\nfor x in AT:\n bingo(x)\n\nAD = [A[i][i] for i in range(3)]\nbingo(AD)\n\nAD = [A[2-i][2-i] for i in range(3)]\nbingo(AD)\n\nprint('No')\n", "import numpy as np\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\ndef bingo(X):\n for x in X:\n if sum(x) == 0:\n return 1\n return 0\n\nfor i,a in enumerate(A):\n for j,x in enumerate(a):\n if x in B:\n A[i][j] = 0\n\nif bingo(A):\n print('yes')\n exit()\n\nAT = []\nfor x in [list(x) for x in zip(*A)]:\n AT.append(x) \n\nif bingo(AT):\n print('yes')\n exit()\n\nAD = []\nAD1 = [0]*3\nAD2 = [0]*3\nfor i,x in enumerate(A):\n AD1[i] = x[i]\n AD2[i] = x[2-i]\nAD.append(AD1)\nAD.append(AD2)\n\nif bingo(AD):\n print('yes')\n exit()\n\nprint('No')\n", "import numpy as np\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\ndef bingo(X):\n for x in X:\n if sum(x) == 0:\n return 1\n return 0\n\nif bingo(A):\n print('yes')\n exit()\n\nAT = []\nfor x in [list(x) for x in zip(*A)]:\n AT.append(x) \n\nif bingo(AT):\n print('yes')\n exit()\n\nAD = []\nAD1 = [0]*3\nAD2 = [0]*3\nfor i,x in enumerate(A):\n AD1[i] = x[i]\n AD2[i] = x[2-i]\nAD.append(AD1)\nAD.append(AD2)\n\nif bingo(AD):\n print('yes')\n exit()\n\nprint('No')\n", "import numpy as np\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 i,a in enumerate(A):\n for j,x in enumerate(a):\n if x in B:\n A[i][j] = 0\n\ndef bingo(x):\n if sum(x) == 0:\n print('Yes')\n exit()\n\nfor x in A:\n bingo(x)\n\nAT = [list(x) for x in zip(*A)]\nfor x in AT:\n bingo(x)\n\nAD = [A[i][i] for i in range(3)]\nbingo(AD)\n\nAD = [A[i][2-i] for i in range(3)]\nbingo(AD)\n\nprint('No')\n"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s205892403', 's328023359', 's926659407', 's209887028'] | [12512.0, 12524.0, 12444.0, 12512.0] | [147.0, 156.0, 150.0, 155.0] | [490, 632, 546, 488] |
p02760 | u977642052 | 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(a: list, n: int, b: list):\n res = [[False, False, False], [False, False, False], [False, False, False]]\n for b in b:\n for i, a_row in enumerate(a):\n for j, a_col in enumerate(a_row):\n if b == a_col:\n res[i][j] = True\n\n for i in range(3):\n # row\n if False not in res[i]:\n print("Yes")\n return\n\n # col\n if False not in [res[i][0], res[i][1], res[i][2]]:\n print("Yes")\n return\n\n # cross\n # ->\n if False not in [res[0][0], res[1][1], res[2][2]]:\n print("Yes c")\n return\n\n # <-\n if False not in [res[0][2], res[1][1], res[2][0]]:\n print("Yes c")\n return\n\n print("No")\n\n\nif __name__ == "__main__":\n a = [list(map(int, input().split())) for _ in range(3)]\n n = int(input())\n b = [int(input()) for _ in range(n)]\n\n main(a, n, b)\n', 'def main(a: list, n: int, b: list):\n res = [[False, False, False], [False, False, False], [False, False, False]]\n for b in b:\n for i, a_row in enumerate(a):\n for j, a_col in enumerate(a_row):\n if b == a_col:\n res[i][j] = True\n\n for i in range(3):\n # row\n if False not in res[i]:\n print("Yes")\n return\n\n # col\n if False not in [res[0][i], res[1][i], res[2][i]]:\n print("Yes")\n return\n\n # cross\n # ->\n if False not in [res[0][0], res[1][1], res[2][2]]:\n print("Yes c")\n return\n\n # <-\n if False not in [res[0][2], res[1][1], res[2][0]]:\n print("Yes c")\n return\n\n print("No")\n\n\nif __name__ == "__main__":\n a = [list(map(int, input().split())) for _ in range(3)]\n n = int(input())\n b = [int(input()) for _ in range(n)]\n\n main(a, n, b)\n', 'def main(a: list, n: int, b: list):\n res = [[False, False, False], [False, False, False], [False, False, False]]\n for b in b:\n for i, a_row in enumerate(a):\n for j, a_col in enumerate(a_row):\n if b == a_col:\n res[i][j] = True\n\n for i in range(3):\n # row\n if False not in res[i]:\n print("Yes")\n return\n\n # col\n if False not in [res[0][i], res[1][i], res[2][i]]:\n print("Yes")\n return\n\n # cross\n # ->\n if False not in [res[0][0], res[1][1], res[2][2]]:\n print("Yes")\n return\n\n # <-\n if False not in [res[0][2], res[1][1], res[2][0]]:\n print("Yes")\n return\n\n print("No")\n\n\nif __name__ == "__main__":\n a = [list(map(int, input().split())) for _ in range(3)]\n n = int(input())\n b = [int(input()) for _ in range(n)]\n\n main(a, n, b)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s405379215', 's562269797', 's296549590'] | [3064.0, 3064.0, 3064.0] | [18.0, 17.0, 17.0] | [921, 921, 917] |
p02760 | u977771109 | 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\nrl = sys.stdin.readline\n\nrows = 3\ncols = 3\na11,a12,a13 = [int(x) for x in rl().split(\' \')]\na11,a12,a13 = [int(x) for x in rl().split(\' \')]\na31,a32,a33 = [int(x) for x in rl().split(\' \')]\n\nn = int(rl())\nb = []\n\nfor i in range(n):\n b.append(int(rl()))\n\n#####################\n\ncard = [a11,a12,a13,a1,a22,a23,a31,a32,a33]\n\nfor num in b:\n for i in range(len(card)):\n if card[i] == num:\n card[i] = 0\n\ndef check(card):\n for y in range(rows):\n if all([card[y*rows+x] == 0 for x in range(cols)]):\n return True\n\n # col\n for x in range(cols):\n if all([card[y*rows+x] == 0 for y in range(rows)]):\n return True\n\n # diagonal\n if all([card[xy*rows+xy] == 0 for xy in range(rows)]):\n return True\n\n if all([card[xy*rows+cols-1-xy] == 0 for xy in range(rows)]):\n return True\n\n return False\n\nif check(card):\n print("Yes")\nelse:\n print("No")\n', 'import sys\nrl = sys.stdin.readline\n\nrows = 3\ncols = 3\na11,a12,a13 = [int(x) for x in rl().split(\' \')]\na21,a22,a23 = [int(x) for x in rl().split(\' \')]\na31,a32,a33 = [int(x) for x in rl().split(\' \')]\n\nn = int(rl())\nb = []\n\nfor i in range(n):\n b.append(int(rl()))\n\n#####################\n\ncard = [a11,a12,a13,a21,a22,a23,a31,a32,a33]\n\nfor num in b:\n for i in range(len(card)):\n if card[i] == num:\n card[i] = 0\n\n\ndef check(card):\n for y in range(rows):\n if all([card[y*rows+x] == 0 for x in range(cols)]):\n return True\n\n # col\n for x in range(cols):\n if all([card[y*rows+x] == 0 for y in range(rows)]):\n return True\n\n # diagonal\n if all([card[xy*rows+xy] == 0 for xy in range(rows)]):\n return True\n\n if all([card[xy*rows+cols-1-xy] == 0 for xy in range(rows)]):\n return True\n\n return False\n\n\nif check(card):\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s725216881', 's103996288'] | [3064.0, 3064.0] | [17.0, 17.0] | [942, 945] |
p02760 | u981309686 | 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. | ["dic={}\na=[[0 for i in range(3)]for j in range(3)]\nfor i in range(1,100):\n dic[i]=[-1,-1]\nfor i in range(3):\n for j in range(3):\n x=int(input())\n a[i][j]=3\n dic[x]=[i,j]\nn=int(input())\nfor i in range(n):\n x=int(input())\n if(dic[x]!=[-1,-1]):\n a[dic[x][0],dic[x][1]]=0\nflag=0\nfor i in range(3):\n if(max(a[i][1],a[i][2],a[i][0])==0):\n flag=1\n break\n elif(max(a[1][i],a[2][i],a[3][i])==0):\n flag=1\n break\nif(max(a[0][0],a[1][1],a[2][2])==0):\n flag=1\nelif(max(a[0][2],a[1][1],a[2][0])==0):\n flag=1\nif(flag==1):\n print ('Yes')\nelse:\n print ('No')", "dic={}\na=[[0 for i in range(3)]for j in range(3)]\nfor i in range(1,100):\n dic[i]=[-1,-1]\nfor i in range(3):\n a[i]= list(map(int,input().split()))\n for j in range(3):\n dic[a[i][j]]=[i,j]\nn=int(input())\nfor i in range(n):\n x=int(input())\n if(dic[x]!=[-1,-1]):\n a[dic[x][0],dic[x][1]]=0\nflag=0\nfor i in range(3):\n if(max(a[i][1],a[i][2],a[i][0])==0):\n flag=1\n break\n elif(max(a[1][i],a[2][i],a[0][i])==0):\n flag=1\n break\nif(max(a[0][0],a[1][1],a[2][2])==0):\n flag=1\nelif(max(a[0][2],a[1][1],a[2][0])==0):\n flag=1\nif(flag==1):\n print ('Yes')\nelse:\n print ('No')", "dic={}\na=[[0 for i in range(3)]for j in range(3)]\nfor i in range(1,100):\n dic[i]=[-1,-1]\nfor i in range(3):\n for j in range(3):\n x=int(input())\n a[i][j]=3\n dic[x]=[i,j]\nn=int(input())\nfor i in range(n):\n x=int(input())\n if(dic[x]!=[-1,-1]):\n a[dic[x][0],dic[x][1]]=0\nflag=0\nfor i in range(3):\n if(max(a[i][1],a[i][2],a[i][0])==0):\n flag=1\n break\n elif(max(a[1][i],a[2][i],a[3][i])==0):\n flag=1\n break\nif(max(a[0][0],a[1][1],a[2][2])==0):\n flag=1\nelif(max(a[0][2],a[1][1],a[2][0])==0):\n flag=1\nif(flag==1):\n print ('Yes')\nelse:\n print ('No')\n\n \n", "dic={}\na=[]\nfor i in range(1,100):\n dic[i]=[-1,-1]\nfor i in range(3):\n a.append(list(map(int,input().split())))\n for j in range(3):\n dic[a[i][j]]=[i,j]\nn=int(input())\nfor i in range(n):\n x=int(input())\n if(dic[x]!=[-1,-1]):\n a[dic[x][0]][dic[x][1]]=0\nflag=0\nfor i in range(3):\n if(max(a[i][1],a[i][2],a[i][0])==0):\n flag=1\n break\n elif(max(a[1][i],a[2][i],a[0][i])==0):\n flag=1\n break\nif(max(a[0][0],a[1][1],a[2][2])==0):\n flag=1\nelif(max(a[0][2],a[1][1],a[2][0])==0):\n flag=1\nif(flag==1):\n print ('Yes')\nelse:\n print ('No')"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s117913800', 's305725851', 's507063531', 's101454393'] | [3064.0, 3064.0, 3064.0, 3192.0] | [17.0, 17.0, 18.0, 17.0] | [626, 632, 581, 599] |
p02760 | u982594421 | 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\nbingo = 'No'\n\nfor t in zip(*a):\n a.append(list(t))\n\na.append([a[i][i] for i in range(3)])\na.append([a[i][2-i]for i in range(3)])\n\nfor line in a:\n if all(item in b for item in a):\n bingo = 'Yes'\n\nprint(bingo)\n\n", "a = [list(map(int, input().split())) for _ in range(3)]\nn = int(input())\nb = [int(input()) for _ in range(n)]\n\nbingo = 'No'\n\nfor t in zip(*a):\n a.append(list(t))\n\na.append([a[i][i] for i in range(3)])\na.append([a[i][2-i]for i in range(3)])\n\nfor line in a:\n if all(item in b for item in line):\n bingo = 'Yes'\n break\n\nprint(bingo)\n\n"] | ['Wrong Answer', 'Accepted'] | ['s603331983', 's028302926'] | [8932.0, 9092.0] | [28.0, 27.0] | [333, 350] |
p02760 | u983181637 | 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 = [int(x) for x in input().split()]\nb = [int(x) for x in input().split()]\nc = [int(x) for x in input().split()]\n\nlist_ = set(a+b+c)\nn = int(input())\n\na = np.array([a, b, c])\n\nfor _ in range(n):\n x = int(input())\n if x in list_:\n a = np.where(a==x,0,a)\nif np.sum(a==0) < 3:\n print('No')\n quit()\n\nfor i in range(3):\n if sum(a[:,i]) == 0:\n print('Yes')\n quit()\n\nfor i in range(3):\n if sum(a[i,:]) == 0:\n print('Yes')\n quit()\n\nif a[0,0]+a[1,1]+a[2,2] == 0 or a[0,2]+a[1,1]+a[2,0] == 0:\n print('Yes')\n\nprint('No')", "import numpy as np\n\na = [int(x) for x in input().split()]\nb = [int(x) for x in input().split()]\nc = [int(x) for x in input().split()]\n\nlist_ = set(a+b+c)\nn = int(input())\n\na = np.array([a, b, c])\n\nfor _ in range(n):\n x = int(input())\n if x in list_:\n a = np.where(a==x,0,a)\n\nif np.sum(a==0) < 3:\n print('No')\n quit()\n\nfor i in range(3):\n if sum(a[:,i]) == 0:\n print('Yes')\n quit()\n\nfor i in range(3):\n if sum(a[i,:]) == 0:\n print('Yes')\n quit()\n\nif a[0,0]+a[1,1]+a[2,2] == 0 or a[0,2]+a[1,1]+a[2,0] == 0:\n print('Yes')\n quit()\n\nprint('No')"] | ['Wrong Answer', 'Accepted'] | ['s775181061', 's049259156'] | [21340.0, 20920.0] | [308.0, 340.0] | [552, 562] |
p02760 | u983327168 | 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\nlist1=[]\nlist3=["Bingo","Bingo","Bingo"]\nA1,A2,A3=map(str,input().split())\nA4,A5,A6=map(str,input().split())\nA7,A8,A9=map(str,input().split())\nn=int(input())\nlist1=[input() for i in range(1,n+1)]\nlist2=[[A1,A2,A3],\n [A4,A5,A6],\n [A7,A8,A9]]\nfor y in range(3):\n for x in range(n):\n if (list1[x] in list2[y])==True:\n s=list2[y].index(list1[x])\n list2[y][s]="Bingo"\n\nfor i in range(3):\n if list2[i]==list3:\n print("Yes")\n sys.exit()\n\nif list2[0][0]==list2[1][1] and list2[1][1]==list2[2][2]:\n print("Yes")\nelif list2[0][2]==list2[1][1] and list2[1][1]==list2[2][0]:\n print("Yes")\n\nfor z in range(3):\n if list2[z][0]==list3:\n print("Yes")\nfor g in range(3):\n if list2[g][1]==list3:\n print("Yes")\nfor h in range(3):\n if list2[h][2]==list3:\n prin("Yes")\nif n<=2:\n print("No")\nelse:\n print("No")\n ', 'list1=[]\nA1,A2,A3=map(int,input().split())\nA4,A5,A6=map(int,input().split())\nA7,A8,A9=map(int,input().split())\nN=int(input())\nfor i in range(1,N+1):\n list1.append(int(input()))\n\nlist2=[A1,A2,A3,\n A4,A5,A6,\n A7,A8,A9]\nfor x in range(N):\n if (list1[x] in list2)==True:\n list2[x]="Bingo"\n else:list2[x]="Not-Bingo"\n\nif list2[0]==list2[1]==list2[2]:\n print("Yes")\nif list2[0]==list2[3]==list[6]:\n print("Yes")\nif list2[3]==list[4]==list[5]:\n print("Yes")\nif list2[6]==list[7]==list[8]:\n print("Yes")\nif list2[1]==list[4]==list[7]:\n print("Yes")\nif list2[2]==list[5]==list[8]:\n print("Yes")\nif list2[0]==list2[4]==list[8]:\n print("Yes")\nif list2[2]==list[4]==list[6]:\n print("Yes")', 'import sys\nlist1=[]\nlist3=["Bingo","Bingo","Bingo"]\nA1,A2,A3=map(str,input().split())\nA4,A5,A6=map(str,input().split())\nA7,A8,A9=map(str,input().split())\nn=int(input())\nlist1=[input() for i in range(1,n+1)]\nlist2=[[A1,A2,A3],\n [A4,A5,A6],\n [A7,A8,A9]]\nfor y in range(3):\n for x in range(n):\n if (list1[x] in list2[y])==True:\n s=list2[y].index(list1[x])\n list2[y][s]="Bingo"\n\nfor i in range(3):\n if list2[i]==list3:\n print("Yes")\n sys.exit()\n\nif list2[0][0]==list2[1][1] and list2[1][1]==list2[2][2]:\n print("Yes")\nelif list2[0][2]==list2[1][1] and list2[1][1]==list2[2][0]:\n print("Yes")\n\nelif list2[0][0]==list2[1][0] and list2[1][0]==list2[2][0]:\n print("Yes")\nelif list2[0][1]==list2[1][1] and list2[1][1]==list2[2][1]:\n print("Yes")\nelif list2[0][2]==list2[1][2] and list2[1][2]==list2[2][2]:\n print("Yes")\nelif n<=2:\n print("No")\nelse:\n print("No")\n '] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s364579622', 's538541016', 's968125870'] | [3064.0, 3064.0, 3188.0] | [18.0, 18.0, 17.0] | [928, 722, 961] |
p02760 | u984276646 | 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 = [[0 for i in range(3)] for j in range(3)]\nfor i in range(N):\n a = int(input())\n for m in range(3):\n for n in range(3):\n if a == A[m][n]:\n B[m][n] = 1\np = 'No'\nfor i in range(3):\n cnt1 = 0\n cnt2 = 0\n for j in range(3):\n if B[i][j] == 1:\n cnt1 += 1\n if B[j][i] == 1:\n cnt2 += 1\n if cnt1 == 3 or cnt2 == 3:\n p = 'Yes'\n break\ncnt3, cnt4 = 0, 0\nfor i in range(3):\n if B[i][i] == 1:\n cnt3 += 1\n if B[i][3-i] == 1:\n cnt4 += 1\nif cnt3 == 3 or cnt4 == 3:\n p = 'Yes'\nprint(p)", "A = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\nB = [[0 for i in range(3)] for j in range(3)]\nfor i in range(N):\n a = int(input())\n for m in range(3):\n for n in range(3):\n if a == A[m][n]:\n B[m][n] = 1\np = 'No'\nfor i in range(3):\n cnt1 = 0\n cnt2 = 0\n for j in range(3):\n if B[i][j] == 1:\n cnt1 += 1\n if B[j][i] == 1:\n cnt2 += 1\n if cnt1 == 3 or cnt2 == 3:\n p = 'Yes'\n break\ncnt3, cnt4 = 0, 0\nfor i in range(3):\n if B[i][i] == 1:\n cnt3 += 1\n if B[i][2-i] == 1:\n cnt4 += 1\nif cnt3 == 3 or cnt4 == 3:\n p = 'Yes'\nprint(p)\n\n"] | ['Runtime Error', 'Accepted'] | ['s339100629', 's869795905'] | [3064.0, 3064.0] | [18.0, 17.0] | [594, 596] |
p02760 | u985041094 | 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 B():\n a = [list(map(int,input().split())) for i in range(3)]\n n = int(input())\n b = [list(map(int,input().split())) for i in range(n)]\n for bingo in b:\n for i in range(3):\n for j in range(3):\n if a[i][j] == bingo:\n a[i][j] = 0\n for i in range(3):\n if all(a[i][j] == 0 for in range(3)):\n print("Yes")\n return\n if all(a[j][i] == 0 for in range(3)):\n print("Yes")\n return\n if (a[0][0] == a[1][1] == a[2][2] == 0) or (a[0][2] == a[1][1] == a[2][0] == 0):\n print("Yes")\n return\n\n print("No")\nB()', 'def B():\n a = [list(map(int,input().split())) for i in range(3)]\n n = int(input())\n b = [list(int(input())) for i in range(n)]\n for bingo in b:\n for i in range(3):\n for j in range(3):\n if a[i][j] == bingo:\n a[i][j] = 0\n if (a[0][0] == a[1][1] == a[2][2] == 0) or (a[0][2] == a[1][1] == a[2][0] == 0):\n print("Yes")\n return\n for i in range(3):\n if all(a[i][j] == 0 for j in range(3)) or all(a[j][i] == 0 for j in range(3)):\n print("Yes")\n return\n print("No")\n', 'def B():\n a = [list(map(int,input().split())) for i in range(3)]\n n = int(input())\n b = [list(map(int,input().split())) for i in range(n)]\n import itertools\n a_list = list(itertools.chain.from_iterable(a))\n for bingo in b:\n if bingo in a_list:\n a_list[a_list.index(bingo)] = 0\n if (a_list[0+0] == a_list[3*1+1] == a_list[3*2+2] == 0) or (a_list[0+2] == a_list[3+1] == a_list[3*2] == 0):\n print("Yes")\n return\n for i in range(3):\n if (a_list[i*3+0] == a_list[i*3+1] == a_list[i*3+2] == 0) or (a_list[0+i] == a_list[3*1+i] == a_list[3*2+i] == 0):\n print("Yes")\n return\n print("No")\nB()', 'def B():\n a = [list(map(int,input().split())) for i in range(3)]\n n = int(input())\n b = [list(map(int,input().split())) for i in range(n)]\n for bingo in b:\n for i in range(3):\n for j in range(3):\n if a[i][j] == bingo:\n a[i][j] = 0\n if (a[0][0] == a[1][1] == a[2][2] == 0) or (a[0][2] == a[1][1] == a[2][0] == 0):\n print("Yes")\n return\n for i in range(3):\n if (a[i][0] == a[i][1] == a[i][2] == 0) or (a[0][i] == a[1][i] == a[2][i] == 0):\n print("Yes")\n return\n print("No")\nB()', 'def B():\n a = [list(map(int,input().split())) for i in range(3)]\n n = int(input())\n b = [list(int(input())) for i in range(n)]\n for bingo in b:\n for i in range(3):\n for j in range(3):\n if a[i][j] == bingo:\n a[i][j] = 0\n if (a[0][0] == a[1][1] == a[2][2] == 0) or (a[0][2] == a[1][1] == a[2][0] == 0):\n print("Yes")\n return\n for i in range(3):\n if all(a[i][j] == 0 for j in range(3)) or all(a[j][i] == 0 for j in range(3)):\n print("Yes")\n return\n print("No")\nB()', "def B():\n mat = [list(map(int,input().split())) for i in range(3)]\n n = int(input())\n b = [list(map(int,input().split())) for i in range(n)]\n for bingo in b:\n for i in range(3):\n for j in range(3):\n if mat[i][j] == bingo:\n mat[i][j] = 0\nfor i in range(3):\n if all(mat[i][j] == 0 for j in range(3)):\n print('Yes')\n break\n if all(mat[j][i] == 0 for j in range(3)):\n print('Yes')\n break\nelse:\n if mat[0][0] == mat[1][1] == mat[2][2] == 0 or\\\n mat[0][2] == mat[1][1] == mat[2][0] == 0:\n print('Yes')\n else:\n print('No')\nB()", 'def B():\n a = [list(map(int,input().split())) for i in range(3)]\n n = int(input())\n b = [list(map(int,input().split())) for i in range(n)]\n import itertools\n a_list = list(itertools.chain.from_iterable(a))\n if a_list[0] in b and a_list[4] in b and a_list[8] in b:\n print("Yes")\n return\n for i in range(3):\n row = True\n col = True\n dig = True\n for j in range(3):\n if row and a_list[i*3+j] not in b:\n row = False\n if col and a_list[j*3+i] not in b:\n col = False\n if row or col:\n print("Yes")\n return\n print("No")\nB()', "def B():\n mat = [list(map(int,input().split())) for i in range(3)]\n n = int(input())\n b = [list(map(int,input().split())) for i in range(n)]\n for bingo in b:\n for i in range(3):\n for j in range(3):\n if mat[i][j] == bingo:\n mat[i][j] = 0\n for i in range(3):\n if all(mat[i][j] == 0 for j in range(3)):\n print('Yes')\n break\n if all(mat[j][i] == 0 for j in range(3)):\n print('Yes')\n break\n else:\n if mat[0][0] == mat[1][1] == mat[2][2] == 0 or\\\n mat[0][2] == mat[1][1] == mat[2][0] == 0:\n print('Yes')\n else:\n print('No')\nB()", 'def B():\n a = [list(map(int,input().split())) for i in range(3)]\n n = int(input())\n b = [list(map(int,input().split())) for i in range(n)]\n bingo = [0]*9\n for i in range(3):\n for j in range(3):\n if a[i][j] in b:\n bingo[i*3+j] = 1\n if (bingo[0+0] == bingo[3*1+1] == bingo[3*2+2] == 1) or (bingo[0+2] == bingo[3+1] == bingo[3*2] == 1):\n print("Yes")\n return\n for i in range(3):\n if (bingo[i*3+0] == bingo[i*3+1] == bingo[i*3+2] == 1) or (bingo[0+i] == bingo[3*1+i] == bingo[3*2+i] == 1):\n print("Yes")\n return\n print("No")\nB()', "def B():\n mat = [list(map(int,input().split())) for i in range(3)]\n n = int(input())\n b = [list(map(int,input().split())) for i in range(n)]\n for bingo in b:\n for i in range(3):\n for j in range(3):\n if mat[i][j] == bingo:\n mat[i][j] = 0\n for i in range(3):\n if all(mat[i][j] == 0 for j in range(3)):\n print('Yes')\n break\n if all(mat[j][i] == 0 for j in range(3)):\n print('Yes')\n break\n else:\n if mat[0][0] == mat[1][1] == mat[2][2] == 0 or\\\n mat[0][2] == mat[1][1] == mat[2][0] == 0:\n print('Yes')\n else:\n print('No')\nB()", 'def B():\n a = [list(map(int,input().split())) for i in range(3)]\n n = int(input())\n b = [list(map(int,input().split())) for i in range(n)]\n for bingo in b:\n for i in range(3):\n for j in range(3):\n if a[i][j] == bingo:\n a[i][j] = 0\n for i in range(3):\n if (a[i][0] == a[i][1] == a[i][2] == 0):\n print("Yes")\n return\n if (a[0][i] == a[1][i] == a[2][i] == 0):\n print("Yes")\n return\n if (a[0][0] == a[1][1] == a[2][2] == 0) or (a[0][2] == a[1][1] == a[2][0] == 0):\n print("Yes")\n return\n\n print("No")\nB()', 'def B():\n a = [list(map(int,input().split())) for i in range(3)]\n n = int(input())\n b = [list(map(int,input().split())) for i in range(n)]\n for bingo in b:\n for i in range(3):\n for j in range(3):\n if a[i][j] == bingo:\n a[i][j] = 0\n for i in range(3):\n if all(a[i][j] == 0 for j in range(3)):\n print("Yes")\n return\n if all(a[j][i] == 0 for j in range(3)):\n print("Yes")\n return\n if (a[0][0] == a[1][1] == a[2][2] == 0) or (a[0][2] == a[1][1] == a[2][0] == 0):\n print("Yes")\n return\n\n print("No")\nB()', 'def B():\n a = [list(map(int,input().split())) for i in range(3)]\n n = int(input())\n b = [list(map(int,input().split())) for i in range(n)]\n bingo = [0]*9\n for i in range(3):\n for j in range(3):\n if a[i][j] in b:\n bingo[i*3+j] = 1\n if (bingo[0] == bingo[3+1] == bingo[3*2+2] == 1) or (bingo[2] == bingo[3+1] == bingo[3*2] == 1):\n print("Yes")\n return\n for i in range(3):\n if (bingo[i*3+0] == bingo[i*3+1] == bingo[i*3+2] == 1) or (bingo[0+i] == bingo[3*1+i] == bingo[3*2+i] == 1):\n print("Yes")\n return\n print("No")\nB()', 'def B():\n a = [list(map(int,input().split())) for i in range(3)]\n n = int(input())\n b = [list(map(int,input().split())) for i in range(n)]\n for bingo in b:\n for i in range(3):\n for j in range(3):\n if a[i][j] == bingo:\n a[i][j] = 0\n if (a[0][0] == a[1][1] == a[2][2] == 0) or (a[0][2] == a[1][1] == a[2][0] == 0):\n print("Yes")\n return\n for i in range(3):\n if (a[i][0] == a[i][1] == a[i][2] == 0):\n print("Yes")\n return\n if (a[0][i] == a[1][i] == a[2][i] == 0):\n print("Yes")\n return\n print("No")\nB()', "def B():\n mat = [list(map(int,input().split())) for i in range(3)]\n n = int(input())\n \n for bingo in (int(input()) for _ in range(N)):\n for i in range(3):\n for j in range(3):\n if mat[i][j] == bingo:\n mat[i][j] = 0\n for i in range(3):\n if all(mat[i][j] == 0 for j in range(3)):\n print('Yes')\n break\n if all(mat[j][i] == 0 for j in range(3)):\n print('Yes')\n break\n else:\n if mat[0][0] == mat[1][1] == mat[2][2] == 0 or\\\n mat[0][2] == mat[1][1] == mat[2][0] == 0:\n print('Yes')\n else:\n print('No')\nB()", 'def B():\n a = [list(map(int,input().split())) for i in range(3)]\n n = int(input())\n b = [int(input()) for i in range(n)]\n for bingo in b:\n for i in range(3):\n for j in range(3):\n if a[i][j] == bingo:\n a[i][j] = 0\n if (a[0][0] == a[1][1] == a[2][2] == 0) or (a[0][2] == a[1][1] == a[2][0] == 0):\n print("Yes")\n return\n for i in range(3):\n if all(a[i][j] == 0 for j in range(3)) or all(a[j][i] == 0 for j in range(3)):\n print("Yes")\n return\n print("No")\n\nB()'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s042437379', 's141574323', 's256603074', 's273369363', 's405251517', 's425845868', 's482778028', 's505771687', 's561567052', 's575736227', 's724208641', 's761036040', 's777867426', 's884683760', 's914366571', 's777997352'] | [3060.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.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, 18.0, 18.0, 17.0, 18.0, 17.0, 18.0, 20.0, 18.0, 18.0, 17.0, 18.0, 17.0] | [639, 574, 671, 591, 577, 648, 661, 700, 624, 700, 645, 643, 618, 644, 733, 572] |
p02760 | u987326700 | 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 = []\nb = []\n\nfor i in range(3):\n tmp = list(map(int,input().split()))\n bingo.append(tmp)\n\nn = int(input())\n\nwhile True:\n try:\n b.append(int(input()))\n except EOFError:\n break\n\nlis1 = [bingo[0][0],bingo[0][1],bingo[0][2]]\nlis2 = [bingo[1][0],bingo[1][1],bingo[1][2]]\nlis3 = [bingo[2][0],bingo[2][1],bingo[2][2]]\n\nlis4 = [bingo[0][0],bingo[1][0],bingo[2][0]]\nlis5 = [bingo[0][1],bingo[1][1],bingo[2][1]]\nlis6 = [bingo[0][2],bingo[1][2],bingo[2][2]]\n\nlis7 = [bingo[0][0],bingo[1][1],bingo[2][2]]\nlis8 = [bingo[0][2],bingo[1][1],bingo[2][0]]\n\nallList = [lis1,lis2,lis3,lis4,lis5,lis6,lis7,lis8]\n\nprint(allList)\nfor i in allList:\n cnt = 0\n for _ in range(3):\n if i[_] in b:\n cnt +=1\n if cnt ==3:\n print("Yes")\n exit()\nprint("No")', 'bingo = []\nb = []\n\nfor i in range(3):\n tmp = list(map(int,input().split()))\n bingo.append(tmp)\n\nn = int(input())\n\nwhile True:\n try:\n b.append(int(input()))\n except EOFError:\n break\n\nlis1 = [bingo[0][0],bingo[0][1],bingo[0][2]]\nlis2 = [bingo[1][0],bingo[1][1],bingo[1][2]]\nlis3 = [bingo[2][0],bingo[2][1],bingo[2][2]]\n\nlis4 = [bingo[0][0],bingo[1][0],bingo[2][0]]\nlis5 = [bingo[0][1],bingo[1][1],bingo[2][1]]\nlis6 = [bingo[0][2],bingo[1][2],bingo[2][2]]\n\nlis7 = [bingo[0][0],bingo[1][1],bingo[2][2]]\nlis8 = [bingo[0][2],bingo[1][1],bingo[2][0]]\n\n\nprint(allList)\nfor i in allList:\n cnt = 0\n for _ in range(3):\n if i[_] in b:\n cnt +=1\n if cnt ==3:\n print("Yes")\n exit()\nprint("No")', 'bingo = []\nb = []\n\nfor i in range(3):\n tmp = list(map(int,input().split()))\n bingo.append(tmp)\n\nn = int(input())\n\nwhile True:\n try:\n b.append(int(input()))\n except EOFError:\n break\n\nlis1 = [bingo[0][0],bingo[0][1],bingo[0][2]]\nlis2 = [bingo[1][0],bingo[1][1],bingo[1][2]]\nlis3 = [bingo[2][0],bingo[2][1],bingo[2][2]]\n\nlis4 = [bingo[0][0],bingo[1][0],bingo[2][0]]\nlis5 = [bingo[0][1],bingo[1][1],bingo[2][1]]\nlis6 = [bingo[0][2],bingo[1][2],bingo[2][2]]\n\nlis7 = [bingo[0][0],bingo[1][1],bingo[2][2]]\nlis8 = [bingo[0][2],bingo[1][1],bingo[2][0]]\n\nallList = [lis1,lis2,lis3,lis4,lis5,lis6,lis7,lis8]\n\nfor i in allList:\n cnt = 0\n for _ in range(3):\n if i[_] in b:\n cnt +=1\n if cnt ==3:\n print("Yes")\n exit()\nprint("No")'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s848876545', 's954013663', 's170359842'] | [3064.0, 3064.0, 3064.0] | [18.0, 18.0, 17.0] | [757, 705, 742] |
p02760 | u989348352 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['import itertools\n\nA = []\nA1 = [int(i) for i in input().split()]\nA.append(A1)\nA2 = [int(i) for i in input().split()]\nA.append(A2)\nA3 = [int(i) for i in input().split()]\nA.append(A3)\n\nf = [[0] * 3 for i in range(3)]\n\n#print(A)\n\n\nN = int(input ())\nb = [input().split() for i in range(N)]\nb= list(itertools.chain.from_iterable(b))\nb = list(map(int, b))\nprint(b)\n\nfor i in range(3):\n for j in range(3):\n for x in b:\n if A[i][j] == x:\n f[i][j] = 1\ns = 0\n\nfor i in range(3):\n if sum(f[i]) == 3:\n s = 1\n if f[0][0] + f[1][1] + f[2][2] == 3:\n s = 1\n if f[0][2] + f[1][1] + f[2][0] == 3:\n s = 1\n for j in range(3):\n if f[0][j] + f[1][j] + f[2][j] == 3:\n s = 1\n \n \n \nif s == 1:\n print("Yes")\nelse:\n print("No")\n\n\n', 'import itertools\n\nA = []\nA1 = [int(i) for i in input().split()]\nA.append(A1)\nA2 = [int(i) for i in input().split()]\nA.append(A2)\nA3 = [int(i) for i in input().split()]\nA.append(A3)\n\nf = [[0] * 3 for i in range(3)]\n\n#print(A)\n\n\nN = int(input ())\nb = [input().split() for i in range(N)]\nb= list(itertools.chain.from_iterable(b))\nb = list(map(int, b))\n\nfor i in range(3):\n for j in range(3):\n for x in b:\n if A[i][j] == x:\n f[i][j] = 1\ns = 0\n\nfor i in range(3):\n if sum(f[i]) == 3:\n s = 1\n if f[0][0] + f[1][1] + f[2][2] == 3:\n s = 1\n if f[0][2] + f[1][1] + f[2][0] == 3:\n s = 1\n for j in range(3):\n if f[0][j] + f[1][j] + f[2][j] == 3:\n s = 1\n \n \n \nif s == 1:\n print("Yes")\nelse:\n print("No")\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s343388134', 's371862587'] | [3064.0, 3064.0] | [17.0, 18.0] | [824, 815] |
p02760 | u995062424 | 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. | ['port numpy as np\nFlg = "No"\nA = [[0]*3 for i in range(3)]\nfor i in range(3):\n A[i][0], A[i][1], A[i][2] = map(int, input().split()) \nN = int(input())\nb = [0]*N\nfor j in range(N):\n b[j] = int(input())\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] = "*"\nA_T = np.array(A).T\n \nfor i in range(3):\n if(A[i][0] == A[i][1] == A[i][2] == "*"):\n Flg = "Yes" \n break\n if(A_T[i][0] == A_T[i][1] == A_T[i][2] == "*"):\n Flg = "Yes"\n break\n\nif(A[0][0] == A[1][1] == A[2][2] == "*"):\n Flg = "Yes"\n\nif(A[0][2] == A[1][1] == A[2][0] == "*"):\n Flg = "Yes"\n\nprint(Flg)', 'import numpy as np\nFlg = "No"\nA = [[0]*3]*3\nb = [0]*N\nfor i in range(3):\n A[i][0], A[i][1], A[i][2] = map(int, input().split()) \nN = int(input())\nfor j in range(N):\n b[j] = int(input())\n \nfor i in range(3):\n for j in range(3):\n for k in range(N):\n if(A[i][j] == b[k]):\n A[i][j] = 0\nA_T = np.array(A).T\n \nfor i in range(3):\n if(A[i][0] == A[i][1] == A[i][2] == 0):\n Flg = "Yes" \n break\n if(A_T[i][0] == A_T[i][1] == A_T[i][2] == 0):\n Flg = "Yes"\n break\n\nif(A[0][0] == A[1][1] == A[2][2] == 0):\n Flg = "Yes"\n\nprint(Flg)', 'import numpy as np\nFlg = "No"\nA = [[0]*3 for i in range(3)]\nfor i in range(3):\n A[i][0], A[i][1], A[i][2] = map(int, input().split()) \nN = int(input())\nb = [0]*N\nfor j in range(N):\n b[j] = int(input())\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] = "*"\nA_T = np.array(A).T\n \nfor i in range(3):\n if(A[i][0] == A[i][1] == A[i][2] == "*"):\n Flg = "Yes" \n break\n if(A_T[i][0] == A_T[i][1] == A_T[i][2] == "*"):\n Flg = "Yes"\n break\n\nif(A[0][0] == A[1][1] == A[2][2] == "*"):\n Flg = "Yes"\n\nif(A[0][2] == A[1][1] == A[2][0] == "*"):\n Flg = "Yes"\n\nprint(Flg)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s081517082', 's229899044', 's705837869'] | [2940.0, 21520.0, 12516.0] | [17.0, 304.0, 150.0] | [701, 624, 703] |
p02760 | u995419623 | 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()))\nd = [a[0],b[0],c[0]]\ne = [a[1],b[1],c[1]]\nf = [a[2],b[2],c[2]]\ng = [a[0],b[1],c[2]]\nh = [a[2],b[1],c[0]]\n\nn = int(input())\n\nbs = []\nfor _ in range(n):\n bs.append(int(input())\n \nfor l in [a,b,c,d,e,f,g,h]:\n if (l[0] in bs) and (l[1] in bs) and (l[2] in bs):\n print("Yes")\n break\nelse:\n print("No")\n', 'a = list(map(int,input().split()))\nb = list(map(int,input().split()))\nc = list(map(int,input().split()))\nd = [a[0],b[0],c[0]]\ne = [a[1],b[1],c[1]]\nf = [a[2],b[2],c[2]]\ng = [a[0],b[1],c[2]]\nh = [a[2],b[1],c[0]]\n\nn = int(input())\n\nbs = []\nfor _ in int(input(range(n))):\n bs.append(int(input())\n \nfor l in [a,b,c,d,e,f,g,h]\n if (l[0] in bs) and (l[1] in bs) and (l[2] in bs):\n print("Yes")\n break\nelse:\n print("No")', 'a = list(map(int,input().split()))\nb = list(map(int,input().split()))\nc = list(map(int,input().split()))\nd = [a[0],b[0],c[0]]\ne = [a[1],b[1],c[1]]\nf = [a[2],b[2],c[2]]\ng = [a[0],b[1],c[2]]\nh = [a[2],b[1],c[0]]\n\nn = int(input())\n\nbs = []\nfor _ in range(n):\n bs.append(int(input())\n \nfor l in [a,b,c,d,e,f,g,h]:\n if (l[0] in bs) and (l[1] in bs) and (l[2] in bs):\n print("Yes")\n break\nelse:\n print("No")\n', 'a = list(map(int,input().split()))\nb = list(map(int,input().split()))\nc = list(map(int,input().split()))\nd = [a[0],b[0],c[0]]\ne = [a[1],b[1],c[1]]\nf = [a[2],b[2],c[2]]\ng = [a[0],b[1],c[2]]\nh = [a[2],b[1],c[0]]\n\nn = int(input())\n\nbs = []\nfor _ in range(n):\n bs.append(int(input())\n \nfor l in [a,b,c,d,e,f,g,h]:\n if (l[0] in bs) and (l[1] in bs) and (l[2] in bs):\n print("Yes")\n break\nelse:\n print("No")\n', 'a', 'a = list(map(int(),input().split()))\nb = list(map(int(),input().split()))\nc = list(map(int(),input().split()))\nd = [a[0],b[0],c[0]]\ne = [a[1],b[1],c[1]]\nf = [a[2],b[2],c[2]]\ng = [a[0],b[1],c[2]]\nh = [a[2],b[1],c[0]]\n\nn = int(input())\n\nbs = []\nfor _ in range(n):\n bs.append(int(input())\n \nfor l in [a,b,c,d,e,f,g,h]\n if (l[0] in bs) and (l[1] in bs) and (l[2] in bs):\n print("Yes")\n break\nelse:\n print("No")\n', 'a = list(map(int(),input().split()))\nb = list(map(int(),input().split()))\nc = list(map(int(),input().split()))\nd = [a[0],b[0],c[0]]\ne = [a[1],b[1],c[1]]\nf = [a[2],b[2],c[2]]\ng = [a[0],b[1],c[2]]\nh = [a[2],b[1],c[0]]\n\nn = int(input())\n\nbs = []\nfor _ in int(input(range(n))):\n bs.append(int(input())\n \nfor l in [a,b,c,d,e,f,g,h]\n if (l[0] in bs) and (l[1] in bs) and (l[2] in bs):\n print("Yes")\n break\nelse:\n print("No")\n', 'a = list(map(int,input().split()))\nb = list(map(int,input().split()))\nc = list(map(int,input().split()))\nd = [a[0],b[0],c[0]]\ne = [a[1],b[1],c[1]]\nf = [a[2],b[2],c[2]]\ng = [a[0],b[1],c[2]]\nh = [a[2],b[1],c[0]]\n\nn = int(input())\n\nbs = []\nfor _ in range(n):\n bs.append(int(input()))\n \nfor l in [a,b,c,d,e,f,g,h]:\n if (l[0] in bs) and (l[1] in bs) and (l[2] in bs):\n print("Yes")\n break\nelse:\n print("No")\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s154692704', 's241057757', 's258428628', 's437552352', 's517291459', 's868069683', 's896208286', 's814224380'] | [3064.0, 3064.0, 3064.0, 3064.0, 2940.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 19.0] | [440, 478, 431, 468, 1, 473, 485, 432] |
p02760 | u996564551 | 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 = input().split(' ')\nA21, A22, A23 = input().split(' ')\nA31, A32, A33 = input().split(' ')\nN = int(input())\nb = []\nfor i in range(N):\n b = input()\nif A11 and A12 and A13 in b:\n print('Yes')\nelif A21 and A22 and A23 in b:\n print('Yes')\nelif A31 and A32 and A33 in b:\n print('Yes')\nelif A11 and A21 and A31 in b:\n print('Yes')\nelif A12 and A22 and A32 in b:\n print('Yes')\nelif A13 and A23 and A33 in b:\n print('Yes')\nelif A11 and A22 and A33 in b:\n print('Yes')\nelif A13 and A22 and A31 in b:\n print('Yes')\nelse:\n print('No')", "A11, A12, A13 = input().split(' ')\nA21, A22, A23 = input().split(' ')\nA31, A32, A33 = input().split(' ')\nA11 = int(A11)\nA12 = int(A12)\nA13 = int(A13)\nA21 = int(A21)\nA22 = int(A22)\nA23 = int(A23)\nA31 = int(A31)\nA32 = int(A32)\nA33 = int(A33)\nN = int(input())\nb = []\nfor i in range(N):\n bi = int(input())\n b.append(bi)\nif A11 in b and A12 in b and A13 in b:\n print('Yes')\nelif A21 in b and A22 in b and A23 in b:\n print('Yes')\nelif A31 in b and A32 in b and A33 in b:\n print('Yes')\nelif A11 in b and A21 in b and A31 in b:\n print('Yes')\nelif A12 in band A22 in b and A32 in b:\n print('Yes')\nelif A13 in b and A23 in b and A33 in b:\n print('Yes')\nelif A11 in b and A22 in b and A33 in b:\n print('Yes')\nelif A13 in b and A22 in b and A31 in b:\n print('Yes')\nelse:\n print('No')", "A11, A12, A13 = input().split(' ')\nA21, A22, A23 = input().split(' ')\nA31, A32, A33 = input().split(' ')\nA11 = int(A11)\nA12 = int(A12)\nA13 = int(A13)\nA21 = int(A21)\nA22 = int(A22)\nA23 = int(A23)\nA31 = int(A31)\nA32 = int(A32)\nA33 = int(A33)\nN = int(input())\nb = []\nfor i in range(N):\n bi = int(input())\n b.append(bi)\nif A11 in b and A12 in b and A13 in b:\n print('Yes')\nelif A21 in b and A22 in b and A23 in b:\n print('Yes')\nelif A31 in b and A32 in b and A33 in b:\n print('Yes')\nelif A11 in b and A21 in b and A31 in b:\n print('Yes')\nelif A12 in b and A22 in b and A32 in b:\n print('Yes')\nelif A13 in b and A23 in b and A33 in b:\n print('Yes')\nelif A11 in b and A22 in b and A33 in b:\n print('Yes')\nelif A13 in b and A22 in b and A31 in b:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s324133776', 's783870080', 's690944497'] | [9228.0, 8936.0, 9200.0] | [28.0, 25.0, 27.0] | [547, 783, 784] |
p02760 | u996731299 | 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())\nnumber=[list(map(int,input().split())) for i in range(N)]\n\n#print(bingo)\n#print(number)\ncheck=[0,0,0,0,0,0,0,0,0]\nans=0\nfor i in range(N):\n for j in range(3):\n for k in range(3):\n if number[i]==bingo[j][k]:\n check[3*j+k]=1\n \n \n \nfor i in range(3):\n if check[0+3*i]==check[1+3*i]==check[2+3*i]==1:\n ans=1\n if check[j]==check[j+3]==check[j+6]==1:\n ans=1\n \nif check[0]==check[4]==check[8]==1:\n ans=1\nif check[2]==check[4]==check[6]==1: \n ans=1\n \nif ans==1:\n print("Yes")\nelse:\n print("No")\n ', 'bingo=[list(map(int,input().split())) for i in range(3)]\nN=int(input())\nnumber=[list(map(int,input().split())) for i in range(N)]\n\n#print(bingo)\n#print(number)\ncheck=[0,0,0,0,0,0,0,0,0]\nans=0\nfor i in range(N):\n for j in range(3):\n for k in range(3):\n if number[i][0]==bingo[j][k]:\n check[3*j+k]=1\n \n \n \nfor i in range(3):\n if check[0+3*i]==check[1+3*i]==check[2+3*i]==1:\n ans=1\n if check[i]==check[i+3]==check[i+6]==1:\n ans=1\n \nif check[0]==check[4]==check[8]==1:\n ans=1\nif check[2]==check[4]==check[6]==1: \n ans=1\n \nif ans==1:\n print("Yes")\nelse:\n print("No")\n \n#print(check)'] | ['Wrong Answer', 'Accepted'] | ['s016101839', 's458760239'] | [3064.0, 3064.0] | [18.0, 17.0] | [686, 703] |
p02760 | u997641430 | 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)]\nX = [[0 for _ in range(3)] for _ in range(3)]\nfor n in range(N):\n for i in range(3):\n for j in range(3):\n if A[i][j] == B[n]:\n X[i][j] = 1\ntate = any([all([X[i][j] for j in range(3)]) for i in range(3)])\nyoko = any([all([X[i][j] for i in range(3)]) for j in range(3)])\nnana = all([X[i][i] for i in range(3)]) or all([X[i][2 - i] for i in range(3)])\nif tate or yoko or nana:\n print('Yes')\nelse:\n print('No')", "A = [list(map(int, input().split())) for i in range(3)]\nB = [[0]*3 for i in range(3)]\nn = int(input())\nfor k in range(n):\n b = int(input())\n for i in range(3):\n for j in range(3):\n if A[i][j] == b:\n B[i][j] = 1\nif any([all([B[i][j] == 1 for j in range(3)]) for i in range(3)]):\n print('Yes')\n exit()\nif any([all([B[i][j] == 1 for i in range(3)]) for j in range(3)]):\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')\n"] | ['Wrong Answer', 'Accepted'] | ['s815193389', 's043218493'] | [3064.0, 3064.0] | [17.0, 18.0] | [559, 574] |
p02760 | u998169143 | 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 = [[0] * 3 for i in range(3)]\nA[0] = list(map(int, input().split()))\nA[1] = list(map(int, input().split()))\nA[2] = list(map(int, input().split()))\n\nN = int(input())\nb = [0] * N\nfor i in range(N):\n b[i] = int(input())\nprint(b)\n\nif ((A[0][0] in b) & (A[0][1] in b) & (A[0][2] in b)):\n print('Yes')\nelif ((A[1][0] in b) & (A[1][1] in b) & (A[1][2] in b)):\n print('Yes')\nelif ((A[2][0] in b) & (A[2][1] in b) & (A[2][2] in b)):\n print('Yes')\nelif ((A[0][0] in b) & (A[1][0] in b) & (A[2][0] in b)):\n print('Yes')\nelif ((A[0][1] in b) & (A[1][1] in b) & (A[2][1] in b)):\n print('Yes')\nelif ((A[0][2] in b) & (A[1][2] in b) & (A[2][2] in b)):\n print('Yes')\nelif ((A[0][0] in b) & (A[1][1] in b) & (A[2][2] in b)):\n print('Yes')\nelif ((A[0][2] in b) & (A[1][1] in b) & (A[2][0] in b)):\n print('Yes')\nelse:\n print('No')", "import numpy as np\n\nA = [[0] * 3 for i in range(3)]\nA[0] = list(map(int, input().split()))\nA[1] = list(map(int, input().split()))\nA[2] = list(map(int, input().split()))\n\nN = int(input())\nb = [0] * N\nfor i in range(N):\n b[i] = int(input())\n\nif ((A[0][0] in b) & (A[0][1] in b) & (A[0][2] in b)):\n print('Yes')\nelif ((A[1][0] in b) & (A[1][1] in b) & (A[1][2] in b)):\n print('Yes')\nelif ((A[2][0] in b) & (A[2][1] in b) & (A[2][2] in b)):\n print('Yes')\nelif ((A[0][0] in b) & (A[1][0] in b) & (A[2][0] in b)):\n print('Yes')\nelif ((A[0][1] in b) & (A[1][1] in b) & (A[2][1] in b)):\n print('Yes')\nelif ((A[0][2] in b) & (A[1][2] in b) & (A[2][2] in b)):\n print('Yes')\nelif ((A[0][0] in b) & (A[1][1] in b) & (A[2][2] in b)):\n print('Yes')\nelif ((A[0][2] in b) & (A[1][1] in b) & (A[2][0] in b)):\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s754999968', 's384126452'] | [12800.0, 12516.0] | [151.0, 150.0] | [863, 854] |
p02760 | u999503965 | 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=list(map(int,imput().split()))\nl+=list(map(int,imput().split()))\nl+=list(map(int,imput().split()))\n\nn=int(input())\n\nans_list=[False]*9\n\nfor i in range(n):\n num=int(input())\n if num in l:\n index=l.index(num)\n ans_list[index]=True\n \nif ans_list[0] and ans_list[1] and ans_list[2]:\n print("Yes")\nelif ans_list[0] and ans_list[3] and ans_list[6]:\n print("Yes")\nelif ans_list[3] and ans_list[4] and ans_list[5]:\n print("Yes")\nelif ans_list[6] and ans_list[7] and ans_list[8]:\n print("Yes")\nelif ans_list[1] and ans_list[4] and ans_list[7]:\n print("Yes")\nelif ans_list[2] and ans_list[5] and ans_list[8]:\n print("Yes")\nelif ans_list[0] and ans_list[4] and ans_list[8]:\n print("Yes")\nelif ans_list[2] and ans_list[4] and ans_list[6]:\n print("Yes")\nelse:\n print("No")', 'l=list(map(int,input().split()))\nl+=list(map(int,input().split()))\nl+=list(map(int,input().split()))\n\nn=int(input())\n\nans_list=[False]*9\n\nfor i in range(n):\n num=int(input())\n if num in l:\n index=l.index(num)\n ans_list[index]=True\n \nif ans_list[0] and ans_list[1] and ans_list[2]:\n print("Yes")\nelif ans_list[0] and ans_list[3] and ans_list[6]:\n print("Yes")\nelif ans_list[3] and ans_list[4] and ans_list[5]:\n print("Yes")\nelif ans_list[6] and ans_list[7] and ans_list[8]:\n print("Yes")\nelif ans_list[1] and ans_list[4] and ans_list[7]:\n print("Yes")\nelif ans_list[2] and ans_list[5] and ans_list[8]:\n print("Yes")\nelif ans_list[0] and ans_list[4] and ans_list[8]:\n print("Yes")\nelif ans_list[2] and ans_list[4] and ans_list[6]:\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s845385668', 's939449313'] | [9208.0, 9248.0] | [24.0, 28.0] | [781, 782] |
p02761 | u001024152 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ['print(-1)', 'import sys\nN, M = map(int, input().split())\nsc = [tuple(map(int, input().split())) for _ in range(M)]\n\nfor i in range(0, 1000):\n ok = True\n for si, ci in sc:\n if (i//10**(N-si)) % 10 != ci:\n ok = False\n if ok and len(str(i)) == N:\n print(i)\n sys.exit()\nelse:\n print(-1)\n'] | ['Wrong Answer', 'Accepted'] | ['s562623772', 's114798444'] | [2940.0, 3060.0] | [17.0, 18.0] | [9, 314] |
p02761 | u001687078 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ["N,M = map(int, input().split())\nsc = [list(map(int, input().split())) for _ in range(M)]\nx = [-1]*N\nfor s,c in sc:\n s -= 1\n if x[s] == -1 or x[s] == c:\n x[s] = c\n else:\n print(-1)\n exit()\nif N!=1 and x[0]==0:\n print(-1)\n exit()\nif x[0]==-1:\n x[0]=1\nif N>=2 and x[1]==-1:\n x[1]=1\nif N==3 and x[2]==-1:\n x[2]=1\nprint(int(''.join(list(map(str,x)))))", "N,M = map(int, input().split())\nif N==1 and M==0:\n print(0)\n quit()\nsc = [list(map(int, input().split())) for _ in range(M)]\nx = [-1]*N\nfor s,c in sc:\n s -= 1\n if x[s] == -1 or x[s] == c:\n x[s] = c\n else:\n print(-1)\n quit()\nif N!=1 and x[0]==0:\n print(-1)\n quit()\nif x[0]==-1:\n x[0]=1\nif N>=2 and x[1]==-1:\n x[1]=0\nif N==3 and x[2]==-1:\n x[2]=0\nprint(int(''.join(list(map(str,x)))))"] | ['Wrong Answer', 'Accepted'] | ['s784711493', 's055968997'] | [3064.0, 3064.0] | [18.0, 17.0] | [391, 433] |
p02761 | u003475507 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ['n,m=map(int,input().split())\n\nr=""\nfor i in range(n):\n if i == 0:r += \'1\'\n else : r+=\'0\'\nr = list(r)\n\nk ={}\nfor _ in range(m):\n x,y = map(int,input().split())\n\n if x == 1 and y == 0: print(\'-1\');exit()\n\n if k.get(x) and k[x] != y: print(\'-1\');exit()\n else: k[x] = y\n\nfor i,j in k.items():\n r[i-1] = j\n\nfor i in r:print(i,end=\'\')', "n,m=map(int,input().split())\n\nans=[-1] * n\n\nfor i in range(m):\n s,c=map(int,input().split())\n s-=1\n\n if ans[s] != -1 and ans[s] != c:\n print(-1);exit()\n if n > 1 and s==0 and c== 0:\n print(-1);exit()\n\n ans[s]=c\n\nfor i in range(n):\n print(max(ans[i],0),end='')", 'n,m=map(int,input().split())\n\nr=""\nfor i in range(n):\n if n > 1 and i == 0:r += \'1\'\n else : r+=\'0\'\nr = list(r)\n\nk ={}\nfor _ in range(m):\n x,y = map(int,input().split())\n\n if n > 1 and x == 1 and y == 0: print(\'-1\');exit()\n\n if k.get(x) and k[x] != str(y): print(\'-1\');exit()\n else: k[x] = str(y)\n\nfor i,j in k.items():\n r[i-1] = j\n\nprint(int(\'\'.join(r)))\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s588869857', 's980863090', 's906152328'] | [3064.0, 9144.0, 3064.0] | [17.0, 30.0, 17.0] | [349, 291, 376] |
p02761 | u007018214 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ['import sys\nn,m = map(int,input().split())\nans = [0] * n\nprint(ans)\nfor i in range(m):\n s,c = map(int,input().split())\n if ans[s-1] != 0 and ans[s-1] != c:\n print(-1)\n sys.exit()\n ans[s-1] = c\nt=""\nfor i in ans:\n t += str(i)\nt = int(t)\nif len(str(t)) != n:\n print(-1)\n sys.exit()\nprint(int(t))', 'import sys\nn,m = map(int,input().split())\nans = [0] * n\nprint(ans)\nfor i in range(m):\n s,c = map(int,input().split())\n if ans[s-1] != 0 and ans[s-1] != c:\n print(-1)\n sys.exit()\n ans[s-1] = c\nt=""\nfor i in ans:\n t += str(i)\nt = int(t)\nif len(str(t)) != n:\n print(-1)\n sys.exit()\nprint(int(t))', 'import sys\n\nn,m = map(int,input().split())\nans = [0]*n\nl = []\nfor i in range(m):\n s,c = map(int,input().split())\n l.append([s,c])\nfor i in l:\n if i[0] == 1 and i[1] == 0 and n != 1:\n print(-1)\n sys.exit()\n if ans[i[0]-1] != 0 and ans[i[0]-1] != i[1]:\n print(-1)\n sys.exit()\n ans[i[0]-1] = i[1]\n\nif ans[0] == 0 and n != 1:\n ans[0] = 1\nt = ""\nfor i in ans:\n t += str(i)\nprint(int(t))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s727015106', 's776743877', 's865589787'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [324, 324, 430] |
p02761 | u007263493 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ["n , m = map(int,input().split())\nx = [0]\ny = [0]\nz = [0]\n\nfor i in range(m):\n s , c = map(int,input().split())\n if s ==1:\n x.append(c)\n elif s==2:\n y.append(c)\n elif s == 3:\n z.append(c)\n\n\nif n ==1:\n if len(set(x)) > 2:\n print('-1')\n else:\n print(x[-1])\nif n == 2 :\n if (len(x) > 1 and x[-1] == 0) or len(set(x)) > 2 or len(set(y)) >2:\n print('-1') \n else:\n if len(x) ==1 :\n x.append(1)\n print(max(x)*10+max(y))\n else:\n print(max(x)*10+max(y))\nif n ==3 :\n if (len(x) > 1 and x[-1] ==0 ) or len(set(x)) > 2 or len(set(y)) > 2 or len(set(z)) > 2:\n print('-1')\n else:\n if len(x) == 1:\n x.append(1)\n if len(y) ==1:\n y.append(1)\n print(max(x)*100+ max(y)*10 + max(z))", "n , m = map(int,input().split())\nx = [0]\ny = [0]\nz = [0]\n\nfor i in range(m):\n s , c = map(int,input().split())\n if s ==1:\n x.append(c)\n elif s==2:\n y.append(c)\n elif s == 3:\n z.append(c)\n\n\nif n ==1:\n if len(set(x)) > 2:\n print('-1')\n else:\n print(max(x))\nif n == 2 :\n if (len(x) > 1 and x[-1] == 0) or len(set(x)) > 2 or len(set(y)) >2:\n print('-1') \n else:\n if len(x) ==1 :\n x.append(1)\n print(max(x)*10+max(y))\n else:\n print(max(x)*10+max(y))\nif n ==3 :\n if (len(x) > 1 and x[-1] ==0 ) or len(set(x)) > 2 or len(set(y)) > 2 or len(set(z)) > 2:\n print('-1')\n else:\n if len(x) == 1:\n x.append(1)\n if len(y) ==1 :\n y.append(0)\n print(max(x)*100+ max(y)*10 + max(z))"] | ['Wrong Answer', 'Accepted'] | ['s336371761', 's056129283'] | [3064.0, 3064.0] | [17.0, 18.0] | [831, 833] |
p02761 | u008079810 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ["N,M=map(int,input().split())\n\nflag=True\nex=[False]*(N)\nprint(ex)\nfor i in range(M):\n S,C=map(int,input().split())\n if ex[S-1]==False or ex[S-1]==str(C):\n ex[S-1]=str(C)\n else:\n flag=False\n break\n\nif N>1 and ex[0]==str(0):\n flag=False\n\nif flag:\n for i in range(N-1):\n if ex[i+1]==False:\n ex[i+1]='0'\n if ex[0]==False and N>1:\n ex[0]='1'\n elif ex[0]==False:\n ex[0]='0'\n Ex=''.join(ex)\n print(Ex)\nelse:\n print(-1)", "N,M=map(int,input().split())\n\nflag=True\nex=[False]*(N)\nfor i in range(M):\n S,C=map(int,input().split())\n if ex[S-1]==False or ex[S-1]==str(C):\n ex[S-1]=str(C)\n else:\n flag=False\n break\n\nif N>1 and ex[0]==str(0):\n flag=False\n\nif flag:\n for i in range(N-1):\n if ex[i+1]==False:\n ex[i+1]='0'\n if ex[0]==False and N>1:\n ex[0]='1'\n elif ex[0]==False:\n ex[0]='0'\n Ex=''.join(ex)\n print(Ex)\nelse:\n print(-1)"] | ['Wrong Answer', 'Accepted'] | ['s787526017', 's518073345'] | [3188.0, 3064.0] | [18.0, 17.0] | [493, 483] |
p02761 | u010870870 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ['N,M =map(int, input().split())\na = [input().split() for l in range(M)]\n\nfor i in range(M):\n for j in range(2):\n a[i][j]=int(a[i][j])\n\na.sort()\nfor i in range(M-1):\n if a[i]==a[i+1]:\n a[i]=[0,0]\nans = 10**(N-1)\n\nfor i in range(M):\n if a[i][0]==1 ans a[i][1]!=0:\n ans += (a[i][1]-1)*10**(N-a[i][0])\n else:\n ans += a[i][1]*10**(N-a[i][0])\n\nfor i in range(M):\n for j in range(M-i):\n if a[i][0] == a[i+j][0] and a[i][1] != a[i+j][1]:\n ans = -1\n\nfor i in range(M):\n if a[i][0]==1 and a[i][1]==0:\n ans = -1\n\nif M == 0 and N ==1:\n ans = 0\n\nprint(ans)', 'import sys\nN,M =map(int, input().split())\na = [input().split() for l in range(M)]\n\nfor i in range(1000):\n flag = 1\n b = str(i)\n if len(b)!= N:\n flag = 0\n continue\n for j in range(M):\n if b[int(a[j][0])-1] != a[j][1]:\n flag = 0\n break\n if flag == 1:\n print(i)\n sys.exit()\n\nprint("-1")'] | ['Runtime Error', 'Accepted'] | ['s277828225', 's160628133'] | [3060.0, 3064.0] | [18.0, 18.0] | [616, 355] |
p02761 | u017624958 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ["N, M = list(map(int, input().split()))\nsc = [list(map(int, input().split())) for i in range(M)]\n\nanswer = [None] * N\nfor si, ci in sc:\n digit = si - 1\n if answer[digit] is not None and answer[digit] != ci:\n print(-1)\n exit()\n \n answer[digit] = ci\n\nfor i, value in enumerate(answer):\n print(i)\n if answer[i] is None:\n answer[i] = 0\n\nif answer[0] == 0 and N != 1:\n print(-1)\n exit()\n\nanswer = ''.join(map(str, answer))\nprint(answer)\n", "N, M = list(map(int, input().split()))\nsc = [list(map(int, input().split())) for i in range(M)]\n\nanswer = [None] * N\nfor si, ci in sc:\n digit = si - 1\n if answer[digit] != ci:\n print(-1)\n exit()\n \n answer[digit] = ci\n\nif answer[0] is None or answer[0] == 0:\n print(-1)\n exit()\n\nfor i, value in enumerate(answer):\n if answer[i] is None:\n answer[i] = 0\n\nanswer = ''.join(map(str, answer))\nprint(answer)\n", "N, M = list(map(int, input().split()))\nsc = [list(map(int, input().split())) for i in range(M)]\n\nanswer = [None] * N\nfor si, ci in sc:\n if answer[si - 1] > ci:\n answer[si - 1] = ci\n\nif answer[0] is None or answer[0] == 0:\n print('-1')\n exit()\n\nfor i, value in enumerate(answer):\n if answer[i] is None:\n answer[i] = 0\n\nanswer = ''.join(map(str, answer))\nprint(answer)\n", "N, M = list(map(int, input().split()))\nsc = [list(map(int, input().split())) for i in range(M)]\n\nanswer = [None] * N\nfor si, ci in sc:\n if answer[si - 1] is not None:\n print(-1)\n exit()\n \n answer[si - 1] = ci\n\nif answer[0] is None or answer[0] == 0:\n print(-1)\n exit()\n\nfor i, value in enumerate(answer):\n if answer[i] is None:\n answer[i] = 0\n\nanswer = ''.join(map(str, answer))\nprint(answer)\n", "N, M = list(map(int, input().split()))\nsc = [list(map(int, input().split())) for i in range(M)]\n\nanswer = [None] * N\nfor si, ci in sc:\n digit = si - 1\n if answer[digit] is not None and answer[digit] != ci:\n print(-1)\n exit()\n \n answer[digit] = ci\n\nfor i, value in enumerate(answer):\n print(i)\n if answer[i] is None:\n answer[i] = 0\n\nif answer[0] == 0:\n print(-1)\n exit()\n\nanswer = ''.join(map(str, answer))\nprint(answer)\n", "N, M = list(map(int, input().split()))\nsc = [list(map(int, input().split())) for i in range(M)]\n\nanswer = [None] * N\nfor si, ci in sc:\n digit = si - 1\n # if answer[digit] is not None and answer[digit] != ci:\n if answer[digit] != ci:\n print('-1')\n exit()\n \n answer[digit] = ci\n\nfor i, value in enumerate(answer):\n if answer[i] is None:\n answer[i] = 0\n\nif answer[0] == 0:\n print('-1')\n exit()\n\nanswer = int(''.join(map(str, answer)))\nprint(answer)\n", "N, M = list(map(int, input().split()))\nsc = [list(map(int, input().split())) for i in range(M)]\n\nanswer = [None] * N\nfor si, ci in sc:\n digit = si - 1\n if answer[digit] is not None and answer[digit] != ci:\n \n print('-1')\n exit()\n \n answer[digit] = ci\n\nif answer[0] == 0 and N != 1:\n print('-1')\n exit()\n\nif answer[0] is None and N == 1:\n answer[0] = 0\nelif answer[0] is None:\n answer[0] = 1\n\nfor i, value in enumerate(answer):\n if answer[i] is None:\n answer[i] = 0\n\nanswer = int(''.join(map(str, answer)))\nprint(answer)\n"] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s153542397', 's300742905', 's301819778', 's607328210', 's618778152', 's897712970', 's439218436'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [19.0, 18.0, 17.0, 17.0, 18.0, 17.0, 18.0] | [476, 443, 393, 432, 465, 491, 596] |
p02761 | u018679195 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ["M = int(M)\nN = int(N)\nans = ['0' for i in range (N)]\nfl = True\n\nfor i in range (M) :\n s , c = input().split()\n s = int(s) - 1\n if (s == 0 and c == '0') :\n fl = False\n if (ans[s] != '0') :\n if (ans[s] != c) :\n fl = False\n else :\n ans[s] = c\n\nres = ''\n\nif (ans[0] == '0' and N != 1) :\n ans[0] = '1'\n\nfor i in ans :\n res += i\n\nprint (res if fl else -1)\n", 'n,m = input().split(" ")\nn = int(n)\nm = int(m)\nans = -1\nans1 = [\'0\']*n\nfor i in range(m):\n si, ci = input().split(" ")\n si=int(si)\n if(ans1[si-1]==\'0\'):\n ans1[si-1]=ci\n elif(ans1[si-1]>ci):\n ans1[si-1]=ci\n \nif(ans1[0]!=\'0\'):\n ans = int((\'\').join(ans1))\nelif(int((\'\').join(ans1))==0)\n ans=0\nprint(ans) ', '#graph implementation\nimport math\nn,m=map(int,input().split())\nans=[0]*n\nfor i in range(m):\n s,c=map(int,input().split())\n if ans[s-1]==0:\n ans[s-1]=c\n else:\n if ans[s-1]>=c and c>0:\n ans[s-1]=c\nif ans[0]==0 and len(ans)<3:\n for i in ans:\n print(i,end="")\nelif ans[0]==0:\n print(-1)\nelse:\n for i in ans:\n print(i,end="")\n#print(ans)\n', 'n, m = list (map (int, input ().split ()))\nd = [-1 for i in range (n + 1)]\nflg = True\n\nfor i in range (m) :\n s, c = list (map (int, input ().split ()))\n if (flg) :\n if (d[s] != -1 and d[s] != c) :\n flg = False\n continue\n d[s] = c\n\nif (d[1] == 0 and n > 1) :\n flg = False\n\nif (flg and n > 1) :\n for i in range (1, n + 1) :\n if (d[i] == -1) :\n if (i == 1) :\n d[i] = 1\n else :\n d[i] = 0\n\nif (n == 1 and d[1] == -1) :\n d[1] = 0\n\nprint (\'\'.join (list (map (str, d[1:]))) if flg else "-1")'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s408372645', 's500925044', 's923348854', 's805615966'] | [3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 18.0, 18.0] | [403, 343, 394, 593] |
p02761 | u018771977 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ['#! env/bin/local python3\n# -*- coding: utf-8 -*-\n\nconditions = []\n\nn, m = map(int, input().split())\nwhile True:\n try:\n conditions.append(list(map(int, input().split())))\n except EOFError:\n break\n\nnumber: list = [0] * n\n\nis_ok = True\nfor c in conditions:\n if number[c[0]-1] == 0 or number[c[0]-1] == c[1]:\n number[c[0]-1] = c[1]\n else:\n is_ok = False\n\nif number[0] == 0:\n is_ok = False\n\nif is_ok:\n print(*number)\nelse:\n print(-1)\n\n\n\n\n', "#! env/bin/local python3\n# -*- coding: utf-8 -*-\n\nimport numpy as np\n\na_1 = list(map(int, input().split()))\na_2 = list(map(int, input().split()))\na_3 = list(map(int, input().split()))\n_ = input()\npickup_number = []\nwhile True:\n try:\n pickup_number.append(int(input()))\n except EOFError:\n break\n\na = np.array([a_1, a_2, a_3])\nprint(pickup_number)\nprint(a)\n\nfor pn in pickup_number:\n a[a == pn] = -1\n\nprint(a)\n\nflag = False\nif np.sum(a, axis=0)[0] == -3 or np.sum(a, axis=1)[0] == -3:\n flag = True\nif np.sum(a.diagonal()) == -3 or a[0][2] + a[1][1] + a[2][0] == -3:\n flag = True\n\nprint('Yes' if flag else 'No')\n", '#! env/bin/local python3\n# -*- coding: utf-8 -*-\n\nn, m = map(int, input().split())\nconditions = []\nwhile True:\n try:\n conditions.append(list(map(int, input().split())))\n except EOFError:\n break\n\nfor i in range(0, 10**n):\n if len(str(i)) != n:\n continue\n flag = True\n for c in conditions:\n if str(i)[c[0]-1] != str(c[1]):\n flag = False\n\n if flag:\n print(i)\n break\nelse:\n print(-1)\n\n\n\n\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s213031722', 's461427689', 's735618954'] | [2940.0, 20640.0, 3188.0] | [17.0, 294.0, 21.0] | [482, 638, 458] |
p02761 | u021548497 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ['n, m = map(int, input().split())\nans = 10**(n-1)\n\njudge = [0]*m\nfor i in range(m):\n judge[i] = [int(x) for x in input().split()]\n\nflag = False\nwhlie ans < 10**n:\n ans = str(ans)\n for i in range(m):\n if ans[judge[i][0]-1] != judge[i][1]:\n break\n if i == m-1:\n print(int(ans))\n flag = True\n break\n if flag:\n break\n ans = int(ans)+1\n\nif ans == 10**n:\n print(-1)', 'n, m = map(int, input().split())\n\nnum = [str(x) for x in range(10**(n-1), 10**n)]\njudge = [True]*len(num)\n\nfor i in range(m):\n s, c = map(int, input().split())\n for j in range(len(num)):\n if num[j][s] != c:\n judge[j] = False\n \nans = -1\nfor i in range(len(num)):\n if judge[i] == True:\n ans = num[i]\n break\n\nprint(ans)', 'import sys\n\nn, m = map(int, input().split())\nkey = [-1 for i in range(n)]\nfor i in range(m):\n s, c = map(int, input().split())\n if key[s-1] == -1:\n key[s-1] = c\n else:\n if key[s-1] == c:\n continue\n else:\n print(-1)\n sys.exit()\n\nfor i in range(n):\n if key[i] == -1:\n if i != 0:\n key[i] = 0\n elif n == 1:\n key[i] = 0\n else:\n key[i] = 1\n key[i] = str(key[i])\n\nans = int("".join(key))\nif 10**(n-1) <= ans < 10**n:\n print(ans)\nelif n == 1 and ans == 0:\n print(0)\nelse:\n print(-1)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s606805188', 's971873543', 's854201923'] | [2940.0, 3064.0, 3064.0] | [16.0, 18.0, 17.0] | [393, 338, 530] |
p02761 | u028014940 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ['\nN, M = map(int, input().split())\n\nif 4 <= M <= 5:\n print("-1")\n\nelif M == 0:\n print("0")\n\nelse:\n None\n', 'N,M = map(int,input().split())\nsc = [tuple(map(int,input().split())) for i in range(M)]\n\nif N==1:\n r = range(0,10)\nelif N==2:\n r = range(10,100)\nelse:\n r = range(100,1000)\n\nfor n in r:\n n = str(n)\n for s,c in sc:\n s -= 1\n if n[s] != str(c):\n break\n else:\n print(n)\n exit()\nprint(-1)\n'] | ['Wrong Answer', 'Accepted'] | ['s748582983', 's959958756'] | [2940.0, 3064.0] | [18.0, 18.0] | [112, 340] |
p02761 | u028973125 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ['import sys\n\nN, M = map(int, sys.stdin.readline().split())\n\ncond = {}\nflag = True\nfor _ in range(M):\n s, c = map(int, sys.stdin.readline().split())\n if s not in cond:\n if s == 1 and c == 0:\n flag = False\n break\n else:\n cond[s] = c\n else:\n if cond[s] != c:\n flag = False\n break\n\nif flag == False:\n print(-1)\nelse:\n ans = ""\n for i in range(1, 4):\n if i in cond:\n ans += str(cond[i])\n else:\n ans += "1"\n print(ans)', 'import sys\n\nN, M = map(int, sys.stdin.readline().split())\n\ncond = {}\nflag = True\nfor _ in range(M):\n s, c = map(int, sys.stdin.readline().split())\n if s not in cond:\n if N > 1 and s == 1 and c == 0:\n flag = False\n break\n else:\n cond[s] = c\n else:\n if cond[s] != c:\n flag = False\n break\n\nif flag == False:\n print(-1)\nelse:\n ans = ""\n for i in range(1, N+1):\n if i in cond:\n ans += str(cond[i])\n else:\n if i == 1 and N > 1:\n ans += "1"\n else:\n ans += "0"\n print(ans)'] | ['Wrong Answer', 'Accepted'] | ['s443212259', 's198824463'] | [3064.0, 3064.0] | [18.0, 17.0] | [542, 636] |
p02761 | u029000441 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ['nm=input().rstrip().split(" ")\nn =int(nm[0])\nm= int(nm[1])\nlines=[]\nimport sys\nfor line in sys.stdin.readlines():\n nums=line.rstrip().split()\n lines.append(nums)\n#print(lines)\nlinga=[]\nlingb=[]\n\nlinesd =list(map(list, set(map(tuple, lines))))\nprint(linesd)\nfor i in range(len(linesd)):\n linga.append(int(linesd[i][0]))\n lingb.append(int(linesd[i][1]))\nprint(linga)\nprint(lingb)\ni1=0\ni2=0\ni3=0\nfor j in linga:\n if j ==1:\n i1 =i1+1\n elif j==2:\n i2 +=1\n elif j==3:\n i3 +=1\nif i1>=2 or i2>=2 or i3>=2:\n print("-1")\nelif n==1:\n if len(lingb)==0:\n print("0")\n else:\n print(lingb[0])\nelif n==2:\n if len(lingb)==0:\n print("10")\n elif len(lingb)==1:\n if linga[0]==1:\n if lingb[0]==0:\n print("-1")\n else:\n print(10*lingb[0])\n elif linga[0]==2:\n print(10+lingb[0])\n elif len(lingb)==2:\n if linga[0]==1:\n if lingb[0]==0:\n print("-1")\n else:\n print(10*lingb[0]+lingb[1])\n if linga[0]==2:\n if lingb[1]==0:\n print("-1")\n else:\n print(10*lingb[1]+lingb[0])\nelif n==3:\n if len(lingb)==0:\n print("-1")\n elif len(lingb)==1:\n if linga[0]==1:\n if lingb[0]==0:\n print("-1")\n elif linga[0]==2:\n print(100+10*lingb[0])\n elif linga[0]==3:\n print(100+lingb[0])\n elif len(lingb)==2:\n if linga[0]==1:\n if lingb[0]==0:\n print("-1")\n elif linga[1]==2:\n print(100*lingb[0]+10*lingb[1])\n elif linga[1]==3:\n print(100*lingb[0]+lingb[1])\n elif linga[0]==2:\n if linga[1]==1:\n if lingb[1]==0:\n print("-1")\n else:\n print(100*lingb[1]+10*lingb[0])\n if linga[1]==3:\n print(100+10*lingb[0]+lingb[1])\n ', 'nm=input().rstrip().split(" ")\nn =int(nm[0])\nm= int(nm[1])\nlines=[]\nimport sys\nfor line in sys.stdin.readlines():\n nums=line.rstrip().split()\n lines.append(nums)\n#print(lines)\n\nlinesd =list(map(list, set(map(tuple, lines))))\n#print(linesd)\nline1=[]\nline2=[]\nline3=[]\nfor (j,k) in enumerate(linesd):\n if j==1:\n line1.append(int(k[1]))\n elif j==2:\n line2.append(int(k[1]))\n elif j==3:\n line3.append(int(k[1]))\nif len(line1)==0:\n line1.append(0)\nelif len(line2)==0:\n line1.append(0)\nelif len(line3)==0:\n line1.append(0)\n#print(line1)\n#print(line2)\n#print(line3)\nif len(line1)>1:\n print("-1")\nelif len(line2)>1:\n print("-1")\nelif len(line3)>1:\n print("-1")\nelif n==1:\n print("line1[0]")\nelif line1[0]==0:\n print("-1")\nelif n==2:\n print("10*line1[0]+line2[0]")\nelif n==3:\n print(100*line1[0]+10*line2[0]+line3[0])\n ', 'import sys\nnm =input().rstrip().split(" ")\nn =int(nm[0])\nm =int(nm[1])\ndirecs=[]\nfor i in range(m):\n direcs.append(input().rstrip().split(" "))\n#print(direcs)\ntrdirecs=list(map(list, set(map(tuple, direcs))))\n#print(trdirecs)\nfirst=[]\nsecond=[]\nthird=[]\nfor j in trdirecs:\n if int(j[0])==1:\n first.append(int(j[1]))\n if int(j[0])==2:\n second.append(int(j[1]))\n if int(j[0])==3:\n third.append(int(j[1]))\nif len(first)!=0 and first[0]==0 and (n==2 or n==3):\n answer=-1\n print(answer)\n sys.exit()\n \n\'\'\'print(first)\nprint(second)\nprint(third)\'\'\'\n\'\'\'if len(first)>1 or len(second)>1 or len(third)>1:\n print(-1)\'\'\'\nif len(first)==0:\n first.append(0)\nif len(second)==0:\n second.append(0)\nif len(third)==0:\n third.append(0)\n\nif n==1:\n for i in range(0,10):\n if i==first[0]:\n answer=i\nelif n==2:\n for i in range(0,100):\n d1=int((i-i%10)/10)\n d2=i%10\n if d1==first[0] and d2 ==second[0]:\n answer=i\n if answer<=9:\n answer=10+i\nelif n==3:\n for i in range(0,1000):\n d3=i%10\n a=int((i-d3)/10)\n d2=a%10\n d1=int((a-a%10)/10)\n #print(d1,d2,d3)\n if d1==first[0] and d2==second[0] and d3==third[0]:\n answer=i\n if answer<100:\n answer=100+i\nif len(first)>1 or len(second)>1 or len(third)>1:\n answer=-1\nprint(answer)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s582635114', 's958149535', 's471800359'] | [3192.0, 3064.0, 3192.0] | [20.0, 20.0, 18.0] | [2039, 883, 1479] |
p02761 | u032222383 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ['n,m=map(int,input().split())\ns=[]*m\nc=[]*m\nt=[]\nfor i in range(m):\n s[i], c[i]=map(int,input().split())\nfor i in range(n):\n t.append("0")\nfor i in range(m):\n t[s[i]-1]=str(c[i])\nfor i in reversed(range(m)):\n if t[s[i]-1]!=str(c[i]):\n print(-1)\n break\n elif \'\'.join(t)=="000" and i!=0:\n print(-1)\n break\n elif i==0:\n print(\'\'.join(t))', 'n,m=map(int,input().split())\ns=[0]*m\nc=[0]*m\nt=[]\nfor i in range(m):\n s[i], c[i]=map(int,input().split())\nfor i in range(n):\n t.append("0")\nfor i in range(m):\n t[s[i]-1]=str(c[i])\nfor i in reversed(range(m)):\n if t[s[i]-1]!=str(c[i]):\n print(-1)\n break\n elif \'\'.join(t)=="000":\n print(-1)\n break\n else:\n print(\'\'.join(t))', 'n,m=map(int,input().split())\ns=[0]*m\nc=[0]*m\nt=[]\nfor i in range(m):\n s[i], c[i]=map(int,input().split())\nfor i in range(n):\n t.append("0")\nfor i in range(m):\n t[s[i]-1]=str(c[i])\nfor i in reversed(range(m)):\n if t[s[i]-1]!=str(c[i]):\n print(-1)\n break\n elif \'\'.join(t)=="000":\n print(-1)\n break\n elif i==0 and t[0]="0":\n t[0]="1"\n print(\'\'.join(t))\n break\n elif i==0:\n print(\'\'.join(t))', 'n,m=map(int,input().split())\nsc=[list(map(int,input().split())) for i in range(m)]\n\nfor i in range(10**n):\n i2=str(i)\n if len(i2)==n and all([i2[s-1]==str(c) for s,c in sc]):\n print(i2)\n exit()\nprint(-1)\n'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s250817617', 's851568444', 's967257077', 's959508206'] | [3064.0, 3064.0, 3064.0, 3060.0] | [18.0, 18.0, 17.0, 18.0] | [386, 374, 464, 216] |
p02761 | u036340997 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ['n, m = map(int, input().split())\ns = []\nc = []\nfor i in range(m):\n _s, _c = map(int, input().split())\n s.append(_s)\n c.append(_c)\n\ns = [0, 0, 10, 100]\ng = [10, 10, 100, 1000]\nfor i in range(s[n], g[n]):\n i_str = str(i)\n for j in range(m):\n if i_str[s[j]-1] != str(c[j]):\n break\n else:\n print(i)\n break\nelse:\n print(-1)', 'n, m = map(int, input().split())\ns = []\nc = []\nfor i in range(m):\n _s, _c = map(int, input().split())\n s.append(_s)\n c.append(_c)\n\nst = [0, 0, 10, 100]\ngo = [10, 10, 100, 1000]\nfor i in range(st[n], go[n]):\n i_str = str(i)\n for j in range(m):\n if i_str[s[j]-1] != str(c[j]):\n break\n else:\n print(i)\n break\nelse:\n print(-1)'] | ['Runtime Error', 'Accepted'] | ['s808097055', 's907953002'] | [3064.0, 3064.0] | [18.0, 19.0] | [339, 343] |
p02761 | u038408819 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ['n, m = map(int, input().split())\nsc = [list(map(int, input().split())) for i in range(m)]\ns = [0] * n\nfor i in sc:\n s[i[0]-1] = str(i[1])\nans = ""\nfirst = True\nfor i in s:\n if i == 0 and first and len(s) != 1:\n ans += str(1)\n first = False\n continue\n ans += str(i)\nif len(ans) != len(str(int(s))):\n print(-1)\nelse:\n print(ans)', 'n, m = map(int, input().split())\nsc = [list(map(int, input().split())) for i in range(m)]\ns = [0] * n\nfor i in sc:\n s[i[0]-1] = str(i[1])\nans = ""\nfirst = True\nfor i in s:\n if i == 0 and first and len(s) != 1:\n ans += str(1)\n first = False\n continue\n ans += str(i)\nif len(ans) != 1 and ans[0] == \'0\':\n print(-1)\nelse:\n print(ans)', 'n, m = map(int, input().split())\nsc = [list(map(int, input().split())) for i in range(m)]\ns = [0] * n\nfor i in sc:\n s[i[0]-1] = str(i[1])\nans = ""\nfirst = True\nfor i in s:\n if i == 0 and first and len(s) != 1:\n ans += str(1)\n first = False\n continue\n ans += str(i)\nif len(ans) != 1 and len(str(int(s))):\n print(-1)\nelse:\n print(ans)', 'n, m = map(int, input().split())\nsc = [list(map(int, input().split())) for i in range(m)]\ns = [0] * n\nfor i in sc:\n s[i[0]-1] = str(i[1])\nans = ""\nfirst = True\nfor i in s:\n if i == 0 and first:\n ans += str(1)\n continue\n ans += str(i)\nif len(ans) != 1 and ans[0] == \'0\':\n print(-1)\nelse:\n print(ans)', 'n, m = map(int, input().split())\nsc = [list(map(int, input().split())) for i in range(m)]\ns = [0] * n\nfor i in sc:\n s[i[0]-1] = str(i[1])\nans = ""\nfirst = True\nfor i in s:\n if i == 0 and first and len(s) != 1:\n ans += str(1)\n first = False\n continue\n ans += str(i)\nif len(ans) != len(str(int(ans))):\n print(-1)\nelse:\n print(ans)', 'n, m = map(int, input().split())\nsc = [list(map(int, input().split())) for i in range(m)]\ns = [0] * n\nfor i in sc:\n s[i[0]-1] = str(i[1])\nans = ""\nfirst = True\nfor i in s:\n if i == 0 and first:\n ans += str(1)\n first = False\n continue\n ans += str(i)\nif len(ans) != 1 and ans[0] == \'0\':\n print(-1)\nelse:\n print(ans)', 'n, m = map(int, input().split())\nsc = [list(map(int, input().split())) for i in range(m)]\ns = [0] * n\nfor i in sc:\n s[i[0]-1] = str(i[1])\nans = ""\ncnt = True\nfor i in s:\n #print(i)\n if i == \'0\' and cnt and len(s) != 1:\n ans += str(1)\n cnt = False\n ans += str(i)\n#print(ans)\nif len(ans) != len(int(ans)):\n print(-1)\nelse:\n print(ans)', 'n, m = map(int, input().split())\nsc = [list(map(int, input().split())) for i in range(m)]\nif n == 3:\n l = range(100, 1000)\nif n == 2:\n l = range(10, 100)\nif n == 1:\n l = range(0, 10)\nflag = False\nfor i in l:\n num = str(i)\n if all([num[s-1] == str(c) for s, c in sc]):\n #print(num)\n #exit()\n flag = True\n ans = num\n break\nif flag:\n print(num)\nelse:\n print(-1)\n#print(-1)'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s007561807', 's091381672', 's198358882', 's355415635', 's647325799', 's797463190', 's957947068', 's822505227'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [24.0, 17.0, 17.0, 17.0, 18.0, 17.0, 18.0, 18.0] | [362, 365, 368, 327, 364, 349, 364, 425] |
p02761 | u038887660 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ['n, m = map(int, input().split())\nsc = {}\nfor m2 in range(m):\n sc[m2]=input().split()\ndic = {}\nnum = 0\n \nfor li in sc.values():\n if int(li[0]) == 1:\n if n >= 2:\n if int(li[1]) == 0:\n num = -1\n break\n if li[0] in dic.keys():\n if li[1] != dic[li[0]]:\n num = -1\n break\n else:\n dic[li[0]] = li[1]\n num += (10**(n-int(li[0])))*int(li[1])\nif num == -1:\n pass\nelse:\n if 1 in dic.keys():\n pass\n else:\n num+=10**(n-1)\n \n \nprint(num)', 'ok_list= []\nfor al in range(10**(n-1), 10**(n)):\n ynli = []\n li = list(str(al))\n for mm in range(m):\n if li[int(sc[int(mm)][0])-1] != sc[int(mm)][1]:\n ynli.append("NO")\n if "NO" in ynli:\n pass\n else:\n ok_list.append(al)\nif ok_list == []:\n print(-1)\nprint(min(ok_list))', 'n, m = map(int, input().split())\nsc = {}\nfor m2 in range(m):\n sc[m2]=input().split()\nok_list= []\nfor al in range(0, 10**(n)):\n ynli = []\n li = list(str(al))\n if len(li) == n:\n for mm in range(m):\n if li[int(sc[int(mm)][0])-1] != sc[int(mm)][1]:\n ynli.append("NO")\n if "NO" in ynli:\n pass\n else:\n ok_list.append(al)\n else:\n pass\nif ok_list == []:\n print(-1)\nelse:\n print(min(ok_list))'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s325191246', 's997383676', 's464856921'] | [3064.0, 3060.0, 3064.0] | [18.0, 17.0, 20.0] | [562, 318, 480] |
p02761 | u044964932 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ['def main():\n n, m = map(int, input().split())\n ans = [0]*n\n for _ in range(m):\n s, c = map(int, input().split())\n if ans[s-1] == 0:\n ans[s-1] = c\n elif ans[s-1] != 0 and ans[s-1] != c:\n print(-1)\n exit()\n\n if len(ans[0]) == 1:\n print(ans[0])\n if ans[0] == 0:\n print(-1)\n else:\n print(*ans, sep="")\n\n\nif __name__ == "__main__":\n main()\n', 'def main():\n n, m = map(int, input().split())\n ans = [0]*n\n for _ in range(m):\n s, c = map(int, input().split())\n if ans[s-1] == 0:\n ans[s-1] = c\n elif ans[s-1] != 0 and ans[s-1] != c:\n print(-1)\n exit()\n\n if len(ans[0]) == 1:\n print(*ans, sep="")\n if ans[0] == 0:\n print(-1)\n else:\n print(*ans, sep="")\n\n\nif __name__ == "__main__":\n main()\n', 'def main():\n n, m = map(int, input().split())\n ans = [-1]*n\n for _ in range(m):\n s, c = map(int, input().split())\n if ans[s-1] == -1:\n ans[s-1] = c\n elif ans[s-1] != -1 and ans[s-1] != c:\n print(-1)\n exit()\n\n if n == 1:\n if ans[0] == -1:\n ans[0] = 0\n else:\n if ans[0] == 0:\n print(-1)\n exit()\n\n if ans[0] == -1:\n ans[0] = 1\n\n for i in range(1, n):\n if ans[i] == -1:\n ans[i] = 0\n print(*ans, sep="")\n\n\nif __name__ == "__main__":\n main()\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s217121386', 's240443046', 's132509221'] | [3064.0, 3064.0, 3064.0] | [19.0, 17.0, 18.0] | [431, 437, 609] |
p02761 | u046158516 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ['def convert(s): \n \n # initialization of string to "" \n new = "" \n \n # traverse in the string \n for x in s: \n new += x \n \n # return string \n return new \n\nn,m=map(int,input().split())\na=[]\nfor i in range(n):\n a.append(0)\nb=[]\nif n==1:\n b.append(0)\nelse:\n b.append(1)\n a[0]=1\n for i in range(n-1):\n b.append(0)\nfail=0\nfor i in range(m):\n s,c=map(int,input().split())\n if c!= b[s-1] and a[s-1]==1:\n fail=1\n break\n b[s-1]=c\n a[s-1]=1\nfor i in range(n):\n b[i]=str(b[i])\nif fail==1:\n print(-1)\nelse:\n print(convert(b))\n \n \n ', 'def convert(s): \n \n # initialization of string to "" \n new = "" \n \n # traverse in the string \n for x in s: \n new += x \n \n # return string \n return new \n\nn,m=map(int,input().split())\na=[]\nfor i in range(n):\n a.append(0)\nb=[]\nif n==1:\n b.append(0)\nelse:\n b.append(1)\n for i in range(n-1):\n b.append(0)\nfail=0\nfor i in range(m):\n s,c=map(int,input().split())\n if c!= b[s-1] and a[s-1]==1:\n fail=1\n break\n b[s-1]=c\n a[s-1]=1\nif n>1 and b[0]==0:\n fail=1\nfor i in range(n):\n b[i]=str(b[i])\n\nif fail==1:\n print(-1)\nelse:\n print(convert(b))\n \n \n '] | ['Wrong Answer', 'Accepted'] | ['s592372535', 's688788779'] | [3064.0, 3064.0] | [17.0, 18.0] | [580, 601] |
p02761 | u047012797 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ['nm = [int(i) for i in input().split()]\nn = nm[0]\nm = nm[1]\nslist = []\nclist = []\nfor i in range(m):\n sc = [int(i) for i in input().split()]\n slist.append(sc[0])\n clist.append(sc[1])\n\nfl = 0\nif (n == 1):\n if (slist[0] == 1 and clist[0] == 0):\n print(\'-1\')\n fl = 1\n\nanswerlist = [\'-1\' for i in range(n)]\nfor (i,s), c in zip(enumerate(slist),clist):\n if (c == 0 and s == 1):\n print(\'-1\')\n break\n fl = 1\n if (answerlist[s-1] != \'-1\' and answerlist[s-1] != str(c)):\n print(\'-1\')\n break\n fl = 1\n answerlist[s-1] = str(c)\nfor i in range(n):\n if (answerlist[i]) == \'-1\':\n if (i == 0):\n answerlist[i] = \'1\'\n else:\n answerlist[i] = \'0\'\nif fl == 1:\n\tprint("".join(answerlist))', 'nm = [int(i) for i in input().split()]\nn = nm[0]\nm = nm[1]\nslist = []\nclist = []\n\nfor i in range(m):\n sc = [int(i) for i in input().split()]\n slist.append(sc[0])\n clist.append(sc[1])\n\nfl = 0\nif (n == 1):\n if m != 0:\n if (slist[0] == 1 and clist[0] == 0):\n print(\'0\')\n fl = 1\n exit()\n\nanswerlist = [\'-1\' for i in range(n)]\nfor (i,s), c in zip(enumerate(slist),clist):\n if (c == 0 and s == 1):\n print(\'-1\')\n fl = 1\n exit()\n if (answerlist[s-1] != \'-1\' and answerlist[s-1] != str(c)):\n print(\'-1\')\n fl = 1\n exit()\n answerlist[s-1] = str(c)\nfor i in range(n):\n if (answerlist[i]) == \'-1\':\n if (i == 0):\n if (n == 1):\n answerlist[i] = \'0\'\n else:\n answerlist[i] = \'1\'\n else:\n answerlist[i] = \'0\'\nif fl == 0:\n\tprint("".join(answerlist))'] | ['Runtime Error', 'Accepted'] | ['s007657473', 's890634827'] | [3064.0, 3064.0] | [18.0, 18.0] | [713, 808] |
p02761 | u051401873 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ['n , m = map(int, input().split())\ns = []\nc = []\nans = [str(0) for _ in range(n)]\n\nfor _ in range(m):\n st, ct = map(int, input().split())\n if(ans[st-1] != "0"):\n print(-1)\n quit()\n ans[st-1] = str(ct)\nans = "".join(ans)\nif len(str(int(ans))) < n:\n print(-1)\nelse:\n print(ans)\n', 'n , m = map(int, input().split())\nans = [str(0) for _ in range(n)]\nb = [0 for _ in range(n)]\nfor _ in range(m):\n st, ct = map(int, input().split())\n if(b[st-1] == 0 or ans[st-1] == str(ct)):\n ans[st-1] = str(ct)\n b[st-1] = 1\n else:\n print(-1)\n quit()\nif(b[0] == 0 and n !=1):\n ans[0] = "1"\nelif(b[0] == 0):\n print(0)\n quit()\nans = "".join(ans)\n\nif len(str(int(ans))) < n:\n print(-1)\n quit()\nelse:\n print(ans)\n quit()\n'] | ['Wrong Answer', 'Accepted'] | ['s477762199', 's486055357'] | [3064.0, 3064.0] | [17.0, 17.0] | [290, 441] |
p02761 | u052244548 | 2,000 | 1,048,576 | If there is an integer not less than 0 satisfying the following conditions, print the smallest such integer; otherwise, print `-1`. * The integer has exactly N digits in base ten. (We assume 0 to be a 1-digit integer. For other integers, leading zeros are not allowed.) * The s_i-th digit from the left is c_i. \left(i = 1, 2, \cdots, M\right) | ['import itertools\nimport functools\nimport math\nfrom collections import Counter\nfrom itertools import combinations\nimport re\n\n\n\n\nN,M=map(int,input().split())\n\n\nans = ["."] * N\n\nfor i in range(M):\n S,C=map(int,input().split())\n\n \n if ans[S-1] not in (".",C):\n print(-1)\n exit()\n\n \n ans[S-1] = str(C)\n\n\ncmp = re.compile("".join(ans))\n\nfor i in range(10**3):\n \n res = cmp.match(str(i))\n if res:\n print(i)\n exit()\n\nprint(-1)', 'import itertools\nimport functools\nimport math\nfrom collections import Counter\nfrom itertools import combinations\n\nN,M=map(int,input().split())\n\nans = [0] * 10\nfor i in range(N):\n ans[i] = -1\n\nfor i in range(M):\n S,C=map(int,input().split())\n if S > N:\n print(-1)\n exit()\n if ans[S-1] != -1:\n print(-1)\n exit()\n ans[S-1] = C\n\nfor i in range(1000):\n chk = "000" + str(i)\n l = len(chk)\n chk = chk[l-3:]\n for j in range(N):\n if int(ans[j]) == -1:\n continue\n elif int(ans[j]) != int(chk[j]):\n break\n if j == N - 1:\n print(i)\n exit()\n\nprint(-1)\n', 'import itertools\nimport functools\nimport math\nfrom collections import Counter\nfrom itertools import combinations\nimport re\n\nN,M=map(int,input().split())\n\nans = ["."] * N\n\nfor i in range(M):\n S,C=map(int,input().split())\n\n if ans[S-1] not in (-1,C):\n print(-1)\n exit()\n ans[S-1] = C\n\nif N != 1 and ans[3-N] == "0":\n print(-1)\n exit()\ncmp = re.compile("".join(ans))\n\nfor i in range(10**N):\n res = cmp.match(str(i))\n if res == True:\n print(i)\n\nprint(-1)\n', 'import itertools\nimport functools\nimport math\nfrom collections import Counter\nfrom itertools import combinations\nimport re\n\n\n\n\nN,M=map(int,input().split())\n\n\nans = ["."] * N\n\nfor i in range(M):\n S,C=map(str,input().split())\n \n k = int(S)\n \n if ans[k-1] not in (".",str(C)):\n print(-1)\n exit()\n\n \n ans[k-1] = str(C)\n\n\ncmp = re.compile("".join(ans))\n\nfor i in range(10**3):\n \n res = cmp.match(str(i))\n if res:\n print(i)\n exit()\n\nprint(-1)\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s063599060', 's085782429', 's840741141', 's411583422'] | [9856.0, 9512.0, 9804.0, 9888.0] | [38.0, 34.0, 37.0, 34.0] | [1123, 659, 493, 1139] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.