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 | u619144316 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['if __name__ == \'__main__\':\n m = [input() for _ in range(3)]\n n = input()\n a = [int(input()) for _ in range(int(n))]\n c =[]\n for i in m:\n b = [int(j) for j in i.split()]\n c.append(b)\n\n for n,i in enumerate(c):\n for m,j in enumerate(i):\n if j in a:\n print("A")\n c[n][m] = -1\n \n re = []\n for i in range(3):\n tmp = []\n tmp2 = []\n for j in range(3):\n tmp.append([i,j])\n tmp2.append([j,i])\n re.append(tmp)\n re.append(tmp2)\n re.append([[0,2],[1,1],[2,0]])\n re.append([[0,0],[1,1],[2,2]])\n\n f = 0\n for i in re:\n flg =[]\n for n,j in enumerate(i):\n if c[j[0]][j[1]] == -1:\n flg.append(1)\n else:\n flg.append(0)\n if flg == [1,1,1]:\n f = 1\n \n if f == 1:\n print(\'Yes\')\n else:\n print(\'No\')', "A = []\nfor _ in range(3):\n A.append([int(i) for i in input().split(' ')])\nN = int(input())\na = []\nfor _ in range(N):\n a.append(int(input()))\n\nfor num in a:\n for i in range(3):\n for j in range(3):\n if num == A[i][j]:\n A[i][j] = '*'\n\nans = 'No'\nfor i in range(3):\n flg = 0 \n b1 = all(A[i][j] == '*' for j in range(3))\n b2 = all(A[j][i] == '*' for j in range(3))\n b3 = all(A[j][j] == '*' for j in range(3))\n b4 = all(A[2-j][j] == '*' for j in range(3))\n if b1 or b2 or b3 or b4:\n ans = 'Yes'\n\nprint(ans)\n "] | ['Wrong Answer', 'Accepted'] | ['s897912541', 's202275724'] | [3064.0, 3064.0] | [18.0, 20.0] | [951, 576] |
p02760 | u624075921 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["mat=[]\n\nfor i in range(3):\n inp = [int(x) for x in input().split()]\n mat.append(inp)\n \nn = int(input())\n\nfor _ in range(n):\n q = int(input())\n for i in range(3):\n if q in mat[i]:\n ind = mat[i].index(q)\n mat[i][ind] = '1'\n break\n \nif mat[0][0]=='1' and mat[0][1]=='1' and mat[0][2]=='1':\n print('YES')\n \nelif mat[1][0]=='1' and mat[1][1]=='1' and mat[1][2]=='1':\n print('YES')\n\nelif mat[2][0]=='1' and mat[2][1]=='1' and mat[2][2]=='1':\n print('YES')\n\n#col\nelif mat[0][0]=='1' and mat[1][0]=='1' and mat[2][0]=='1':\n print('YES')\n\nelif mat[0][1]=='1' and mat[1][1]=='1' and mat[2][1]=='1':\n print('YES')\n\nelif mat[0][2]=='1' and mat[1][2]=='1' and mat[2][2]=='1':\n print('YES')\n\n#diag\nelif mat[0][0]=='1' and mat[1][1]=='1' and mat[2][2]=='1':\n print('YES')\n\nelif mat[0][2]=='1' and mat[1][1]=='1' and mat[2][0]=='1':\n print('YES')\nelse:\n print('NO')\n ", "mat=[]\n\nfor i in range(3):\n inp = [int(x) for x in input().split()]\n mat.append(inp)\n \nn = int(input())\n\nfor _ in range(n):\n q = int(input())\n for i in range(3):\n if q in mat[i]:\n ind = mat[i].index(q)\n mat[i][ind] = '1'\n break\n \nif mat[0][0]=='1' and mat[0][1]=='1' and mat[0][2]=='1':\n print('Yes')\n \nelif mat[1][0]=='1' and mat[1][1]=='1' and mat[1][2]=='1':\n print('Yes')\n\nelif mat[2][0]=='1' and mat[2][1]=='1' and mat[2][2]=='1':\n print('Yes')\n\n#col\nelif mat[0][0]=='1' and mat[1][0]=='1' and mat[2][0]=='1':\n print('Yes')\n\nelif mat[0][1]=='1' and mat[1][1]=='1' and mat[2][1]=='1':\n print('Yes')\n\nelif mat[0][2]=='1' and mat[1][2]=='1' and mat[2][2]=='1':\n print('Yes')\n\n#diag\nelif mat[0][0]=='1' and mat[1][1]=='1' and mat[2][2]=='1':\n print('Yes')\n\nelif mat[0][2]=='1' and mat[1][1]=='1' and mat[2][0]=='1':\n print('Yes')\nelse:\n print('No')\n "] | ['Wrong Answer', 'Accepted'] | ['s178604419', 's073127311'] | [3064.0, 3188.0] | [18.0, 20.0] | [942, 942] |
p02760 | u624613992 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 for k in range(n):\n if a[i][j] == b[k]:\n a[i][j] = 0\n\nans = "No"\nfor i in range(3):\n if a[i][0] + a[i][1] + a[i][2] == 0:\n ans = "Yes"\n if a[0][i] + a[1][i] + a[2][i] == 0:\n ans = "Yes"\nif a[0][0] == a[1][1] == a[2][2] == 0 or a[0][2] == a[1][1] == a[2][0] == 0:\n ans = "Yes\nprint(ans)', 'a = [list(map(int, input().split())) for _ in range(3)]\nn = int(input())\nb = [int(input()) for _ in range(n)]\n\nfor i in range(3):\n for j in range(3):\n for k in range(n):\n if a[i][j] == b[k]:\n a[i][j] = 0\n\nans = "No"\nfor i in range(3):\n if a[i][0] + a[i][1] + a[i][2] == 0:\n ans = "Yes"\n if a[0][i] + a[1][i] + a[2][i] == 0:\n ans = "Yes"\nif a[0][0] == a[1][1] == a[2][2] == 0 or a[0][2] == a[1][1] == a[2][0] == 0:\n print("Yes")\nprint(ans)', '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 for k in range(n):\n if a[i][j] == b[k]:\n a[i][j] = 0\n\nans = "No"\nfor i in range(3):\n if a[i][0] + a[i][1] + a[i][2] == 0:\n ans = "Yes"\n if a[0][i] + a[1][i] + a[2][i] == 0:\n ans = "Yes"\nif a[0][0] == a[1][1] == a[2][2] == 0 or a[0][2] == a[1][1] == a[2][0] == 0:\n ans = "Yes"\nprint(ans)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s782806744', 's997382509', 's169444491'] | [3064.0, 3064.0, 3192.0] | [17.0, 18.0, 17.0] | [495, 497, 496] |
p02760 | u624617831 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 bingo = []\n for i in range(3):\n a = list(map(int, input().split()))\n bingo.append(a)\n \n n = int(input())\n for j in range(n):\n b = int(input())\n\n for k in range(3):\n for l in range(3):\n if int(bingo[k][l]) == b:\n bingo[k][l] = -1\n \n for ii in range(3):\n \n if bingo[ii][0:3] == [-1,-1,-1] or [bingo[0][ii],bingo[1][ii],bingo[2][ii]] == [-1,-1,-1] or [bingo[0][0],bingo[1][1],bingo[2][2]] == [-1,-1,-1] or [bingo[2][0],bingo[1][1],bingo[0][2]] == [-1,-1,-1]:\n \n print('yes')\n break\n else:\n print('No')\n\n\n\n\nif __name__ == '__main__':\n main()\n\n", "def main():\n bingo = []\n for i in range(3):\n a = list(map(int, input().split()))\n bingo.append(a)\n \n n = int(input())\n for j in range(n):\n b = int(input())\n\n for k in range(3):\n for l in range(3):\n if int(bingo[k][l]) == b:\n bingo[k][l] = -1\n \n for ii in range(3):\n if bingo[ii][0:3] == [-1,-1,-1] or bingo[0:3][ii] == [-1,-1,-1] or [bingo[0][0],bingo[1][1],bingo[2][2]] == [-1,-1,-1] or [bingo[2][0],bingo[1][1],bingo[0][2]] == [-1,-1,-1]:\n print('yes')\n break\n else:\n print('No')\n\n\n\n\nif __name__ == '__main__':\n main()\n\n", "def main():\n bingo = []\n for i in range(3):\n a = list(map(int, input().split()))\n bingo.append(a)\n \n n = int(input())\n for j in range(n):\n b = int(input())\n\n for k in range(3):\n for l in range(3):\n if int(bingo[k][l]) == b:\n bingo[k][l] = -1\n \n for ii in range(3):\n \n if bingo[ii][0:3] == [-1,-1,-1] or [bingo[0][ii],bingo[1][ii],bingo[2][ii]] == [-1,-1,-1] or [bingo[0][0],bingo[1][1],bingo[2][2]] == [-1,-1,-1] or [bingo[2][0],bingo[1][1],bingo[0][2]] == [-1,-1,-1]:\n print('yes')\n break\n else:\n print('No')\n\n\n\n\nif __name__ == '__main__':\n main()\n\n", "def main():\n bingo = []\n for i in range(3):\n a = list(map(int, input().split()))\n bingo.append(a)\n \n n = int(input())\n for j in range(n):\n b = int(input())\n\n for k in range(3):\n for l in range(3):\n if int(bingo[k][l]) == b:\n bingo[k][l] = -1\n \n\n if [bingo[0][0],bingo[1][1],bingo[2][2]] == [-1,-1,-1] or [bingo[2][0],bingo[1][1],bingo[0][2]] == [-1,-1,-1]:\n print('Yes')\n else:\n for ii in range(3): \n if bingo[ii][0:3] == [-1,-1,-1] or [bingo[0][ii],bingo[1][ii],bingo[2][ii]] == [-1,-1,-1]:\n \n print('Yes')\n break\n else:\n print('No')\n\n\n\n\nif __name__ == '__main__':\n main()\n\n"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s624320059', 's642163098', 's971695748', 's122780521'] | [3064.0, 3064.0, 3064.0, 3064.0] | [18.0, 18.0, 17.0, 18.0] | [706, 662, 693, 766] |
p02760 | u625864724 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['b = []\nfor i in range(3):\n lst = list(map(int,input().split()))\n b.append(lst)\nn = int(input())\nfor i in range(n):\n a = int(input())\n for j in range(3):\n for k in range(3):\n if (b[j][k] == a):\n b[j][k] = 0\nif (b[0][0] = b[0][1] = b[0][2] or b[1][0] = b[1][1] = b[1][2] or b[2][0] = b[2][1] = b[2][2] or b[0][0] = b[1][0] = b[2][0] or b[0][1] = b[1][1] = b[2][1] or b[0][2] = b[1][2] = b[2][2] or b[0][0] = b[1][1] = b[2][2] or b[0][2] = b[1][1] = b[2][0]):\n print("Yes")\nelse:\n print("No")\n ', 'b = []\nfor i in range(3):\n lst = list(map(int,input().split()))\n b.append(lst)\nn = int(input())\nfor i in range(n):\n a = int(input())\n for j in range(3):\n for k in range(3):\n if (b[j][k] == a):\n b[j][k] = 0\nif (b[0][0] == b[0][1] == b[0][2] or b[1][0] == b[1][1] == b[1][2] or b[2][0] == b[2][1] == b[2][2] or b[0][0] == b[1][0] == b[2][0] or b[0][1] == b[1][1] == b[2][1] or b[0][2] == b[1][2] == b[2][2] or b[0][0] == b[1][1] == b[2][2] or b[0][2] == b[1][1] == b[2][0]):\n print("Yes")\nelse:\n print("No")\n \n'] | ['Runtime Error', 'Accepted'] | ['s350930189', 's565915844'] | [9012.0, 9276.0] | [24.0, 33.0] | [513, 530] |
p02760 | u626228246 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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()))\nB = list(map(int,input().split()))\nC = list(map(int,input().split()))\nN = int(input())\nM = [int(input()) for i in range(N)]\n\nfor m in range(M):\n if M[m] in A:\n A[M[m]] = 0\n elif M[m] in B:\n B[M[m]] = 0\n elif M[m] in C:\n C[M[m]] = 0\n\nfor t in range(3):\n if A[t] + B[t] + C[t] ==0:\n print("Yes")\n sys.exit()\nif sum(A) == 0 or sum(B) == 0 or sum(c) ==0:\n print("Yes")\n sys.exit()\nelif A[0] + B[1] + C[2] == 0:\n print("Yes")\n sys.exit()\nelif A[2] + B[1] +C[0] == 0:\n print("Yes")\nelse:\n print("No")', "A = list(map(int,input().split()))\nB = list(map(int,input().split()))\nC = list(map(int,input().split()))\nN = int(input())\nM = [int(input()) for i in range(N)]\nfor m in range(M):\n\tif M[m] in A:\n\t\tA[M[m]] = 0\n\telif M[m] in B:\n\t\tB[M[m]] = 0\n\telif M[m] in C:\n\t\tC[M[m]] = 0\nfor t in range(3):\n\tif A[t] + B[t] + C[t] == 0:\n\t\tprint('Yes')\n\t\tsys.exit()\nif sum(A) == 0 or sum(B) == 0 or sum(C) ==0:\n\tprint('Yes')\n\tsys.exit()\nelif A[0] + B[1] + C[2] == 0:\n\tprint('Yes')\n\tsys.exit()\nelif A[2] + B[1] +C[0] == 0:\n\tprint('Yes')\nelse:\n\tprint('No')", 'import sys\nA = list(map(int,input().split()))\nB = list(map(int,input().split()))\nC = list(map(int,input().split()))\nN = int(input())\nM = [int(input()) for i in range(N)]\n\nfor m in range(M):\n if M[m] in A:\n A[M[m]] = 0\n elif M[m] in B:\n B[M[m]] = 0\n elif M[m] in C:\n C[M[m]] = 0\n\nfor t in range(3):\n if A[t] + B[t] + C[t] ==0:\n print("Yes")\n sys.exit()\nif sum(A) == 0 or sum(B) == 0 or sum(C) ==0:\n print("Yes")\n sys.exit()\nelif A[0] + B[1] + C[2] == 0:\n print("Yes")\n sys.exit()\nelif A[2] + B[1] +C[0] == 0:\n print("Yes")\nelse:\n print("No")\n', "import sys\nA = list(map(int,input().split()))\nB = list(map(int,input().split()))\nC = list(map(int,input().split()))\nN = int(input())\nM = [int(input()) for i in range(N)]\nfor m in range(len(M)):\n\tif M[m] in A:\n\t\tA[A.index(M[m])] = 0\n\telif M[m] in B:\n\t\tB[B.index(M[m])] = 0\n\telif M[m] in C:\n\t\tC[C.index(M[m])] = 0\nfor t in range(3):\n\tif A[t] + B[t] + C[t] == 0:\n\t\tprint('Yes')\n\t\tsys.exit()\nif sum(A) == 0 or sum(B) == 0 or sum(C) ==0:\n\tprint('Yes')\n\tsys.exit()\nelif A[0] + B[1] + C[2] == 0:\n\tprint('Yes')\n\tsys.exit()\nelif A[2] + B[1] +C[0] == 0:\n\tprint('Yes')\nelse:\n\tprint('No')"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s023446456', 's330706788', 's331867716', 's244883208'] | [3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 18.0, 17.0] | [565, 533, 566, 576] |
p02760 | u626361595 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 = []\ntmp = input()\nbingo.append(tmp.split(' '))\ntmp = input()\nbingo.append(tmp.split(' '))\ntmp = input()\nbingo.append(tmp.split(' '))\nfor i in len(bingo):\n bingo[i] = [int(bingo[i][0]), int(bingo[i][1]), int(bingo[i][2])]\n\nn = input()\ndata = []\narr = range(int(n))\narr = list(arr)\nfor count in arr:\n tmp = input()\n data.append(int(tmp))\n\nans = []\nfor num in data:\n for i in len(bingo):\n for j in [0, 1, 2]:\n if bingo[i][j] is num:\n ans.append([i, j])\n\n# 1 2 3\n# 4 5 6\n# 7 8 9\n\n# 6 15 12 15 15 24 18\n# more 3\n\n# 11 12 13\n# 21 22 23\n# 31 32 33\n\nif [0, 0] in ans and [0, 1] in ans and [0, 2] in ans:\n print('Yes')\n exit(0)\n\nif [1, 0] in ans and [1, 1] in ans and [1, 2] in ans:\n print('Yes')\n exit(0)\n\nif [2, 0] in ans and [2, 1] in ans and [2, 2] in ans:\n print('Yes')\n exit(0)\n\nif [0, 0] in ans and [1, 0] in ans and [2, 0] in ans:\n print('Yes')\n exit(0)\n\nif [0, 1] in ans and [1, 1] in ans and [2, 1] in ans:\n print('Yes')\n exit(0)\n\nif [0, 2] in ans and [1, 2] in ans and [2, 2] in ans:\n print('Yes')\n exit(0)\n\nif [0, 0] in ans and [1, 1] in ans and [2, 2] in ans:\n print('Yes')\n exit(0)\n\nif [0, 2] in ans and [1, 1] in ans and [2, 0] in ans:\n print('Yes')\n exit(0)\n\nprint('No')\n", "bingo = []\ntmp = input()\nbingo.append(tmp.split(' '))\ntmp = input()\nbingo.append(tmp.split(' '))\ntmp = input()\nbingo.append(tmp.split(' '))\nfor i in range(len(bingo)):\n bingo[i] = [int(bingo[i][0]), int(bingo[i][1]), int(bingo[i][2])]\n\nn = input()\ndata = []\narr = range(int(n))\narr = list(arr)\nfor count in arr:\n tmp = input()\n data.append(int(tmp))\n\nans = []\nfor num in data:\n for i in range(len(bingo)):\n for j in [0, 1, 2]:\n if bingo[i][j] is num:\n ans.append([i, j])\n\n# 1 2 3\n# 4 5 6\n# 7 8 9\n\n# 6 15 12 15 15 24 18\n# more 3\n\n# 11 12 13\n# 21 22 23\n# 31 32 33\n\nif [0, 0] in ans and [0, 1] in ans and [0, 2] in ans:\n print('Yes')\n exit(0)\n\nif [1, 0] in ans and [1, 1] in ans and [1, 2] in ans:\n print('Yes')\n exit(0)\n\nif [2, 0] in ans and [2, 1] in ans and [2, 2] in ans:\n print('Yes')\n exit(0)\n\nif [0, 0] in ans and [1, 0] in ans and [2, 0] in ans:\n print('Yes')\n exit(0)\n\nif [0, 1] in ans and [1, 1] in ans and [2, 1] in ans:\n print('Yes')\n exit(0)\n\nif [0, 2] in ans and [1, 2] in ans and [2, 2] in ans:\n print('Yes')\n exit(0)\n\nif [0, 0] in ans and [1, 1] in ans and [2, 2] in ans:\n print('Yes')\n exit(0)\n\nif [0, 2] in ans and [1, 1] in ans and [2, 0] in ans:\n print('Yes')\n exit(0)\n\nprint('No')\n"] | ['Runtime Error', 'Accepted'] | ['s242817987', 's743909429'] | [3192.0, 3192.0] | [17.0, 18.0] | [1278, 1292] |
p02760 | u626881915 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['mat = [[False]*3 for i in range(3)]\na_mat = []\nfor i in range(3):\n a_list = list(map(int, input().split()))\n a_mat.append(a_list)\nn = int(input())\nfor i in range(n):\n b = int(input())\n for x in range(3):\n for y in range(3):\n if a_mat[x][y] == b:\n mat[x][y] = True\n\nif mat[0][0] and mat[0][1] and mat[0][2] ¥\nor mat[1][0] and mat[1][1] and mat[1][2] ¥\nor mat[2][0] and mat[2][1] and mat[2][2] ¥\nor mat[0][0] and mat[1][0] and mat[2][0] ¥\nor mat[0][1] and mat[1][1] and mat[2][1] ¥\nor mat[0][2] and mat[1][2] and mat[2][2] ¥\nor mat[0][0] and mat[1][1] and mat[2][2] ¥\nor mat[0][2] and mat[1][1] and mat[2][0]:\n print("Yes")\nelse:\n print("No")', 'mat = [[False]*3 for i in range(3)]\na_mat = []\nfor i in range(3):\n a_list = list(map(int, input().split()))\n a_mat.append(a_list)\nn = int(input())\nfor i in range(n):\n b = int(input())\n for x in range(3):\n for y in range(3):\n if a_mat[x][y] == b:\n mat[x][y] = True\n\nif mat[0][0] and mat[0][1] and mat[0][2] \\\nor mat[1][0] and mat[1][1] and mat[1][2] \\\nor mat[2][0] and mat[2][1] and mat[2][2] \\\nor mat[0][0] and mat[1][0] and mat[2][0] \\\nor mat[0][1] and mat[1][1] and mat[2][1] \\\nor mat[0][2] and mat[1][2] and mat[2][2] \\\nor mat[0][0] and mat[1][1] and mat[2][2] \\\nor mat[0][2] and mat[1][1] and mat[2][0]:\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s233500732', 's337073670'] | [3188.0, 3064.0] | [18.0, 18.0] | [668, 662] |
p02760 | u627417051 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['60 88 34\n92 41 43\n65 73 48\n10\n60\n43\n88\n11\n48\n73\n65\n41\n92\n34\n', '\nimport sys\ninput = sys.stdin.buffer.readline\n\n\nfrom collections import defaultdict\n\ncon = 10 ** 9 + 7\n\ndef getlist():\n\treturn list(map(int, input().split()))\n\n\ndef main():\n\tA = []\n\tfor i in range(3):\n\t\ta = getlist()\n\t\tA.append(a)\n\tbingo = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]\n\n\tN = int(input())\n\tfor k in range(N):\n\t\tb = int(input())\n\t\tfor i in range(3):\n\t\t\tfor j in range(3):\n\t\t\t\tif A[i][j] == b:\n\t\t\t\t\tbingo[i][j] = 1\n\t\n\tjudge = "No"\n\tfor i in range(3):\n\t\tif bingo[i][0] == 1 and bingo[i][1] == 1 and bingo[i][2] == 1:\n\t\t\tjudge = "Yes"\n\tfor i in range(3):\n\t\tif bingo[0][i] == 1 and bingo[1][i] == 1 and bingo[2][i] == 1:\n\t\t\tjudge = "Yes"\n\n\tif bingo[0][0] == 1 and bingo[1][1] == 1 and bingo[2][2] == 1:\n\t\tjudge = "Yes"\n\tif bingo[2][0] == 1 and bingo[1][1] == 1 and bingo[0][2] == 1:\n\t\tjudge = "Yes"\n\n\tprint(judge)\n\nif __name__ == \'__main__\':\n\tmain()'] | ['Runtime Error', 'Accepted'] | ['s969249823', 's462675516'] | [2940.0, 3444.0] | [17.0, 26.0] | [60, 918] |
p02760 | u628581330 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 = [map(int,input().split()) for a in range(3)]\na1 = [a[0][0],a[0][1],a[0][2]]\na2 = [a[1][0],a[1][1],a[1][2]]\na3 = [a[2][0],a[2][1],a[2][2]]\na4 = [a[0][0],a[1][1],a[2][2]]\na5 = [a[0][2],a[1][1],a[2][0]]\na6 = [a[0][0],a[1][0],a[2][0]]\na7 = [a[0][1],a[1][1],a[2][1]]\na8 = [a[0][2],a[1][2],a[2][2]]\nn = int(input())\nB = [int(input()) for i in range(n)]\nif set(a1) <= set(B) or set(a2) <= set(B) or set(a3) <= set(B) or set(a4) <= set(B) or set(a5) <= set(B) or set(a6) <= set(B) or set(a7) <= set(B) or set(a8) <= set(B):\n print('Yes')\nelse:\n print('No')", "a = [input().split() for a in range(3)]\na1 = [a[0][0],a[0][1],a[0][2]]\na2 = [a[1][0],a[1][1],a[1][2]]\na3 = [a[2][0],a[2][1],a[2][2]]\na4 = [a[0][0],a[1][1],a[2][2]]\na5 = [a[0][2],a[1][1],a[2][0]]\na6 = [a[0][0],a[1][0],a[2][0]]\na7 = [a[0][1],a[1][1],a[2][1]]\na8 = [a[0][2],a[1][2],a[2][2]]\nn = int(input())\nB = [int(input()) for i in range(n)]\nif set(a1) <= set(B) or set(a2) <= set(B) or set(a3) <= set(B) or set(a4) <= set(B) or set(a5) <= set(B) or set(a6) <= set(B) or set(a7) <= set(B) or set(a8) <= set(B):\n print('Yes')\nelse:\n print('No')", "a = [input().split() for a in range(3)]\na1 = [a[0][0],a[0][1],a[0][2]]\na2 = [a[1][0],a[1][1],a[1][2]]\na3 = [a[2][0],a[2][1],a[2][2]]\na4 = [a[0][0],a[1][1],a[2][2]]\na5 = [a[0][2],a[1][1],a[2][0]]\na6 = [a[0][0],a[1][0],a[2][0]]\na7 = [a[1][0],a[1][1],a[2][1]]\na8 = [a[2][0],a[2][1],a[2][2]]\nn = int(input())\nB = [int(input()) for i in range(n)]\nif set(a1) <= set(B) or set(a2) <= set(B) or set(a3) <= set(B) or set(a4) <= set(B) or set(a5) <= set(B) or set(a6) <= set(B) or set(a7) <= set(B) or set(a8) <= set(B):\n print('Yes')\nelse:\n print('No')", "a1 = list(map(int,input().split()))\na2 = list(map(int,input().split()))\na3 = list(map(int,input().split()))\na4 = set()\na5 = set()\na4.update({a1[0],a2[1],a3[2]})\na5.update({a1[2],a2[1],a3[0]})\nprint(a4)\nprint(a5)\nn = int(input())\nB =set()\nfor i in range(n):\n b = int(input())\n B.add(b)\nif set(a1) <= B or set(a2) <= B or set(a3) <= B or a4 <= B or a5 <= B:\n print('Yes')\nelse:\n print('No')", "a = [input().split() for a in range(3)]\na1 = [a[0][0],a[0][1],a[0][2]]\na2 = [a[1][0],a[1][1],a[1][2]]\na3 = [a[2][0],a[2][1],a[2][2]]\na4 = [a[0][0],a[1][1],a[2][2]]\na5 = [a[0][2],a[1][1],a[2][0]]\na6 = [a[0][0],a[1][0],a[2][0]]\na7 = [a[1][0],a[1][1],a[2][1]]\na8 = [a[2][0],a[2][1],a[2][2]]\nn = int(input())\nB = [int(input()) for i in range(n)]\nif set(a1) <= B or set(a2) <= B or set(a3) <= B or set(a4) <= B or set(a5) <= B or set(a6) <= B or set(a7) <= B or set(a8) <= B:\n print('Yes')\nelse:\n print('No')", 'a = [input().split() for a in range(3)]\nn = int(input())\nb = [input() for i in range(n)]\nc = [a[0][0],a[1][1],a[2][2]]\nd = [a[0][2],a[1][1],a[2][0]]\ntate1 = len(set(a[0]) & set(b))\ntate2 = len(set(a[1]) & set(b))\ntate3 = len(set(a[2]) & set(b))\nyoko1 = len(set([x[0] for x in a]) & set(b))\nyoko2 = len(set([x[1] for x in a]) & set(b))\nyoko3 = len(set([x[2] for x in a]) & set(b))\nnaname1 = len(set(c) & set(b))\nnaname2 = len(set(d) & set(b))\nbingo = [tate1,tate2,tate3,yoko1,yoko2,yoko3,naname1,naname2]\nif 3 in bingo:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s313802600', 's332092095', 's633256034', 's693664105', 's926700859', 's393071701'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 18.0, 17.0, 17.0, 17.0] | [558, 549, 549, 400, 509, 557] |
p02760 | u629350026 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 a1,a2,a3=map(int,input().split())\n a.append(a1,a2,a3)\nn=int(input())\nfor i in range(n):\n b=int(input())\n for j in range(9):\n if a[j]==b:\n a[j]=0\nif a[0]==0 and a[1]==0 and a[2]==0:\n print("Yes")\nelif a[3]==0 and a[4]==0 and a[5]==0:\n print("Yes")\nelif a[6]==0 and a[7]==0 and a[8]==0:\n print("Yes")\nelif a[0]==0 and a[3]==0 and a[6]==0:\n print("Yes")\nelif a[1]==0 and a[4]==0 and a[7]==0:\n print("Yes")\nelif a[2]==0 and a[5]==0 and a[8]==0:\n print("Yes")\nelif a[0]==0 and a[4]==0 and a[8]==0:\n print("Yes")\nelif a[2]==0 and a[4]==0 and a[6]==0:\n print("Yes")\nelse:\n print("No")', 'a=[]\nfor i in range(3):\n a1,a2,a3=map(int,input().split())\n a.append(a1)\n a.append(a2)\n a.append(a3)\nn=int(input())\nfor i in range(n):\n b=int(input())\n for j in range(9):\n if a[j]==b:\n a[j]=0\nif a[0]==0 and a[1]==0 and a[2]==0:\n print("Yes")\nelif a[3]==0 and a[4]==0 and a[5]==0:\n print("Yes")\nelif a[6]==0 and a[7]==0 and a[8]==0:\n print("Yes")\nelif a[0]==0 and a[3]==0 and a[6]==0:\n print("Yes")\nelif a[1]==0 and a[4]==0 and a[7]==0:\n print("Yes")\nelif a[2]==0 and a[5]==0 and a[8]==0:\n print("Yes")\nelif a[0]==0 and a[4]==0 and a[8]==0:\n print("Yes")\nelif a[2]==0 and a[4]==0 and a[6]==0:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s473369711', 's939371163'] | [3064.0, 3064.0] | [17.0, 18.0] | [623, 647] |
p02760 | u629540524 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 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 a[i][j] = -1\nf = False\nfor i in range(3):\n for j in range(3):\n if (a[0][0] == a[0][1] == a[0][2]== -1) or (a[1][0] == a[1][1] == a[1][2]== -1) or (a[2][0] == a[2][1] == a[2][2]== -1):\n f = True\n elif (a[0][0] == a[1][0] == a[2][0] == -1) or (a[0][1] == a[1][1] == a[2][1] == -1) or (a[0][2] == a[1][2] == a[2][2] == -1):\n f = True\n elif (a[0][0] == a[1][1] == a[2][2] == -1) or (a[2][0] == a[1][1] == a[0][2] == -1):\n f = True\nprint(a)\nif f:\n print('Yes')\nelse:\n print('No')", "a = [list(map(int,input().split())) 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 a[i][j] = -1\nf = False\nfor i in range(3):\n for j in range(3):\n if (a[0][0] == a[0][1] == a[0][2]== -1) or (a[1][0] == a[1][1] == a[1][2]== -1) or (a[2][0] == a[2][1] == a[2][2]== -1):\n f = True\n elif (a[0][0] == a[1][0] == a[2][0] == -1) or (a[0][1] == a[1][1] == a[2][1] == -1) or (a[0][2] == a[1][2] == a[2][2] == -1):\n f = True\n elif (a[0][0] == a[1][1] == a[2][2] == -1) or (a[2][0] == a[1][1] == a[0][2] == -1):\n f = True\nif f:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s628090348', 's697425822'] | [9296.0, 9280.0] | [29.0, 30.0] | [744, 735] |
p02760 | u630027862 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["x = [input().split() for i in range(3)]\nN = int(input())\nb = [int(input()) for n in range(N)]\nl = [[0]*3, [0]*3, [0]*3]\nfor val in b:\n for i in range(3):\n for j in range(3):\n print(val)\n if val == int(x[i][j]):\n l[i][j] = 1\nif l[0][0] + l[0][1] + l[0][2] == 3:\n print('Yes')\nelif l[1][0] + l[1][1] + l[1][2] == 3:\n print('Yes')\nelif l[2][0] + l[2][1] + l[2][2] == 3:\n pritn('Yes')\nelif l[0][0] + l[1][0] + l[2][0] == 3:\n print('Yes')\nelif l[0][1] + l[1][1] + l[2][1] == 3:\n print('Yes')\nelif l[0][2] + l[1][2] + l[2][2] == 3:\n print('Yes')\nelif l[0][0] + l[1][1] + l[2][2] == 3:\n print('Yes')\nelif l[0][2] + l[1][1] + l[2][0] == 3:\n print('Yes')\nelse:\n print('No')", "x = [input().split() for i in range(3)]\nN = int(input())\nb = [int(input()) for n in range(N)]\nl = [[0]*3, [0]*3, [0]*3]\nfor val in b:\n for i in range(3):\n for j in range(3):\n if val == int(x[i][j]):\n l[i][j] = 1\nif l[0][0] + l[0][1] + l[0][2] == 3:\n print('Yes')\nelif l[1][0] + l[1][1] + l[1][2] == 3:\n print('Yes')\nelif l[2][0] + l[2][1] + l[2][2] == 3:\n print('Yes')\nelif l[0][0] + l[1][0] + l[2][0] == 3:\n print('Yes')\nelif l[0][1] + l[1][1] + l[2][1] == 3:\n print('Yes')\nelif l[0][2] + l[1][2] + l[2][2] == 3:\n print('Yes')\nelif l[0][0] + l[1][1] + l[2][2] == 3:\n print('Yes')\nelif l[0][2] + l[1][1] + l[2][0] == 3:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s371177646', 's806887728'] | [3192.0, 3064.0] | [23.0, 17.0] | [738, 715] |
p02760 | u640123177 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['li_a = list(map(int, input().split()))\nli_b = list(map(int, input().split()))\nli_c = list(map(int, input().split()))\nli_d = [li_a[0], li_b[0], li_c[0]]\nli_e = [li_a[1], li_b[1], li_c[1]]\nli_f = [li_a[2], li_b[2], li_c[2]]\nli_g = [li_a[0], li_b[1], li_c[2]]\nli_h = [li_a[2], li_b[1], li_c[0]]\nn = int(input())\nli_call = []\nfor i in range(n):\n li_call.append(int(input()))\nfor i in range(n):\n for j in range(2):\n if li_a[j] == li_call[i]:\n li_a[j] = 0\n for k in range(2):\n if li_b[k] == li_call[i]:\n li_b[k] = 0\n for l in range(2):\n if li_c[l] == li_call[i]:\n li_c[l] = 0\nli_o = 0\nif li_a == li_o or li_b == li_o or li_c == li_o or li_d == li_o or li_e == li_o or li_f == li_o or li_g == li_o or li_h == [0, 0, 0]:\n print("Yes")\nelse:\n print("No")', 'li_a = list(map(int, input().split()))\nli_b = list(map(int, input().split()))\nli_c = list(map(int, input().split()))\n\nn = int(input())\nli_call = []\nfor i in range(n):\n li_call.append(int(input()))\nfor i in range(n):\n for j in range(3):\n if li_a[j] == li_call[i]:\n li_a[j] = 0\n for k in range(3):\n if li_b[k] == li_call[i]:\n li_b[k] = 0\n for l in range(3):\n if li_c[l] == li_call[i]:\n li_c[l] = 0\nli_o = 0\nli_d = [li_a[0], li_b[0], li_c[0]]\nli_e = [li_a[1], li_b[1], li_c[1]]\nli_f = [li_a[2], li_b[2], li_c[2]]\nli_g = [li_a[0], li_b[1], li_c[2]]\nli_h = [li_a[2], li_b[1], li_c[0]]\nif li_a == li_o or li_b == li_o or li_c == li_o or li_d == li_o or li_e == li_o or li_f == li_o or li_g == li_o or li_h == [0, 0, 0]:\n print("Yes")\nelse:\n print("No")', 'li_a = list(map(int, input().split()))\nli_b = list(map(int, input().split()))\nli_c = list(map(int, input().split()))\n\nn = int(input())\nli_call = []\nfor i in range(n):\n li_call.append(int(input()))\nfor i in range(n):\n for j in range(3):\n if li_a[j] == li_call[i]:\n li_a[j] = 0\n for k in range(3):\n if li_b[k] == li_call[i]:\n li_b[k] = 0\n for l in range(3):\n if li_c[l] == li_call[i]:\n li_c[l] = 0\nli_o = [0, 0, 0]\nli_d = [li_a[0], li_b[0], li_c[0]]\nli_e = [li_a[1], li_b[1], li_c[1]]\nli_f = [li_a[2], li_b[2], li_c[2]]\nli_g = [li_a[0], li_b[1], li_c[2]]\nli_h = [li_a[2], li_b[1], li_c[0]]\nif li_a == li_o:\n print("Yes")\nelif li_b == li_o:\n print("Yes")\nelif li_c == li_o:\n print("Yes")\nelif li_d == li_o:\n print("Yes")\nelif li_e == li_o:\n print("Yes")\nelif li_f == li_o:\n print("Yes")\nelif li_g == li_o:\n print("Yes")\nelif li_h == li_o:\n print("Yes")\n\nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s818894331', 's921351752', 's318440845'] | [3064.0, 3064.0, 3064.0] | [18.0, 17.0, 17.0] | [775, 776, 906] |
p02760 | u642528832 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 = [list(map(int,input().split())) for i in range(3)]\nbingo_list = sum(bingo_list,[])\nn = int(input())\nbingo_number = [int(input())for i in range(n)]\ncheck_list = [0 for i in range(9)]\n\nfor j in bingo_number:\n if j in bingo_list:\n check_list[bingo_list.index(j)] = 1\n\nif [1,1,1] in [check_list[:3],check_list[3:6],check_list[6:],check_list[0:7:3],check_list[1:8:3]check_list[2:9:3],check_list[0:9:4],check_list[2:8:2]]:\n print('Yes')\nelse:\n print('No')", "bingo_list = [list(map(int,input().split())) for i in range(3)]\nbingo_list = sum(bingo_list,[])\nn = int(input())\nbingo_number = [int(input())for i in range(n)]\ncheck_list = [0 for i in range(9)]\n\nfor j in bingo_number:\n if j in bingo_list:\n check_list[bingo_list.index(j)] = 1\n\nif [1,1,1]in [check_list[:3],check_list[3:6],check_list[6:],check_list[0:7:3],check_list[1:8:3]check_list[2:9:3],check_list[0:9:4],check_list[2:7:2]]:\n print('Yes')\nelse:\n print('No')", "bingo_list = [list(map(int,input().split())) for i in range(3)]\nbingo_list = sum(bingo_list,[])\nn = int(input())\nbingo_number = [int(input())for i in range(n)]\ncheck_list = [0 for i in range(9)]\n\nfor j in bingo_number:\n if j in bingo_list:\n check_list[bingo_list.index(j)] = 1\n\nif [1,1,1]in [check_list[:3],check_list[3:6],check_list[6:],\n check_list[0:7:3],check_list[1:8:3]check_list[2:9:3],\n check_list[0:9:4],check_list[2:7:2]]:\n print('Yes')\nelse:\n print('No')", "bingo_list = [list(map(int,input().split())) for i in range(3)]\nbingo_list = sum(bingo_list,[])\nn = int(input())\nbingo_number = [int(input())for i in range(n)]\ncheck_list = [0 for i in range(9)]\n\nfor j in bingo_number:\n if j in bingo_list:\n check_list[bingo_list.index(j)] = 1\n\nif [1,1,1] in [check_list[:3], check_list[3:6], check_list[6:], check_list[0:7:3], check_list[1:8:3],check_list[2:9:3],check_list[0:9:4],check_list[2:7:2]]:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s177917605', 's193630130', 's251517060', 's903044980'] | [8992.0, 9060.0, 8960.0, 9112.0] | [25.0, 22.0, 23.0, 29.0] | [478, 477, 505, 485] |
p02760 | u646412443 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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)]\nbingo = [[0 for _ in range(3)] for _ in range(3)]\nprint(bingo)\nfor i in range(n):\n for j in range(3):\n for k in range(3):\n if a[j][k] == b[i]:\n bingo[j][k] = True\nif (bingo[0][0] and bingo[1][0] and bingo[2][0]) or (bingo[0][1] and bingo[1][1] and bingo[2][1]) or (bingo[0][2] and bingo[1][2] and bingo[2][2]):\n print('Yes')\nelif (bingo[0][0] and bingo[0][1] and bingo[0][2]) or (bingo[1][0] and bingo[1][1] and bingo[1][2]) or (bingo[2][0] and bingo[2][1] and bingo[2][2]):\n print('Yes')\nelif (bingo[0][0] and bingo[1][1] and bingo[2][2]) or (bingo[0][2] and bingo[1][1] and bingo[2][0]):\n print('Yes')\nelse:\n print('No')\n", "a = [list(map(int, input().split())) for _ in range(3)]\nn = int(input())\nb = [int(input()) for _ in range(n)]\nbingo = [[0 for _ in range(3)] for _ in range(3)]\n\nfor i in range(n):\n for j in range(3):\n for k in range(3):\n if a[j][k] == b[i]:\n bingo[j][k] += 1\n\nfor i in range(3):\n if bingo[0][i] * bingo[1][i] * bingo[2][i] > 0:\n print('Yes')\n exit()\nfor i in range(3):\n if bingo[i][0] * bingo[i][1] * bingo[i][2] > 0:\n print('Yes')\n exit()\nif bingo[0][0] * bingo[1][1] * bingo[2][2] > 0:\n print('Yes')\n exit()\nif bingo[0][2] * bingo[1][1] * bingo[2][0] > 0:\n print('Yes')\n exit()\nprint('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s601706500', 's916557541'] | [3064.0, 3064.0] | [18.0, 17.0] | [781, 674] |
p02760 | u646892595 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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(list(map(int, input().split())))\nN = input()\nN = int(N)\nB = []\nfor _ in range(N):\n b = input()\n B.append(int(b))\nnpA = np.array(A)\ncheck = 'no'\nfor a in npA:\n if a[0] in B and a[1] in B and a[2] in B:\n check = 'yes'\nfor a in npA.T:\n if a[0] in B and a[1] in B and a[2] in B:\n check = 'yes'\ndia = np.diag(npA)\nif dia[0] in B and dia[1] in B and dia[2] in B:\n check = 'yes'\ndiaT = np.diag(np.fliplr(npA))\nif diaT[0] in B and diaT[1] in B and diaT[2] in B:\n check = 'yes'\nprint(check)", "import numpy as np\n\nA = []\nfor _ in range(3):\n A.append(list(map(int, input().split())))\nN = input()\nN = int(N)\nB = []\nfor _ in range(N):\n b = input()\n B.append(int(b))\nnpA = np.array(A)\ncheck = 'No'\nfor a in npA:\n if a[0] in B and a[1] in B and a[2] in B:\n check = 'Yes'\nfor a in npA.T:\n if a[0] in B and a[1] in B and a[2] in B:\n check = 'Yes'\ndia = np.diag(npA)\nif dia[0] in B and dia[1] in B and dia[2] in B:\n check = 'Yes'\ndiaT = np.diag(np.fliplr(npA))\nif diaT[0] in B and diaT[1] in B and diaT[2] in B:\n check = 'Yes'\nprint(check)"] | ['Wrong Answer', 'Accepted'] | ['s595175539', 's372139985'] | [12504.0, 12504.0] | [150.0, 150.0] | [572, 572] |
p02760 | u647679586 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["row_1 = list(map(int, input().split()))\nrow_2 = list(map(int, input().split()))\nrow_3 = list(map(int, input().split()))\nN = int(input())\nnumbers_called = []\nfor i in range(N):\n b = int(input())\n numbers_called.append(b)\n\ncol_1 = [row_1[0], row_2[0], row_3[0]]\ncol_2 = [row_1[1], row_2[1], row_3[1]]\ncol_3 = [row_1[2], row_2[2], row_3[2]]\ndiagonal = [row_1[0], row_2[1], row_3[2]]\nanti_diagonal = [[row_3[0], row_2[1], row_1[0]]]\n\nwinning_combinations = [row_1, row_2, row_3, col_1, col_2, col_3, diagonal, anti_diagonal]\nfor combination in winning_combinations:\n for number in combination:\n is_bingo = True\n if number not in numbers_called:\n is_bingo = False\n \n if is_bingo:\n print('Yes')\nprint('No')", "row_1 = list(map(int, input().split()))\nrow_2 = list(map(int, input().split()))\nrow_3 = list(map(int, input().split()))\nN = int(input())\nnumbers_called = []\nfor i in range(N):\n b = int(input())\n numbers_called.append(b)\n\ncol_1 = [row_1[0], row_2[0], row_3[0]]\ncol_2 = [row_1[1], row_2[1], row_3[1]]\ncol_3 = [row_1[2], row_2[2], row_3[2]]\ndiagonal = [row_1[0], row_2[1], row_3[2]]\nanti_diagonal = [row_3[0], row_2[1], row_1[2]]\n\nwinning_combinations = [row_1, row_2, row_3, col_1, col_2, col_3, diagonal, anti_diagonal]\n\nis_bingo = False\nfor combination in winning_combinations:\n # check if every number for this combination has been called\n is_bingo = all([number in numbers_called for number in combination])\n \n if is_bingo:\n break\n\n\nif is_bingo:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s050712665', 's721751540'] | [9168.0, 9260.0] | [27.0, 25.0] | [759, 811] |
p02760 | u651314218 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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())\nnum_count = int(input())\nnumber_list = [0] * num_count\nfor i in range(num_count):\n number_list[i] = int(input())\n\nbingo_map = [[a, b, c], [d, e, f], [g, h, i]]\nbingo_answer = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]\n\ndef bingo(bingo_map, number_list):\n for number in number_list:\n for i, bingo_row in enumerate(bingo_map):\n if number in bingo_row:\n for j, bingo_number in enumerate(bingo_row):\n if bingo_number == number:\n bingo_answer[i][j] = 1\n\n\ndef check_bingo():\n return (all(bingo_answer[0]) or all(bingo_answer[1]) or all(bingo_answer[2]) or\n all([bingo_answer[0][0], bingo_answer[1][0], bingo_answer[2][0]]) or\n all([bingo_answer[0][1], bingo_answer[1][1], bingo_answer[2][1]]) or\n all([bingo_answer[0][2], bingo_answer[1][2], bingo_answer[2][2]]) or\n all([bingo_answer[0][0], bingo_answer[1][1], bingo_answer[2][2]]) or\n all([bingo_answer[2][0], bingo_answer[1][1], bingo_answer[0][2]]))\n\nbingo(bingo_map, number_list)\n\nif (check_bingo()):\n print("Yes")\nelse:\n print("No")\n', 'a, b, c = map(int, input().split())\nd, e, f = map(int, input().split())\ng, h, i = map(int, input().split())\nnum_count = int(input())\nnumber_list = [0] * num_count\nfor i in range(num_count):\n number_list[i] = int(input())\n\nbingo_map = [[a, b, c], [d, e, f], [g, h, i]]\nbingo_answer = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]\n\ndef bingo(bingo_map, number_list):\n for number in number_list:\n for i, bingo_row in enumerate(bingo_map):\n if number in bingo_row:\n for j, bingo_number in enumerate(bingo_row):\n if bingo_number == number:\n bingo_answer[i][j] = 1\n\n\ndef check_bingo():\n return (all(bingo_answer[0]) or all(bingo_answer[1]) or all(bingo_answer[2]) or\n all(bingo_answer[0][0], bingo_answer[1][0], bingo_answer[2][0]) or\n all(bingo_answer[0][1], bingo_answer[1][1], bingo_answer[2][1]) or\n all(bingo_answer[0][2], bingo_answer[1][2], bingo_answer[2][2]) or\n all(bingo_answer[0][0], bingo_answer[1][1], bingo_answer[2][2]) or\n all(bingo_answer[2][0], bingo_answer[1][1], bingo_answer[0][2]))\n\nbingo(bingo_map, number_list)\n\nif check_bingo():\n print "Yes"\nelse:\n print "No"\n', 'a, b, c = map(int, input().split())\nd, e, f = map(int, input().split())\ng, h, i = map(int, input().split())\nnum_count = int(input())\nnumber_list = [0] * num_count\nfor i in range(num_count):\n number_list[i] = int(input())\n\nbingo_map = [[a, b, c], [d, e, f], [g, h, i]]\nbingo_answer = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]\n\ndef bingo(bingo_map, number_list):\n for number in number_list:\n for i, bingo_row in enumerate(bingo_map):\n if number in bingo_row:\n for j, bingo_number in enumerate(bingo_row):\n if bingo_number == number:\n bingo_answer[i][j] = 1\n\n\ndef check_bingo():\n return (all(bingo_answer[0]) or all(bingo_answer[1]) or all(bingo_answer[2]) or\n all(bingo_answer[0][0], bingo_answer[1][0], bingo_answer[2][0]) or\n all(bingo_answer[0][1], bingo_answer[1][1], bingo_answer[2][1]) or\n all(bingo_answer[0][2], bingo_answer[1][2], bingo_answer[2][2]) or\n all(bingo_answer[0][0], bingo_answer[1][1], bingo_answer[2][2]) or\n all(bingo_answer[2][0], bingo_answer[1][1], bingo_answer[0][2]))\n\nbingo(bingo_map, number_list)\n\nif (check_bingo()):\n print("Yes")\nelse:\n print("No")\n', 'a, b, c = map(int, input().split())\nd, e, f = map(int, input().split())\ng, h, x = map(int, input().split())\nnum_count = int(input())\nnumber_list = [0] * num_count\nfor i in range(num_count):\n number_list[i] = int(input())\n\nbingo_map = [[a, b, c], [d, e, f], [g, h, x]]\nbingo_answer = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]\n\ndef bingo(bingo_map, number_list):\n for number in number_list:\n for i, bingo_row in enumerate(bingo_map):\n if number in bingo_row:\n for j, bingo_number in enumerate(bingo_row):\n if bingo_number == number:\n bingo_answer[i][j] = 1\n\n\ndef check_bingo():\n return (all(bingo_answer[0]) or all(bingo_answer[1]) or all(bingo_answer[2]) or\n all([bingo_answer[0][0], bingo_answer[1][0], bingo_answer[2][0]]) or\n all([bingo_answer[0][1], bingo_answer[1][1], bingo_answer[2][1]]) or\n all([bingo_answer[0][2], bingo_answer[1][2], bingo_answer[2][2]]) or\n all([bingo_answer[0][0], bingo_answer[1][1], bingo_answer[2][2]]) or\n all([bingo_answer[2][0], bingo_answer[1][1], bingo_answer[0][2]]))\n\nbingo(bingo_map, number_list)\n\nif (check_bingo()):\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s019381684', 's021214810', 's462201256', 's536086136'] | [3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 18.0, 18.0] | [1187, 1173, 1177, 1187] |
p02760 | u655048024 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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_1 = list(map(int,input().split()))\na_2 = list(map(int,input().split()))\na_3 = list(map(int,input().split()))\na = [a_1,a_2,a_3]\nn = int(input())\nfor i in range(n):\n h = int(input())\n for j in range(3):\n for k in range(3):\n if(a[j][k]==h):\n a[j][k]=0\nans = "No"\nfor i in range(3):\n if(len(set(a[i]+[0]))==1):\n ans = "Yes"\nfor i in range(3):\n if(len(set([a[0][i],a[1][i],a[2][i],[0]]))==1):\n ans= "Yes"\nif((a[0][0]==0)and(a[1][1]==a[2][2])and(a[0][0]==a[1][1]))or((a[0][2]==0)and(a[1][1]==a[2][0])and(a[0][2]==a[1][1])):\n ans = "Yes"\n \nprint(ans)\n \n', 'a_1 = list(map(int,input().split()))\na_2 = list(map(int,input().split()))\na_3 = list(map(int,input().split()))\na = [a_1,a_2,a_3]\nn = int(input()):\nfor i in range(n):\n h = int(input())\n for j in range(3):\n for k in range(3):\n if(a[j][k]==h):\n a[j][k]=0\nans = "No"\nfor i in range(3):\n if(a[i][0]==0)and(a[i][0]==a[i][1])and(a[i][1]==a[i][2]):\n ans = "Yes"\nfor i in range(3):\n if(a[0][i]==0)and(a[0][i]==a[1][i])and(a[1][i]==a[2][i]):\n ans= "Yes"\nif((a[0][0]==0)and(a[1][1]==a[2][2])and(a[0][0]==a[1][1]))or((a[0][2]==0)and(a[1][1]==a[2][0])and(a[0][2]==a[1][1])):\n ans = "Yes"\n \nprint(ans)\n \n ', 'a_1 = list(map(int,input().split()))\na_2 = list(map(int,input().split()))\na_3 = list(map(int,input().split()))\na = [a_1,a_2,a_3]\nn = int(input())\nfor i in range(n):\n h = int(input())\n for j in range(3):\n for k in range(3):\n if(a[j][k]==h):\n a[j][k]=0\nans = "No"\nfor i in range(3):\n if(a[i][0]==0)and(a[i][0]==a[i][1])and(a[i][1]==a[i][2]):\n ans = "Yes"\nfor i in range(3):\n if(a[0][i]==0)and(a[0][i]==a[1][i])and(a[1][i]==a[2][i]):\n ans= "Yes"\nif((a[0][0]==0)and(a[1][1]==a[2][2])and(a[0][0]==a[1][1]))or((a[0][2]==0)and(a[1][1]==a[2][0])and(a[0][2]==a[1][1])):\n ans = "Yes"\n \nprint(ans)\n \n \n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s860119928', 's916510622', 's736112133'] | [9228.0, 8960.0, 9292.0] | [28.0, 25.0, 30.0] | [578, 624, 624] |
p02760 | u656803083 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['map_list = [int,input().split() for x in range(3)]\n\nn = int(input())\nfor i in range(n):\n a = int(input())\n ', 'map_list = [list(map(int,input().split())) for x in range(3)]\n \nn = int(input())\nfor i in range(n):\n a = int(input())\n for i in range(3):\n for j in range(3):\n if map_list[i][j] == a:\n map_list[i][j] = 0\n\nans = "No"\nfor k in range(3):\n if map_list[0][k] == map_list[1][k] == map_list[2][k] or \\\n map_list[k][0] == map_list[k][1] == map_list[k][2]:\n ans = "Yes"\n break\n if map_list[0][0] == map_list[1][1] == map_list[2][2] or \\\n\t map_list[0][2] == map_list[1][1] == map_list[2][0]:\n ans = "Yes"\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s584279956', 's457971044'] | [8836.0, 9220.0] | [25.0, 29.0] | [109, 542] |
p02760 | u657329920 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 = input().split()\n a = [int(num) for num in a]\n A.append(a)\n\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 b.count(A[i][j]) != 0:\n A[i][j] = 0\n else:\n continue\n\nif (sum(A[0]) or sum(A[1]) or sum(A[2])\n or sum(A[:][0]) or sum(A[:][1]) or sum(A[:][2])\n or (A[0][0]+A[1][1]+A[2][2]) or (A[0][2]+A[1][1]+A[2][0])) == 0:\n print("Yes")\nelse:\n print("No")', 'A = []\nfor i in range(3):\n a = input().split()\n a = [int(num) for num in a]\n A.append(a)\nprint(A)\n\nN = int(input())\nb = [int(input()) for i in range(N)]\nprint(b)\n\nfor i in range(3):\n for j in range(3):\n if b.count(A[i][j]) != 0:\n A[i][j] = 0\n else:\n continue\n\nif A[1][1] == 0:\n if A[0][0]==A[2][2]==0 or A[0][2]==A[2][0]==0:\n print("Yes")\n else:\n print("No")\nelif A[1][1] != 0:\n if sum(A[0])==0 or sum(A[2])==0 or sum(A[:][0])==0 or sum(A[:][2]==0):\n print("Yes")\n else:\n print("No")', 'A = []\nfor i in range(3):\n a = input().split()\n a = [int(num) for num in a]\n A.append(a)\n\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 b.count(A[i][j]) != 0:\n A[i][j] = 0\n else:\n continue\n\nif (sum(A[0][:]) or sum(A[1][:]) or sum(A[2][:])\n or sum(A[:][0]) or sum(A[:][1]) or sum(A[:][2])\n or (A[0][0]+A[1][1]+A[2][2]) or (A[0][2]+A[1][1]+A[2][0])) == 0:\n print("Yes")\nelse:\n print("No")', 'A = []\nfor i in range(3):\n a = input().split()\n a = [int(num) for num in a]\n A.append(a)\n\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 b.count(A[i][j]) != 0:\n A[i][j] = 0\n else:\n continue\n\ndef Agetraw(j):\n Ans = [int(A[i][j]) for i in range(3)]\n return(Ans)\n\nif (sum(A[0]) or sum(A[1]) or sum(A[2]) \n or sum(Agetraw(0)) or sum(Agetraw(1)) or sum(Agetraw(2)) \n or A[0][0]+A[1][1]+A[2][2] or A[0][2]+A[1][1]+A[2][0]) == 0:\n print("Yes")\nelse:\n print("No")\n', 'A = []\nfor i in range(3):\n a = input().split()\n a = [int(num) for num in a]\n A.append(a)\n\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 b.count(A[i][j]) != 0:\n A[i][j] = 0\n else:\n continue\n\ndef Agetraw(j):\n Ans = [int(A[i][j]) for i in range(3)]\n return(Ans)\n\nif (sum(A[0])==0 or sum(A[1])==0 or sum(A[2])==0 \n or sum(Agetraw(0))==0 or sum(Agetraw(1))==0 or sum(Agetraw(2))==0 \n or A[0][0]+A[1][1]+A[2][2]==0 or A[0][2]+A[1][1]+A[2][0]==0):\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s213811743', 's617987442', 's737893021', 's905480751', 's450456862'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [18.0, 17.0, 17.0, 17.0, 17.0] | [455, 519, 464, 541, 559] |
p02760 | u658987783 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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())\n\nn=int(input())\n\ncard=[a11,a12,a13,a21,a22,a23,a31,a32,a33]\ndef isBingo():\n if ( (card[0] == -1 and card[1] == -1 and card[2] == -1) \\\n or (card[3] == -1 and card[4] == -1 and card[5] == -1) \\\n or (card[6] == -1 and card[7] == -1 and card[8] == -1) \\\n or (card[0] == -1 and card[3] == -1 and card[6] == -1) \\\n or (card[1] == -1 and card[4] == -1 and card[7] == -1) \\\n or (card[2] == -1 and card[5] == -1 and card[8] == -1) \\\n or (card[0] == -1 and card[4] == -1 and card[8] == -1) \\\n or (card[2] == -1 and card[4] == -1 and card[6] == -1) \\\n ):\n return True\n else:\n return False\n \nfor i in range(n):\n if i in card:\n card[card.index(i)]=-1\nif( isBingo()):\n print("Yes")\nelse:\n print("No")\n \n \n \n \n \n ', 'a11,a12,a13=map(int,input().split())\na21,a22,a23=map(int,input().split())\na31,a32,a33=map(int,input().split())\n\nn=int(input())\n\ncard=[a11,a12,a13,a21,a22,a23,a31,a32,a33]\ndef isBingo():\n if ( (card[0] == -1 and card[1] == -1 and card[2] == -1) \\\n or (card[3] == -1 and card[4] == -1 and card[5] == -1) \\\n or (card[6] == -1 and card[7] == -1 and card[8] == -1) \\\n or (card[0] == -1 and card[3] == -1 and card[6] == -1) \\\n or (card[1] == -1 and card[4] == -1 and card[7] == -1) \\\n or (card[2] == -1 and card[5] == -1 and card[8] == -1) \\\n or (card[0] == -1 and card[4] == -1 and card[8] == -1) \\\n or (card[2] == -1 and card[4] == -1 and card[6] == -1) \\\n ):\n return True\n else:\n return False\n \nfor i in range(n):\n i= int(input())\n if i in card:\n card[card.index(i)]=-1\nif( isBingo()):\n print("Yes")\nelse:\n print("No")\n \n \n \n \n \n '] | ['Wrong Answer', 'Accepted'] | ['s433571404', 's156942877'] | [3064.0, 3188.0] | [17.0, 21.0] | [910, 928] |
p02760 | u665452497 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\nimport numpy as np\n\ncard = np.array([list(map(int, input().split())) for _ in range(3)])\nn = int(input())\n\nfor _ in range(n):\n num = int(input())\n if num in card:\n pos = tuple(nd[0] for nd in np.where(card == num))\n print(pos)\n card[pos[0], pos[1]] = 0\n\nf = 0\n\nfor i in range(3):\n if sum(card[i,:]) == 0 or sum(card[:,i]) == 0:\n f = 1\n if card[0,0]+card[1,1]+card[2,2] == 0 or card[2,0]+card[1,1]+card[2,0] == 0:\n f = 1\n\nif f:\n print('Yes')\nelse:\n print('No')", "# coding: utf-8\nimport numpy as np\n\ncard = np.array([list(map(int, input().split())) for _ in range(3)])\nn = int(input())\n\nfor _ in range(n):\n num = int(input())\n if num in card:\n pos = tuple(nd[0] for nd in np.where(card == num))\n card[pos[0], pos[1]] = 0\n\nf = 0\n\nfor i in range(3):\n if sum(card[i,:]) == 0 or sum(card[:,i]) == 0:\n f = 1\n if card[0,0]+card[1,1]+card[2,2] == 0 or card[2,0]+card[1,1]+card[2,0] == 0:\n f = 1\n\nif f:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s135204439', 's396622444'] | [12440.0, 21448.0] | [149.0, 964.0] | [528, 509] |
p02760 | u666961261 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['class CircularQueue(): \n \n # constructor \n def __init__(self, size): # initializing the class \n self.size = size \n \n # initializing queue with none \n self.queue = [None for i in range(size)] \n self.front = self.rear = -1\n \n def enqueue(self, data): \n \n # condition if queue is full \n if ((self.rear + 1) % self.size == self.front): \n print(" Queue is Full\\n") \n \n # condition for empty queue \n elif (self.front == -1): \n self.front = 0\n self.rear = 0\n self.queue[self.rear] = data \n else: \n \n # next position of rear \n self.rear = (self.rear + 1) % self.size \n self.queue[self.rear] = data \n \n def dequeue(self): \n if (self.front == -1): # codition for empty queue \n print ("Queue is Empty\\n") \n \n # condition for only one element \n elif (self.front == self.rear): \n temp=self.queue[self.front] \n self.front = -1\n self.rear = -1\n return temp \n else: \n temp = self.queue[self.front] \n self.front = (self.front + 1) % self.size \n return temp \n \n def display(self): \n \n # condition for empty queue \n if(self.front == -1): \n print ("Queue is Empty") \n \n elif (self.rear >= self.front): \n print("Elements in the circular queue are:", \n end = " ") \n for i in range(self.front, self.rear + 1): \n print(self.queue[i], end = " ") \n print () \n \n else: \n print ("Elements in Circular Queue are:", \n end = " ") \n for i in range(self.front, self.size): \n print(self.queue[i], end = " ") \n for i in range(0, self.rear + 1): \n print(self.queue[i], end = " ") \n print () \n \n if ((self.rear + 1) % self.size == self.front): \n print("Queue is Full")', 'def common_member(a, b): \n a_set = set(a) \n b_set = set(b) \n if (a_set & b_set): \n return a_set & b_set\n else: \n return "a"\n\nL = list(map(int,input().split()))\nL1 = list(map(int,input().split()))\nL2 = list(map(int,input().split()))\nLL = L + L1 + L2\nN = int(input())\nM = []\nfor i in range(N):\n ML = input()\n M.append(int(ML))\n\nres = len(common_member(M,LL))\nprint(res)\nprint(common_member(M,LL))\nif(res == 1):\n print("No")\nelif (res >= (N/2)):\n print("Yes")\n\n ', 'row1 = list(map(int,input().split()))\nrow2 = list(map(int,input().split()))\nrow3 = list(map(int,input().split()))\nn = int(input())\narr = []\nfor i in range(n):\n temp = int(input())\n arr.append(temp)\n#\nif row1[0] in arr and row1[1] in arr and row1[2] in arr or row2[0] in arr and row2[1] in arr and row2[2] in arr or row3[0] in arr and row3[1] in arr and row3[2] in arr:\n print("Yes")\n exit()\nelif row1[0] in arr and row2[0] in arr and row3[0] in arr or row1[1] in arr and row2[1] in arr and row3[1] in arr or row1[2] in arr and row2[2] in arr and row3[2] in arr:\n print("Yes")\n exit()\nelif row1[0] in arr and row2[1] in arr and row3[2] in arr or row1[2] in arr and row2[1] in arr and row3[0] in arr:\n print("Yes")\n exit()\nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s578233580', 's674838552', 's926647064'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [2157, 500, 766] |
p02760 | u670606123 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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()))\nb_list = list(map(int, input().split()))\nc_list = list(map(int, input().split()))\nN = int(input())\nd_list = [int(input()) for k in range(N)]\n\nfor n in range(3):\n for p in range(3):\n if d_list[n] == a_list[p]:\n a_list[p] = 555\n for q in range(3):\n if d_list[n] == b_list[q]:\n b_list[q] = 555\n for r in range(3):\n if d_list[n] == c_list[r]:\n c_list[r] = 555\n\nif a_list[0] == a_list[1] == a_list[2]:\n print('Yes')\n\nelif b_list[0] == b_list[1] == b_list[2]:\n print('Yes')\n\nelif c_list[0] == c_list[1] == c_list[2]:\n print('Yes')\n\nelif a_list[0] == b_list[0] == c_list[0]:\n print('Yes')\nelif a_list[1] == b_list[1] == c_list[1]:\n print('Yes')\nelif a_list[2] == b_list[2] == c_list[2]:\n print('Yes')\nelif a_list[0] == b_list[1] == c_list[2]:\n print('Yes')\n\nelif a_list[2] == b_list[1] == c_list[0]:\n print('Yes')\nelse:\n print('No')\n\n ", "a_list = list(map(int, input().split()))\nb_list = list(map(int, input().split()))\nc_list = list(map(int, input().split()))\nN = int(input())\nd_list = [int(input()) for k in range(N)]\n\n\nfor n in range(3):\n for p in range(3):\n if d_list[n] == a_list[p]:\n a_list[p] = 555\n for q in range(3):\n if d_list[n] == b_list[q]:\n b_list[q] = 555\n for r in range(3):\n if d_list[n] == c_list[r]:\n c_list[r] = 555\n\nif a_list[0] == a_list[1] == a_list[2] == 555:\n print('Yes')\n\nelif b_list[0] == b_list[1] == b_list[2] == 555:\n print('Yes')\n\nelif c_list[0] == c_list[1] == c_list[2] == 555:\n print('Yes')\n\nelif a_list[0] == b_list[0] == c_list[0] == 555:\n print('Yes')\nelif a_list[1] == b_list[1] == c_list[1] == 555:\n print('Yes')\nelif a_list[2] == b_list[2] == c_list[2] == 555:\n print('Yes')\nelif a_list[0] == b_list[1] == c_list[2] == 555:\n print('Yes')\n\nelif a_list[2] == b_list[1] == c_list[0] == 555:\n print('Yes')\nelse:\n print('No')\n", "a_list = list(map(int, input().split()))\nb_list = list(map(int, input().split()))\nc_list = list(map(int, input().split()))\nN = int(input())\nd_list = [int(input()) for k in range(N)]\n\n\nfor n in range(N):\n for p in range(3):\n if d_list[n] == a_list[p]:\n a_list[p] = 555\n for q in range(3):\n if d_list[n] == b_list[q]:\n b_list[q] = 555\n for r in range(3):\n if d_list[n] == c_list[r]:\n c_list[r] = 555\n\nif a_list[0] == a_list[1] == a_list[2] == 555:\n print('Yes')\n\nelif b_list[0] == b_list[1] == b_list[2] == 555:\n print('Yes')\n\nelif c_list[0] == c_list[1] == c_list[2] == 555:\n print('Yes')\n\nelif a_list[0] == b_list[0] == c_list[0] == 555:\n print('Yes')\nelif a_list[1] == b_list[1] == c_list[1] == 555:\n print('Yes')\nelif a_list[2] == b_list[2] == c_list[2] == 555:\n print('Yes')\nelif a_list[0] == b_list[1] == c_list[2] == 555:\n print('Yes')\n\nelif a_list[2] == b_list[1] == c_list[0] == 555:\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s374199400', 's646888965', 's241524702'] | [3192.0, 3064.0, 3064.0] | [17.0, 17.0, 18.0] | [969, 1022, 1022] |
p02760 | u672370694 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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())\nnum = [int(input()) for i in range(n)]\nBingo.append([Bingo[0][0] , Bingo[1][1],Bingo[2][2] ])\nBingo.append([Bingo[0][2] , Bingo[1][1],Bingo[2][0] ])\nk=0\nre = 'No'\nfor l in range(3):\n if len(list(set(num) & set(Bingo[l]))) == 3:\n re = 'Yes'\n break\nprint(re)", "Bingo = [ list(map(int,input().split())) for i in range(3)]\nn = int(input())\nnum = [int(input()) for i in range(n)]\nBingo.append([Bingo[0][0] , Bingo[1][1],Bingo[2][2] ])\nBingo.append([Bingo[0][2] , Bingo[1][1],Bingo[2][0] ])\nfor k in range(3):\n Bingo.append([Bingo[0][k] , Bingo[1][k],Bingo[2][k] ])\nk=0\nre = 'No'\nfor l in range(len(Bingo)):\n if len(list(set(num) & set(Bingo[l]))) == 3:\n re = 'Yes'\n break\nprint(re)"] | ['Wrong Answer', 'Accepted'] | ['s578599842', 's421067018'] | [3064.0, 3064.0] | [17.0, 18.0] | [340, 425] |
p02760 | u674052742 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['# -*- coding: utf-8 -*-\n"""\nCreated on Tue Mar 3 22:38:51 2020\n\n@author: Kanaru Sato\n"""\n\nA = []\n[A.append(list(map(int, input().split()))) for i in range(0,3)]\n\nN = int(input())\n\nb = []\n[b.append(list(map(int, input()))) for i in range(0,N)]\n\nflag = [[0, 0, 0]\n [0, 0, 0]\n [0, 0, 0]]\n\nfor i in range(0,3):\n for j in range(0,3):\n if A[i][j] in b:\n flag[i][j] = 1\n\ncolumn = 0\nraw = 0\nnaname = 0\n\nfor i in range(0,3):\n column += flag[i][0]*flag[i][1]*flag[i][2]\n raw += flag[0][i]*flag[1][i]*flag[2][i]\nnaname = flag[0][0]*flag[1][1]*flag[2][2]+flag[0][2]*flag[1][1]*flag[2][0]\n\nif column>=1 or raw>=1 or naname>=1:\n print("Yes")\nelse:\n print("No")', '# -*- coding: utf-8 -*-\n"""\nCreated on Tue Mar 3 22:38:51 2020\n\n@author: Kanaru Sato\n"""\n\nA = []\n[A.append(list(map(int, input().split()))) for i in range(0,3)]\n\nN = int(input())\n\nb = []\n[b.append(int(input())) for i in range(0,N)]\n\nflag = [[0, 0, 0],\n [0, 0, 0],\n [0, 0, 0]]\n\nfor i in range(0,3):\n for j in range(0,3):\n if A[i][j] in b:\n flag[i][j] = 1\n\ncolumn = 0\nraw = 0\nnaname = 0\n\nfor i in range(0,3):\n column += flag[i][0]*flag[i][1]*flag[i][2]\n raw += flag[0][i]*flag[1][i]*flag[2][i]\nnaname = flag[0][0]*flag[1][1]*flag[2][2]+flag[0][2]*flag[1][1]*flag[2][0]\n\nprint(flag)\n\nif column>=1 or raw>=1 or naname>=1:\n print("Yes")\nelse:\n print("No")', '# -*- coding: utf-8 -*-\n"""\nCreated on Tue Mar 3 22:38:51 2020\n\n@author: Kanaru Sato\n"""\n\nA = []\n[A.append(list(map(int, input().split()))) for i in range(0,3)]\n\nN = int(input())\n\nb = []\n[b.append(int(input())) for i in range(0,N)]\n\nflag = [[0, 0, 0],\n [0, 0, 0],\n [0, 0, 0]]\n\nfor i in range(0,3):\n for j in range(0,3):\n if A[i][j] in b:\n flag[i][j] = 1\n\ncolumn = 0\nraw = 0\nnaname = 0\n\nfor i in range(0,3):\n column += flag[i][0]*flag[i][1]*flag[i][2]\n raw += flag[0][i]*flag[1][i]*flag[2][i]\nnaname = flag[0][0]*flag[1][1]*flag[2][2]+flag[0][2]*flag[1][1]*flag[2][0]\n\n\nif column>=1 or raw>=1 or naname>=1:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s205050108', 's741043159', 's260264155'] | [3192.0, 3064.0, 3064.0] | [17.0, 19.0, 17.0] | [694, 698, 686] |
p02760 | u674064321 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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_input = input().split()\n a.append(int(a_input))\n\nfor i in range(n):\n x = input()\n for j in range(3):\n for k in range(3):\n if x == int(a[j][k]):\n a[j][k] = "0"\n\nfor i in range(3):\n if a[0][i] == "0" and a[0][i] == a[1][i] and a[0][i] == a[2][i]:\n print("Yes")\n elif a[i][0] == "0" and a[i][0] == a[i][1] and a[i][0] == a[i][2]:\n print("Yes")\n elif a[0][0] == "0" and a[0][0] == a[1][1] and a[1][1] == a[2][2]:\n print("Yes")\n elif a[0][2] == "0" and a[0][2] == a[1][1] and a[0][2] == a[2][0]:\n print("Yes")\n else:\n print("No")', 'a= []\nfor i in range(3):\n a_input = input().split()\n a.append(int(a_input))\n\nfor i in range(n):\n x = input()\n for j in range(3):\n for k in range(3):\n if x == a[j][k]:\n a[j][k] = "0"\n\nfor i in range(3):\n if a[0][i] == "0" and a[0][i] == a[1][i] and a[0][i] == a[2][i]:\n print("Yes")\n elif a[i][0] == "0" and a[i][0] == a[i][1] and a[i][0] == a[i][2]:\n print("Yes")\n elif a[0][0] == "0" and a[0][0] == a[1][1] and a[1][1] == a[2][2]:\n print("Yes")\n elif a[0][2] == "0" and a[0][2] == a[1][1] and a[0][2] == a[2][0]:\n print("Yes")\n else:\n print("No")', 'a= []\nfor i in range(3):\n a_input = input().split()\n a.append(a_input)\n\nn = int(input())\nfor i in range(n):\n x = input()\n for j in range(3):\n for k in range(3):\n if x == a[j][k]:\n a[j][k] = "0"\n\nfor i in range(3):\n if a[0][i] == "0" and a[0][i] == a[1][i] and a[0][i] == a[2][i]:\n print("Yes")\n exit()\n elif a[i][0] == "0" and a[i][0] == a[i][1] and a[i][0] == a[i][2]:\n print("Yes")\n exit()\n elif a[0][0] == "0" and a[0][0] == a[1][1] and a[1][1] == a[2][2]:\n print("Yes")\n exit()\n elif a[0][2] == "0" and a[0][2] == a[1][1] and a[0][2] == a[2][0]:\n print("Yes")\n exit()\nprint("No")\n '] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s083041966', 's843360579', 's101195451'] | [3064.0, 3064.0, 3064.0] | [18.0, 18.0, 17.0] | [611, 606, 661] |
p02760 | u674190122 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 row_sums(B):\n return sum(B[0])==0 or sum(B[1])==0 or sum(B[2]) == 0\n\ndef diagonal_sum(M):\n i,j = -1,-1\n sums = 0\n for _ in range(3):\n i += 1\n j += 1\n sums += M[i][j]\n return sums == 0\n\ndef column_sum(M):\n columns = list(zip(*M))\n return row_sums(columns)\n\nhas = [[int(x) for x in input().split()] for _ in range(3)]\ncalls = int(input())\nfor _ in range(calls):\n current = int(input())\n for i in range(3):\n if current in has[i]:\n has[i][has[i].index(current)]=0\n\n\'\'\'\nif row_sums(has) or column_sum(has) or diagonal_sum(has):\n print(\'Yes\')\nelse:print(\'No\')\n\'\'\'\nanswer = "NO"\nfor i in range(3):\n if has[i][0]==has[i][1]==has[i][2]==0:ans="Yes"\n if has[0][i]==has[1][i]==has[2][i]==0:ans="Yes"\nif has[0][0]==has[1][1]==has[2][2]==0:ans="Yes"\nif has[2][0]==has[1][1]==has[0][2]==0:ans="Yes"\nprint(answer)\n\n\n\n', 'a=[list(map(int,input().split()))for _ in range(3)]\nfor i in range(int(input())):\n b=int(input())\n for j in range(3):\n for k in range(3):\n if a[j][k]==b:a[j][k]=0\nans="No"\nfor i in range(3):\n if a[i][0]==a[i][1]==a[i][2]==0:ans="Yes"\n if a[0][i]==a[1][i]==a[2][i]==0:ans="Yes"\nif a[0][0]==a[1][1]==a[2][2]==0:ans="Yes"\nif a[2][0]==a[1][1]==a[0][2]==0:ans="Yes"\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s991460361', 's026986961'] | [3064.0, 3064.0] | [18.0, 18.0] | [893, 383] |
p02760 | u674418975 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["up = list(input().split())\nmid = list(input().split())\ndown = list(input().split())\n\ntable = [up, mid, down]\n# print(table)\nnums = []\nwhile True:\n try:\n nums.append(input())\n except EOFError:\n break\n# print(nums)\n\nfor i in range(3):\n for j in range(3):\n if table[i][j] in nums:\n table[i][j] = 'T'\n\nflag = False\n\nfor i in range(3):\n if table[i].count('T') == 3:\n print('YES')\n flag = True\n\n\nif flag == False:\n if table[0][0]=='T' and table[0][1]=='T' and table[0][2]=='T':\n print('YES')\n flag = True\n \nif flag == False:\n if table[1][0]=='T' and table[1][1]=='T' and table[1][2]=='T':\n print('YES')\n flag = True\n \nif flag == False:\n if table[2][0]=='T' and table[2][1]=='T' and table[2][2]=='T':\n print('YES')\n flag = True\n\n\nif flag == False:\n if table[0][0]=='T' and table[1][1]=='T' and table[2][2]=='T':\n print('YES')\n flag = True\n \nif flag == False:\n if table[0][2]=='T' and table[1][1]=='T' and table[2][0]=='T':\n print('YES')\n flag = True\n \nif flag == False:\n print('NO')", "up = list(input().split())\nmid = list(input().split())\ndown = list(input().split())\n\ntable = [up, mid, down]\n\nnums = []\nwhile True:\n try:\n nums.append(input())\n except EOFError:\n break\n\nfor i in range(3):\n for j in range(3):\n if table[i][j] in nums:\n table[i][j] = 'T'\n\nflag = False\n\nfor i in range(3):\n if table[i].count('T') == 3:\n print('Yes')\n flag = True\n if flag == True:\n break\n\nif flag == False:\n if table[0][0]=='T' and table[1][0]=='T' and table[2][0]=='T':\n print('Yes')\n flag = True\n \nif flag == False:\n if table[0][1]=='T' and table[1][1]=='T' and table[2][1]=='T':\n print('Yes')\n flag = True\n \nif flag == False:\n if table[0][2]=='T' and table[1][2]=='T' and table[2][2]=='T':\n print('Yes')\n flag = True\n\nif flag == False:\n if table[0][0]=='T' and table[1][1]=='T' and table[2][2]=='T':\n print('Yes')\n flag = True\n \nif flag == False:\n if table[0][2]=='T' and table[1][1]=='T' and table[2][0]=='T':\n print('Yes')\n flag = True\n \nif flag == False:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s977439136', 's567844824'] | [3064.0, 3064.0] | [17.0, 17.0] | [1097, 1062] |
p02760 | u677842374 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["A = []\nB = []\ncnt = 0\n\nfor i in range(3):\n A.append(list(map(int, input().split())))\n\nN = int(input())\n\nfor i in range(N):\n B.append(int(input()))\n\nfor i in range(3):\n for j in range(3):\n for k in B:\n if A[i][j] == k:\n A[i][j] = 0\n\nfor i in range(3): \n if A[i][0]==0 and A[i][0]==A[i][1] and A[i][1]==A[i][2]:\n print('Yes')\n \n elif A[0][i]==0 and A[0][i]==A[1][i] and A[1][i]==A[2][i]:\n print('Yes')\n \n elif A[0][0]==0 and A[0][0]==A[1][1] and A[1][1]==A[2][2]:\n print('Yes')\n elif A[0][2]==0 and A[0][2]==A[1][1] and A[1][1]==A[2][0]:\n print('Yes')\n else:\n print('No')", "A = []\nB = []\ncnt = 0\n\nfor i in range(3):\n A.append(list(map(int, input().split())))\n\nN = int(input())\n\nfor i in range(N):\n B.append(int(input()))\n\nfor i in range(3):\n for j in range(3):\n for k in B:\n if A[i][j] == k:\n A[i][j] = 0\nimport sys\nfor i in range(3): \n if A[i][0]==0 and A[i][0]==A[i][1] and A[i][1]==A[i][2]:\n print('Yes')\n sys.exit()\n elif A[0][i]==0 and A[0][i]==A[1][i] and A[1][i]==A[2][i]:\n print('Yes')\n sys.exit()\n elif A[0][0]==0 and A[0][0]==A[1][1] and A[1][1]==A[2][2]:\n print('Yes')\n sys.exit()\n elif A[0][2]==0 and A[0][2]==A[1][1] and A[1][1]==A[2][0]:\n print('Yes')\n sys.exit()\n\nprint('No')"] | ['Wrong Answer', 'Accepted'] | ['s066474760', 's659467017'] | [3064.0, 3064.0] | [17.0, 17.0] | [678, 737] |
p02760 | u678505520 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['def check(a,b):\n if a==b:\n a=-1\n\nA1=list(map(int,input().split()))\nA2=list(map(int,input().split()))\nA3=list(map(int,input().split()))\nN=int(input())\n\ni = 0\nj = 0\nwhile i<N:\n b = int(input())\n while j<3:\n check(A1[j],b)\n while j<3:\n check(A2[j],b)\n while j<3:\n check(A3[j],b)\n\nif A1[0]==A1[1]==A1[2] or A2[0]==A2[1]==A2[2] or A3[0]==A3[1]==A3[2] or A1[0]==A2[0]==A3[0] or A1[1]==A2[1]==A3[1] or A1[2]==A2[2]==A3[2] or A1[0]==A2[1]==A3[2] or A1[2]==A2[1]==A3[0]:\n print("Yes")\nelse:\n print("No")', 'def check(a,b):\n if a==b:\n a=-1\n\nA1=list(map(int,input().split()))\nA2=list(map(int,input().split()))\nA3=list(map(int,input().split()))\nN=int(input())\n\ni = 0\nj = 0\nwhile i<N:\n b = int(input())\n while j<3:\n check(A1[j],b)\n j+=1\n while j<3:\n check(A2[j],b)\n j+=1\n while j<3:\n check(A3[j],b)\n j+=1\n i+=1\n\nif A1[0]==A1[1]==A1[2] or A2[0]==A2[1]==A2[2] or A3[0]==A3[1]==A3[2] or A1[0]==A2[0]==A3[0] or A1[1]==A2[1]==A3[1] or A1[2]==A2[2]==A3[2] or A1[0]==A2[1]==A3[2] or A1[2]==A2[1]==A3[0]:\n print("Yes")\nelse:\n print("No")', 'def check(a,b):\n if a==b:\n a=-1\n\nA1=list(map(int,input().split()))\nA2=list(map(int,input().split()))\nA3=list(map(int,input().split()))\nN=int(input())\nB=list(map(int,input().split()))\n\ni = 0\nj = 0\nwhile i<N:\n while j<3:\n check(A1[j],B[i])\nwhile i<N:\n while j<3:\n check(A2[j],B[i])\nwhile i<N:\n while j<3:\n check(A3[j],B[i])\n\nif A1[0]==A1[1]==A1[2] or A2[0]==A2[1]==A2[2] or A3[0]==A3[1]==A3[2] or A1[0]==A2[0]==A3[0] or A1[1]==A2[1]==A3[1] or A1[2]==A2[2]==A3[2] or A1[0]==A2[1]==A3[2] or A1[2]==A2[1]==A3[0]:\n print("Yes")\nelse:\n print("No")', "f = lambda:list(map(int,input().split()))\nl = f() + f() + f()\nn = int(input())\ns = set()\n\nfor i in range(n):\n b = int(input())\n if b in l: s|={l.index(b)}\n\nprint(['No','Yes'][any(t<=s for t in [{0,1,2},{0,3,6},{0,4,8},{1,4,7},\n {2,4,6},{2,5,8},{3,4,5},{6,7,8}])])"] | ['Time Limit Exceeded', 'Wrong Answer', 'Time Limit Exceeded', 'Accepted'] | ['s692064692', 's859822522', 's868452453', 's497097913'] | [3064.0, 3064.0, 3064.0, 3064.0] | [2104.0, 20.0, 2104.0, 17.0] | [543, 591, 586, 306] |
p02760 | u679089074 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['#7\nA = [list(map(int,input().split())) for i in range(3)]\n\nN = int(input())\n\nB = [int(input()) for i in range(N)]\n\nC = [[0,0,0],[0,0,0],[0,0,0]]\nAns = "No"\n\nfor i in range(3):\n for j in range(3):\n if A[i][j] in B: \n C[i][j] = 1\n\nfor i in range(3):\n if C[i][1]+C[i][2]+C[i][3] == 3:\n Ans ="Yes"\n\nfor i in range(3):\n if C[1][i]+C[2][i]+C[3][i] == 3:\n Ans ="Yes"\n \nif C[1][1]+C[2][2]+C[3][2] == 3 or C[1][3]+C[2][2]+C[3][1] == 3:\n Ans = "Yes"\n \nprint(Ans)\n \n ', '#7\nA = [list(map(int,input().split())) for i in range(3)]\n\nN = int(input())\n\nB = [int(input()) for i in range(N)]\n\nC = [[0,0,0],[0,0,0],[0,0,0]]\nAns = "No"\n\nfor i in range(3):\n for j in range(3):\n if A[i][j] in B: \n C[i][j] = 1\n\nfor i in range(3):\n if C[i][0]+C[i][1]+C[i][2] == 3:\n Ans ="Yes"\n\nfor i in range(3):\n if C[0][i]+C[1][i]+C[2][i] == 3:\n Ans ="Yes"\n \nif C[0][0]+C[1][1]+C[2][2] == 3 or C[0][2]+C[1][1]+C[2][0] == 3:\n Ans = "Yes"\n \nprint(Ans)\n \n '] | ['Runtime Error', 'Accepted'] | ['s971240400', 's348595650'] | [9252.0, 9108.0] | [27.0, 28.0] | [580, 580] |
p02760 | u685510108 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A = []\nfor i in range(3):\n a = list(map(int, input().split()))\n A.append(a)\n\nN = int(input())\n\nB = []\nfor i in range(N):\n B.append(int(input()))\n\nfor b in B:\n for i in range(3):\n for j in range(3):\n if b == A[i][j]:\n A[i][j] = 0\n\nans = "NO"\nfor i in range(3):\n if A[i][0] == A[i][1] == A[i][2] == 0:\n ans = "YES"\n break\n if A[0][i] == A[1][i] == A[2][i] == 0:\n ans = "YES"\n break\n if A[0][0] == A[1][1] == A[2][2] == 0:\n ans = "YES"\n break\n if A[0][2] == A[1][1] == A[2][0] == 0:\n ans = "YES"\nprint(ans)', 'A = []\nfor i in range(3):\n a = list(map(int, input().split()))\n A.append(a)\n\nN = int(input())\n\nB = []\nfor i in range(N):\n B.append(int(input()))\n\nfor b in B:\n for i in range(3):\n for j in range(3):\n if b == A[i][j]:\n A[i][j] = 0\n\nans = "NO"\nfor i in range(3):\n if A[i][0] == A[i][1] == A[i][2] == 0:\n ans = "YES"\n break\n if A[0][i] == A[1][i] == A[2][i] == 0:\n ans = "YES"\n break\n if A[0][0] == A[1][1] == A[2][2] == 0:\n ans = "YES"\n break\n if A[0][2] == A[1][1] == A[2][0] == 0:\n ans = "YES"\nprint(ans)', 'A = []\nfor i in range(3):\n a = list(map(int, input().split()))\n A.append(a)\n\nN = int(input())\n\nB = []\nfor i in range(N):\n B.append(int(input()))\n\nfor b in B:\n print(b)\n for i in range(3):\n for j in range(3):\n if b == A[i][j]:\n A[i][j] = 0\n\nans = "NO"\nfor i in range(3):\n if A[i][0] == A[i][1] == A[i][2] == 0:\n ans = "YES"\n break\n if A[0][i] == A[1][i] == A[2][i] == 0:\n ans = "YES"\n break\n if A[0][0] == A[1][1] == A[2][2] == 0:\n ans = "YES"\n break\n if A[0][2] == A[1][1] == A[2][0] == 0:\n ans = "YES"\nprint(ans)', 'A = []\nfor i in range(3):\n a = list(map(int, input().split()))\n A.append(a)\n\nN = int(input())\n\nB = []\nfor i in range(N):\n B.append(int(input()))\n\nfor b in B:\n for i in range(3):\n for j in range(3):\n if b == A[i][j]:\n A[i][j] = 0\n\nans = "No"\nfor i in range(3):\n if A[i][0] == A[i][1] == A[i][2] == 0:\n ans = "Yes"\n break\n if A[0][i] == A[1][i] == A[2][i] == 0:\n ans = "Yes"\n break\n if A[0][0] == A[1][1] == A[2][2] == 0:\n ans = "Yes"\n break\n if A[0][2] == A[1][1] == A[2][0] == 0:\n ans = "Yes"\nprint(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s197224266', 's242196879', 's908800412', 's264418691'] | [3064.0, 3064.0, 3064.0, 3064.0] | [18.0, 17.0, 17.0, 18.0] | [609, 609, 622, 609] |
p02760 | u685684561 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["a0,a1,a2=map(int,input().split())\na3,a4,a5=map(int,input().split())\na6,a7,a8=map(int,input().split())\nN=int(input())\nb=[input() for i in range(N)]\n\nc=range(9)\nlists=[]\nlists.append(a0)\nlists.append(a1)\nlists.append(a2)\nlists.append(a3)\nlists.append(a4)\nlists.append(a5)\nlists.append(a6)\nlists.append(a7)\nlists.append(a8)\n\nlistb=[]\nfor j in range(N):\n listb.append(b[j])\n\nfor il in c:\n for ib in range(N):\n if b[ib]==lists[il]:\n k=il\n lists[k]=0\n \nif lists[0]==lists[1] and lists[2]==lists[1] and lists[0]==0:\n print ('Yes')\nelif lists[3]==lists[4] and lists[5]==lists[4] and lists[3]==0:\n print ('Yes')\nelif lists[6]==lists[7] and lists[8]==lists[7] and lists[6]==0:\n print ('Yes')\nelif lists[0]==lists[3] and lists[3]==lists[6] and lists[0]==0:\n print ('Yes')\nelif lists[1]==lists[4] and lists[4]==lists[7] and lists[1]==0:\n print ('Yes')\nelif lists[2]==lists[5] and lists[5]==lists[8] and lists[2]==0:\n print ('Yes')\nelif lists[0]==lists[4] and lists[4]==lists[8] and lists[0]==0:\n print ('Yes')\nelif lists[2]==lists[4] and lists[4]==lists[6] and lists[2]==0:\n print ('Yes')\nelse:\n print ('No')", "a0,a1,a2=map(int,input().split())\na3,a4,a5=map(int,input().split())\na6,a7,a8=map(int,input().split())\nN=int(input())\nb=[input() for i in range(N)]\n\nc=range(9)\nlists=[]\nlists.append(a0)\nlists.append(a1)\nlists.append(a2)\nlists.append(a3)\nlists.append(a4)\nlists.append(a5)\nlists.append(a6)\nlists.append(a7)\nlists.append(a8)\n\nlistb=[]\nfor j in range(N):\n listb.append(b[j])\n\nfor il in c:\n for ib in range(N):\n if b[ib]==lists[il]:\n k=il\n lists[k]=0\n \nif lists[0]==lists[1] and lists[2]==lists[1]:\n print ('Yes')\nelif lists[3]==lists[4] and lists[5]==lists[4]:\n print ('Yes')\nelif lists[6]==lists[7] and lists[8]==lists[7]:\n print ('Yes')\nelif lists[0]==lists[3] and lists[3]==lists[6]:\n print ('Yes')\nelif lists[1]==lists[4] and lists[4]==lists[7]:\n print ('Yes')\nelif lists[2]==lists[5] and lists[5]==lists[8]:\n print ('Yes')\nelif lists[0]==lists[4] and lists[4]==lists[8]:\n print ('Yes')\nelif lists[2]==lists[4] and lists[4]==lists[6]:\n print ('Yes')\nelse:\n print ('No')", "a0,a1,a2=map(int,input().split())\na3,a4,a5=map(int,input().split())\na6,a7,a8=map(int,input().split())\nN=int(input())\nb=[int(input()) for i in range(N)]\n\ns=range(9)\nlists=[]\nlists.append(a0)\nlists.append(a1)\nlists.append(a2)\nlists.append(a3)\nlists.append(a4)\nlists.append(a5)\nlists.append(a6)\nlists.append(a7)\nlists.append(a8)\n\nlistb=[]\nfor j in range(N):\n listb.append(b[j])\nt=0\nfor il in range(9):\n for ib in range(N):\n if b[ib]==lists[il]:\n lists[il]=0\n \nif lists[0]==lists[1] and lists[2]==lists[1] and lists[0]==0:\n print ('Yes')\nelif lists[3]==lists[4] and lists[5]==lists[4] and lists[3]==0:\n print ('Yes')\nelif lists[6]==lists[7] and lists[8]==lists[7] and lists[6]==0:\n print ('Yes')\nelif lists[0]==lists[3] and lists[3]==lists[6] and lists[0]==0:\n print ('Yes')\nelif lists[1]==lists[4] and lists[4]==lists[7] and lists[1]==0:\n print ('Yes')\nelif lists[2]==lists[5] and lists[5]==lists[8] and lists[2]==0:\n print ('Yes')\nelif lists[0]==lists[4] and lists[4]==lists[8] and lists[0]==0:\n print ('Yes')\nelif lists[2]==lists[4] and lists[4]==lists[6] and lists[2]==0:\n print ('Yes')\nelse:\n print ('No')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s009175660', 's892620791', 's214642428'] | [3192.0, 3188.0, 3192.0] | [19.0, 18.0, 19.0] | [1167, 1039, 1136] |
p02760 | u686713618 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["Card=[list(map(int,input().split())) for i in range(3)]\nN=int(input())\nb=[int(input()) for i in range(N)]\nfor i in range(N):\n for j in range(3):\n for k in range(3):\n if A[j][k]==b[i]:\n A[j][k]=0\nif (A[0][0]==A[0][1]==A[0][2]==0) or (A[1][0]==A[1][1]==A[1][2]==0) or (A[2][0]==A[2][1]==A[2][2]==0) or (A[0][0]==A[1][0]==A[2][0]==0) or (A[0][1]==A[1][1]==A[2][1]==0) or (A[0][2]==A[1][2]==A[2][2]==0) or (A[0][0] == A[1][1] == A[2][2] == 0) or (A[2][0]==A[1][1]==A[0][2]==0):\n print('Yes')\nelse:\n print('No')", "card=[list(map(int,input().split())) for i in range(3)]\nN=int(input())\nb=[int(input()) for i in range(N)]\nfor i in range(N):\n for j in range(3):\n for k in range(3):\n if card[j][k]==b[i]:\n card[j][k]=0\nif (card[0][0]==card[0][1]==card[0][2]==0) or (card[1][0]==card[1][1]==card[1][2]==0) or (card[2][0]==card[2][1]==card[2][2]==0) or (card[0][0]==card[1][0]==card[2][0]==0) or (card[0][1]==card[1][1]==card[2][1]==0) or (card[0][2]==card[1][2]==card[2][2]==0) or (card[0][0] == card[1][1] == card[2][2] == 0) or (card[2][0]==card[1][1]==card[0][2]==0):\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s351358878', 's745553995'] | [3064.0, 3064.0] | [17.0, 17.0] | [549, 627] |
p02760 | u692498898 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["d=[list(map(int,input().split()))for i in range(3)]\nrow=int(input())\nnum=[int(input()) for j in range(row)]\nbingo=0\nfor a in range(3):\n if d[0][a] and d[1][a] and d[2][a] in num:\n bingo=bingo+1\n elif d[a][0] and d[a][1] and d[a][1] in num:\n bingo=bingo+1\nif d[1][1] and d[2][2] and d[3][3] in num:\n bingo=bingo+1\nelif d[3][1] and d[2][2] and d[1][3] in num:\n bingo=bingo+1\nif bingo>0:\n print('Yes')\nelse:\n print('No')", "d=[list(map(int,input().split()))for i in range(3)]\nrow=int(input())\nnum=[int(input()) for j in range(row)]\nbingo=0\nfor a in range(3):\n if d[0][a] in num and d[1][a] in num and d[2][a] in num:\n bingo=bingo+1\n if d[a][0] in num and d[a][1] in num and d[a][2] in num:\n bingo=bingo+1\nif d[1][1] in num and d[2][2] in num and d[0][0] in num:\n bingo=bingo+1\nif d[1][1] in num and d[0][2] in num and d[2][0] in num:\n bingo=bingo+1\nif bingo>0:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s934206272', 's677808257'] | [3064.0, 3064.0] | [18.0, 17.0] | [429, 481] |
p02760 | u692632484 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["A=[[int(i) for i in input().split()] for _ in range(3)]\nN=int(input())\nfor _ in range(N):\n b=int(input())\n for i in range(3):\n for j in range(3):\n if A[i][j]==b:\n A[i][j]=-1\nflag=False\nfor h in range(3):\n cnt=0\n for w in range(3):\n if A[h][w]==-1:\n cnt+=1\n if cnt==3:\n flag=True\nfor w in range(3):\n cnt=0\n for h in range(3):\n if A[h][w]==-1:\n cnt+=1\n if cnt==3:\n flag=True\ncnt=0\nif A[d][d]==-1:\n cnt+=1\nif cnt==3:\n flag=True\ncnt=0\nif A[d][-d]==-1:\n cnt+=1\nif cnt==3:\n flag=True\nprint('Yes' if flag else 'No')\n", "A=[[int(i) for i in input().split()] for _ in range(3)]\nN=int(input())\nfor _ in range(N):\n b=int(input())\n for i in range(3):\n for j in range(3):\n if A[i][j]==b:\n A[i][j]=-1\nflag=False\nfor h in range(3):\n cnt=0\n for w in range(3):\n if A[h][w]==-1:\n cnt+=1\n if cnt==3:\n flag=True\nfor w in range(3):\n cnt=0\n for h in range(3):\n if A[h][w]==-1:\n cnt+=1\n if cnt==3:\n flag=True\ncnt=0\nfor d in range(3):\n if A[d][d]==-1:\n cnt+=1\nif cnt==3:\n flag=True\ncnt=0\nfor d in range(3):\n if A[d][2-d]==-1:\n cnt+=1\nif cnt==3:\n flag=True\nprint('Yes' if flag else 'No')\n"] | ['Runtime Error', 'Accepted'] | ['s061899429', 's874644646'] | [3064.0, 3064.0] | [17.0, 17.0] | [628, 683] |
p02760 | u693134887 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['a1 = [int(x) for x in input().split()]\na2 = [int(x) for x in input().split()]\na3 = [int(x) for x in input().split()]\nn = int(input())\nb = []\nfor _ in range(n):\n b.append(input())\nres = ""\nfor x in b:\n if int(x) == int(a1[0]):\n print(x)\n res += "1"\n if int(x) == int(a2[1]):\n res += "1"\n if int(x) == int(a3[2]):\n res += "1"\nif res == "111":\n print("Yes")\nelse:\n print("No")\n', 'a1 = [int(x) for x in input().split()]\na2 = [int(x) for x in input().split()]\na3 = [int(x) for x in input().split()]\nn = int(input())\nb = []\nfor _ in range(n):\n b.append(input())\nres = ""\nfor x in b:\n if int(x) == int(a1[0]):\n res += "1"\n if int(x) == int(a2[1]):\n res += "1"\n if int(x) == int(a3[2]):\n res += "1"\n if int(x) == int(a1[0]):\n res += "2"\n if int(x) == int(a1[1]):\n res += "2"\n if int(x) == int(a1[2]):\n res += "2"\n if int(x) == int(a2[0]):\n res += "3"\n if int(x) == int(a2[1]):\n res += "3"\n if int(x) == int(a2[2]):\n res += "3"\n if int(x) == int(a3[0]):\n res += "4"\n if int(x) == int(a3[1]):\n res += "4"\n if int(x) == int(a3[2]):\n res += "4"\n if int(x) == int(a1[0]):\n res += "5"\n if int(x) == int(a2[0]):\n res += "5"\n if int(x) == int(a3[0]):\n res += "5"\n if int(x) == int(a1[1]):\n res += "6"\n if int(x) == int(a2[1]):\n res += "6"\n if int(x) == int(a3[1]):\n res += "6"\n if int(x) == int(a1[2]):\n res += "7"\n if int(x) == int(a2[2]):\n res += "7"\n if int(x) == int(a3[2]):\n res += "7"\n if int(x) == int(a1[2]):\n res += "8"\n if int(x) == int(a2[1]):\n res += "8"\n if int(x) == int(a3[0]):\n res += "8"\nif res == "111" or res == "222" or res == "333" or res=="444" or res=="555" or res=="666" or res==\'777\' or res =="888":\n print("Yes")\nelse:\n print("No")\n', 'a1 = [int(x) for x in input().split()]\na2 = [int(x) for x in input().split()]\na3 = [int(x) for x in input().split()]\nn = int(input())\nb = []\nfor _ in range(n):\n b.append(int(input()))\nres = []\nfor x in b:\n for i in range(3):\n if x == a1[i]:\n res += "1"\n if x == a2[i]:\n res += "2"\n if x == a3[i]:\n res += "3"\n if x == a1[0] or x == a2[0] or x == a3[0]:\n res += "4"\n if x == a1[1] or x == a2[1] or x == a3[1]:\n res += "5"\n if x == a1[2] or x == a2[2] or x == a3[2]:\n res += "6"\n if x == a1[0] or x == a2[1] or x == a3[2]:\n res += "7"\n if x == a1[2] or x == a2[1] or x == a3[0]:\n res += "8"\nif res.count("1")>=3 or res.count("2")>=3 or res.count("3")>=3 or res.count("4")>=3 or res.count("5")>=3 or res.count("6")>=3 or res.count("7")>=3 or res.count("8")>=3:\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s229069163', 's946610209', 's324974884'] | [3064.0, 3192.0, 3064.0] | [17.0, 18.0, 17.0] | [420, 1514, 907] |
p02760 | u693200186 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['a = [input().split() for l in range(3)]\nn = int(input())\nb = [input() for i in range(n)]\nc = [a[0][0],a[1][1],a[2][2]]\nd = [a[0][2],a[1][1],a[2][0]]\ntate1 = len(set(a[0]) & set(b))\ntate2 = len(set(a[1]) & set(b))\ntate3 = len(set(a[2]) & set(b))\nyoko1 = len(set([x[0] for x in a]) & set(b))\nyoko2 = len(set([x[1] for x in a]) & set(b))\nyoko3 = len(set([x[2] for x in a]) & set(b))\nnaname1 = len(set(c) & set(b))\nnaname2 = len(set(d) & set(b))\nbingo = [tate1,tate2,tate3,yoko1,yoko2,yoko3,naname1,naname2]\nif 3 in bingo:\n print("bingo")\nelse:\n print("NG")', 'a = [input().split() for l in range(3)]\nprint(a)\nn = int(input())\nprint(n)\nb = [input() for i in range(n)]\nprint(b)\nc = [a[0][0],a[1][1],a[2][2]]\nd = [a[0][2],a[1][1],a[2][0]]\ntate1 = len(set(a[0]) & set(b))\ntate2 = len(set(a[1]) & set(b))\ntate3 = len(set(a[2]) & set(b))\nyoko1 = len(set([x[0] for x in a]) & set(b))\nyoko2 = len(set([x[1] for x in a]) & set(b))\nyoko3 = len(set([x[2] for x in a]) & set(b))\nnaname1 = len(set(c) & set(b))\nnaname2 = len(set(d) & set(b))\nbingo = [tate1,tate2,tate3,yoko1,yoko2,yoko3,naname1,naname2]\nif 3 in bingo:\n print("Yes")\nelse:\n print("No")', 'a = [input().split() for l in range(3)]\nn = int(input())\nb = [input() for i in range(n)]\nc = [a[0][0],a[1][1],a[2][2]]\nd = [a[0][2],a[1][1],a[2][0]]\ntate1 = len(set(a[0]) & set(b))\ntate2 = len(set(a[1]) & set(b))\ntate3 = len(set(a[2]) & set(b))\nyoko1 = len(set([x[0] for x in a]) & set(b))\nyoko2 = len(set([x[1] for x in a]) & set(b))\nyoko3 = len(set([x[2] for x in a]) & set(b))\nnaname1 = len(set(c) & set(b))\nnaname2 = len(set(d) & set(b))\nbingo = [tate1,tate2,tate3,yoko1,yoko2,yoko3,naname1,naname2]\nif 3 in bingo:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s198461182', 's495810988', 's958013058'] | [3064.0, 3064.0, 3064.0] | [17.0, 18.0, 18.0] | [555, 580, 553] |
p02760 | u693933222 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['import numpy as np\n\n\na = []\n\nfor i in range(3):\n a.append(list(map(int, input().split())))\n\n\na = np.array(a)\n\n#print(a)\n\nn = int(input())\n\nfor i in range(n):\n b = int(input())\n for j in a:\n for k in j:\n if (k == b):\n k = 0\n break\n\nans = min(sum(a[0]), sum(a[1]), sum(a[2]))\nans = min(ans, (a[0][0] + a[1][1] + a[2][2]), a[0][2] + a[1][1] + a[2][0])\na.T\nans = min(ans,sum(a[0]), sum(a[1]), sum(a[2]))\n\nprint(["No","Yes"][ans == 0])', 'a = []\n\nfor i in range(3):\n a.append(list(map(int, input().split())))\n\nn = int(input())\n\nfor i in range(n):\n b = int(input())\n for j in range(3):\n for k in range(3):\n if (a[j][k] == b):\n a[j][k] = 0\n break\n\n#print(a)\n\nans = min(sum(a[0]), sum(a[1]), sum(a[2]),(a[0][0] + a[1][1] + a[2][2]), (a[0][2] + a[1][1] + a[2][0]),(a[0][0] + a[1][0] + a[2][0]),(a[0][1] + a[1][1] + a[2][1]),(a[0][2] + a[1][2] + a[2][2]))\n\nprint(["No","Yes"][ans == 0])'] | ['Wrong Answer', 'Accepted'] | ['s330760016', 's415639916'] | [14412.0, 3064.0] | [150.0, 17.0] | [487, 499] |
p02760 | u696010640 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["A = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\n\nval = 0\nflag = False\n\nfor i in range(N):\n b = int(input())\n for j in range(3):\n for k in range(3):\n if A[j][k] == b:\n A[j][k] = 0\n\nval = 0\nfor i in range(3):\n val += A[i]\nif val == 0:\n flag True\n\nval = A[0][2] + A[1][1] + A[2][0]\nif val == 0:\n flag = True\n\nfor i in range(3):\n if sum(A[i]) == 0:\n flag = True\n \n val = 0\n for j in range(3):\n val += A[j][i]\n if val == 0:\n flag = True\n\nif flag == True:\n print('Yes')\nelse:\n print('No')", "A = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\n\nval = 0\nflag = False\n\nfor i in range(N):\n b = int(input())\n for j in range(3):\n for k in range(3):\n if A[j][k] == b:\n A[j][k] = 0\n\nval = 0\nfor i in range(3):\n val += A[i]\nif val == 0:\n flag = True\n\nval = A[0][2] + A[1][1] + A[2][0]\nif val == 0:\n flag = True\n\nfor i in range(3):\n if sum(A[i]) == 0:\n flag = True\n \n val = 0\n for j in range(3):\n val += A[j][i]\n if val == 0:\n flag = True\n\nif flag == True:\n print('Yes')\nelse:\n print('No')", "A = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\n\nval = 0\nflag = False\n\nfor i in range(N):\n b = int(input())\n for j in range(3):\n for k in range(3):\n if A[j][k] == b:\n A[j][k] = 0\n\nval = A[0][2] + A[1][1] + A[2][0]\nif val == 0:\n flag = True\n\nfor i in range(3):\n if sum(A[i]) == 0:\n flag = True\n \n val = 0\n for j in range(3):\n val += A[j][i]\n if val == 0:\n flag = True\n\nif flag == True:\n print('Yes')\nelse:\n print('No')", "A = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\n\nval = 0\nflag = False\n\nfor i in range(N):\n b = int(input())\n for j in range(3):\n for k in range(3):\n if A[j][k] == b:\n A[j][k] = 0\n\nval = 0\nfor i in range(3):\n val += A[i][i]\nif val == 0:\n flag = True\n\nval = A[0][2] + A[1][1] + A[2][0]\nif val == 0:\n flag = True\n\nfor i in range(3):\n if sum(A[i]) == 0:\n flag = True\n \n val = 0\n for j in range(3):\n val += A[j][i]\n if val == 0:\n flag = True\n\nif flag == True:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s614768722', 's707608003', 's969005412', 's657304862'] | [9000.0, 9176.0, 9160.0, 9168.0] | [24.0, 30.0, 24.0, 26.0] | [597, 599, 526, 602] |
p02760 | u696969901 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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_ROW_NO = 3\n\nA = []\nfor i in range(BINGO_ROW_NO):\n A.append(input().split())\nprint(A)\n\nN = int(input())\n\n\n\ndef SetBingo(A, b):\n for y in range(BINGO_ROW_NO - 1):\n for x in range(BINGO_ROW_NO - 1):\n if A[y][x] == b:\n A[y][x] = ''\n return \n return \n\nfor _ in range(N):\n b = input()\n SetBingo(A, b)\n\nisBingo = False\n\n\nfor i in range(BINGO_ROW_NO):\n if A[i][0] == '' and A[i][1] == '' and A[i][2] == '':\n isBingo = True\n\nfor i in range(BINGO_ROW_NO):\n if A[0][i] == '' and A[1][i] == '' and A[2][i] == '':\n isBingo = True\n\nfor i in range(BINGO_ROW_NO):\n if A[i][i] != '':\n break\n isBingo = True\n\nfor i in range(BINGO_ROW_NO):\n if A[i][BINGO_ROW_NO - 1 - i] != '':\n break\n isBingo = True\n\nif isBingo:\n print('Yes')\nelse:\n print('No')\n", "BINGO_ROW_NO = 3\n\nA = []\nfor i in range(BINGO_ROW_NO):\n A.append(input().split())\n\nN = int(input())\n\n\n\ndef SetBingo(A, b):\n for y in range(BINGO_ROW_NO):\n for x in range(BINGO_ROW_NO):\n if A[y][x] == b:\n A[y][x] = ''\n return \n return \n\nfor _ in range(N):\n b = input()\n SetBingo(A, b)\n\nisBingo = False\n\n\nfor i in range(BINGO_ROW_NO):\n if A[i][0] == '' and A[i][1] == '' and A[i][2] == '':\n isBingo = True\n\nfor i in range(BINGO_ROW_NO):\n if A[0][i] == '' and A[1][i] == '' and A[2][i] == '':\n isBingo = True\n\nif A[0][0] == '' and A[1][1] == '' and A[2][2] == '':\n isBingo = True\n\nif A[0][2] == '' and A[1][1] == '' and A[2][0] == '':\n isBingo = True\n\nif isBingo:\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s371229255', 's365204475'] | [3064.0, 3064.0] | [17.0, 17.0] | [902, 842] |
p02760 | u697101155 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\nimport sys\n\nA = []\nfor i in range(3):\n row = list(map(int, input().split()))\n A.append(row)\nN = int(input())\nb = []\nfor i in range(N):\n k = int(input())\n b.append(k)\n\nfor k in b:\n for row in A:\n for elem in row:\n if k == elem:\n elem = 0\n\n\ns_row = np.sum(A, axis=1)\nfor i in range(3):\n if s_row[i] == 0:\n print('Yes')\n sys.exit()\n\n\ns_col = np.sum(A, axis=0)\nfor i in range(3):\n if s_col[i] == 0:\n print('Yes')\n sys.exit()\n\nc = 0\nfor i in range(3):\n c += A[i][i]\nif c == 0:\n print('Yes')\n sys.exit()\n\nc = 0\nfor i in range(3):\n c += A[3-i-1][i]\nif c == 0:\n print('Yes')\n sys.exit()\n\nprint('No')", "import numpy as np\nimport sys\n\nfor i in range(3):\n A = list(map(int, input().split()))\nN = int(input())\nb = []\nfor i in range(N):\n k = int(input())\n b.append(k)\nfor k in b:\n for row in A:\n for elem in row:\n if k == elem:\n elem = 0\n\n\nrow = np.sum(A, axis=1)\nfor i in range(3):\n if row[i] == 0:\n print('Yes')\n sys.exit()\n\n\ncol = np.sum(A, axis=0)\nfor i in range(3):\n if col[i] == 0:\n print('Yes')\n sys.exit()\n\nc = 0\nfor i in range(3):\n c += A[i][i]\nif c == 0:\n print('Yes')\n sys.exit()\n\nc = 0\nfor i in range(3):\n c += A[3-i-1][i]\nif c == 0:\n print('Yes')\n sys.exit()\n\nprint('No')", "import numpy as np\nimport sys\n \nA = []\nfor i in range(3):\n array = list(map(int, input().split()))\n A.append(array)\nN = int(input())\nb = []\nfor i in range(N):\n k = int(input())\n b.append(k)\nfor k in b:\n for row in A:\n for elem in row:\n if k == elem:\n elem = 0\n \n \nrow = np.sum(A, axis=1)\nfor i in range(3):\n if row[i] == 0:\n print('Yes')\n sys.exit()\n \n \ncol = np.sum(A, axis=0)\nfor i in range(3):\n if col[i] == 0:\n print('Yes')\n sys.exit()\n \nc = 0\nfor i in range(3):\n c += A[i][i]\nif c == 0:\n print('Yes')\n sys.exit()\n \nc = 0\nfor i in range(3):\n c += A[3-i-1][i]\nif c == 0:\n print('Yes')\n sys.exit()\n \nprint('No')", "import numpy as np\nimport sys\n\nA = []\nfor i in range(3):\n array = list(map(int, input().split()))\n A.append(array)\nN = int(input())\nb = []\nfor i in range(N):\n k = int(input())\n b.append(k)\n\nfor k in b:\n for row in A:\n for elem in row:\n if k == elem:\n elem = 0\n\n\ns_row = np.sum(A, axis=1)\nfor i in range(3):\n if s_row[i] == 0:\n print('Yes')\n sys.exit()\n\n\ns_col = np.sum(A, axis=0)\nfor i in range(3):\n if s_col[i] == 0:\n print('Yes')\n sys.exit()\n\nc = 0\nfor i in range(3):\n c += A[i][i]\nif c == 0:\n print('Yes')\n sys.exit()\n\nc = 0\nfor i in range(3):\n c += A[3-i-1][i]\nif c == 0:\n print('Yes')\n sys.exit()\n\nprint('No')", "import numpy as np\nimport sys\n\nA = []\nfor i in range(3):\n array = list(map(int, input().split()))\n A.append(array)\nN = int(input())\nb = []\nfor i in range(N):\n k = int(input())\n b.append(k)\n\nfor k in range(len(b)):\n for i in range(len(A)):\n for j in range(len(A[i])):\n if b[k] == A[i][j]:\n A[i][j] = 0\n\n\ns_row = np.sum(A, axis=1)\nfor i in range(3):\n if s_row[i] == 0:\n print('Yes')\n sys.exit()\n\n\ns_col = np.sum(A, axis=0)\nfor i in range(3):\n if s_col[i] == 0:\n print('Yes')\n sys.exit()\n\nc = 0\nfor i in range(3):\n c += A[i][i]\nif c == 0:\n print('Yes')\n sys.exit()\n\nc = 0\nfor i in range(3):\n c += A[3-i-1][i]\nif c == 0:\n print('Yes')\n sys.exit()\n\nprint('No')"] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s267520848', 's427634107', 's598324660', 's937538724', 's757297793'] | [12504.0, 13216.0, 13408.0, 12484.0, 12484.0] | [154.0, 164.0, 150.0, 150.0, 149.0] | [710, 674, 713, 714, 755] |
p02760 | u700138719 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['list1 = []\nfor x in range(3):\n list1.append([int(i)for i in input().split()])\nn = int(input())\nindices = []\nfor x in range(n):\n val = int(input())\n if val in list1[0]:\n indices.append([list1[0].index(val),0])\n elif val in list1[1]:\n indices.append([list1[1].index(val),1])\n elif val in list1[2]:\n indices.append([list1[2].index(val),2])\n else:\n indices.append(-1)\nif [0,0] in indices and [0,1] in indices and [0,2] in indices:\n print("YES")\nelif [1,0] in indices and [1,1] in indices and [1,2] in indices:\n print("YES")\nelif [2,0] in indices and [2,1] in indices and [2,2] in indices:\n print("YES")\nelif [0,0] in indices and [1,0] in indices and [2,0] in indices:\n print("YES")\nelif [0,1] in indices and [1,1] in indices and [2,1] in indices:\n print("YES")\nelif [0,2] in indices and [1,2] in indices and [2,2] in indices:\n print("YES")\nelif [0,0] in indices and [1,1] in indices and [2,2] in indices:\n print("YES")\nelse:\n print("NO")', 'list1 = []\nfor x in range(3):\n list1.append([int(i)for i in input().split()])\nn = int(input())\nindices = []\nfor x in range(n):\n val = int(input())\n if val in list1[0]:\n indices.append([list1[0].index(val),0])\n elif val in list1[1]:\n indices.append([list1[1].index(val),1])\n elif val in list1[2]:\n indices.append([list1[2].index(val),2])\n else:\n indices.append(-1)\nif [0,0] in indices and [0,1] in indices and [0,2] in indices:\n print("Yes")\nelif [1,0] in indices and [1,1] in indices and [1,2] in indices:\n print("Yes")\nelif [2,0] in indices and [2,1] in indices and [2,2] in indices:\n print("Yes")\nelif [0,0] in indices and [1,0] in indices and [2,0] in indices:\n print("Yes")\nelif [0,1] in indices and [1,1] in indices and [2,1] in indices:\n print("Yes")\nelif [0,2] in indices and [1,2] in indices and [2,2] in indices:\n print("Yes")\nelif [0,0] in indices and [1,1] in indices and [2,2] in indices:\n print("Yes")\nelif [0,2] in indices and [1,1] in indices and [2,0] in indices:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s205026883', 's123008153'] | [3064.0, 3064.0] | [17.0, 17.0] | [1003, 1085] |
p02760 | u703214333 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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)]\nmaze=[["*" for i in range(3)] for _ in range(3)]\nfor i in range(3):\n for j in range(3):\n for k in range(n):\n if b[i]==a[j][k]:\n maze[j][k]="#"\nfor i in range(3):\n f=1\n for j in range(3):\n if maze[i][j]!="#":\n f=0\n break\n if f:\n print("Yes")\n exit()\nfor i in range(3):\n fc=1\n for j in range(3):\n if maze[j][i]!="#":\n fc=0\n break\n if fc:\n print("Yes")\n exit()\nfor i in range(3):\n fa=1\n if maze[i][i]!="#":\n fa=0\n break\nif fa:\n print("Yes")\n exit()\nfor i in range(3):\n fe=1\n if maze[i][2-i]!="#":\n fe=0\n break\nif fe:\n print("Yes")\n exit()\nprint("No")', 'a=[list(map(int,input().split())) for _ in range(3)]\nn=int(input())\nb=[int(input()) for _ in range(n)]\nmaze=[["*" for i in range(3)] for _ in range(3)]\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 maze[j][k]="#"\nfor i in range(3):\n f=1\n for j in range(3):\n if maze[i][j]!="#":\n f=0\n break\n if f:\n print("Yes")\n exit()\nfor i in range(3):\n fc=1\n for j in range(3):\n if maze[j][i]!="#":\n fc=0\n break\n if fc:\n print("Yes")\n exit()\nfor i in range(3):\n fa=1\n if maze[i][i]!="#":\n fa=0\n break\nif fa:\n print("Yes")\n exit()\nfor i in range(3):\n fe=1\n if maze[i][2-i]!="#":\n fe=0\n break\nif fe:\n print("Yes")\n exit()\nprint("No")'] | ['Runtime Error', 'Accepted'] | ['s684894945', 's911858888'] | [3064.0, 3064.0] | [17.0, 17.0] | [842, 842] |
p02760 | u706785092 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 = input().split()\nd, e, f = input().split()\ng, h, i = input().split()\nN = int(input())\n\nnum_list = []\nfor _ in range(N):\n num_list.append(int(input()))\n\nfor j in num_list:\n if a == j:\n a = 101\n if b == j:\n b = 101\n if c == j:\n c = 101\n if d == j:\n d = 101\n if e == j:\n e = 101\n if f == j:\n f = 101\n if g == j:\n g = 101\n if h == j:\n h = 101\n if i == j:\n i = 101\n\nanswer = 'No'\nif a + b + c == 303:\n answer = 'Yes'\nif d + e + f == 303:\n answer = 'Yes'\nif g + h + i == 303:\n answer = 'Yes'\nif a + d + g == 303:\n answer = 'Yes'\nif b + e + h == 303:\n answer = 'Yes'\nif c + f + i == 303:\n answer = 'Yes'\nif a + e + i == 303:\n answer = 'Yes'\nif c + e + g == 303:\n answer = 'Yes'\n\nprint(answer)", "a, b, c = map(int, input().split())\nd, e, f = map(int, input().split())\ng, h, i = map(int, input().split())\nN = int(input())\n\nnum_list = []\nfor _ in range(N):\n num_list.append(int(input()))\n\nfor j in num_list:\n if a == j:\n a = 101\n if b == j:\n b = 101\n if c == j:\n c = 101\n if d == j:\n d = 101\n if e == j:\n e = 101\n if f == j:\n f = 101\n if g == j:\n g = 101\n if h == j:\n h = 101\n if i == j:\n i = 101\n\nanswer = 'No'\nif a + b + c == 303:\n answer = 'Yes'\nif d + e + f == 303:\n answer = 'Yes'\nif g + h + i == 303:\n answer = 'Yes'\nif a + d + g == 303:\n answer = 'Yes'\nif b + e + h == 303:\n answer = 'Yes'\nif c + f + i == 303:\n answer = 'Yes'\nif a + e + i == 303:\n answer = 'Yes'\nif c + e + g == 303:\n answer = 'Yes'\n\nprint(answer)"] | ['Wrong Answer', 'Accepted'] | ['s699921453', 's059400097'] | [3064.0, 3064.0] | [17.0, 17.0] | [811, 841] |
p02760 | u707659359 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["import sys\ncard = [[int(x) for x in input().split(' ') ] for _ in range(3)]\n\npatterns = []\n\npatterns += [[card[i][j] for i in range(3)] for j in range(3)]\npatterns += [[card[j][i] for i in range(3)] for j in range(3)]\npatterns.append([card[i][i] for i in range(3)])\npatterns.append([card[2-i][2-i] for i in range(3)] )\n\nN = int(input())\nfor _ in range(N):\n b = int(input())\n for pat in patterns:\n if b in pat:\n pat.remove(b)\n \n if len(pat)==0:\n print('YES')\n sys.exit()\n\nprint('NO')", "import sys\ncard = [[int(x) for x in input().split(' ') ] for _ in range(3)]\n\npatterns = []\n\npatterns += [[card[i][j] for i in range(3)] for j in range(3)]\npatterns += [[card[j][i] for i in range(3)] for j in range(3)]\npatterns.append([card[i][i] for i in range(3)])\npatterns.append([card[i][2-i] for i in range(3)] )\n\nprint(patterns)\n\nok = False\nN = int(input())\nfor _ in range(N):\n b = int(input())\n for pat in patterns:\n while b in pat:\n pat.remove(b)\n \nprint(patterns)\n \nfor pat in patterns:\n if len(pat) == 0:\n print('Yes')\n sys.exit()\n\nprint('No')", "import sys\ncard = [[int(x) for x in input().split(' ') ] for _ in range(3)]\n\npatterns = []\n\npatterns += [[card[i][j] for i in range(3)] for j in range(3)]\npatterns += [[card[j][i] for i in range(3)] for j in range(3)]\npatterns.append([card[i][i] for i in range(3)])\npatterns.append([card[2-i][2-i] for i in range(3)] )\n\nok = False\nN = int(input())\nfor _ in range(N):\n b = int(input())\n for pat in patterns:\n if b in pat:\n pat.remove(b)\n \n if len(pat)==0:\n ok = True\n\nif ok:\n print('YES')\nelse:\n print('NO')", "import sys\ncard = [[int(x) for x in input().split(' ') ] for _ in range(3)]\n\npatterns = []\n\npatterns += [[card[i][j] for i in range(3)] for j in range(3)]\npatterns += [[card[j][i] for i in range(3)] for j in range(3)]\npatterns.append([card[i][i] for i in range(3)])\npatterns.append([card[i][2-i] for i in range(3)] )\n\nok = False\nN = int(input())\nfor _ in range(N):\n b = int(input())\n for pat in patterns:\n while b in pat:\n pat.remove(b)\n \nfor pat in patterns:\n if len(pat) == 0:\n print('Yes')\n sys.exit()\n\nprint('No')"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s038010866', 's778431523', 's810267167', 's831763228'] | [3064.0, 3064.0, 3064.0, 3064.0] | [18.0, 17.0, 18.0, 18.0] | [542, 603, 561, 569] |
p02760 | u712429027 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\ninput = sys.stdin.readline\nins = lambda: input().rstrip()\nini = lambda: int(input().rstrip())\ninm = lambda: map(int, input().rstrip().split())\ninl = lambda: list(map(int, input().split()))\nout = lambda x, s=\'\\n\': print(s.join(map(str, x)))\n\na = inl()\nb = inl()\nc = inl()\nn = ini()\nbingo = []\nfor _ in range(n):\n bingo.append(ini())\nct = [0] * 9\nfor i in bingo:\n if i in a:\n ct[a.index(i)] = 1\n if i in b:\n ct[b.index(i) + 3] = 1\n if i in c:\n ct[c.index(i) + 6] = 1\nprint(ct)\nif sum(ct[:3]) == 3 or sum(ct[3:6]) == 3 or sum(ct[6:9]) == 3:\n print("Yes")\nelif ct[0] + ct[4] + ct[8] == 3 or ct[2] + ct[4] + ct[6] == 3:\n print("Yes")\nelif ct[0] + ct[3] + ct[6] == 3 or ct[1] + ct[4] + ct[7] == 3 or ct[2] + ct[5] + ct[8] == 3:\n print("Yes")\nelse:\n print("No") ', 'import sys\ninput = sys.stdin.readline\nins = lambda: input().rstrip()\nini = lambda: int(input().rstrip())\ninm = lambda: map(int, input().rstrip().split())\ninl = lambda: list(map(int, input().split()))\nout = lambda x, s=\'\\n\': print(s.join(map(str, x)))\n\na = inl()\nb = inl()\nc = inl()\nn = ini()\nbingo = []\nfor _ in range(n):\n bingo.append(ini())\nct = [0] * 9\nfor i in bingo:\n if i in a:\n ct[a.index(i)] = 1\n if i in b:\n ct[b.index(i) + 3] = 1\n if i in c:\n ct[c.index(i) + 6] = 1\nif sum(ct[:3]) == 3 or sum(ct[3:6] or sum(ct[6:9]) == 3):\n print("YES")\nelif ct[0] + ct[4] + ct[8] == 3 or ct[2] + ct[4] + ct[6]:\n print("YES")\nelse:\n print("NO") ', 'import sys\ninput = sys.stdin.readline\nins = lambda: input().rstrip()\nini = lambda: int(input().rstrip())\ninm = lambda: map(int, input().rstrip().split())\ninl = lambda: list(map(int, input().split()))\nout = lambda x, s=\'\\n\': print(s.join(map(str, x)))\n\na = inl()\nb = inl()\nc = inl()\nn = ini()\nbingo = []\nfor _ in range(n):\n bingo.append(ini())\nct = [0] * 9\nfor i in bingo:\n if i in a:\n ct[a.index(i)] = 1\n if i in b:\n ct[b.index(i) + 3] = 1\n if i in c:\n ct[c.index(i) + 6] = 1\nif sum(ct[:3]) == 3 or sum(ct[3:6]) == 3 or sum(ct[6:9]) == 3:\n print("Yes")\nelif (ct[0] + ct[4] + ct[8]) == 3 or (ct[2] + ct[4] + ct[6]) == 3:\n print("Yes")\nelif (ct[0] + ct[3] + ct[6]) == 3 or (ct[1] + ct[4] + ct[7]) == 3 or (ct[2] + ct[5] + ct[8]) == 3:\n print("Yes")\nelse:\n print("No") '] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s536923367', 's634795309', 's685363528'] | [9220.0, 9236.0, 9296.0] | [26.0, 32.0, 30.0] | [814, 684, 814] |
p02760 | u719790500 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 import itertools\n a = list(map(int,input().split()))\n b = list(map(int,input().split()))\n c = list(map(int,input().split()))\n d = [a[0],b[0],c[0]]\n e = [a[1],b[1],c[1]]\n f = [a[2],b[2],c[2]]\n g = [a[0],b[1],c[2]]\n h = [a[2],b[1],c[0]]\n n = int(input())\n listB = [int(input()) for x in range(n)]\n C = itertools.combinations(listB,3)\n if a in C or b in C or c in C or d in C or e in C or f in C or g in C or h in C:\n print("Yes")\n else:\n print("No")\nmain()', 'def main():\n import itertools\n a = list(map(int,input().split()))\n b = list(map(int,input().split()))\n c = list(map(int,input().split()))\n d = [a[0],b[0],c[0]]\n e = [a[1],b[1],c[1]]\n f = [a[2],b[2],c[2]]\n g = [a[0],b[1],c[2]]\n h = [a[2],b[1],c[0]]\n n = int(input())\n listB = [int(input()) for x in range(n)]\n C = itertools.combinations(listB,3)\n D = list(C)\n if a in D or b in D or c in D or d in D or e in D or f in D or g in D or h in D:\n print("Yes")\n else:\n print("No")\nmain()', 'def main():\n import math\n a = list(map(int,input().split()))\n b = list(map(int,input().split()))\n c = list(map(int,input().split()))\n d = [a[0],b[0],c[0]]\n e = [a[1],b[1],c[1]]\n f = [a[2],b[2],c[2]]\n g = [a[0],b[1],c[2]]\n h = [a[2],b[1],c[0]]\n n = int(input())\n listB = [int(input()) for x in range(n)]\n C = itertools.combinations(listB,3)\n if a in C or b in C or c in C or d in C or e in C or f in C or g in C or h in C:\n print("Yes")\n else:\n print("No")\nmain()', 'def main():\n S = str(input())\n T = str(input())\n a = int(0)\n for x in range(len(S)):\n if S[x]!=T[x]:\n a = a + 1\n print(int(a))\nmain()', 'def main():\n import itertools\n a = tuple(map(int,input().split()))\n b = tuple(map(int,input().split()))\n c = tuple(map(int,input().split()))\n d = (a[0],b[0],c[0])\n e = (a[1],b[1],c[1])\n f = (a[2],b[2],c[2])\n g = (a[0],b[1],c[2])\n h = (a[2],b[1],c[0])\n n = int(input())\n listB = [int(input()) for x in range(n)]\n X = itertools.permutations(listB,3)\n R = list(X)\n if a in R or b in R or c in R or d in R or e in R or f in R or g in R or h in R:\n print("Yes")\n else:\n print("No")\nmain()\n'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s709526688', 's724837072', 's814702419', 's906219756', 's631027868'] | [9180.0, 9200.0, 9252.0, 8964.0, 9240.0] | [32.0, 26.0, 21.0, 26.0, 28.0] | [519, 535, 514, 162, 539] |
p02760 | u721425712 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["# B\na = []\nfor i in range(3):\n a1, a2, a3 = map(int, input().split())\n a.append(a1)\n a.append(a2)\n a.append(a3)\n \nprint(a)\n \nn = int(input())\nb = []\nfor i in range(n):\n bb = int(input())\n b.append(bb)\n \nfor i in range(n):\n while a.count(b[i]) > 0:\n a[a.index(b[i])] = 0\n \nif a[0] == a[3] == a[6] == 0:\n print('Yes')\nelif a[1] == a[4] == a[7] == 0:\n print('Yes')\nelif a[2] == a[5] == a[8] == 0:\n print('Yes')\nelif a[0] == a[1] == a[2] == 0:\n print('Yes')\nelif a[3] == a[4] == a[5] == 0:\n print('Yes')\nelif a[6] == a[7] == a[8] == 0:\n print('Yes')\nelif a[0] == a[4] == a[8] == 0:\n print('Yes')\nelif a[2] == a[4] == a[6] == 0:\n print('Yes')\nelse:\n print('No')", "# B\na = []\nfor i in range(3):\n a1, a2, a3 = map(int, input().split())\n a.append(a1)\n a.append(a2)\n a.append(a3)\n \nn = int(input())\nb = []\nfor i in range(n):\n bb = int(input())\n b.append(bb)\n \nfor i in range(n):\n while a.count(b[i]) > 0:\n a[a.index(b[i])] = 0\n \nif a[0] == a[3] == a[6] == 0:\n print('Yes')\nelif a[1] == a[4] == a[7] == 0:\n print('Yes')\nelif a[2] == a[5] == a[8] == 0:\n print('Yes')\nelif a[0] == a[1] == a[2] == 0:\n print('Yes')\nelif a[3] == a[4] == a[5] == 0:\n print('Yes')\nelif a[6] == a[7] == a[8] == 0:\n print('Yes')\nelif a[0] == a[4] == a[8] == 0:\n print('Yes')\nelif a[2] == a[4] == a[6] == 0:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s320304225', 's446944980'] | [3064.0, 3064.0] | [18.0, 18.0] | [727, 713] |
p02760 | u723345499 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['res = False\nfor row in a:\n if all(num in b for num in row):\n res = True\nfor col in zip(a):\n if all(num in b for num in col):\n res = True\nif all(a[i][i] in b for i range(3)):\n res = True\nif all(a[i][2 - i] in b for i range(3)):\n res = True\n\n\nprint("Yes" if res else("No"))', 'a = [list(map(int, input().split())) for _ in range(3)]\nn = int(input())\nb = [int(input()) for _ in range(n)]\n\nSize = 3\nbingo = False\nfor row in a:\n if all(item in b for item in row):\n bingo = True\nfor col in zip(*a):\n if all(item in b for item in col):\n bingo = True\nif all(a[i][i] in b for i in range(Size)):\n bingo = True\nif all(a[i][Size - 1 - i] in b for i in range(Size)):\n bingo = True\n \nprint("Yes" if bingo else "No")'] | ['Runtime Error', 'Accepted'] | ['s005068810', 's387412414'] | [2940.0, 3064.0] | [17.0, 17.0] | [305, 452] |
p02760 | u723583932 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['#157 b\na=[]\ncall_num=[]\nfor i in range(3):\n x,y,z=map(int,input().split())\n a.append(x)\n a.append(y)\n a.append(z)\nn=int(input())\nfor i in range(n):\n x=int(input())\n if x in a:\n call_num.append(a.index(x))\nbingo\nans=[[0,1,2],[3,4,5],[6,7,8],[0,3,6],[1,4,7],[2,5,8],[0,4,8],[2,4,6]]\nfor x in ans:\n flag=True\n for y in x:\n if y not in call_num:\n flag=False\n if flag:\n print("Yes")\n bing=True\n break\nif bingo!=True: \n print("No")\n', '#157 b \na=[]\ncall_num=[]\nfor i in range(3):\n x,y,z=map(int,input().split())\n a.append(x)\n a.append(y)\n a.append(z)\nn=int(input())\nfor i in range(n):\n x=int(input())\n if x in a:\n call_num.append(a.index(x))\nbingo\nans=[[0,1,2],[3,4,5],[6,7,8],[0,3,6],[1,4,7],[2,5,8],[0,4,8],[2,4,6]]\nfor x in ans:\n flag=True\n for y in x:\n if y not in call_num:\n flag=False\n if flag:\n print("Yes")\n bing=True\n break\nif bing!=True: \n print("No")\n', '#157 b\na=[]\ncall_num=[]\nfor i in range(3):\n x,y,z=map(int,input().split())\n a.append(x)\n a.append(y)\n a.append(z)\nn=int(input())\nfor i in range(n):\n x=int(input())\n if x in a:\n call_num.append(a.index(x))\nbingo=False\nans=[[0,1,2],[3,4,5],[6,7,8],[0,3,6],[1,4,7],[2,5,8],[0,4,8],[2,4,6]]\nfor x in ans:\n flag=True\n for y in x:\n if y not in call_num:\n flag=False\n if flag:\n print("Yes")\n bingo=True\n break\nif bingo!=True:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s414405562', 's854111939', 's449804571'] | [3064.0, 3064.0, 3064.0] | [18.0, 18.0, 17.0] | [509, 509, 507] |
p02760 | u723711163 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 = [ list(map(int, input().split())) for _ in range(3) ]\nt_or_f = [ [False]*3 for _ in range(3) ]\n\nnums = [ r for i in range(3) for r in bingo ]\n\nn = int(input())\nfor _ in range(n):\n i = int(input())\n\n if i in nums:\n for x in range(3):\n for y in range(3):\n if bingo[x][y] == i:\n t_or_f[x][y] = True\n break\n\n\nis_bingo = False\nif t_or_f[0][0] and t_or_f[1][1] and t_or_f[2][2]:\n is_bingo = True\n print('Yes')\nelif t_or_f[0][2] and t_or_f[1][1] and t_or_f[2][0]:\n is_bingo = True\n print('Yes')\nelse:\n for i in range(3):\n if t_or_f[i][i] and t_or_f[i+1][i+1] and t_or_f[i+2][i+2]:\n is_bingo = True\n print('Yes')\n sys.exit()\n\nif not is_bingo: print('No')\n\n", "\nbingo = [ list(map(int, input().split())) for _ in range(3) ]\nt_or_f = [ [False]*3 for _ in range(3) ]\n\nnums = [ r[i]for i in range(3) for r in bingo ]\n\nn = int(input())\nappear = [ int(input()) for _ in range(n) ]\n\nfor x in range(3):\n for y in range(3):\n if bingo[x][y] in appear:\n t_or_f[x][y] = True\n\nis_bingo = False\nif t_or_f[0][0] and t_or_f[1][1] and t_or_f[2][2]:\n is_bingo = True\nelif t_or_f[0][2] and t_or_f[1][1] and t_or_f[2][0]:\n is_bingo = True\nelse:\n for i in range(3):\n if t_or_f[i][0] and t_or_f[i][1] and t_or_f[i][2]: is_bingo = True\n if t_or_f[0][i] and t_or_f[1][i] and t_or_f[2][i]: is_bingo = True\n\nif is_bingo:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s085434767', 's730714478'] | [3064.0, 3064.0] | [17.0, 18.0] | [726, 687] |
p02760 | u724844363 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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()))\nseat = [a1, a2, a3]\nn = int(input())\nb = [int(input()) for i in range(n)]\n\nseat_tf = [[False, False, False] for _ in range(3)]\n\nfor k in b:\n for i in range(3):\n for j in range(3):\n if seat[i][j] == b:\n seat_tf[i][j] = True\n\nfor i in range(3):\n if seat_tf[i][0] and seat_tf[i][1] and seat_tf[i][2]:\n print("Yes")\n exit()\n\nfor j in range(3):\n if seat_tf[0][j] and seat_tf[1][j] and seat_tf[2][j]:\n print("Yes")\n exit()\n\nif (seat_tf[0][0] and seat_tf[1][1] and seat_tf[2][2]) or (seat_tf[0][2] and seat_tf[1][1] and seat_tf[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()))\nseat = [a1, a2, a3]\nn = int(input())\nb = [int(input()) for i in range(n)]\n\nseat_tf = [[False, False, False] for _ in range(3)]\n\nfor k in b:\n for i in range(3):\n for j in range(3):\n if seat[i][j] == k:\n seat_tf[i][j] = True\n\nfor i in range(3):\n if seat_tf[i][0] and seat_tf[i][1] and seat_tf[i][2]:\n print("Yes")\n exit()\n\nfor j in range(3):\n if seat_tf[0][j] and seat_tf[1][j] and seat_tf[2][j]:\n print("Yes")\n exit()\n\nif (seat_tf[0][0] and seat_tf[1][1] and seat_tf[2][2]) or (seat_tf[0][2] and seat_tf[1][1] and seat_tf[2][0]):\n print("Yes")\n exit()\nprint("No")'] | ['Wrong Answer', 'Accepted'] | ['s826190468', 's916571612'] | [3064.0, 3064.0] | [21.0, 17.0] | [749, 749] |
p02760 | u727057618 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["\ndata = []\nfor j in range(3):\n data.extend([int (i) for i in input().split()])\n\nbingo_dic = {}\nfor i, d in enumerate(data):\n bingo_dic[d] = i\n \nN = int(input())\n\nbingo = [0,0,0,0,0,0,0,0,0]\nfor _ in range(N):\n i = int(input())\n if i in bingo_dic.keys():\n bingo[bingo_dic[i]] = 1\n \nif bingo[0] + bingo[1] + bingo[2] == 3:\n print('yes')\n exit()\n \nif bingo[3] + bingo[4] + bingo[5] == 3:\n print('yes')\n exit()\n \nif bingo[6] + bingo[7] + bingo[8] == 3:\n print('yes')\n exit()\n \nif bingo[0] + bingo[3] + bingo[6] == 3:\n print('yes')\n exit()\n\nif bingo[1] + bingo[4] + bingo[7] == 3:\n print('yes')\n exit()\n \nif bingo[2] + bingo[5] + bingo[8] == 3:\n print('yes')\n exit()\n \nif bingo[0] + bingo[4] + bingo[8] == 3:\n print('yes')\n exit()\n\nif bingo[2] + bingo[4] + bingo[6] == 3:\n print('yes')\n exit()\n\nprint('no')", "data = []\nfor j in range(3):\n data.extend([int (i) for i in input().split()])\n\nbingo_dic = {}\nfor i, d in enumerate(data):\n bingo_dic[d] = i\n \nN = int(input())\n\nbingo = [0,0,0,0,0,0,0,0,0]\nfor _ in range(N):\n i = int(input())\n if i in bingo_dic.keys():\n bingo[bingo_dic[i]] = 1\n \nif bingo[0] + bingo[1] + bingo[2] == 3:\n print('yes')\n exit()\n \nif bingo[3] + bingo[4] + bingo[5] == 3:\n print('yes')\n exit()\n \nif bingo[6] + bingo[7] + bingo[8] == 3:\n print('yes')\n exit()\n \nif bingo[0] + bingo[3] + bingo[6] == 3:\n print('yes')\n exit()\n\nif bingo[1] + bingo[4] + bingo[7] == 3:\n print('yes')\n exit()\n \nif bingo[2] + bingo[5] + bingo[8] == 3:\n print('yes')\n exit()\n \nif bingo[0] + bingo[4] + bingo[8] == 3:\n print('yes')\n exit()\n\nif bingo[2] + bingo[4] + bingo[6] == 3:\n print('yes')\n exit()\n\nprint('no')", "data = []\nfor j in range(3):\n data.extend([int (i) for i in input().split()])\n\nbingo_dic = {}\nfor i, d in enumerate(data):\n bingo_dic[d] = i\n \nN = int(input())\n\nbingo = [0,0,0,0,0,0,0,0,0]\nfor _ in range(N):\n i = int(input())\n if i in bingo_dic.keys():\n bingo[bingo_dic[i]] = 1\n \nif bingo[0] + bingo[1] + bingo[2] == 3:\n print('Yes')\n exit()\n \nif bingo[3] + bingo[4] + bingo[5] == 3:\n print('Yes')\n exit()\n \nif bingo[6] + bingo[7] + bingo[8] == 3:\n print('Yes')\n exit()\n \nif bingo[0] + bingo[3] + bingo[6] == 3:\n print('Yes')\n exit()\n\nif bingo[1] + bingo[4] + bingo[7] == 3:\n print('Yes')\n exit()\n \nif bingo[2] + bingo[5] + bingo[8] == 3:\n print('Yes')\n exit()\n \nif bingo[0] + bingo[4] + bingo[8] == 3:\n print('Yes')\n exit()\n\nif bingo[2] + bingo[4] + bingo[6] == 3:\n print('Yes')\n exit()\n\nprint('No')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s171652317', 's283370668', 's879654107'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [833, 832, 832] |
p02760 | u729133443 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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=lambda a:any(all(b)for b in a)or all(a[i][i]for i in(0,1,2)) \na=eval('list(map(int,input().split())),'*3)\nexec('b=int(input());a=[[u*(u!=b)for u in t]for t in a];'*int(input()))\na=[[not u for u in t]for t in a]\nprint('NYoe s'[f(a)|f(t[::-1]for t in zip(*a))::2])", "s,a=',036,048,246,258,345,678,',open(0).read().split()\nfor i in a[9:]:s=s.replace(str(a.index(i)),'')\nprint('NYoe s'[',,'in s::2])"] | ['Runtime Error', 'Accepted'] | ['s243226875', 's862073311'] | [3060.0, 2940.0] | [18.0, 17.0] | [266, 130] |
p02760 | u729938879 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['a = []\nfor _ in range(3):\n a.append(list(map(int,input().split()))) \nprint(a)\nn = int(input())\nnum_list = []\nfor _ in range(n):\n num_list.append(int(input()))\n \nflg = False\nfor i in range(3):\n if a[i][0] in num_list and a[i][1] in num_list and a[i][2] in num_list:\n flg = True\n break\ndiago = list([a[0][0],a[1][1],a[2][2]])\n\nif flg != True:\n if diago[0] in num_list and diago[1] in num_list and diago[2] in num_list:\n flg = True\n\nif flg:\n print("Yes")\nelse:\n print("No")', 'a = []\nfor _ in range(3):\n a.append(list(map(int,input().split()))) \nn = int(input())\nnum_list = []\nfor _ in range(n):\n num_list.append(int(input()))\n \nflg = False\nfor i in range(3):\n if a[i][0] in num_list and a[i][1] in num_list and a[i][2] in num_list:\n flg = True\n break\n \nfor i in range(3):\n if a[0][i] in num_list and a[1][i] in num_list and a[2][i] in num_list:\n flg = True\n break\n \nif flg != True:\n diago = list([a[0][0],a[1][1],a[2][2]])\n if diago[0] in num_list and diago[1] in num_list and diago[2] in num_list:\n flg = True\n \nif flg != True:\n diago2 = list([a[2][0],a[1][1],a[2][0]])\n if diago2[0] in num_list and diago2[1] in num_list and diago2[2] in num_list:\n flg = True\n \nif flg:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s462588681', 's341098695'] | [3064.0, 3064.0] | [17.0, 18.0] | [512, 831] |
p02760 | u731603651 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['\nA1=list(map(int,input().split()))\nA2=list(map(int,input().split()))\nA3=list(map(int,input().split()))\nN=int(input())\nb=[0]*N\nfor i in range(N):\n print(i)\n b[i]=int(input())\nC1=any([i == A1[0] for i in b])\nC2=any([i == A1[1] for i in b])\nC3=any([i == A1[2] for i in b])\nC4=any([i == A2[0] for i in b])\nC5=any([i == A2[1] for i in b])\nC6=any([i == A2[2] for i in b])\nC7=any([i == A3[0] for i in b])\nC8=any([i == A3[1] for i in b])\nC9=any([i == A3[2] for i in b])\n\nif(any(all(C1,C2,C3),all(C4,C5,C6),all(C7,C8,C9),all(C1,C4,C7),all(C2,C5,C8),all(C3,C6,C9),all(C1,C5,C9),all(C3,C5,C7)):\n print("Yes")\nelse:\n print("No")', 'A1=list(map(int,input().split()))\nA2=list(map(int,input().split()))\nA3=list(map(int,input().split()))\nN=int(input())\nb=[0]*N\nfor i in range(N):\n b[i]=int(input())\nC1=any([i == A1[0] for i in b])\nC2=any([i == A1[1] for i in b])\nC3=any([i == A1[2] for i in b])\nC4=any([i == A2[0] for i in b])\nC5=any([i == A2[1] for i in b])\nC6=any([i == A2[2] for i in b])\nC7=any([i == A3[0] for i in b])\nC8=any([i == A3[1] for i in b])\nC9=any([i == A3[2] for i in b])\n\nif(any([all([C1,C2,C3]),all([C4,C5,C6]),all([C7,C8,C9]),all([C1,C4,C7]),all([C2,C5,C8]),all([C3,C6,C9]),all([C1,C5,C9]),all([C3,C5,C7])])):\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s458896573', 's596377529'] | [3064.0, 3064.0] | [17.0, 18.0] | [622, 629] |
p02760 | u734936991 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['60 88 34\n92 41 43\n65 73 48\n10\n60\n43\n88\n11\n48\n73\n65\n41\n92\n34\n', "b = []\nb.append([int(s) for s in input().split()])\nb.append([int(s) for s in input().split()])\nb.append([int(s) for s in input().split()])\n\nn = int(input())\n\nfor i in range(0, n):\n v = int(input())\n\n for i in range(0, 3):\n for j in range(0, 3):\n if b[i][j] == v:\n b[i][j] = 999\n\nans = 'NO'\n\nfor i in range(0, 3):\n s = set(b[i])\n\n if len(s) == 1:\n ans = 'YES'\n\nfor i in range(0, 3):\n s = set([b[0][i], b[1][i], b[2][i]])\n\n if len(s) == 1:\n ans = 'YES'\n\nc = set([b[0][0], b[1][1], b[2][2]])\n\nif len(c) == 1:\n ans = 'YES'\n\nc = set([b[0][2], b[1][1], b[2][0]])\n\nif len(c) == 1:\n ans = 'YES'\n\nprint(ans)", "b = []\nb.append([int(s) for s in input().split()])\nb.append([int(s) for s in input().split()])\nb.append([int(s) for s in input().split()])\n\nn = int(input())\n\nfor i in range(0, n):\n v = int(input())\n\n for i in range(0, 3):\n for j in range(0, 3):\n if b[i][j] == v:\n b[i][j] = 999\n\nans = 'NO'\n\nfor i in range(0, 3):\n s = set(b[i])\n\n if len(s) == 1:\n ans = 'YES'\n\nfor i in range(0, 3):\n s = set([b[0][i], b[1][i], b[2][i]])\n\n if len(s) == 1:\n ans = 'YES'\n\nc = set([b[0][0], b[1][1], b[2][2]])\n\nif len(c) == 1:\n ans = 'YES'\n\nc = set([b[0][2], b[1][1], b[2][0]])\n\nif len(c) == 1:\n ans = 'YES'\n\nprint(ans)", "b = []\nb.append([int(s) for s in input().split()])\nb.append([int(s) for s in input().split()])\nb.append([int(s) for s in input().split()])\n\nn = int(input())\n\nfor i in range(0, n):\n v = int(input())\n\n for i in range(0, 3):\n for j in range(0, 3):\n if b[i][j] == v:\n b[i][j] = 999\n\nans = 'No'\n\nfor i in range(0, 3):\n s = set(b[i])\n\n if len(s) == 1:\n ans = 'Yes'\n\nfor i in range(0, 3):\n s = set([b[0][i], b[1][i], b[2][i]])\n\n if len(s) == 1:\n ans = 'Yes'\n\nc = set([b[0][0], b[1][1], b[2][2]])\n\nif len(c) == 1:\n ans = 'Yes'\n\nc = set([b[0][2], b[1][1], b[2][0]])\n\nif len(c) == 1:\n ans = 'Yes'\n\nprint(ans)"] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s107395029', 's604950528', 's988355745', 's519544753'] | [2940.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0, 18.0] | [60, 669, 669, 669] |
p02760 | u738898077 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['\nls_a = []\nfor i in range(3):\n ls_a.extend(list(map(int,input().split())))\nn = int(input())\nls_b = [int(input()) for i in range(n)]\n\nfor i in range(9):\n if ls_a[i] in ls_b:\n ls_a[i] = 0\n\nprint(ls_a,ls_b)\nfor i in range(3):\n if ls_a[i] == 0 and ls_a[i+3] == 0 and ls_a[i+6] == 0:\n print("Yes")\n exit()\n if ls_a[i*3] == 0 and ls_a[i*3+1] == 0 and ls_a[i*3+2] == 0:\n print("Yes")\n exit()\nif ls_a[0] == 0 and ls_a[4] == 0 and ls_a[8] == 0:\n print("Yes")\n exit()\nif ls_a[2] == 0 and ls_a[4] == 0 and ls_a[6] == 0:\n print("Yes")\n exit()\nprint("No")\n ', '\nls_a = []\nfor i in range(3):\n ls_a.extend(list(map(int,input().split())))\nn = int(input())\nls_b = [int(input()) for i in range(n)]\n\nfor i in range(9):\n if ls_a[i] in ls_b:\n ls_a[i] = 0\n\nfor i in range(3):\n if ls_a[i] == 0 and ls_a[i+3] == 0 and ls_a[i+6] == 0:\n print("Yes")\n exit()\n if ls_a[i*3] == 0 and ls_a[i*3+1] == 0 and ls_a[i*3+2] == 0:\n print("Yes")\n exit()\nif ls_a[0] == 0 and ls_a[4] == 0 and ls_a[8] == 0:\n print("Yes")\n exit()\nif ls_a[2] == 0 and ls_a[4] == 0 and ls_a[6] == 0:\n print("Yes")\n exit()\nprint("No")\n '] | ['Wrong Answer', 'Accepted'] | ['s830350557', 's867793975'] | [3064.0, 3064.0] | [18.0, 18.0] | [614, 597] |
p02760 | u742729271 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\n\ni = 0\nwhile i<N:\n b = int(input())\n j=0\n while j<3:\n k=0\n while k<3:\n if A[j][k]==b:\n A[j][k]=0\n k+=1\n j+=1\n i+=1\n\nflag = False\ni = 0\nwhile i<3:\n if A[i][0]+A[i][1]+A[i][2] == 0:\n flag = True\n break\n if A[0][i]+A[1][i]+A[2][i] == 0:\n flag = True\n break\n i += 1\n\nif A[0][0]+A[1][1]+A[2][2] == 0:\n flag = Trueå\nif A[2][0]+A[1][1]+A[0][2] == 0:\n flag = True\n\nif flag == True:\n print("Yes")\nelse:\n print("No")\n \n', 'A = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\n\ni = 0\nwhile i<N:\n b = int(input())\n j=0\n while j<3:\n k=0\n while k<3:\n if A[j][k]==b:\n A[j][k]=0\n k+=1\n j+=1\n i+=1\n\nflag = False\ni = 0\nwhile i<3:\n if A[i][0]+A[i][1]+A[i][2] == 0:\n flag = True\n break\n if A[0][i]+A[1][i]+A[2][i] == 0:\n flag = True\n break\n i += 1\n\nif A[0][0]+A[1][1]+A[2][2] == 0:\n flag = True\nif A[2][0]+A[1][1]+A[0][2] == 0:\n flag = True\n\nif flag == True:\n print("Yes")\nelse:\n print("No")\n \n'] | ['Runtime Error', 'Accepted'] | ['s616208449', 's502521229'] | [3064.0, 3064.0] | [17.0, 18.0] | [537, 535] |
p02760 | u744521311 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['mylist=[]\n\nmylist= map(int,input().rstrip().split())\nmylist= map(int,input().rstrip().split())\nmylist = map(int,input().rstrip().split())\n\nnum = int(input())\n\nfor i in range(num):\n x = map(int,input().rstrip().split())\n k=0\n for j in mylist:\n if j==x:\n mylist[k]=0\n k+=1\n \nbingo(0,1,2)\nbingo(3,4,5)\nbingo(6,7,8)\nbingo(0,3,6)\nbingo(1,4,7)\nbingo(2,5,8)\nbingo(0,4,8)\nbingo(2,4,6)\n\n \ndef bingo(x,y,z):\n if mylist[a]==0 and mylist[b]==0 mylist[c]==0:\n print("Yes")\n else:\n print("No")\n\nprint(result)', '\na,b,c= map(int,input().rstrip().split())\nd,e,f= map(int,input().rstrip().split())\ng,h,i= map(int,input().rstrip().split())\n\nmylist=[a,b,c,d,e,f,g,h,i]\nnum = int(input())\n\nfor i in range(num):\n x = int(input())\n k=0\n for j in mylist:\n if j==x:\n mylist[k]=0\n k+=1\n\nx=0\ndef bingo(a,b,c):\n global x\n if mylist[a]==0 and mylist[b]==0 and mylist[c]==0:\n x=1\n \n \nbingo(0,1,2)\nbingo(3,4,5)\nbingo(6,7,8)\nbingo(0,3,6)\nbingo(1,4,7)\nbingo(2,5,8)\nbingo(0,4,8)\nbingo(2,4,6)\n\n\nif x==1:\n print("Yes")\nelse:\n print("No")\n \n\n'] | ['Runtime Error', 'Accepted'] | ['s769120995', 's986761574'] | [3064.0, 3064.0] | [18.0, 17.0] | [544, 552] |
p02760 | u748311048 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["#N=int(input())\n#N,M=map(int, input().split())\n#L=list(map(int, input().split()))\nL=[]\nCheck=[]\nfor n in range(9):\n Check.append(-(n+1))\n\nfor i in range(3):\n L.append(map(int, input().split()))\n\nN=int(input())\nfor j in range(N):\n I=int(input())\n if I in L:\n Check[L.index(I)]=1\n \nfor k in range(3):\n if Check[0+3*k]==Check[1+3*k]==Check[2+3*k]:\n print('Yes')\n exit()\n\nfor l in range(3):\n if Check[0+l]==Check[3+l]==Check[6+l]:\n print('Yes')\n exit()\n\nif Check[0]==Check[4]==Check[8] or Check[2]==Check[4]==Check[6]:\n print('Yes')\n exit()\n\nprint('No')", "#N=int(input())\n#N,M=map(int, input().split())\n#L=list(map(int, input().split()))\nL=[]\nCheck=[]\nfor n in range(9):\n Check.append(-(n+1))\n\nfor i in range(3):\n NL=list(map(int, input().split()))\n L.append(NL[0])\n L.append(NL[1])\n L.append(NL[2])\n\nN=int(input())\nfor j in range(N):\n I=int(input())\n if I in L:\n Check[L.index(I)]=1\n \nfor k in range(3):\n if Check[0+3*k]==Check[1+3*k]==Check[2+3*k]:\n print('Yes')\n exit()\n\nfor l in range(3):\n if Check[0+l]==Check[3+l]==Check[6+l]:\n print('Yes')\n exit()\n\nif Check[0]==Check[4]==Check[8] or Check[2]==Check[4]==Check[6]:\n print('Yes')\n exit()\n\nprint('No')"] | ['Wrong Answer', 'Accepted'] | ['s009266009', 's288830285'] | [3188.0, 3064.0] | [19.0, 17.0] | [573, 626] |
p02760 | u750485713 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 = [input().split() for i in range(3)]\n\na.extend(b)\na.extend(c)\nb = [input() for i in range(10)]\nfor b1 in b:\n a = [\'a\' if b1 == s in s else s for s in a]\n\nif a[0] == \'a\' and a[1] == \'a\' and a[2] == \'a\':\n print("Yes")\nelif a[3] == \'a\' and a[4] == \'a\' and a[5] == \'a\':\n print("Yes")\nelif a[6] == \'a\' and a[7] == \'a\' and a[8] == \'a\':\n print("Yes")\nelif a[0] == \'a\' and a[3] == \'a\' and a[6] == \'a\':\n print("Yes")\nelif a[1] == \'a\' and a[4] == \'a\' and a[7] == \'a\':\n print("Yes")\nelif a[2] == \'a\' and a[5] == \'a\' and a[8] == \'a\':\n print("Yes")\nelif a[0] == \'a\' and a[4] == \'a\' and a[8] == \'a\':\n print("Yes")\nelif a[2] == \'a\' and a[4] == \'a\' and a[6] == \'a\':\n print("Yes")\n', 'a,b,c = [input().split() for i in range(3)]\n\na.extend(b)\na.extend(c)\nN = int(input())\nb = [input() for i in range(N)]\nfor b1 in b:\n a = [\'a\' if b1 == s in s else s for s in a]\n\nif a[0] == \'a\' and a[1] == \'a\' and a[2] == \'a\':\n print("Yes")\nelif a[3] == \'a\' and a[4] == \'a\' and a[5] == \'a\':\n print("Yes")\nelif a[6] == \'a\' and a[7] == \'a\' and a[8] == \'a\':\n print("Yes")\nelif a[0] == \'a\' and a[3] == \'a\' and a[6] == \'a\':\n print("Yes")\nelif a[1] == \'a\' and a[4] == \'a\' and a[7] == \'a\':\n print("Yes")\nelif a[2] == \'a\' and a[5] == \'a\' and a[8] == \'a\':\n print("Yes")\nelif a[0] == \'a\' and a[4] == \'a\' and a[8] == \'a\':\n print("Yes")\nelif a[2] == \'a\' and a[4] == \'a\' and a[6] == \'a\':\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s356787337', 's473353174'] | [3064.0, 3064.0] | [17.0, 18.0] | [698, 735] |
p02760 | u752522099 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 card.append(list(map(int,input().split())))\n\nN = int(input()) \n\nresult = [[0,0,0],[0,0,0],[0,0,0]] \nfor _ in range(N): \n b = int(input()) \n for i in range(3): \n for j in range(3):\n if b == card[i][j]:\n result[i][j] = 1\n\njudge = "No" \n\nfor i in range(3): \n if result[i][0] * result[i][1] * result[i][2] == 1:\n judge = "Yes"\n\nfor i in range(3): \n if result[0][i] * result[1][i]*result[2][i] == 1:\n judge = "Yes"\n\nif result[0][0] * result[1][1] * result[2][2] == 1: \n judge = "Yes"\n\nif result[0][2] * result[1][1] : result[2][1] == 1: \n judge = "Yes"\n\nprint(judge) \n ', 'card = [] \nfor i in range(3): \n card.append(list(map(int,input().split())))\n\nN = int(input()) \n\nresult = [[0,0,0],[0,0,0],[0,0,0]] \nfor _ in range(N): \n b = int(input()) \n for i in range(3): \n for j in range(3):\n if b == card[i][j]:\n result[i][j] = 1\n\njudge = "No" \n\nfor i in range(3): \n if result[i][0] * result[i][1] * result[i][2] == 1:\n judge = "Yes"\n\nfor i in range(3): \n if result[0][i] * result[1][i] * result[2][i] == 1:\n judge = "Yes"\n\nif result[0][0] * result[1][1] * result[2][2] == 1: \n judge = "Yes"\n\nif result[0][2] * result[1][1] * result[2][0] == 1: \n judge = "Yes"\n\nprint(judge) '] | ['Runtime Error', 'Accepted'] | ['s622464067', 's300346244'] | [3064.0, 3064.0] | [17.0, 17.0] | [1256, 1256] |
p02760 | u753635524 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\nA = []\n\nflag_First = True\nfor Count in range(3):\n for x in input().split(' '):\n x.strip('\\n')\n InputValue = int(x)\n if 1<=int(x)<=100:\n if flag_First==True:\n A.append (InputValue)\n flag_First = False\n else:\n for Index in A:\n if Index == InputValue:\n sys.exit()\n\n A.append (InputValue)\n else:\n sys.exit()\n\nN = int(input())\nif N<=0 and N>10:\n sys.exit()\n\nB = []\nfor Count in range(1,N+1):\n InputValue = int(input())\n if 1<=InputValue<=100:\n if Count == 1:\n B.append (InputValue)\n else:\n for Index in B:\n if Index == InputValue:\n sys.exit()\n\n B.append (InputValue)\n\nBingo =[0,0,0,0,0,0,0,0,0]\n\nfor Item_B in B:\n for Index,Item_A in enumerate(A):\n if Item_A == Item_B:\n Bingo[Index]= 1\n\ndef CheckHorizontalBingo(Start,End):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Start<=Index<=End:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n print(1,'YES')\n sys.exit()\n\nCheckHorizontalBingo(1,2)\nCheckHorizontalBingo(3,5)\nCheckHorizontalBingo(6,8)\n\ndef CheckVerticalBingo(One,Two,There):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Index==One or Index==Two or Index==There:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n print('YES')\n sys.exit()\n\nCheckVerticalBingo(0,3,6)\nCheckVerticalBingo(1,4,7)\nCheckVerticalBingo(2,5,8)\n\ndef CheckDiagonalBingo(One,Two,There):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Index==One or Index==Two or Index==There:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n print('YES')\n sys.exit()\n\nCheckDiagonalBingo(0,4,8)\nCheckDiagonalBingo(3,5,7)\n\nprint('No')", "import sys\n\nA = []\n\nflag_First = True\nfor Count in range(3):\n for x in input().split(' '):\n x.strip('\\n')\n InputValue = int(x)\n if 1<=int(x)<=100:\n if flag_First==True:\n A.append (InputValue)\n flag_First = False\n else:\n for Index in A:\n if Index == InputValue:\n sys.exit()\n\n A.append (InputValue)\n else:\n sys.exit()\n\nN = int(input())\nif N<=0 and N>10:\n sys.exit()\n\nB = []\nfor Count in range(1,N+1):\n InputValue = int(input())\n if 1<=InputValue<=100:\n if Count == 1:\n B.append (InputValue)\n else:\n for Index in B:\n if Index == InputValue:\n sys.exit()\n\n B.append (InputValue)\n\nBingo =[0,0,0,0,0,0,0,0,0]\n\nfor Item_B in B:\n for Index,Item_A in enumerate(A):\n if Item_A == Item_B:\n Bingo[Index]= 1\n\ndef CheckHorizontalBingo(Start,End):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Start<=Index<=End:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n print(1,'YES')\n sys.exit()\n\nCheckHorizontalBingo(0,2)\nCheckHorizontalBingo(3,5)\nCheckHorizontalBingo(6,8)\n\ndef CheckVerticalBingo(One,Two,There):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Index==One or Index==Two or Index==There:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n print('YES')\n sys.exit()\n\nCheckVerticalBingo(0,3,6)\nCheckVerticalBingo(1,4,7)\nCheckVerticalBingo(2,5,8)\n\ndef CheckDiagonalBingo(One,Two,There):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Index==One or Index==Two or Index==There:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n print('YES')\n sys.exit()\n\nCheckDiagonalBingo(0,4,8)\nCheckDiagonalBingo(3,5,7)\n\nprint('No')", "import sys\n\nA = []\n\nflag_First = True\nfor Count in range(3):\n for x in input().split(' '):\n x.strip('\\n')\n InputValue = int(x)\n if 1<=int(x)<=100:\n if flag_First==True:\n A.append (InputValue)\n flag_First = False\n else:\n for Index in A:\n if Index == InputValue:\n sys.exit()\n\n A.append (InputValue)\n else:\n sys.exit()\n\nN = int(input())\nif N<=0 and N>10:\n sys.exit()\n\nB = []\nfor Count in range(1,N+1):\n InputValue = int(input())\n if 1<=InputValue<=100:\n if Count == 1:\n B.append (InputValue)\n else:\n for Index in B:\n if Index == InputValue:\n sys.exit()\n\n B.append (InputValue)\n\nBingo =[0,0,0,0,0,0,0,0,0]\n\nfor Item_B in B:\n for Index,Item_A in enumerate(A):\n if Item_A == Item_B:\n Bingo[Index]= 1\n\ndef CheckHorizontalBingo(Start,End):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Start<=Index<=End:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n sys.exit()\n\nCheckHorizontalBingo(1,2)\nCheckHorizontalBingo(3,5)\nCheckHorizontalBingo(6,8)\n\ndef CheckVerticalBingo(One,Two,There):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Index==One or Index==Two or Index==There:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n sys.exit()\n\nCheckVerticalBingo(0,3,6)\nCheckVerticalBingo(1,4,7)\nCheckVerticalBingo(2,5,8)\n\ndef CheckDiagonalBingo(One,Two,There):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Index==One or Index==Two or Index==There:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n sys.exit()\n\nCheckDiagonalBingo(0,4,8)\nCheckDiagonalBingo(3,5,7)\n\nprint('No')", "import sys\n\nA = []\n\nflag_First = True\nfor Count in range(3):\n for x in input().split(' '):\n x.strip('\\n')\n InputValue = int(x)\n if 1<=int(x)<=100:\n if flag_First==True:\n A.append (InputValue)\n flag_First = False\n else:\n for Index in A:\n if Index == InputValue:\n sys.exit()\n\n A.append (InputValue)\n else:\n sys.exit()\n\nN = int(input())\nif N<=0 and N>10:\n sys.exit()\n\nB = []\nfor Count in range(1,N+1):\n InputValue = int(input())\n if 1<=InputValue<=100:\n if Count == 1:\n B.append (InputValue)\n else:\n for Index in B:\n if Index == InputValue:\n sys.exit()\n\n B.append (InputValue)\n\nBingo =[0,0,0,0,0,0,0,0,0]\n\nfor Item_B in B:\n for Index,Item_A in enumerate(A):\n if Item_A == Item_B:\n Bingo[Index]= 1\n\ndef CheckHorizontalBingo(Start,End):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Start<=Index<=End:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n print(1,'YES')\n sys.exit()\n\nCheckHorizontalBingo(0,1,2)\nCheckHorizontalBingo(3,4,5)\nCheckHorizontalBingo(6,7,8)\n\ndef CheckVerticalBingo(One,Two,There):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Index==One or Index==Two or Index==There:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n print('YES')\n sys.exit()\n\nCheckVerticalBingo(0,3,6)\nCheckVerticalBingo(1,4,7)\nCheckVerticalBingo(2,5,8)\n\ndef CheckDiagonalBingo(One,Two,There):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Index==One or Index==Two or Index==There:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n print('YES')\n sys.exit()\n\nCheckDiagonalBingo(0,4,8)\nCheckDiagonalBingo(3,5,7)\n\nprint('No')", "import sys\n\nA = []\n\nflag_First = True\nfor Count in range(3):\n for x in input().split(' '):\n x.strip('\\n')\n InputValue = int(x)\n if 1<=int(x)<=100:\n if flag_First==True:\n A.append (InputValue)\n flag_First = False\n else:\n for Index in A:\n if Index == InputValue:\n print(Index,InputValue)\n print('値が重複しています。')\n sys.exit()\n\n A.append (InputValue)\n else:\n sys.exit()\n\nN = int(input())\nif N<=0 and N>10:\n sys.exit()\n\nB = []\nfor Count in range(1,N+1):\n InputValue = int(input())\n if 1<=InputValue<=100:\n if Count == 1:\n B.append (InputValue)\n else:\n for Index in B:\n if Index == InputValue:\n print(Index,InputValue)\n print('値が重複しています。')\n sys.exit()\n\n B.append (InputValue)\n\nBingo =[0,0,0,0,0,0,0,0,0]\n\nfor Item_B in B:\n for Index,Item_A in enumerate(A):\n if Item_A == Item_B:\n Bingo[Index]= 1\n\nprint(Bingo)\n\ndef CheckHorizontalBingo(Start,End):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Start<=Index<=End:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n print(1,'YES')\n sys.exit()\n\nCheckHorizontalBingo(1,2)\nCheckHorizontalBingo(3,5)\nCheckHorizontalBingo(6,8)\n\ndef CheckVerticalBingo(One,Two,There):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Index==One or Index==Two or Index==There:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n print(2,'YES')\n sys.exit()\n\nCheckVerticalBingo(0,3,6)\nCheckVerticalBingo(1,4,7)\nCheckVerticalBingo(2,5,8)\n\ndef CheckDiagonalBingo(One,Two,There):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Index==One or Index==Two or Index==There:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n print(2,'YES')\n sys.exit()\n\nCheckDiagonalBingo(0,4,8)\nCheckDiagonalBingo(3,5,7)\n\nprint('No')", "import sys\n\nA = []\n\nflag_First = True\nfor Count in range(3):\n for x in input().split(' '):\n x.strip('\\n')\n InputValue = int(x)\n if 1<=int(x)<=100:\n if flag_First==True:\n A.append (InputValue)\n flag_First = False\n else:\n for Index in A:\n if Index == InputValue:\n sys.exit()\n\n A.append (InputValue)\n else:\n sys.exit()\n\nN = int(input())\nif N<=0 and N>10:\n sys.exit()\n\nB = []\nfor Count in range(1,N+1):\n InputValue = int(input())\n if 1<=InputValue<=100:\n if Count == 1:\n B.append (InputValue)\n else:\n for Index in B:\n if Index == InputValue:\n sys.exit()\n\n B.append (InputValue)\n\nBingo =[0,0,0,0,0,0,0,0,0]\n\nfor Item_B in B:\n for Index,Item_A in enumerate(A):\n if Item_A == Item_B:\n Bingo[Index]= 1\n\ndef CheckHorizontalBingo(Start,End):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Start<=Index<=End:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n print('YES')\n sys.exit()\n\nCheckHorizontalBingo(0,2)\nCheckHorizontalBingo(3,5)\nCheckHorizontalBingo(6,8)\n\ndef CheckVerticalBingo(One,Two,There):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Index==One or Index==Two or Index==There:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n print('YES')\n sys.exit()\n\nCheckVerticalBingo(0,3,6)\nCheckVerticalBingo(1,4,7)\nCheckVerticalBingo(2,5,8)\n\ndef CheckDiagonalBingo(One,Two,There):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Index==One or Index==Two or Index==There:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n print('YES')\n sys.exit()\n\nCheckDiagonalBingo(0,4,8)\nCheckDiagonalBingo(3,5,7)\n\nprint('No')", "import sys\n\nA = []\n\nflag_First = True\nfor Count in range(3):\n for x in input().split(' '):\n x.strip('\\n')\n InputValue = int(x)\n if 1<=int(x)<=100:\n if flag_First==True:\n A.append (InputValue)\n flag_First = False\n else:\n for Index in A:\n if Index == InputValue:\n print('No')\n sys.exit()\n\n A.append (InputValue)\n else:\n print('No')\n sys.exit()\n\nN = int(input())\nif N<=0 and N>10:\n print('No')\n sys.exit()\n\nB = []\nfor Count in range(1,N+1):\n InputValue = int(input())\n if 1<=InputValue<=100:\n if Count == 1:\n B.append (InputValue)\n else:\n for Index in B:\n if Index == InputValue:\n print('No')\n sys.exit()\n\n B.append (InputValue)\n\nBingo =[0,0,0,0,0,0,0,0,0]\n\nfor Item_B in B:\n for Index,Item_A in enumerate(A):\n if Item_A == Item_B:\n Bingo[Index]= 1\n\ndef CheckHorizontalBingo(Start,End):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Start<=Index<=End:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n print('Yes')\n sys.exit()\n\nCheckHorizontalBingo(0,2)\nCheckHorizontalBingo(3,5)\nCheckHorizontalBingo(6,8)\n\ndef CheckVerticalBingo(One,Two,There):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Index==One or Index==Two or Index==There:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n print('Yes')\n sys.exit()\n\nCheckVerticalBingo(0,3,6)\nCheckVerticalBingo(1,4,7)\nCheckVerticalBingo(2,5,8)\n\ndef CheckDiagonalBingo(One,Two,There):\n\n Flag_Bingo = True\n for Index,Item in enumerate(Bingo):\n if Index==One or Index==Two or Index==There:\n if Item == 0 :\n Flag_Bingo = False\n\n if Flag_Bingo == True:\n print('Yes')\n sys.exit()\n\nCheckDiagonalBingo(0,4,8)\nCheckDiagonalBingo(2,4,6)\n\nprint('No')"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s387449059', 's493830352', 's721270813', 's929644049', 's932515306', 's995324072', 's149486683'] | [3192.0, 3192.0, 3192.0, 3192.0, 3192.0, 3192.0, 3192.0] | [18.0, 17.0, 18.0, 18.0, 19.0, 18.0, 19.0] | [2029, 2029, 1964, 2035, 2263, 2027, 2135] |
p02760 | u757274384 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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())\nB = [int(input()) for i in range(n)]\nfor i in range(n):\n for j in range(3):\n for k in range(3):\n if B[i] == A[j][k]:\n A[j][k] = "*"\nans = ["*","*","*"]\nfor i in range(3):\n if A[i] == ans or [A[0][i],A[1][i],A[2][i]] == ans:\n print("Yes")\n exit()\n \nif [A[0][0],A[1][1],A[2][2]] == ans or [A[2][0],A[1][1],A[0][2]] == ans:\n print("Yes")\nelse:\n pass\n\nprint("No")', '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())\nB = [int(input()) for i in range(n)]\nfor i in range(n):\n for j in range(3):\n for k in range(3):\n if B[i] == A[j][k]:\n A[j][k] = "*"\nans = ["*","*","*"]\nfor i in range(3):\n if A[i] == ans or [A[0][i],A[1][i],A[2][i]] == ans:\n print("Yes")\n exit()\n \nif [A[0][0],A[1][1],A[2][2]] == ans or [A[0][2],A[1][1],A[2][0]] == ans:\n print("Yes")\n exit()\n\nprint("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s717745233', 's610735011'] | [3064.0, 3064.0] | [17.0, 17.0] | [530, 527] |
p02760 | u758583243 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 judge(board):\n for i in range(0, 3):\n if board[i][0] == board[i][1] == board[i][2] == 0 :\n return True\n if board[0][i] == board[1][i] == board[2][i] == 0:\n return True\n \n if board[0][0] == board[1][1] == board[2][2] == 0:\n return True\n if board[0][2] == board[1][1] == borad[2][0] == 0:\n return True\n \n return False\n\n\nupper = list(map(int, input().split(" ")))\nmiddle = list(map(int, input().split(" ")))\nlower = list(map(int, input().split(" ")))\n\nboard = (upper,middle,lower)\n\nN = int(input())\nbingos = list()\n\nfor i in range(0, N):\n bingos.append(int(input()))\n\nfor i in range(0, 3):\n for j in range(0, 3):\n if upper[j] == bingos[i]:\n board[0][j] = 0\n break\n elif middle[j] == bingos[i]:\n board[1][j] = 0\n break\n elif lower[j] == bingos[i]:\n board[2][j] = 0\n break\n else:\n pass\n\nif judge(board):\n print(\'Yes\')\nelse:\n print(\'No\')\n', 'def judge(board):\n for i in range(0, 3):\n if board[i][0] == board[i][1] == board[i][2] == 0 :\n return True\n if board[0][i] == board[1][i] == board[2][i] == 0:\n return True\n \n if board[0][0] == board[1][1] == board[2][2] == 0:\n return True\n if board[0][2] == board[1][1] == borad[2][0] == 0:\n return True\n \n return False\n\n\nupper = list(map(int, input().split(" ")))\nmiddle = list(map(int, input().split(" ")))\nlower = list(map(int, input().split(" ")))\n\nboard = (upper,middle,lower)\n\nN = int(input())\nbingos = [input() for i in range(N)]\n\nfor i in range(0, len(bingos)):\n for j in range(0, 3):\n if upper[j] == bingos[i]:\n board[0][j] = 0\n break\n elif middle[j] == bingos[i]:\n board[1][j] = 0\n break\n elif lower[j] == bingos[i]:\n board[2][j] = 0\n break\n else:\n pass\n\nif judge(board):\n print(\'Yes\')\nelse:\n print(\'No\')\n', 'def judge(board):\n for i in range(0, 3):\n if board[i][0] == board[i][1] == board[i][2] == 0 :\n return True\n if board[0][i] == board[1][i] == board[2][i] == 0:\n return True\n \n if board[0][0] == board[1][1] == board[2][2] == 0:\n return True\n if board[0][2] == board[1][1] == board[2][0] == 0:\n return True\n \n return False\n\n\nupper = list(map(int, input().split(" ")))\nmiddle = list(map(int, input().split(" ")))\nlower = list(map(int, input().split(" ")))\n\nboard = (upper,middle,lower)\n\nN = int(input())\nbingos = list()\n\nfor i in range(0, N):\n bingos.append(int(input()))\n\n\n"""\nprint(upper)\nprint(middle)\nprint(lower)\nprint(bingos)\n\nfor i in range(3):\n for j in range(3):\n print(f\'board[\', i, \'][\', j, \'] =\', board[i][j])\n"""\n\nfor i in range(0, len(bingos)):\n for j in range(0, 3):\n# print(\'bingos[i] : j = \', bingos[i], j)\n if upper[j] == bingos[i]:\n board[0][j] = 0\n# print(\'find in upper\')\n break\n elif middle[j] == bingos[i]:\n board[1][j] = 0\n# print(\'find in middle\')\n break\n elif lower[j] == bingos[i]:\n board[2][j] = 0\n# print(\'find in lower\')\n break\n else:\n pass\n# print(\'\')\n\nif judge(board):\n print(\'Yes\')\nelse:\n print(\'No\')\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s116867778', 's482376054', 's373716978'] | [3064.0, 3064.0, 3064.0] | [18.0, 18.0, 18.0] | [1023, 999, 1370] |
p02760 | u761062383 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['def resolve():\n A = [list(map(int, input().split())) for _ in range(3)]\n N = int(input())\n B = [int(input()) for _ in range(N)]\n punch = [[False for _ in range(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 punch[i][j] = True\n print(punch, file=sys.stderr)\n ans = "No"\n for i in range(3):\n if False not in punch[i]:\n ans = "Yes"\n break\n for j in range(3):\n if not punch[j][i]:\n break\n else:\n ans = "Yes"\n break\n if (punch[0][0] and punch[1][1] and punch[2][2]) or (\n punch[0][2] and punch[1][1] and punch[2][0]):\n ans = "Yes"\n print(ans)\n\n\nresolve()\n', 'def resolve():\n A = [list(map(int, input().split())) for _ in range(3)]\n N = int(input())\n B = [int(input()) for _ in range(N)]\n punch = [[False for _ in range(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 punch[i][j] = True\n ans = "No"\n for i in range(3):\n if False not in punch[i]:\n ans = "Yes"\n break\n for j in range(3):\n if not punch[j][i]:\n break\n else:\n ans = "Yes"\n break\n if (punch[0][0] and punch[1][1] and punch[2][2]) or (\n punch[0][2] and punch[1][1] and punch[2][0]):\n ans = "Yes"\n print(ans)\n\n\nresolve()\n'] | ['Runtime Error', 'Accepted'] | ['s919370021', 's646160542'] | [9196.0, 9188.0] | [29.0, 27.0] | [757, 723] |
p02760 | u765325669 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['60 88 34\n92 41 43\n65 73 48\n10\n60\n43\n88\n11\n48\n73\n65\n41\n92\n34', 'a = [int(j) for i in range(3) for j in input().split(\' \')]\nn = int(input())\nnn = [int(input()) for i in range(n)]\n\nfor ni in nn:\n if ni in a:\n a[a.index(ni)] = 0\n\n \njudge = "Yes"\nif a[4]!=0:\n if a[2]!=0 and a[6]!=0:\n judge = "No"\nelse:\n if a[2]!=0 and a[6]!=0 and a[1]!=0 and a[7]!=0:\n judge = "No"\n\nprint(judge)', 'a = [int(j) for i in range(3) for j in input().split(\' \')]\nn = int(input())\nnn = [int(input()) for i in range(n)]\n\nfor ni in nn:\n if ni in a:\n a[a.index(ni)] = 0\n\n \njudge = "Yes"\nif a[4]!=0 and a[2]!=0 and a[6]!=0:\n judge = "No"\n\nif a[4]==0:\n if a[2]!=0 and a[6]!=0 and a[1]!=0 and a[7]!=0:\n judge = "No"\n\nprint(judge)', 'a = [int(j) for i in range(3) for j in input().split(\' \')]\nn = int(input())\nnn = [int(input()) for i in range(n)]\n\ncnt = 0\nfor ni in nn:\n if ni in a:\n cnt += 1\n a[a.index(ni)] = 0\n\njudge = "No"\nfor i in range(3):\n if sum(a[i::3])==0 or sum(a[i*3:i*3+3])==0:\n judge = "Yes"\n \nif sum(a[::4])==0 or (a[2]+a[4]+a[6])==0:\n judge = "Yes"\n \nprint(judge)'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s274885024', 's565625669', 's844860027', 's506590871'] | [2940.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 18.0, 17.0] | [59, 327, 330, 362] |
p02760 | u766566560 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 i in range(3)]\nN = int(input())\nb = [input() for i in range(N)]\n\nfor i in range(N):\n\tfor j in range(3):\n\t\tfor k in range(3):\n\t\t\tif A[j][k] == b[i]:\n\t\t\t\tA[j][k] = '○'\n\nfor i in range(3):\n\tif A[i][0] == A[i][1] == A[i][2]:\n\t\tprint('YES')\n\t\texit()\n\telif A[0][i] == A[1][i] == A[2][i]:\n\t\tprint('YES')\n\t\texit()\n\telif A[0][0] == A[1][1] == A[2][2] or A[0][2] == A[1][1] == A[2][0]:\n\t\tprint('YES')\n\t\texit()\n\nprint('NO')", "A = [input().split() for i in range(3)]\nN = int(input())\nb = [input() for i in range(N)]\n\nfor i in range(N):\n\tfor j in range(3):\n\t\tfor k in range(3):\n\t\t\tif A[j][k] == b[i]:\n\t\t\t\tA[j][k] = '○'\n\nfor i in range(3):\n\tif A[i][0] == A[i][1] == A[i][2]:\n\t\tprint('Yes')\n\t\texit()\n\telif A[0][i] == A[1][i] == A[2][i]:\n\t\tprint('Yes')\n\t\texit()\n\telif A[0][0] == A[1][1] == A[2][2] or A[0][2] == A[1][1] == A[2][0]:\n\t\tprint('Yes')\n\t\texit()\n\nprint('No')"] | ['Wrong Answer', 'Accepted'] | ['s996520251', 's939083019'] | [3064.0, 3064.0] | [17.0, 17.0] | [439, 439] |
p02760 | u768256617 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["bingo=[]\nfor i in range(3):\n a=list(map(int,input().split()))\n bingo.append(a)\n \nn=int(input())\nfor i in range(n):\n b=int(input())\n for j in range(3):\n if b in bingo[i]:\n bingo[i][bingo[i].index(b)]=0\n \ndef hantei(l):\n for i in range(3):\n if all([l[i][j]==0 for j in range(3)]):\n return 'Yes'\n \n elif all([l[j][i]==0 for j in range(3)]):\n return 'Yes'\n \n elif l[0][0]==0 and l[1][1]==0 and l[2][2]==0:\n return 'Yes'\n \n elif l[0][2]==0 and l[1][1]==0 and l[2][0]==0:\n return 'Yes'\n \n else:\n return 'No'\n \nprint(hantei(bingo))\n \n ", "bingo=[]\nfor i in range(3):\n a=list(map(int,input().split()))\n bingo.append(a)\n \nn=int(input())\nfor i in range(n):\n b=int(input())\n for j in range(3):\n if b in bingo[j]:\n bingo[j][bingo[j].index(b)]=0\n \ndef hantei(l):\n for i in range(3):\n if all([l[i][j]==0 for j in range(3)]):\n return 'Yes'\n \n elif all([l[j][i]==0 for j in range(3)]):\n return 'Yes'\n \n elif l[0][0]==0 and l[1][1]==0 and l[2][2]==0:\n return 'Yes'\n \n elif l[0][2]==0 and l[1][1]==0 and l[2][0]==0:\n return 'Yes'\n \n else:\n continue\n \n return 'No'\n \n#print(bingo)\nprint(hantei(bingo))"] | ['Runtime Error', 'Accepted'] | ['s591801437', 's178499982'] | [9240.0, 9252.0] | [20.0, 30.0] | [608, 630] |
p02760 | u771167374 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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())\nl = [int(input()) for i in range(n)]\nif (a11 and a12 and a13 in l) or (a21 and a22 and a23 in l) or (a31 and a32 and a33 in l) or (a11 and a21 and a31 in l) or (a22 and a12 and a32 in l) or (a13 and a23 and a33 in l) or (a11 and a22 and a33 in l) or (elif a13 and a22 and a31 in l):\n print('Yes')\nelse :\n print('No')", "a11, a12, a13 = input().split()\na21, a22, a23 = input().split()\na31, a32, a33 = input().split()\nn = int(input())\nl = [int(input()) for i in range(n)]\n\nif all(a11 and a12 and a13) in l:\n print('Yes')\nelif all(a12 and a22 and a23) in l:\n print('Yes')\nelif all(a31 and a32 and a33) in l:\n print('Yes')\nelif all(a11 and a21 and a31) in l:\n print('Yes')\nelif all(a12 and a22 and a32) in l:\n print('Yes')\nelif all(a13 and a23 and a33) in l:\n print('Yes')\nelif all(a11 and a22 and a33) in l:\n print('Yes')\nelif all(a13 and a22 and a31) in l:\n print('Yes')\nelse :\n print('No')", "a11, a12, a13 = map(int, input().split())\na21, a22, a23 = map(int, input().split())\na31, a32, a33 = map(int, input().split())\nn = int(input())\nl = [int(input()) for i in range(n)]\nt1 = (a11, a12, a13)\nt2 = (a12, a22, a23)\nt3 = (a31, a32, a33)\nt4 = (a11, a21, a31)\nt5 = (a12, a22, a32)\nt6 = (a13, a23, a33)\nt7 = (a11, a22, a33)\nt8 = (a13, a22, a31)\nls = [t1, t2, t3, t4, t5, t6, t7, t8]\nfor i in ls:\n if i in l :\n print('Yes')\n break\n else :\n print('No')\n break", 'A=[]\nflag=0\nfor i in range(3):\n A.append(list(map(int,input().split())))\nn=int(input())\nfor i in range(n):\n s=int(input())\n for k in range(3):\n if s in A[k]:\n A[k][A[k].index(s)]=0\n\nif A[0]==[0,0,0] or A[1]==[0,0,0] or A[2]==[0,0,0]:\n print("Yes")\n flag=1\nelif A[1][1]==0 and A[2][2]==0 and A[0][0]==0:\n print("Yes")\n flag=1\nelif A[0][2]==0 and A[1][1]==0 and A[2][0]==0:\n print("Yes")\n flag=1\nelse:\n for i in range(3):\n if A[0][i]==0 and A[1][i]==0 and A[2][i]==0:\n print("Yes")\n flag=1\n break\nif flag == 0:\n print("No")\n'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s215980405', 's721859114', 's812216292', 's937017323'] | [3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0, 17.0] | [465, 595, 494, 559] |
p02760 | u771538568 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['c=[]\nw=0\nfor i in range(3):\n c.append(list(map(int,input().split())))\nN=int(input())\nd=[]\nfor y in range(N):\n d.append(int(input()))\nfor n in d:\n for p in c:\n for j in p:\n if n in j:\n j=0\nfor t in c:\n for h in t:\n if c.count(0)==3:\n o=1\n break\n else:\n continue\n break\nfor v in range(3):\n w=0\n for k in c:\n if k[v]==0:\n w+=1\n if w==3:\n o=1\nw=0\nfor ji in range(3):\n if c[ji][ji]==0:\n w+=1\n if w==3:\n o=1\nw=0\nfor ji2 in range(3):\n if c[ji2][3-ji2]==0:\n w+=1\n if w==3:\n o=1\nfor v1 in range(3):\n w=0\n for k in range(3):\n if c[k][v1]==0:\n w+=1\n if w==3:\n o=1\n\nif o==1:\n print("Yes")\nelse:\n print("No")\n\n\n\n\n\n\n\n\n\n', 'a=list(map(int,input().split()))\nb=len(a)\nc=[a]\nw=0\nfor i in range(b-1):\n c.append(list(map(int,input().split())))\nN=int(input())\nd=[]\nfor y in range(N):\n d.append(int(input()))\nfor n in d:\n for p in c:\n for j in p:\n if n in j:\n j=0\nfor t in c:\n for h in t:\n if c.count(0)==b:\n o=1\n break\n else:\n continue\n break\nfor v in range(b):\n w=0\n for k in c:\n if k[v]==0:\n w+=1\n if w==b:\n o=1\nw=0\nfor ji in range(b):\n if c[ji][ji]==0:\n w+=1\n if w==b:\n o=1\nw=0\nfor ji2 in range(b):\n if c[ji2][b-ji2]==0:\n w+=1\n if w==b:\n o=1\nfor v1 in range(b):\n w=0\n for k in range(b):\n if c[k][v1]==0:\n w+=1\n if w==b:\n o=1\n\nif o==1:\n print("Yes")\nelse:\n print("No")', 'a=list(map(int,input().split()))\nb=len(a)\nc=[a]\nw=0\nfor i in range(b-1):\n c.append(list(map(int,input().split())))\nN=int(input())\nd=[]\nfor y in range(N):\n d.append(int(input()))\nfor n in d:\n for p in c:\n for j in p:\n if n in j:\n j=0\nfor t in c:\n for h in t:\n if c.count(0)==b:\n o=1\n break\n else:\n continue\n break\nfor v in range(b):\n w=0\n for k in c:\n if k[v]==0:\n w+=1\n if w==b:\n o=1\nw=0\nfor ji in range(b):\n if c[ji][ji]==0:\n w+=1\n if w==b:\n o=1\nw=0\nfor ji2 in range(b):\n if c[ji2][b-ji2]==0:\n w+=1\n if w==b:\n o=1\nif o==1:\n print("Yes")\nelse:\n print("No")', 'p1=list(map(int,input().split()))\np2=list(map(int,input().split()))\np3=list(map(int,input().split()))\np=p1+p2+p3\nn=int(input())\nfor _ in range(n):\n b=int(input())\n if b in p:\n p[p.index(b)]=0\nif p[0]+p[1]+p[2]==0 or p[3]+p[4]+p[5]==0 or p[6]+p[7]+p[8]==0 or p[0]+p[3]+p[6]==0 or p[1]+p[4]+p[7]==0 or p[2]+p[5]+p[8]==0 or p[0]+p[4]+p[8]==0 or p[2]+p[4]+p[6]==0:\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s036593316', 's616728619', 's670436959', 's645948315'] | [3188.0, 3064.0, 3064.0, 3064.0] | [17.0, 18.0, 18.0, 17.0] | [822, 857, 731, 413] |
p02760 | u773440446 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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)]\nN = int(input())\nq = [int(input()) for i in range(N)]\nprint(q)\nfor i in range(3):\n for j in range(3):\n for k in range(N):\n\n if l[i][j] == q[k]:\n l[i][j] = 0\n \n if l[0][0] == 0 and l[0][1] == 0 and l[0][2] == 0:\n print(\'Yes\')\n exit()\n elif l[1][0] == 0 and l[1][1] == 0 and l[1][2] == 0:\n print("Yes")\n exit()\n elif l[2][0] == 0 and l[2][1] == 0 and l[2][2] == 0:\n print("Yes")\n exit()\n elif l[0][0] == 0 and l[1][1] == 0 and l[2][2] == 0:\n print("Yes")\n exit()\n elif l[0][2] == 0 and l[1][1] == 0 and l[2][0] == 0:\n print("Yes")\n exit()\n elif l[0][0] == 0 and l[1][0] == 0 and l[2][0] == 0:\n print("Yes")\n exit()\n elif l[0][1] == 0 and l[1][1] == 0 and l[2][1] == 0:\n print("Yes")\n exit()\n elif l[0][2] == 0 and l[1][2] == 0 and l[2][2] == 0:\n print("Yes")\n exit()\n\nprint(\'No\')\n', 'l = [map(int,input().split()) for i in range(3)]\nN = int(input())\nq = [int(input()) for i in range(N)]\n\nfor i in range(3):\n for j in range(3):\n for k in range(N):\n if l[i][j] == q[k]:\n l[i][j] == 0\n \n if l[0][0] == 0 and l[0][1] == 0 and l[0][2] == 0:\n print(\'Yes\')\n exit()\n elif l[1][0] == 0 and l[1][1] == 0 and l[1][2] == 0:\n print("Yes")\n exit()\n elif l[2][0] == 0 and l[2][1] == 0 and l[2][2] == 0:\n print("Yes")\n exit()\n elif l[0][0] == 0 and l[1][1] == 0 and l[2][2] == 0:\n print("Yes")\n exit()\n elif l[0][2] == 0 and l[1][1] == 0 and l[2][0] == 0:\n print("Yes")\n exit()\n elif l[0][0] == 0 and l[1][0] == 0 and l[2][0] == 0:\n print("Yes")\n exit()\n elif l[0][1] == 0 and l[1][1] == 0 and l[2][1] == 0:\n print("Yes")\n exit()\n elif l[0][2] == 0 and l[1][2] == 0 and l[2][2] == 0:\n print("Yes")\n exit()\n \nprint(\'No\')', 'l = [list(map(int,input().split())) for i in range(3)]\nN = int(input())\nq = [int(input()) for i in range(N)]\n\nfor i in range(3):\n for j in range(3):\n for k in range(N):\n\n if l[i][j] == q[k]:\n l[i][j] = 0\n \n if l[0][0] == 0 and l[0][1] == 0 and l[0][2] == 0:\n print(\'Yes\')\n exit()\n elif l[1][0] == 0 and l[1][1] == 0 and l[1][2] == 0:\n print("Yes")\n exit()\n elif l[2][0] == 0 and l[2][1] == 0 and l[2][2] == 0:\n print("Yes")\n exit()\n elif l[0][0] == 0 and l[1][1] == 0 and l[2][2] == 0:\n print("Yes")\n exit()\n elif l[0][2] == 0 and l[1][1] == 0 and l[2][0] == 0:\n print("Yes")\n exit()\n elif l[0][0] == 0 and l[1][0] == 0 and l[2][0] == 0:\n print("Yes")\n exit()\n elif l[0][1] == 0 and l[1][1] == 0 and l[2][1] == 0:\n print("Yes")\n exit()\n elif l[0][2] == 0 and l[1][2] == 0 and l[2][2] == 0:\n print("Yes")\n exit()\n\nprint(\'No\')\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s087235942', 's994846361', 's227502310'] | [9264.0, 9212.0, 9220.0] | [30.0, 24.0, 28.0] | [1008, 999, 1000] |
p02760 | u774762906 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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(map(int,input().split())) for i in range(3)]\nN=int(input())\nb=[]\nfor i in range(N):\n b.append(int(input()))\n\n\nfor i in range(3):\n for j in range(3):\n for x in range(N):\n if A[i][j]==b[x]:\n A[i][j]=0\n\nfor i in range(3):\n if A[i][0]==0 and A[i][1]==0 and A[i][2]==0:\n print("Yes")\n break\nfor i in range(3):\n if A[0][i]==0 and A[1][i]==0 and A[2][i]==0:\n print("Yes")\n break\nif A[0][0] == 0 and A[1][1] == 0 and A[2][2] == 0:\n print("Yes")\n break\nif A[0][2] == 0 and A[1][1] == 0 and A[2][0] == 0:\n print("Yes")\n break\nprint("No")\n', '\nimport sys\nA=[list(map(int,input().split())) for i in range(3)]\nN=int(input())\nb=[]\nfor i in range(N):\n b.append(int(input()))\n\n\nfor i in range(3):\n for j in range(3):\n for x in range(N):\n if A[i][j]==b[x]:\n A[i][j]=0\n\nfor i in range(3):\n if A[i][0]==0 and A[i][1]==0 and A[i][2]==0:\n print("Yes")\n sys.exit(0)\nfor i in range(3):\n if A[0][i]==0 and A[1][i]==0 and A[2][i]==0:\n print("Yes")\n sys.exit(0)\nif A[0][0] == 0 and A[1][1] == 0 and A[2][2] == 0:\n print("Yes")\n sys.exit(0)\nif A[0][2] == 0 and A[1][1] == 0 and A[2][0] == 0:\n print("Yes")\n sys.exit(0)\nprint("No")\n# your code goes here'] | ['Runtime Error', 'Accepted'] | ['s026409945', 's327195987'] | [3064.0, 3064.0] | [17.0, 18.0] | [622, 730] |
p02760 | u785728112 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ["for _ in range(3):\n A = list(map(int, input().split())) \nN = int(input())\n\nfor _ in range(N):\n b = int(input())\n for y in range(3):\n for x in range(3):\n if A[y][x] == b:\n A[y][x] = -1\n\nfor y in range(3):\n f = True\n for x in range(3):\n if A[y][x] != -1:\n f = False\n if f:\n print('Yes')\n exit()\n\nfor x in range(3):\n f = True\n for y in range(3):\n if A[y][x] != -1:\n f = False\n if f:\n print('Yes')\n exit()\n\nf = True\nfor x in range(3):\n if A[2 - x][x] != -1:\n f = False\nif f:\n print('Yes')\n exit()\n\nprint('No')", "for _ in range(3):\n A = list(map(int, input().split())) \nN = int(input())\n\nfor _ in range(N):\n b = int(input())\n for y in range(3):\n for x in range(3):\n if A[y][x] == b:\n A[y][x] = -1\n\nfor y in range(3):\n f = True\n for x in range(3):\n if A[y][x] != -1:\n f = False\n if f:\n print('Yes')\n exit()\n\nfor x in range(3):\n f = True\n for y in range(3):\n if A[y][x] != -1:\n f = False\n if f:\n print('Yes')\n exit()\n\nf = True\nfor x in range(3):\n if A[x][x] != -1:\n f = False\nif f:\n print('Yes')\n exit()\n\nf = True\nfor x in range(3):\n if A[2 - x][x] != -1:\n f = False\nif f:\n print('Yes')\n exit()\n\nprint('No')", "for _ in range(3):\n A = list(map(int, input().split())) \nN = int(input())\n\nfor _ in range(N):\n b = int(input())\n for y in range(3):\n for x in range(3):\n if A[y][x] == b:\n A[y][x] = -1\n\nfor y in range(3):\n f = True\n for x in range(3):\n if A[y][x] != -1:\n f = False\n if f:\n print('Yes')\n exit()\n\nfor x in range(3):\n f = True\n for y in range(3):\n if A[y][x] != -1:\n f = False\n if f:\n print('Yes')\n exit()\n\nf = True\nfor x in range(3):\n if A[x][x] != -1:\n f = False\nif f:\n print('Yes')\n exit()\n\nf = True\nfor x in range(3):\n if A[2 - x][x] != -1:\n f = False\nif f:\n print('Yes')\n exit()\n\nprint('No')", "a = [list(map(int, input().split())) for _ in range(3)]\nn = int(input())\nb = [int(input()) for _ in range(n)]\nmark = [[False, False, False] for _ in range(3)]\nfor i in range(3):\n for j in range(3):\n if a[i][j] in b:mark[i][j] = True\n\nans = 'No'\nfor i in range(3):\n if all(mark[i]):\n ans = 'Yes'\n break \nfor j in range(3):\n if mark[0][j] and mark[1][j] and mark[2][j]:\n ans = 'Yes'\n break\nif (mark[0][0] and mark[1][1] and mark[2][2]) or (mark[0][2] and mark[1][1] and mark[2][0]): ans = 'Yes'\nprint(ans)"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s178757889', 's376882115', 's416118602', 's001585743'] | [9268.0, 9224.0, 9100.0, 9192.0] | [24.0, 23.0, 28.0, 27.0] | [643, 746, 746, 552] |
p02760 | u787059958 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\nkey = []\nfor i, v in enumerate(A):\n for k, j in enumerate(v):\n if (j in B):\n key.append([i, k])\n\nans = [[[0, 0], [1, 0], [2, 0]], [[0, 1], [1, 1], [2, 1]], [[0, 2], [1, 2], [2, 2]], [[0, 0], [1, 1], [2, 2]], [\n [0, 2], [1, 1], [2, 0]], [[0, 0], [0, 1], [0, 2]], [[1, 0], [1, 1], [1, 2]], [[2, 0], [2, 1], [2, 2]]]\n\nfor i in ans:\n for j in i:\n if (j in key.sort()):\n print('Yes')\n exit()\n\nprint('No')\n", "A = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nB = [int(input()) for _ in range(N)]\n\nkey = []\nfor i, v in enumerate(A):\n for k, j in enumerate(v):\n if (j in B):\n key.append([i, k])\n\nans = [[[0, 0], [1, 0], [2, 0]], [[0, 1], [1, 1], [2, 1]], [[0, 2], [1, 2], [2, 2]], [[0, 0], [1, 1], [2, 2]], [\n [0, 2], [1, 1], [2, 0]], [[0, 0], [0, 1], [0, 2]], [[1, 0], [1, 1], [1, 2]], [[2, 0], [2, 1], [2, 2]]]\n\nfor i in ans:\n count = 0\n for j in i:\n if (j in key):\n count += 1\n if (count == 3):\n print('Yes')\n exit()\n\nprint('No')"] | ['Runtime Error', 'Accepted'] | ['s969040284', 's473879213'] | [3064.0, 3444.0] | [17.0, 21.0] | [567, 609] |
p02760 | u789436713 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['from collections import Counter\nA1=list(map(int,input().split()))\nA2=list(map(int,input().split()))\nA3=list(map(int,input().split()))\nA=[A1,A2,A3]\nN=int(input())\nfor _ in range(N):\n b=int(input())\n \n for tmpA in A:\n if b in tmpA:\n index=tmpA.index(b)\n tmpA[index]=-1\n break\n \n\n \n\nif True in [ not False in [A[j][i]==A[j+1][i] for j in range(len(A)-1)] for i in range(len(A[0]))]:\n print("Yes")\n\nelif True in [len(Counter(tmpA))==1 for tmpA in A]:\n print("Yes")\n\nelif [A[i][i] == A[i+1][i+1]for i in range(len(A)-1)] or [A[len(A)-(i+1)][i] == A[len(A)-(i+2)][i+1]for i in range(len(A)-1)]\n print("Yes")\n\nelse:\n print("No")\n', 'from collections import Counter\nA1=list(map(int,input().split()))\nA2=list(map(int,input().split()))\nA3=list(map(int,input().split()))\nA=[A1,A2,A3]\nN=int(input())\nfor _ in range(N):\n b=int(input())\n \n for tmpA in A:\n if b in tmpA:\n index=tmpA.index(b)\n tmpA[index]=-1\n break\n \n\n \n\nif True in [[tmpA[i]==tmpA[i] and [i]==[i] for i in range(3)] for tmpA in A]\n print("Yes")\n\nelif len(Counter(A[0]))==1 or len(Counter(A[1]))==1 or len(Counter(A[2]))==1:\n print("Yes")\n\nelif A[1][1]==-1 and (A[0][0] == A[2][2] or A[0][2]==A[2][0]):\n print("Yes")\n\nelse:\n print("No")\n', 'from collections import Counter\nA1=list(map(int,input().split()))\nA2=list(map(int,input().split()))\nA3=list(map(int,input().split()))\nA=[A1,A2,A3]\nN=int(input())\nfor _ in range(N):\n b=int(input())\n \n for tmpA in A:\n if b in tmpA:\n index=tmpA.index(b)\n tmpA[index]=-1\n break\n \n\n\nif A[1][1]==-1:\n \n if A[0][0] == A[2][2] or A[0][2]==A[2][0]:\n print("Yes")\n \n elif A[0][1]==A[2][1] or A[1][0]==A[1][2]:\n print("Yes")\n \n\n \n\nif A[0][0]==A[1][0] and A[1][0]==A[2][0] or A[0][2]==A[1][2]and A[1][2]==A[2][2]:\n print("Yes")\n \nelif len(Counter(A[0]))==1or len(Counter(A[2]))==1:\n print("Yes")\nelse:\n print("No")', 'from collections import Counter\nA1=list(map(int,input().split()))\nA2=list(map(int,input().split()))\nA3=list(map(int,input().split()))\nA=[A1,A2,A3]\nN=int(input())\nfor _ in range(N):\n b=int(input())\n \n for tmpA in A:\n if b in tmpA:\n index=tmpA.index(b)\n tmpA[index]=-1\n break\n \n\n \n\nif True in [ not False in [A[j][i]==A[j+1][i] for j in range(len(A)-1)] for i in range(len(A[0]))]:\n print("Yes")\n\nelif True in [len(Counter(tmpA))==1 for tmpA in A]:\n print("Yes")\n\nelif not False in [A[i][i] == A[i+1][i+1]for i in range(len(A)-1)] or not False in [A[len(A)-(i+1)][i] == A[len(A)-(i+2)][i+1]for i in range(len(A)-1)]\n print("Yes")\n\nelse:\n print("No")', 'from collections import Counter\nA1=list(map(int,input().split()))\nA2=list(map(int,input().split()))\nA3=list(map(int,input().split()))\nA=[A1,A2,A3]\nN=int(input())\nfor _ in range(N):\n b=int(input())\n \n for tmpA in A:\n if b in tmpA:\n index=tmpA.index(b)\n tmpA[index]=-1\n break\n \n\n \n\nif True in [ not False in [A[j][i]==A[j+1][i] for j in range(len(A)-1)] for i in range(len(A[0]))]:\n print("Yes")\n\nelif True in [len(Counter(tmpA))==1 for tmpA in A]:\n print("Yes")\n\nelif A[1][1]==-1 and (A[0][0] == A[2][2] or A[0][2]==A[2][0]):\n print("Yes")\n\nelse:\n print("No")\n'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s061374285', 's327373319', 's400858257', 's909743050', 's160838565'] | [3064.0, 3064.0, 3444.0, 3064.0, 3436.0] | [17.0, 17.0, 40.0, 20.0, 22.0] | [714, 654, 815, 740, 651] |
p02760 | u791110052 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 num in b:\n for x in range(3):\n for y in range(3):\n if a[x][y] == num:\n a[x][y] = 0\n\nif sum(a[0]) == 0 or sum(a[1]) == 0 or sum(a[3]) == 0:\n print("Yes")\nelif sum([a[0][0],a[1][1],a[2][2]]) == 0 or sum([a[2][0],a[1][1],a[0][2]]):\n print("Yes")\nelif sum([a[0][0],a[1][0],a[2][0]]) == 0 or sum([a[0][1],a[1][1],a[2][1]]) == 0 or sum([a[0][2],a[1][2],a[2][2]]) == 0:\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 num in b:\n for x in range(3):\n for y in range(3):\n if a[x][y] == num:\n a[x][y] = 0\n\nif sum(a[0]) == 0 or sum(a[1]) == 0 or sum(a[2]) == 0:\n print("Yes")\nelif sum([a[0][0],a[1][1],a[2][2]]) == 0 or sum([a[2][0],a[1][1],a[0][2]]) == 0:\n print("Yes")\nelif sum([a[0][0],a[1][0],a[2][0]]) == 0 or sum([a[0][1],a[1][1],a[2][1]]) == 0 or sum([a[0][2],a[1][2],a[2][2]]) == 0:\n print("Yes") \nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s510981025', 's694845054'] | [3064.0, 3064.0] | [18.0, 18.0] | [579, 584] |
p02760 | u794066762 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['\ndef check(grid):\n\tbingo=False\n\t#row\n\tfor i in range(3):\n\t\tcount=0\n\t\tfor j in range(3):\n\t\t\tif grid[i][j]==1:\n\t\t\t\tcount+=1\n\tif count==3:\n\t\tprint(1)\n\t\tbingo=True\n\t#col\n\tcount=0\n\tfor i in range(3):\n\t\tfor j in range(3):\n\t\t\tif grid[j][i]==1:\n\t\t\t\tcount+=1\n\tif count==3:\n\t\tprint(2)\n\t\tbingo=True\n\t\n\tcount=0\n\tfor i in range(3):\n\t\tif grid[i][i]==1:\n\t\t\tcount+=1\n\tif count==3:\n\t\tprint(3)\n\t\tbingo=True\n\t\n\tcount=0\n\tfor i in range(3):\n\t\tif grid[i][2-i]==1:\n\t\t\tcount+=1\n\tif count==3:\n\t\tprint(4)\n\t\tbingo=True\n\t\t\n\treturn bingo\n\t\t\npos={}\nfor i in range(3):\n\ttemp=list(map(int,input().split(\' \')))\n\tfor j,t in enumerate(temp):\n\t\tpos[t]=[i,j]\ngrid=[[0 for i in range(3)] for j in range(3)]\n\nn=int(input())\nfor i in range(n):\n\tt=int(input())\n\tif t in pos.keys():\n\t\tr,c=pos[t]\n\t\tgrid[r][c]=1\nbingo=check(grid)\n\nif bingo:\n\tprint("Yes")\nelse:\n\tprint("No")', '\ndef check(grid):\n\tbingo=False\n\t#row\n\tfor i in range(3):\n\t\tcount=0\n\t\tfor j in range(3):\n\t\t\tif grid[i][j]==1:\n\t\t\t\tcount+=1\n\t\tif count==3:\n\t\t\tbingo=True\n\t#col\n\tfor i in range(3):\n\t\tcount=0\n\t\tfor j in range(3):\n\t\t\tif grid[j][i]==1:\n\t\t\t\tcount+=1\n\t\tif count==3:\n\t\t\tbingo=True\n\t\n\tcount=0\n\tfor i in range(3):\n\t\tif grid[i][i]==1:\n\t\t\tcount+=1\n\tif count==3:\n\t\tbingo=True\n\t\n\tcount=0\n\tfor i in range(3):\n\t\tif grid[i][2-i]==1:\n\t\t\tcount+=1\n\tif count==3:\n\t\tbingo=True\n\t\t\n\treturn bingo\n\t\t\npos={}\nfor i in range(3):\n\ttemp=list(map(int,input().split(\' \')))\n\tfor j,t in enumerate(temp):\n\t\tpos[t]=[i,j]\ngrid=[[0 for i in range(3)] for j in range(3)]\n\nn=int(input())\nfor i in range(n):\n\tt=int(input())\n\tif t in pos.keys():\n\t\tr,c=pos[t]\n\t\tgrid[r][c]=1\nbingo=check(grid)\n\nif bingo:\n\tprint("Yes")\nelse:\n\tprint("No")'] | ['Wrong Answer', 'Accepted'] | ['s336735651', 's979961687'] | [3064.0, 3064.0] | [17.0, 18.0] | [851, 812] |
p02760 | u796708718 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A = [[],[],[]]\nb = []\n\nfor i in range(0,3):\n A[i] = [int(x) for x in input().split(" ")]\nN = int(input())\nfor i in range(0,N):\n b.append(int(input()))\n\nfor i in range(0,3):\n for j in range(0,3):\n for n in range(0,N):\n if A[i][j] == b[n]:\n A[i][j] = 0\n\nif A[0] == [0,0,0] or A[1] == [0,0,0] or A[2] == [0,0,0]:\n print("Yes")\nelif [A[0][0],A[1][0],A[2][0]] == [0,0,0]:\n print("yes")\nelif [A[0][1],A[1][1],A[2][1]] == [0,0,0]:\n print("yes")\nelif [A[0][2],A[1][2],A[2][2]] == [0,0,0]:\n print("yes")\nelif [A[0][0],A[1][1],A[2][2]] == [0,0,0]:\n print("yes")\nelif [A[2][0],A[1][1],A[0][2]] == [0,0,0]:\n print("yes")\nelse:\n print("No")', 'A = [[],[],[]]\nb = []\n\nfor i in range(0,3):\n A[i] = [int(x) for x in input().split(" ")]\nN = int(input())\nfor i in range(0,N):\n b.append(int(input()))\n\nfor i in range(0,3):\n for j in range(0,3):\n for n in range(0,N):\n if A[i][j] == b[n]:\n A[i][j] = 0\n\nif A[0] == [0,0,0] or A[1] == [0,0,0] or A[2] == [0,0,0]:\n print("Yes")\nelif [A[0][0],A[1][0],A[2][0]] == [0,0,0]:\n print("Yes")\nelif [A[0][1],A[1][1],A[2][1]] == [0,0,0]:\n print("Yes")\nelif [A[0][2],A[1][2],A[2][2]] == [0,0,0]:\n print("Yes")\nelif [A[0][0],A[1][1],A[2][2]] == [0,0,0]:\n print("Yes")\nelif [A[2][0],A[1][1],A[0][2]] == [0,0,0]:\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s571755384', 's492106887'] | [3064.0, 3064.0] | [18.0, 17.0] | [654, 655] |
p02760 | u798260206 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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().solit()))\na2= list(map(int,input().solit()))\na3= list(map(int,input().solit()))\na = a1 + a2 + a3\n\nn = int(input())\n\n\nfor _ in range(n):\n b = int(input())\n if b in a:\n a[a.index(b)]=0\n \n \ncheck = 0\nfor i in range(3):\n \n if (a[3*i]==a[3*i+1] and a[3*i+1]==a[3*i+2]) or (a[i]==a[i+3] and a[i+3]==a[i+6]):\n check+=1\n\nif (a[0]==a[4] and a[4]==a[8]) or (a[2]==a[4] and a[4]==a[6]):\n check+=1\nif check>0:\n print("Yes")\nelse:\n print("No")', 'a1= list(map(int,input().split()))\na2= list(map(int,input().split()))\na3= list(map(int,input().split()))\na = a1 + a2 + a3\n \nn = int(input())\n \n\nfor _ in range(n):\n b = int(input())\n if b in a:\n a[a.index(b)]=0\n \n \ncheck = 0\nfor i in range(3):\n \n if (a[3*i]==a[3*i+1] and a[3*i+1]==a[3*i+2]) or (a[i]==a[i+3] and a[i+3]==a[i+6]):\n check+=1\n\nif (a[0]==a[4] and a[4]==a[8]) or (a[2]==a[4] and a[4]==a[6]):\n check+=1\nif check>0:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s650820195', 's347910993'] | [3064.0, 3064.0] | [17.0, 18.0] | [545, 547] |
p02760 | u798543098 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\ngrid = []\nfor i in range(3):\n array = list(map(int,input().strip().split()))\n grid.append(array)\n \ngrid = np.array(grid)\n\nN = int(input().split())\ns = [int(input()) for i in range(N)]\n\nfor i in s:\n b = np.where(grid==i,0,grid)\n \nif grid[0][0]==0 & grid[0][1]==0 & grid[0][2]==0:\n han = "Yes"\nelif grid[1][0]==0 & grid[1][1]==0 & grid[1][2]==0:\n han = "Yes"\nelif grid[2][0]==0 & grid[2][1]==0 & grid[2][2]==0:\n han = "Yes"\nelif grid[0][0]==0 & grid[1][0]==0 & grid[2][0]==0:\n han = "Yes"\nelif grid[0][1]==0 & grid[1][1]==0 & grid[2][1]==0:\n han = "Yes"\nelif grid[0][2]==0 & grid[1][2]==0 & grid[2][2]==0:\n han = "Yes"\nelif grid[0][0]==0 & grid[1][1]==0 & grid[2][2]==0:\n han = "Yes"\nelif grid[0][2]==0 & grid[1][1]==0 & grid[2][0]==0:\n han = "Yes"\nelse:\n han = "No"\nprint(han)\n', 'import numpy as np\n\ngrid = []\nfor i in range(3):\n array = list(map(int,input().strip().split()))\n grid.append(array)\n \ngrid = np.array(grid)\n\nN = int(input())\ns = [int(input()) for i in range(N)]\n\nfor i in s:\n grid = np.where(grid==i,0,grid)\n \n#print(grid)\n \nif grid[0][0]==0 and grid[0][1]==0 and grid[0][2]==0:\n han = "Yes"\nelif grid[1][0]==0 and grid[1][1]==0 and grid[1][2]==0:\n han = "Yes"\nelif grid[2][0]==0 and grid[2][1]==0 and grid[2][2]==0:\n han = "Yes"\nelif grid[0][0]==0 and grid[1][0]==0 and grid[2][0]==0:\n han = "Yes"\nelif grid[0][1]==0 and grid[1][1]==0 and grid[2][1]==0:\n han = "Yes"\nelif grid[0][2]==0 and grid[1][2]==0 and grid[2][2]==0:\n han = "Yes"\nelif grid[0][0]==0 and grid[1][1]==0 and grid[2][2]==0:\n han = "Yes"\nelif grid[0][2]==0 and grid[1][1]==0 and grid[2][0]==0:\n han = "Yes"\nelse:\n han = "No"\nprint(han)\n'] | ['Runtime Error', 'Accepted'] | ['s090826115', 's982755617'] | [20780.0, 12448.0] | [419.0, 151.0] | [838, 883] |
p02760 | u803865203 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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])\ncheck = np.zeros([3,3])\nchoice = []\nflag = "No"\n\nfor i in range(3):\n a = input().split()\n a = [int(x) for x in a]\n bingo[i] = a\nN = int(input())\nfor i in range(N):\n choice.append(int(input()))\n\nconvert = bingo.reshape([9])\nfor i in range(9):\n for j in range(N):\n if(convert[i] == j):\n ckeck[i//3][i%3] = 1\n continue\n\nfor i in range(3):\n if(check[i][0] == 1 and check[i][1] == 1 and check[i][2] == 1):\n flag = "Yes"\n elif(check[0][i] == 1 and check[1][i] == 1 and check[2][i] == 1):\n flag = "Yes"\nif(check[0][0] == 1 and check[1][1] == 1 and check[2][2] == 1):\n flag = "Yes"\nelif(check[2][0] == 1 and check[1][1] == 1 and check[0][2] == 1):\n flag = "Yes"\n\nprint(flag)\n', 'bingo = np.zeros([3,3])\ncheck = np.zeros([3,3])\nchoice = []\nflag = "N0"\n\nfor i in range(3):\n a = input().split()\n a = [int(x) for x in a]\n bingo[i] = a\nN = int(input())\nfor i in range(N):\n choice.append(int(input()))\n\nconvert = bingo.reshape([9])\nfor i in range(9):\n for j in range(N):\n if(convert[i] == j):\n ckeck[i//3][i%3] = 1\n continue\n\nfor i in range(3):\n if(check[i][0] == 1 and check[i][1] == 1 and check[i][2] == 1):\n ok = "Yes"\n elif(check[0][i] == 1 and check[1][i] == 1 and check[2][i] == 1)\n ok = "Yes"\nif(check[0][0] == 1 and check[1][1] == 1 and check[2][2] == 1):\n ok = "Yes"\nelif(check[2][0] == 1 and check[1][1] == 1 and check[0][2] == 1):\n ok = "Yes"\n\nprint(ok)\n', 'import numpy as np\n\nbingo = np.zeros([3,3])\ncheck = np.zeros([3,3])\nchoice = []\nflag = "No"\n\nfor i in range(3):\n a = input().split()\n a = [int(x) for x in a]\n bingo[i] = a\nN = int(input())\nfor i in range(N):\n choice.append(int(input()))\n\nconvert = bingo.reshape([9])\nfor i in range(9):\n for j in choice:\n if(convert[i] == j):\n check[i//3][i%3] = 1\n continue\n\n \nfor i in range(3):\n if(check[i][0] == 1 and check[i][1] == 1 and check[i][2] == 1):\n flag = "Yes"\n elif(check[0][i] == 1 and check[1][i] == 1 and check[2][i] == 1):\n flag = "Yes"\nif(check[0][0] == 1 and check[1][1] == 1 and check[2][2] == 1):\n flag = "Yes"\nelif(check[2][0] == 1 and check[1][1] == 1 and check[0][2] == 1):\n flag = "Yes"\n\nprint(flag)\n\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s444362755', 's538842435', 's249963413'] | [13736.0, 3064.0, 20692.0] | [159.0, 17.0, 336.0] | [781, 750, 793] |
p02760 | u809816772 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 for k in range(N):\n if A[i][j] == B[k]:\n A[i][j] = 0\n\nans = "No"\nfor i in range(3):\n if A[i][0] == 0 and A[i][1] == 0 and A[i][2] == 0:\n ans = "Yes"\n elif A[0][i] == 0 and A[1][i] == 0 and A[2][i] == 0:\n ans = "Yes"\n elif A[0][0] and A[1][1] and A[2][2] == 0:\n ans = "Yes"\n elif A[0][2] and A[1][1] and A[2][0] == 0:\n ans = "Yes"\n\nprint(ans)', 'A = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\nB = [int(input()) for i in range(N)]\n\nfor i in range(3):\n for j in range(3):\n for k in range(N):\n if A[i][j] == B[k]:\n A[i][j] = 0\n\nans = "No"\nfor i in range(3):\n if A[i][0] == 0 and A[i][1] == 0 and A[i][2] == 0:\n ans = "Yes"\n elif A[0][i] == 0 and A[1][i] == 0 and A[2][i] == 0:\n ans = "Yes"\n elif A[0][0] == 0 and A[1][1] == 0 and A[2][2] == 0:\n ans = "Yes"\n elif A[0][2] == 0 and A[1][1] == 0 and A[2][0] == 0:\n ans = "Yes"\n\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s241048224', 's481036860'] | [3064.0, 3064.0] | [18.0, 18.0] | [568, 588] |
p02760 | u809819902 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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()))\nka = a + b + c\nx = int()\nn = int(input())\nfor i in range(n):\n k = int(input())\n if k in ka: ka[ka.index(k)] = x\nprint(ka)\nans = "No"\nif ka[0] == x and ka[1] == x and ka[2] == x:ans = "Yes"\nelif ka[3] == x and ka[4] == x and ka[5] == x:ans = "Yes"\nelif ka[6] == x and ka[7] == x and ka[8] == x:ans = "Yes"\nelif ka[0] == x and ka[3] == x and ka[6] == x:ans = "Yes"\nelif ka[1] == x and ka[4] == x and ka[7] == x:ans = "Yes"\nelif ka[2] == x and ka[5] == x and ka[8] == x:ans = "Yes"\nelif ka[0] == x and ka[4] == x and ka[8] == x:ans = "Yes"\nelif ka[2] == x and ka[4] == x and ka[6] == x:ans = "Yes"\nprint(ans)\n', 'a = list(map(int, input().split()))\nb = list(map(int, input().split()))\nc = list(map(int, input().split()))\nka = a + b + c\nx = int()\nn = int(input())\nfor i in range(n):\n k = int(input())\n if k in ka: ka[ka.index(k)] = x\nans = "No"\nif ka[0] == x and ka[1] == x and ka[2] == x:ans = "Yes"\nelif ka[3] == x and ka[4] == x and ka[5] == x:ans = "Yes"\nelif ka[6] == x and ka[7] == x and ka[8] == x:ans = "Yes"\nelif ka[0] == x and ka[3] == x and ka[6] == x:ans = "Yes"\nelif ka[1] == x and ka[4] == x and ka[7] == x:ans = "Yes"\nelif ka[2] == x and ka[5] == x and ka[8] == x:ans = "Yes"\nelif ka[0] == x and ka[4] == x and ka[8] == x:ans = "Yes"\nelif ka[2] == x and ka[4] == x and ka[6] == x:ans = "Yes"\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s826282626', 's612881491'] | [9232.0, 9176.0] | [30.0, 29.0] | [720, 710] |
p02760 | u810288681 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['import math\nh,w = map(int, input().split())\nprint(1 if h==1 or w==1 else math.ceil(h*w/2) )', "al = []\nans = 'No'\nfor i in range(3):\n al.append(list(map(int, input().split())))\nn = int(input())\nbl = [int(input()) for i in range(n)]\nfor i in bl:\n for a in al:\n if i in a:\n a[a.index(i)]=0 \nt1 = al[0][0]+al[1][1]+al[2][2]\nt2 = al[0][2]+al[1][1]+al[2][0]\nif t1 ==0 or t2==0:\n ans = 'Yes'\nelse:\n for a in al:\n if sum(a)==0:\n ans = 'Yes'\n break\n else:\n for va in zip(*al):\n if sum(va)==0:\n ans = 'Yes'\n break\nprint(ans)\n\n\n \n\n \n\n\n \n \n "] | ['Runtime Error', 'Accepted'] | ['s434368316', 's811315344'] | [2940.0, 3188.0] | [18.0, 20.0] | [91, 602] |
p02760 | u812587837 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 isBingo(a):\n for i in range(3)\n if a[i][0] == a[i][1] and a[i][0] == a[i][2]:\n return 'Yes'\n elif a[0][i] == a[1][i] and a[i][0] == a[2][i]:\n return 'Yes'\n if a[0][0] == a[1][1] and a[0][0] == a[2][2]:\n return 'Yes'\n elif a[0][2] == a[1][1] and a[0][2] == a[2][0]\n return 'Yes'\n else:\n return 'No'\n \na = []\nfor i in range(3):\n a.append(list(map(int, input().split())))\nn = int(input())\nb = []\nfor i in range(n):\n b.append(int(input()))\n\nfor i in range(n):\n for j in range(3):\n if b[i] in a[j]:\n a[j][a[j].index(b[i])] = -1\n\nprint(isBingo(a))", "def isBingo(a):\n for i in range(3)\n if a[i][0] == a[i][1] and a[i][0] == a[i][2]:\n return 'Yes'\n elif a[0][i] == a[1][i] and a[i][0] == a[2][i]:\n return 'Yes'\n if a[0][0] == a[1][1] and a[0][0] == a[2][2]:\n return 'Yes'\n elif a[0][2] == a[1][1] and a[0][2] == a[2][0]:\n return 'Yes'\n else:\n return 'No'\n \na = []\nfor i in range(3):\n a.append(list(map(int, input().split())))\nn = int(input())\nb = []\nfor i in range(n):\n b.append(int(input()))\n\nfor i in range(n):\n for j in range(3):\n if b[i] in a[j]:\n a[j][a[j].index(b[i])] = -1\n\nprint(isBingo(a))", "def isBingo(a):\n for i in range(3):\n if a[i][0] == a[i][1] and a[i][0] == a[i][2] and a[i][0] == -1:\n return 'Yes'\n elif a[0][i] == a[1][i] and a[i][0] == a[2][i] and a[i][0] == -1:\n return 'Yes'\n if a[0][0] == a[1][1] and a[0][0] == a[2][2] and a[i][0] == -1:\n return 'Yes'\n elif a[0][2] == a[1][1] and a[0][2] == a[2][0] and a[i][0] == -1:\n return 'Yes'\n else:\n return 'No'\n \na = []\nfor i in range(3):\n a.append(list(map(int, input().split())))\nn = int(input())\nb = []\nfor i in range(n):\n b.append(int(input()))\n\nfor i in range(n):\n for j in range(3):\n if b[i] in a[j]:\n a[j][a[j].index(b[i])] = -1\n\nprint(isBingo(a))", "def isBingo(a):\n for i in range(3):\n if a[i][0] == a[i][1] and a[i][0] == a[i][2] and a[i][0] == -1:\n return 'Yes'\n elif a[0][i] == a[1][i] and a[0][i] == a[2][i] and a[0][i] == -1:\n return 'Yes'\n if a[0][0] == a[1][1] and a[0][0] == a[2][2] and a[0][0] == -1:\n return 'Yes'\n elif a[0][2] == a[1][1] and a[0][2] == a[2][0] and a[0][2] == -1:\n return 'Yes'\n else:\n return 'No'\n \na = []\nfor i in range(3):\n a.append(list(map(int, input().split())))\nn = int(input())\nb = []\nfor i in range(n):\n b.append(int(input()))\n\nfor i in range(n):\n for j in range(3):\n if b[i] in a[j]:\n a[j][a[j].index(b[i])] = -1\n\nprint(isBingo(a))"] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s040162535', 's182249457', 's756101279', 's449446182'] | [2940.0, 2940.0, 3064.0, 3064.0] | [17.0, 18.0, 17.0, 17.0] | [644, 645, 718, 718] |
p02760 | u813993459 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\nxy = [list(map(int, input().split())) for _ in range(3)]\nn = int(input())\nnum = [list(map(int, input().split())) for _ in range(n)]\n\ndef input_b(xy:list, num:int, result:list):\n for i in range(3):\n if num in xy[i]:\n for j in range(3):\n if num==xy[i][j]:\n result[i][j]=1\n return result\n \ndef check_result(result:list):\n\n \n for i in range(3):\n if 3 == np.array(result[0]).sum():\n return "Yes" \n\n if 3 in np.array(result[0]) + np.array(result[1]) + np.array(result[2]):\n return "Yes"\n\n if 3 == result[0][0] + result[1][1] + result[2][2]:\n return"Yes"\n \n return "No"\n\nfor i in num:\n result=input_b(xy,i[0],result)\n\nprint(check_result(result))', 'import numpy as np\n \nxy = [list(map(int, input().split())) for _ in range(3)]\nn = int(input())\nnum = [list(map(int, input().split())) for _ in range(n)] \nresult = [[0,0,0],[0,0,0],[0,0,0]]\n \ndef input_b(xy:list, num:int, result:list):\n for i in range(3):\n if num in xy[i]:\n for j in range(3):\n if num==xy[i][j]:\n result[i][j]=1\n return result\n \ndef check_result(result:list):\n for i in range(3):\n if 3 == np.array(result[i]).sum():\n return "Yes" \n if 3 in np.array(result[0]) + np.array(result[1]) + np.array(result[2]):\n return "Yes"\n if 3 == result[0][0] + result[1][1] + result[2][2]:\n return"Yes"\n if 3 == result[0][2] + result[1][1] + result[2][0]:\n return"Yes"\n return "No"\n \nfor k in num:\n result=input_b(xy,k[0],result)\n \nprint(check_result(result))'] | ['Runtime Error', 'Accepted'] | ['s253471131', 's479303693'] | [12440.0, 12484.0] | [155.0, 152.0] | [781, 873] |
p02760 | u816631826 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['matrix = []\nfor i in range(3):\n line = []\n line = input().split(" ")\n matrix.append(line)\n\nn = int(input())\nchosen = 0\n\nfor i in range(n):\n b = input()\n for i in range(3):\n for j in range(3):\n if matrix[i][j] == b:\n chosen += 1\n matrix[i][j] = 0\nbingo = False\nif chosen == 9:\n bingo = True\n# Squares conditions\nelif (chosen == 8):\n for i in range(3):\n for j in range (3):\n if(i != 1 and j != 1):\n if(matrix[i][j] != 0):\n break\n if(i == 2 and j == 2):\n bingo = True\nelif (chosen >= 3):\n for i in range(3):\n if(matrix[i][0] == 0 and matrix[i][1] == 0 and matrix[i][2] == 0):\n bingo = True\n break\n elif(matrix[0][i] == 0 and matrix[1][i] == 0 and matrix[2][i] == 0):\n bingo = True\n break\n if(matrix[1][1] and (matrix[0][0] == 0 and matrix[2][2] == 0) or (matrix[0][2] == 0 and matrix[2][0] == 0)):\n bingo = True\n\nif bingo:\n print("Yes")\nelse:\n print("No")\n', "A = [ [] for i in range (3)]\nfor i in range(3) :\n A[i] = input().split()\n\nfl = False \n\nB = [[False for i in range (3)] for i in range(3)]\n\nN = int(input())\nfor b in range (N) :\n tmp = input()\n for i in range (3) :\n for j in range (3) :\n if int(tmp) == int(A[i][j]) :\n B[i][j] = True\n\nif B[0][0] and B[1][1] and B[2][2] :\n fl = True\nelif B[0][2] and B[1][1] and B[2][0] :\n fl = True\nelif B[0][0] and B[0][1] and B[0][2] :\n fl = True\nelif B[1][0] and B[1][1] and B[1][2] :\n fl = True\nelif B[2][0] and B[2][1] and B[2][2] :\n fl = True\nelif B[0][0] and B[1][0] and B[2][0] :\n fl = True\nelif B[0][1] and B[1][1] and B[2][1] :\n fl = True\nelif B[0][2] and B[1][2] and B[2][2] :\n fl = True\n\nprint ('Yes' if fl else 'No')"] | ['Wrong Answer', 'Accepted'] | ['s412200488', 's309772857'] | [9300.0, 3188.0] | [27.0, 19.0] | [1085, 778] |
p02760 | u818078165 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['A = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\nb = []\nfor i in range(n):\n b.append(int(input()))\n\nV = [[False,False,False],[False,False,False],[False,False,False]]\n\nfor i in b:\n for i in range(len(A)):\n for j in range(len(A[i])):\n if(A[i][j] == i):\n V[i][j] = True\n\n\ndef judge(V):\n for i in range(3):\n if(V[i][0] and V[i][1] and V[i][2]):\n return True\n if(V[0][i] and V[1][i] and V[2][i]):\n return True\n\n if(V[0][0] and V[1][1] and V[2][2]):\n return True\n if (V[0][2] and V[1][1] and V[2][0]):\n return True\n return False\n\nif(judge(V)):\n print("Yes")\nelse:\n print("No")', 'A = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\nb = []\nfor i in range(n):\n b.append(int(input()))\n\nV = [[False,False,False],[False,False,False],[False,False,False]]\n\nfor bb in b:\n for i in range(len(A)):\n for j in range(len(A[i])):\n if(A[i][j] == bb):\n V[i][j] = True\n\n\ndef judge(V):\n for i in range(3):\n if(V[i][0] and V[i][1] and V[i][2]):\n return True\n if(V[0][i] and V[1][i] and V[2][i]):\n return True\n\n if(V[0][0] and V[1][1] and V[2][2]):\n return True\n if (V[0][2] and V[1][1] and V[2][0]):\n return True\n return False\n\n#print(V)\n\nif(judge(V)):\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s868759454', 's699565639'] | [3064.0, 3064.0] | [17.0, 17.0] | [700, 713] |
p02760 | u819611380 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['R = 3\nC = 3\nmatrix = [] \nprint("Enter the entries rowwise:") \n \nfor i in range(R): \n a =[] \n for j in range(C): \n a.append(int(input())) \n matrix.append(a) \n \n# For printing the matrix \nfor i in range(R): \n for j in range(C): \n print(matrix[i][j], end = " ") \n print() \n\ni= int(input("Enter: "))\nif i in matrix:\n print("Yes")\nelse:\n print("No")', 'a, b, c = (input("Enter 1 ")).split()\ne,f, g = (input("Enter 2")).split()\nh,i,j = (input("Enter 3")).split()\nx = (input("Enter: "))\nif (x==a or x==b or x==c or x==e or x==f or x==g or x==h or x==i or x==j):\n print("Yes")\nelse:\n print("No")', 'row1 = list(map(int,input().split()))\nrow2 = list(map(int,input().split()))\nrow3 = list(map(int,input().split()))\nn = int(input())\narr = []\nfor i in range(n):\n temp = int(input())\n arr.append(temp)\n#\nif row1[0] in arr and row1[1] in arr and row1[2] in arr or row2[0] in arr and row2[1] in arr and row2[2] in arr or row3[0] in arr and row3[1] in arr and row3[2] in arr:\n print("Yes")\n exit()\nelif row1[0] in arr and row2[0] in arr and row3[0] in arr or row1[1] in arr and row2[1] in arr and row3[1] in arr or row1[2] in arr and row2[2] in arr and row3[2] in arr:\n print("Yes")\n exit()\nelif row1[0] in arr and row2[1] in arr and row3[2] in arr or row1[2] in arr and row2[1] in arr and row3[0] in arr:\n print("Yes")\n exit()\nelse:\n print("No")'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s666747562', 's750064193', 's680968117'] | [3064.0, 3060.0, 3064.0] | [17.0, 17.0, 17.0] | [390, 245, 766] |
p02760 | u823885866 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['import sys\nA1 = list(map(int, sys.stdin.readline().split()))\nA2 = list(map(int, sys.stdin.readline().split()))\nA3 = list(map(int, sys.stdin.readline().split()))\nN = int(sys.stdin.readline())\nb = [int(sys.stdin.readline()) for _ in range(N)]\nA = A1 + A2 + A3\ni = 0\nwhile i <= 8:\n if b.count(A[i]):\n A[i] = 101\n i += 1\nbingoFlag = False\nk = 0\nwhile k <= 2:\n if A[k] == A[k+3] == A[k+6]:\n bingoFlag = True\n break\n k += 1\nif A[0] == A[4] == A[8] or A[2] == A[4] == A[6]:\n bingoFlag = True\nif bingFlag:\n print("Yes")\nelse:\n print("No")\n', 'import sys\nA1 = list(map(int, sys.stdin.readline().split()))\nA2 = list(map(int, sys.stdin.readline().split()))\nA3 = list(map(int, sys.stdin.readline().split()))\nN = int(sys.stdin.readline())\nb = [int(sys.stdin.readline()) for _ in range(N)]\nA = A1 + A2 + A3\ni = 0\nwhile i <= 8:\n if b.count(A[i]):\n A[i] = 101\n i += 1\nbingoFlag = False\nk = 0\nwhile k <= 2:\n if A[k] == A[k+3] == A[k+6] or A[k*3] == A[k*3 + 1] == A[k*3 + 2]:\n bingoFlag = True\n break\n k += 1\nif A[0] == A[4] == A[8] or A[2] == A[4] == A[6]:\n bingoFlag = True\nif bingoFlag:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s510567130', 's412880530'] | [3064.0, 3064.0] | [18.0, 18.0] | [547, 585] |
p02760 | u826771152 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal. | ['first_array = [int(i) for i in input().split()]\nsecond_array = [int(i) for i in input().split()]\nthird_array = [int(i) for i in input().split()]\nN = int(input())\nbs = []\nfor i in range(N):\n bs.append(i)\nfirst_array = [(i in bs) for i in first_array]\nsecond_array = [(i in bs) for i in second_array]\nthird_array = [(i in bs) for i in third_array]\ncheck_array = [True for i in range(3)]\nbingo = [first_array, second_array, third_array]\n\ndef main():\n bingo_count = int()\n for horizon in bingo:\n bingo_count += int(horizon == check_array)\n for i in range(3):\n vertical = []\n for j in range(3):\n vertical.append(bingo[j][i])\n bingo_count += int(vertical == check_array)\n diagnal = [bingo[i][up] for up,i in enumerate(reversed(range(3)))]\n bingo_count += int(diagnal == check_array)\n diagnal = [bingo[i][i] for i in range(3)]\n bingo_count += int(diagnal == check_array)\n if bingo_count > 0:\n print("Yes")\n else:\n print("No")\nmain()\n', '# B\n\nfirst_array = [int(i) for i in input().split()]\nsecond_array = [int(i) for i in input().split()]\nthird_array = [int(i) for i in input().split()]\nN = int(input())\nbs = []\nfor i in range(N):\n bs.append(int(input()))\n\nfirst_array = [(i in bs) for i in first_array]\nsecond_array = [(i in bs) for i in second_array]\nthird_array = [(i in bs) for i in third_array]\ncheck_array = [True for i in range(3)]\nbingo = [first_array, second_array, third_array]\n# [0][0] == first_array[0]\n\ndef main():\n bingo_count = int()\n \n for horizon in bingo:\n bingo_count += int(horizon == check_array)\n\n # vertical\n for i in range(3):\n vertical = []\n for j in range(3):\n vertical.append(bingo[j][i])\n bingo_count += int(vertical == check_array)\n\n # diagnal 1\n diagnal = [bingo[i][i] for i in range(3)]\n bingo_count += int(diagnal == check_array)\n\n # diagnal 2\n diagnal = [bingo[i][up] for up,i in enumerate(reversed(range(3)))]\n bingo_count += int(diagnal == check_array)\n \n \n if bingo_count > 0:\n print("Yes")\n else:\n print("No")\nmain()'] | ['Wrong Answer', 'Accepted'] | ['s999255128', 's740472182'] | [3064.0, 3064.0] | [18.0, 18.0] | [959, 1169] |
p02760 | u830162518 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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,inout().split())\nN=int(input())\nL=[int(input()) for i in range(N)]\nif a in L and b in L and c in L:\n print('Yes')\nelif d in L and e in L and f in L:\n print('Yes')\nelif g in L and h in L and i in L:\n print('Yes')\nelif a in L and d in L and g in L:\n print('Yes')\nelif b in L and e in L and h in L:\n print('Yes')\nelif c in L and f in L and i in L:\n print('Yes')\nelif a in L and e in L and i in L:\n print('Yes')\nelif c in L and e in L and g in L:\n print('Yes')\nelse:\n print('No')\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())\nL=[int(input()) for i in range(N)]\nif a in L and b in L and c in L:\n print('Yes')\nelif d in L and e in L and f in L:\n print('Yes')\nelif g in L and h in L and i in L:\n print('Yes')\nelif a in L and d in L and g in L:\n print('Yes')\nelif b in L and e in L and h in L:\n print('Yes')\nelif c in L and f in L and i in L:\n print('Yes')\nelif a in L and e in L and i in L:\n print('Yes')\nelif c in L and e in L and g in L:\n print('Yes')\nelse:\n print('No')\n "] | ['Runtime Error', 'Accepted'] | ['s316297957', 's899733591'] | [3064.0, 3064.0] | [17.0, 17.0] | [569, 569] |
p02760 | u830592648 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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=list(list(map(int, input().split())) for _ in range(3))\nN=int(input())\nB=list(int(input()) for _ in range(N))\na=np.array(A)\nC=a.flatten()\n\nfor c in range(len(C)):\n for b in range(len(B)):\n if C[c]==B[b]:\n C[c]=0\n\n if (sum(C[:3])==0) | (sum(C[3:6])==0) | (sum(C[6:9])==0):\n print("Yes")\nelif (C[0]+C[3]+C[6]==0) | (C[1]+C[4]+C[7]==0) | (C[2]+C[5]+C[8]==0):\n print("Yes")\nelif (C[0]+C[4]+C[8]==0) | (C[2]+C[4]+C[6]==0): \n print("Yes")\nelse:\n print("No")', 'import numpy as np\nA=list(list(map(int, input().split())) for _ in range(3))\nN=int(input())\nB=list(int(input()) for _ in range(N))\na=np.array(A)\nc=a.flatten()\nC=c.tolist()\n\nfor c in range(len(C)):\n for b in range(len(B)):\n if C[c]==B[b]:\n C[c]=0\n\n if (sum(C[:3])==0) | (sum(C[3:6])==0) | (sum(C[6:9])==0):\n print("Yes")\nelif (C[0]+C[3]+C[6]==0) | (C[1]+C[4]+C[7]==0) | (C[2]+C[5]+C[8]==0):\n print("Yes")\nelif (C[0]+C[4]+C[8]==0) | (C[2]+C[4]+C[6]==0): \n print("Yes")\nelse:\n print("No")', 'import numpy as np\nA=list(list(map(int, input().split())) for _ in range(3))\nN=int(input())\nB=list(int(input()) for _ in range(N))\na=np.array(A)\nc=a.flatten()\nC=c.tolist()\n\nfor c in range(len(C)):\n for b in range(len(B)):\n if C[c]==B[b]:\n C[c]=0\n\nif (sum(C[:3])==0) | (sum(C[3:6])==0) | (sum(C[6:9])==0):\n print("Yes")\nelif (C[0]+C[3]+C[6]==0) | (C[1]+C[4]+C[7]==0) | (C[2]+C[5]+C[8]==0):\n print("Yes")\nelif (C[0]+C[4]+C[8]==0) | (C[2]+C[4]+C[6]==0): \n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s176936483', 's324284268', 's477789936'] | [3064.0, 3064.0, 14244.0] | [18.0, 17.0, 150.0] | [516, 529, 517] |
p02760 | u830881690 | 2,000 | 1,048,576 | We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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(input9())\nr = []\nfor _ in range(3):\n b = int(input())\n for i in range(3):\n for j in range(3):\n if a[i][j] == b:\n a[i][j] = 0\nans = 'No'\nfor i in range(3):\n if a[i][0] + a[i][1] + a[i][2] == 0: ans = 'Yes'\n if a[0][i] + a[1][i] + a[2][i] == 0: ans = 'Yes'\nif a[0][0] + a[1][1] + a[2][2] == 0: ans = 'Yes'\nif a[0][2] + a[1][1] + a[2][0] == 0: ans = 'Yes'\nprint(ans)", "a = [list(map(int, input().split())) for _ in range(3)]\nn = int(input())\nfor _ in range(n):\n b = int(input())\n for i in range(3):\n for j in range(3):\n if a[i][j] == b:\n a[i][j] = 0\nans = 'No'\nfor i in range(3):\n if a[i][0] + a[i][1] + a[i][2] == 0: ans = 'Yes'\n if a[0][i] + a[1][i] + a[2][i] == 0: ans = 'Yes'\nif a[0][0] + a[1][1] + a[2][2] == 0: ans = 'Yes'\nif a[0][2] + a[1][1] + a[2][0] == 0: ans = 'Yes'\nprint(ans)"] | ['Runtime Error', 'Accepted'] | ['s349545183', 's621841478'] | [3064.0, 3064.0] | [17.0, 17.0] | [472, 464] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.