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
u221264296
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['t=[]\nfor i in range(3):\n t.append([int(i) for i in input().split()])\nn = int(input())\nlst = []\nfor i in range(n):lst+=[int(input())]\ndef ligne(i):\n for j in range(3):\n if not t[i][j] in lst:\n return False\n return True\ndef col(j):\n for i in range(3):\n if not t[i][j] in lst:\n retur False\n return True\ndef diag1():\n for i in range(3):\n if not t[i][i] in lst:\n return False\n return True\ndef diag2():\n for i in range(3):\n if not t[2-i][i] in lst:\n return False\n return True\nans = False\nfor i in range(3):\n ans = ans or ligne(i)\n ans = ans or col(i)\nans = ans or diag1() or diag2()\nif ans :\n print("Yes")\nelse:\n print("No")', 't=[]\nfor i in range(3):\n t.append([int(i) for i in input().split()])\nn = int(input())\nlst = []\nfor i in range(n):lst+=[int(input())]\ndef ligne(i):\n for j in range(3):\n if not t[i][j] in lst:\n return False\n return True\ndef col(j):\n for i in range(3):\n if not t[i][j] in lst:\n return False\n return True\ndef diag1():\n for i in range(3):\n if not t[i][i] in lst:\n return False\n return True\ndef diag2():\n for i in range(3):\n if not t[2-i][i] in lst:\n return False\n return True\nans = False\nfor i in range(3):\n ans = ans or ligne(i)\n ans = ans or col(i)\nans = ans or diag1() or diag2()\nif ans :\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s342582367', 's615855239']
[2940.0, 3064.0]
[17.0, 17.0]
[730, 731]
p02760
u222207357
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\nflag = False\nfor i in range(3):\n if a[i][0] in b and a[i][1] in b and a[i][2] in b:\n flag = True\n break\n if a[0][i] in b and a[1][i] in b and a[2][i] in b:\n flag = True\n break\nif a[0][0] in b and a[1][1] in b and a[2][2] in b:\n flag = True\nif a[2][0] in b and a[1][1] in b and a[0][2] in b:\n flag = True\n \nprint("Yes" if flag else "No")', 'a = [list(map(int, input().split())) for _ in range(3)]\nn = int(input())\nb = [int(input()) for _ in range(n)]\n\nflag = False\nfor i in range(3):\n if a[i][0] in b and a[i][1] in b and a[i][2] in b:\n flag = True\n break\n if a[0][i] in b and a[1][i] in b and a[2][i] in b:\n flag = True\n break\nif a[0][0] in b and a[1][1] in b and a[2][2] in b:\n flag = True\nif a[2][0] in b and a[1][1] in b and a[0][2] in b:\n flag = True\n \nprint("Yes" if flag else "No")']
['Runtime Error', 'Accepted']
['s613390328', 's477297423']
[3064.0, 3064.0]
[18.0, 18.0]
[490, 490]
p02760
u223574877
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['loopin=input()\n\nbingolist = []\n\n\n\nA11,A12,A13,A21,A22,A23,A31,A32,A33=0,0,0,0,0,0,0,0,0\n\n\nfor i in range(int(loopin)):\n\tbingo = input()\n\tif bingo==a:\n\t\tA11=1\n\telif bingo==b:\n\t\tA12=1\t\n\telif bingo==c:\n\t\tA13=1\t\n\telif bingo==d:\n\t\tA21=1\t\n\telif bingo==e:\n\t\tA22=1\t\n\telif bingo==f:\n\t\tA23=1\t\n\telif bingo==g:\n\t\tA31=1\t\n\telif bingo==h:\n\t\tA32=1\t\n\telif bingo==i:\n\t\tA33=1\t\n\nif (A11+A12+A13)==3:\n\tprint("Yes")\nelif (A21+A22+A23)==3:\n\tprint("Yes")\nelif (A31+A32+A33)==3:\n\tprint("Yes")\nelif (A11+A22+A33)==3:\n\tprint("Yes")\nelif (A13+A22+A31)==3:\n\tprint("Yes")\nelse:\n\tprint("No")\n', 'a,b,c=input().split()\nd,e,f=input().split()\ng,h,i=input().split()\n\nloopin=input()\n\nA11,A12,A13,A21,A22,A23,A31,A32,A33=0,0,0,0,0,0,0,0,0\n\n\nfor x in range(int(loopin)):\n\tbingo = input()\n\tif bingo==a:\n\t\tA11=1\n\telif bingo==b:\n\t\tA12=1\t\n\telif bingo==c:\n\t\tA13=1\t\n\telif bingo==d:\n\t\tA21=1\t\n\telif bingo==e:\n\t\tA22=1\t\n\telif bingo==f:\n\t\tA23=1\t\n\telif bingo==g:\n\t\tA31=1\t\n\telif bingo==h:\n\t\tA32=1\n\telif bingo==i:\n\t\tA33=1\n\n\nif (A11+A12+A13)==3:\n\tprint("Yes")\nelif (A21+A22+A23)==3:\n\tprint("Yes")\nelif (A31+A32+A33)==3:\n\tprint("Yes")\nelif (A11+A21+A31)==3:\n\tprint("Yes")\nelif (A12+A22+A32)==3:\n\tprint("Yes")\nelif (A13+A23+A33)==3:\n\tprint("Yes")\nelif (A11+A22+A33)==3:\n\tprint("Yes")\nelif (A13+A22+A31)==3:\n\tprint("Yes")\nelse:\n\tprint("No")\n']
['Runtime Error', 'Accepted']
['s732810826', 's726655623']
[3064.0, 3064.0]
[17.0, 18.0]
[561, 720]
p02760
u223904637
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
["a=[]\nfor i in range(3):\n a.append(list(map(int,input().split())))\nb=[[0 for i in range(3)] for j in range(3)]\nn=int(input())\nfor i in range(n):\n p=int(input())\n for j in range(3):\n for k in range(3):\n if p==a[i][j]:\n b[i][j]=1\nfor i in range(3):\n x=0\n y=0\n for j in range(3):\n if b[i][j]==1:\n x+=1\n if b[j][i]==1:\n y+=1\n if x==3 or y==3:\n print('Yes')\n exit()\nif b[0][0]==b[1][1]==b[2][2]==1:\n print('Yes')\n exit()\nif b[2][0]==b[1][1]==b[0][2]==1:\n print('Yes')\n exit()\nprint('No')", "a=[]\nfor i in range(3):\n a.append(list(map(int,input().split())))\nb=[[0 for i in range(3)] for j in range(3)]\nn=int(input())\nfor i in range(n):\n p=int(input())\n for j in range(3):\n for k in range(3):\n if p==a[j][k]:\n b[j][k]=1\nfor i in range(3):\n x=0\n y=0\n for j in range(3):\n if b[i][j]==1:\n x+=1\n if b[j][i]==1:\n y+=1\n if x==3 or y==3:\n print('Yes')\n exit()\nif b[0][0]==b[1][1]==b[2][2]==1:\n print('Yes')\n exit()\nif b[2][0]==b[1][1]==b[0][2]==1:\n print('Yes')\n exit()\nprint('No')\n"]
['Runtime Error', 'Accepted']
['s896843350', 's537128298']
[3064.0, 3064.0]
[17.0, 18.0]
[597, 598]
p02760
u224554402
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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()\nb = input()\nc = input()\nlist_ans =(a,b,c)\nN = int(input())\n\n\nfor i in range(N):\n bingo = input()\n bingo_list=[]\n bingo_list.append(bingo)\n \n \n \n\ndef bingo_row(p,q):\n \n if p in q:\n return True\n else:\n return False\n\ndef bingo_column(p,q,r,s):\n \n for i in range(3):\n if p[i] in s and q[i] in s:\n if r[i] in s:\n return True\n else:\n return False\n else:\n return False\n\ndef bingo_slash(p,q,r,s):\n if q[1] in s:\n if p[0] in s and r[2]:\n return True\n elif p[2] in s and r[0]:\n return True\n else:\n return False\n else:\n return False\n \ntotal = 0\nfor i in list_ans:\n if bingo_row(i, bingo_list):\n print('Yes')\n break\n elif bingo_column(a,b,c,bingo_list):\n print('Yes')\n break\n elif bingo_slash(a,b,c,bingo_list):\n print('Yes')\n break\n else:\n total += 1\nif total == 3:\n print('No')", "a = input()\nb = input()\nc = input()\nlist_ans =(a,b,c)\nN = int(input())\nbingo_list=[]\n\nfor i in range(N):\n bingo = input()\n bingo_list.append(bingo)\n \n \nprint(bingo_list)\n\ndef bingo_row(p,q):\n \n for i in range(3):\n if p[i] in q:\n return True\n else:\n return False\n\ndef bingo_column(p,q,r,s):\n \n for i in range(3):\n if p[i] in s and q[i] in s:\n if r[i] in s:\n return True\n else:\n return False\n else:\n return False\n\ndef bingo_slash(p,q,r,s):\n if q[1] in s:\n if p[0] in s and r[2] in s:\n return True\n elif p[2] in s and r[0] in s:\n return True\n else:\n return False\n else:\n return False\nprint(bingo_row(a,bingo_list))\n \ntotal = 0\nfor i in list_ans:\n if bingo_row(i, bingo_list):\n print('Yes')\n break\n elif bingo_column(a,b,c,bingo_list):\n print('Yes')\n break\n elif bingo_slash(a,b,c,bingo_list):\n print('Yes')\n break\n else:\n total += 1\nif total == 3:\n print('No')", " = input().split()\nb = input().split()\nc = input().split()\nlist_ans =(a,b,c)\nN = int(input())\nbingo_list=[]\n\nfor i in range(N):\n bingo = input()\n bingo_list.append(bingo)\n\n\n\ndef bingo_row(p,q):\n row_total= 0\n \n for i in range(3):\n if p[i] in q:\n row_total +=1\n else:\n return False\n if row_total == 3:\n return True\n\ndef bingo_column(p,q,r,s):\n batu = 0\n \n for i in range(3):\n \n if p[i] in s and q[i] in s:\n if r[i] in s:\n return True\n break\n else:\n batu +=1 \n else:\n batu +=1\n if batu == 3:\n return False\n\ndef bingo_slash(p,q,r,s):\n if q[1] in s:\n if p[0] in s and r[2] in s:\n print('C')\n return True\n elif p[2] in s and r[0] in s:\n print('D')\n return True\n else:\n return False\n else:\n return False\n\n \ntotal = 0\nfor i in list_ans:\n if bingo_row(i, bingo_list):\n print('Yes')\n break\n elif bingo_column(a,b,c,bingo_list):\n print('Yes')\n break\n elif bingo_slash(a,b,c,bingo_list):\n print('Yes')\n break\n else:\n total += 1\nif total == 3:\n print('No')\n\n", "a = input().split()\nb = input().split()\nc = input().split()\nlist_ans =(a,b,c)\nN = int(input())\nbingo_list=[]\n\nfor i in range(N):\n bingo = input()\n bingo_list.append(bingo)\n\n\n\ndef bingo_row(p,q):\n row_total= 0\n \n for i in range(3):\n if p[i] in q:\n row_total +=1\n else:\n return False\n if row_total == 3:\n return True\n\ndef bingo_column(p,q,r,s):\n batu = 0\n \n for i in range(3):\n \n if p[i] in s and q[i] in s:\n if r[i] in s:\n return True\n break\n else:\n batu +=1 \n else:\n batu +=1\n if batu == 3:\n return False\n\ndef bingo_slash(p,q,r,s):\n if q[1] in s:\n if p[0] in s and r[2] in s:\n return True\n elif p[2] in s and r[0] in s:\n return True\n else:\n return False\n else:\n return False\n\n \ntotal = 0\nfor i in list_ans:\n if bingo_row(i, bingo_list):\n print('Yes')\n break\n elif bingo_column(a,b,c,bingo_list):\n print('Yes')\n break\n elif bingo_slash(a,b,c,bingo_list):\n print('Yes')\n break\n else:\n total += 1\nif total == 3:\n print('No')\n "]
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s052232714', 's133069069', 's256851698', 's588270483']
[3064.0, 3064.0, 3064.0, 3064.0]
[17.0, 18.0, 18.0, 17.0]
[1173, 1264, 1417, 1391]
p02760
u225020286
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 (2):\n for j in range(2):\n a.append(int(input()))\nN=int(input())\nfor i in range(N):\n b[i]=int(input())\n \nfor i in range(2):\n for j in range(2):\n for k in range(N):\n if a[i][j]==b[k]:\n a[i][j]=1\n else:\n a[i][j]=0\n \nif a[0][0]=1 and a[0][1]=1 and a[0][2]=1:\n print("Yes")\nelif a[1][0]=1 and a[1][1]=1 and a[1][2]=1:\n print("Yes")\nelif a[2][0]=1 and a[2][1]=1 and a[2][2]=1:\n print("Yes")\nelif a[0][0]=1 and a[1][0]=1 and a[2][0]=1:\n print("Yes")\nelif a[0][1]=1 and a[1][1]=1 and a[2][1]=1:\n print("Yes")\nelif a[0][2]=1 and a[1][2]=1 and a[2][2]=1:\n print("Yes")\nelif a[0][0]=1 and a[1][1]=1 and a[2][2]=1:\n print("Yes")\nelif a[0][2]=1 and a[1][1]=1 and a[2][0]=1:\n print("Yes")\nelse:\n print("No")\n', 'A=[list(map(int,input().split())) for i in range(3)]\nN=int(input())\nB=list(int(input()) for i in range(N))\nx=[]\nfor i in range(3):\n for j in range(3):\n if A[i][j] in B:\n x.append(A[i][j])\nif A[0][0] in x and A[1][0] in x and A[2][0] in x:\n print("Yes")\nelif A[0][1] in x and A[1][1] in x and A[2][1] in x:\n print("Yes")\nelif A[0][2] in x and A[1][2] in x and A[2][2] in x:\n print("Yes")\nelif A[0][0] in x and A[0][1] in x and A[0][2] in x:\n print("Yes")\nelif A[1][0] in x and A[1][1] in x and A[1][2] in x:\n print("Yes")\nelif A[2][0] in x and A[2][1] in x and A[2][2] in x:\n print("Yes")\nelif A[0][0] in x and A[1][1] in x and A[2][2] in x:\n print("Yes")\nelif A[0][2] in x and A[1][1] in x and A[2][0] in x:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s569318346', 's002265584']
[2940.0, 3064.0]
[17.0, 18.0]
[764, 758]
p02760
u227082700
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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(input())for _ in range(3)]for _ in range(3)]\nn=int(input())\nb=[int(input())for _ in range(n)]\nfor i in b:\n for j in range(3):\n for k in range(3):\n if i==a[j][k]:a[j][k]=0\nans="No"\nfor i in range(3):\n if a[i][0]==a[i][1]==a[i][2]:ans="Yes"\n if a[0][i]==a[1][i]==a[2][i]:ans="Yes"\nif a[0][0]==a[1][1]==a[2][2]:ans="Yes"\nif a[0][2]==a[1][1]==a[2][0]:ans="Yes"\nprint(ans)', 'a=[list(map(int,input().split())) for _ in range(3)]\nn=int(input())\nb=[int(input())for _ in range(n)]\nfor i in b:\n for j in range(3):\n for k in range(3):\n if i==a[j][k]:a[j][k]=0\nans="No"\nfor i in range(3):\n if a[i][0]==a[i][1]==a[i][2]:ans="Yes"\n if a[0][i]==a[1][i]==a[2][i]:ans="Yes"\nif a[0][0]==a[1][1]==a[2][2]:ans="Yes"\nif a[0][2]==a[1][1]==a[2][0]:ans="Yes"\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s747049113', 's019266967']
[3064.0, 3064.0]
[18.0, 17.0]
[386, 387]
p02760
u228636605
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 array = list(map(int, input().strip().split()))\n A.append(array)\n\n# A = [input().split() for l in range(3)] \n\nN = int(input())\nb = []\nflag = 0\nfor i in range(N):\n b.append(int(input()))\n\nprint(type(int(A[0][0])))\nprint(type(b[0]))\n\nif A[0][0] == b[0]:\n print("Yes")\n\nfor i in range(3):\n for j in range(3):\n for k in range(N):\n #print(A[i][j], b[k])\n if A[i][j] == b[k]:\n A[i][j] = 1000\n\nfor i in range(3):\n if A[i][0] == A[i][1] and A[i][1] == A[i][2] and A[i][2] == 1000:\n flag = 1\n if A[0][i] == A[1][i] and A[1][i] == A[2][i] and A[2][i] == 1000:\n flag = 1\n if A[0][0] == A[1][1] and A[1][1] == A[2][2] and A[2][2] == 1000:\n flag = 1\n if A[0][2] == A[1][1] and A[1][1] == A[2][0] and A[2][0] == 1000:\n flag = 1\n\nif flag == 1:\n print("Yes")\nelse:\n print("No")', 'A = []\nfor i in range(3):\n array = list(map(int, input().strip().split()))\n A.append(array)\n\n# A = [input().split() for l in range(3)] \n\nN = int(input())\nb = []\nflag = 0\nfor i in range(N):\n b.append(int(input()))\n\nprint(type(int(A[0][0])))\nprint(type(b[0]))\n\nif A[0][0] == b[0]:\n print("Yes")\n\nfor i in range(3):\n for j in range(3):\n for k in range(N):\n #print(A[i][j], b[k])\n if A[i][j] == b[k]:\n A[i][j] = 1000\n\nfor i in range(3):\n if A[i][0] == A[i][1] and A[i][1] == A[i][2] and A[i][2] == 1000:\n flag = 1\n if A[0][i] == A[1][i] and A[1][i] == A[2][i] and A[2][i] == 1000:\n flag = 1\n if A[0][0] == A[1][1] and A[1][1] == A[2][2] and A[2][2] == 1000:\n flag = 1\n if A[0][2] == A[1][1] and A[1][1] == A[2][0] and A[2][0] == 1000:\n flag = 1\n\nif flag == 1:\n print("Yes")\nelse:\n print("No")\nprint(A)', 'A = []\nfor i in range(3):\n array = list(map(int, input().strip().split()))\n A.append(array)\n\n# A = [input().split() for l in range(3)] \n\nN = int(input())\nb = []\nflag = 0\nfor i in range(N):\n b.append(int(input()))\n\n#print(type(int(A[0][0])))\n#print(type(b[0]))\n\nfor i in range(3):\n for j in range(3):\n for k in range(N):\n #print(A[i][j], b[k])\n if A[i][j] == b[k]:\n A[i][j] = 1000\n\nfor i in range(3):\n if A[i][0] == A[i][1] and A[i][1] == A[i][2] and A[i][2] == 1000:\n flag = 1\n if A[0][i] == A[1][i] and A[1][i] == A[2][i] and A[2][i] == 1000:\n flag = 1\n if A[0][0] == A[1][1] and A[1][1] == A[2][2] and A[2][2] == 1000:\n flag = 1\n if A[0][2] == A[1][1] and A[1][1] == A[2][0] and A[2][0] == 1000:\n flag = 1\n\nif flag == 1:\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s470719815', 's675588591', 's759923163']
[3188.0, 3064.0, 3064.0]
[17.0, 18.0, 17.0]
[893, 902, 858]
p02760
u232599070
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\nbingo = [a11, a12, a13, a21, a22, a23, a31, a32, a33]\n\nnum = []\nfor _ in range(N):\n num.append(_)\n\nfor _ in range(len(bingo)):\n if bingo[_] in num:\n bingo[_] = 0\n\nrow1 = a11 + a12 + a13\nrow2 = a21 + a22 + a23\nrow3 = a31 + a32 + a33\ncol1 = a11 + a21 + a31\ncol2 = a12 + a22 + a32\ncol3 = a13 + a23 + a33\ncross1 = a11 + a22 + a33\ncross2 = a13 + a22 + a31\n\nif 0 in [row1, row2, row3, col1, col2, col3, cross1, cross2]:\n print("Yes")\nelse:\n print("No")\n\n\n', 'a11, a12, a13 = map(int, input().split())\na21, a22, a23 = map(int, input().split())\na31, a32, a33 = map(int, input().split())\nN = int(input())\nnum = []\nfor _ in range(N):\n num.append(int(input()))\n\nrow1 = a11 + a12 + a13\nrow2 = a21 + a22 + a23\nrow3 = a31 + a32 + a33\ncol1 = a11 + a21 + a31\ncol2 = a12 + a22 + a32\ncol3 = a13 + a23 + a33\ncross1 = a11 + a22 + a33\ncross2 = a13 + a22 + a31\n\nif 0 in [row1, row2, row3, col1, col2, col3, cross1, cross2]:\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())\nnum = []\nfor _ in range(N):\n num.append(int(input()))\n \nbingo = [\n [a11, a12, a13], \n [a21, a22, a23], \n [a31, a32, a33]\n]\n \nfor n in range(3):\n for m in range(3): \n if bingo[n][m] in num:\n bingo[n][m] = 0\n \nrow1 = bingo[0][0] + bingo[0][1] + bingo[0][2]\nrow2 = bingo[1][0] + bingo[1][1] + bingo[1][2]\nrow3 = bingo[2][0] + bingo[2][1] + bingo[2][2]\n \ncol1 = bingo[0][0] + bingo[1][0] + bingo[2][0]\ncol2 = bingo[0][1] + bingo[1][1] + bingo[2][1]\ncol3 = bingo[0][2] + bingo[1][2] + bingo[2][2]\n \ncross1 = bingo[0][0] + bingo[1][1] + bingo[2][2]\ncross2 = bingo[2][0] + bingo[1][1] + bingo[2][0]\n \nif 0 in [row1, row2, row3, col1, col2, col3, cross1, cross2]:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s435868047', 's776154384', 's238361045']
[3064.0, 3064.0, 3064.0]
[18.0, 18.0, 17.0]
[601, 484, 847]
p02760
u232873434
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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(0,3)]\nN = int(input())\nb_list =list([int(input()) for i in range(0,N)])\ncount = 0\nfor i in range(0,3):\n for j in range(0,3):\n if A[i][j] in b_list:\n count = count + (i+1)*(j+1)\nif count % 3 == 0:\n print('Yes')\nelse:\n print('No')", "import numpy as np\nA = [list(map(int, input().split())) for i in range(0,3)]\nN = int(input())\nb_list =list([int(input()) for i in range(0,N)])\ncount = np.zeros((3,3))\nfor i in range(0,3):\n for j in range(0,3):\n if A[i][j] in b_list:\n count[i][j] = count + 1\nif (count.sum(axis=1) % 3 ==0).any():\n print('Yes')\nelif (count.sum(axis=0) % 3 ==0).any():\n print('Yes')\nelif count[0][0] + count[1][1] + count[2][2]:\n print('Yes')\nelif count[2][0] + count[1][1] + count[0][2]:\n print('Yes')\nelse:\n print('No')", "import numpy as np\nA = [list(map(int, input().split())) for i in range(0,3)]\nN = int(input())\nb_list =list([int(input()) for i in range(0,N)])\ncount = np.zeros(3,3)\nfor i in range(0,3):\n for j in range(0,3):\n if A[i][j] in b_list:\n count[i][j] = count + (i+1)*(j+1)\nif (count.sum(axis=1) % 3 ==0).any():\n print('Yes')\nelif (count.sum(axis=0) % 3 ==0).any():\n print('Yes')\nelif count[0][0] + count[1][1] + count[2][2]:\n print('Yes')\nelif count[2][0] + count[1][1] + count[0][2]:\n print('Yes')\nelse:\n print('No')", "import numpy as np\nA = [list(map(int, input().split())) for i in range(0,3)]\nN = int(input())\nb_list =list([int(input()) for i in range(0,N)])\ncount = np.zeros((3,3))\nfor i in range(0,3):\n for j in range(0,3):\n if A[i][j] in b_list:\n count[i][j] = count[i][j] + 1\nif (count.sum(axis=1) ==3).any():\n print('Yes')\nelif (count.sum(axis=0) ==3).any():\n print('Yes')\nelif count[0][0] + count[1][1] + count[2][2]==3:\n print('Yes')\nelif count[2][0] + count[1][1] + count[0][2]==3:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s001078851', 's556235035', 's571091237', 's580546102']
[3064.0, 12504.0, 18672.0, 12504.0]
[17.0, 150.0, 273.0, 153.0]
[307, 538, 546, 543]
p02760
u236823931
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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', "if __name__ == '__main__':\n a = [list(map(int, input().split())) for e in range(3)]\n n = int(input())\n b = [int(input()) for _ in range(n)]\n c = 'No'\n for i in range(len(a)):\n for j in range(len(a)):\n if a[i][j] in b:\n a[i][j] = 0\n\n for i in range(len(a)):\n if {a[i][j] for j in range(len(a))} == {0}:\n c = 'Yes'\n if {a[j][i] for j in range(len(a))} == {0}:\n c = 'Yes'\n if {a[j][j] for j in range(len(a))} == {0}:\n c = 'Yes'\n if {a[-(j+1)][j] for j in range(len(a))} == {0}:\n c = 'Yes'\n print(c)"]
['Runtime Error', 'Accepted']
['s559591697', 's652540761']
[2940.0, 3064.0]
[17.0, 17.0]
[59, 608]
p02760
u238940874
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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()))\nfor j in range(3):\n for k in range(3):\n if a[j][k] == b:\n a[j][k] = 0\nans='No'\nfor i in range(3):\n if a[i][0]==a[i][1]==a[i][2]==0:\n ans='Yes'\n if a[0][i]==a[1][i]==a[2][i]==0:\n ans='Yes'\nif a[0][0]==a[1][1]==a[2][2]==0:\n ans='Yes'\nif a[2][0]==a[1][1]==a[0][2]==0:\n ans='Yes'\nprint(ans)", "a=[list(map(int,input().split())) for i in range(3)]\nn=int(input())\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:\n ans='Yes'\n if a[0][i]==a[1][i]==a[2][i]==0:\n ans='Yes'\nif a[0][0]==a[1][1]==a[2][2]==0:\n ans='Yes'\nif a[2][0]==a[1][1]==a[0][2]==0:\n ans='Yes'\nprint(ans)", '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', 'Runtime Error', 'Accepted']
['s631203810', 's724655934', 's028652187']
[3064.0, 3064.0, 3064.0]
[17.0, 20.0, 18.0]
[452, 431, 383]
p02760
u239653493
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['a,b,c = map(int, input().split())\nd,e,f = map(int, input().split())\ng,h,i = map(int, input().split())\nn=int(input())\nA = []\nfor i in range(n):\n A.append(int(input()))\nif ((a in A) and (b in A) and (c in A)) or ( d in A and e in A and f in A) or(g in A and h in A and i in A) or (a in A and d in A and g in A) or (b in A and e in A and h in A) or(c in A and f in A and i in A) or ( a in A and e in A and i in A) or(c in A and e in A and g in A):\n\n\n print("Yes")\nelse:\n print("No")', 'a,b,c = map(int, input().split())\nd,e,f = map(int, input().split())\ng,h,i = map(int, input().split())\nn=int(input())\nA = [input() for _ in range(n)]\nif (a and b and c) in A:\n print("Yes")\nelif (d and e and f) in A:\n print("Yes")\nelif (g and h and i) in A:\n print("Yes")\nelif (a and d and g) in A:\n print("Yes")\nelif (b and e and h) in A:\n print("Yes")\nelif (c and f and i) in A:\n print("Yes")\nelif (a and e and i) in A:\n print("Yes")\nelif (c and e and g) in A:\n print("Yes")\nelse:\n print("No")', 'a,b,c = map(int, input().split())\nd,e,f = map(int, input().split())\ng,h,i = map(int, input().split())\nn=int(input())\nA = []\nfor i in range(n):\n A.append(int(input()))\nif (a in A) and (b in A) and (c in A):\n print("Yes")\nelif d in A and e in A and f in A:\n print("Yes")\nelif g in A and h in A and i in A:\n print("Yes")\nelif a in A and d in A and g in A:\n print("Yes")\nelif b in A and e in A and h in A:\n print("Yes")\nelif c in A and f in A and i in A:\n print("Yes")\nelif a in A and e in A and i in A:\n print("Yes")\nelif c in A and e in A and g in A:\n print("Yes")\nelse:\n print("No")', 'a,b,c = map(int, input().split())\nd,e,f = map(int, input().split())\ng,h,i = map(int, input().split())\nn=int(input())\nA = list(map(int, input().split()))\nif (a and b and c) in A:\n print("Yes")\nelif (d and e and f) in A:\n print("Yes")\nelif (g and h and i) in A:\n print("Yes")\nelif (a and d and g) in A:\n print("Yes")\nelif (b and e and h) in A:\n print("Yes")\nelif (c and f and i) in A:\n print("Yes")\nelif (a and e and i) in A:\n print("Yes")\nelif (c and e and g) in A:\n print("Yes")\nelse:\n print("No")', 'a,b,c = map(int, input().split())\nd,e,f = map(int, input().split())\ng,h,i = map(int, input().split())\nn=int(input())\nA = []\nfor _ in range(n):\n A.append(int(input())\nif (a and b and c) in A:\n print("Yes")\nelif (d and e and f) in A:\n print("Yes")\nelif (g and h and i) in A:\n print("Yes")\nelif (a and d and g) in A:\n print("Yes")\nelif (b and e and h) in A:\n print("Yes")\nelif (c and f and i) in A:\n print("Yes")\nelif (a and e and i) in A:\n print("Yes")\nelif (c and e and g) in A:\n print("Yes")\nelse:\n print("No")', 'a,b,c = map(int, input().split())\nd,e,f = map(int, input().split())\ng,h,i = map(int, input().split())\nn=int(input())\nA = []\nfor j in range(n):\n A.append(int(input()))\nif (a in A) and (b in A) and (c in A):\n print("Yes")\nelif d in A and e in A and f in A:\n print("Yes")\nelif g in A and h in A and i in A:\n print("Yes")\nelif a in A and d in A and g in A:\n print("Yes")\nelif b in A and e in A and h in A:\n print("Yes")\nelif c in A and f in A and i in A:\n print("Yes")\nelif a in A and e in A and i in A:\n print("Yes")\nelif c in A and e in A and g in A:\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s434775761', 's545561132', 's676616378', 's691862005', 's972609833', 's350730156']
[3064.0, 3064.0, 3064.0, 3064.0, 2940.0, 3064.0]
[18.0, 17.0, 17.0, 17.0, 17.0, 17.0]
[491, 523, 614, 527, 543, 615]
p02760
u242890210
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 = list(map(int, input().split()))\nlist2 = list(map(int, input().split()))\nlist3 = list(map(int, input().split()))\nn = int(input())\nnum_list = []\nfor i in range(n):\n b = int(input())\n num_list.append(b)\nfor num in num_list:\n if num in list1:\n x = list1.index(num)\n list1.pop(x)\n list1.insert(x, 'bingo')\n if num in list2:\n x = list2.index(num)\n list2.pop(x)\n list2.insert(x, 'bingo')\n if num in list3:\n x = list3.index(num)\n list3.pop(x)\n list3.insert(x, 'bingo')\nresult = 'No'\nif list1[0] == list1[1] == list1[2] == 'bingo':\n result = 'Yes'\nif list2[0] == list2[1] == list2[2] == 'bingo':\n result = 'Yes'\nif list3[0] == list3[1] == list3[2] == 'bingo':\n result = 'Yes'\nif list1[0] == list2[0] == list3[0] == 'bingo':\n result = 'Yes'\nif list1[1] == list2[1] == list3[1] == 'bingo':\n result = 'Yes'\nif list1[2] == list2[2] == list3[2] == 'bingo':\n result = 'Yes'\nif list1[0] == list2[1] == list3[2] == 'bingo':\n result = 'Yes'\nif list1[2] == list2[1] == list3[0] == 'bingo':\n result = 'Yes'\nprint(list1)\nprint(list2)\nprint(list3)\nprint(result)", "list1 = list(map(int, input().split()))\nlist2 = list(map(int, input().split()))\nlist3 = list(map(int, input().split()))\nn = int(input())\nnum_list = []\nfor i in range(n):\n b = int(input())\n num_list.append(b)\nfor num in num_list:\n if num in list1:\n x = list1.index(num)\n list1.pop(x)\n list1.insert(x, 'bingo')\n if num in list2:\n x = list2.index(num)\n list2.pop(x)\n list2.insert(x, 'bingo')\n if num in list3:\n x = list3.index(num)\n list3.pop(x)\n list3.insert(x, 'bingo')\nresult = 'No'\nif list1[0] == list1[1] == list1[2] == 'bingo':\n result = 'Yes'\nif list2[0] == list2[1] == list2[2] == 'bingo':\n result = 'Yes'\nif list3[0] == list3[1] == list3[2] == 'bingo':\n result = 'Yes'\nif list1[0] == list2[0] == list3[0] == 'bingo':\n result = 'Yes'\nif list1[1] == list2[1] == list3[1] == 'bingo':\n result = 'Yes'\nif list1[2] == list2[2] == list3[2] == 'bingo':\n result = 'Yes'\nif list1[0] == list2[1] == list3[2] == 'bingo':\n result = 'Yes'\nif list1[2] == list2[1] == list3[0] == 'bingo':\n result = 'Yes'\n\nprint(result)"]
['Wrong Answer', 'Accepted']
['s087503671', 's423056404']
[3188.0, 3064.0]
[18.0, 17.0]
[1149, 1111]
p02760
u246895837
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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_l = []\nb_flg = 0\n \nfor _ in range(3):\n bingo_l.append(list(map(int, input().split())))\n\nN = int(input())\n\nkekka_l = [[0, 0, 0],[0, 0, 0],[0, 0, 0]]\n\nfor _ in range(N):\n b = int(input())\n for i in range(3):\n for j in range(3):\n if b == bingo_l[i][j]:\n kekka_l[i][j] = 1\n break\n\nfor i in range(3):\n if sum(kekka_l[i]) == 3:\n b_flg = 1\n break\n\nsum = 0\n\nfor j in range(3):\n for i in range(3):\n sum += kekka_l[i][j]\n if sum == 3:\n b_flg = 1\n break\n\nif kekka_l[0][0] + kekka_l[1][1] + kekka_l[2][2] == 3:\n b_flg = 1\n\nif kekka_l[0][2] + kekka_l[1][1] + kekka_l[2][0] == 3:\n b_flg = 1\n\nif b_flg == 1:\n print('yes')\nelse:\n print('No')\n", "bingo_l = []\n \nfor _ in range(3):\n bingo_l.append(list(map(int, input().split())))\n\nN = int(input())\n\nkekka_l = [[0, 0, 0],[0, 0, 0],[0, 0, 0]]\n\nfor _ in range(N):\n b = int(input())\n for i in range(3):\n for j in range(3):\n if b == bingo_l[i][j]:\n kekka_l[i][j] = 1\n break\n\nfor i in range(3):\n if sum(kekka_l[i]) == 3:\n b_flg = 1\n break\n\nsum = 0\n\nfor j in range(3):\n for i in range(3):\n sum += kekka_l[i][j]\n if sum == 3:\n b_flg = 1\n break\n\nif kekka_l[0][0] + kekka_l[1][1] + kekka_l[2][2] == 3:\n b_flg = 1\n\nif kekka_l[0][2] + kekka_l[1][1] + kekka_l[2][0] == 3:\n b_flg = 1\n\nif b_flg == 1:\n print('yes')\nelse:\n print('No')\n\n ", "bingo_l = []\nb_flg = 0\n \nfor _ in range(3):\n bingo_l.append(list(map(int, input().split())))\n\nN = int(input())\n\nkekka_l = [[0, 0, 0],[0, 0, 0],[0, 0, 0]]\n\nfor _ in range(N):\n b = int(input())\n for i in range(3):\n for j in range(3):\n if b == bingo_l[i][j]:\n kekka_l[i][j] = 1\n break\n\nfor i in range(3):\n if sum(kekka_l[i]) == 3:\n b_flg = 1\n break\n\nsum = 0\n\nfor j in range(3):\n for i in range(3):\n sum += kekka_l[i][j]\n if sum == 3:\n b_flg = 1\n break\n\nif kekka_l[0][0] + kekka_l[1][1] + kekka_l[2][2] == 3:\n b_flg = 1\n\nif kekka_l[0][2] + kekka_l[1][1] + kekka_l[2][0] == 3:\n b_flg = 1\n\nif b_flg == 1:\n print('yes')\nelse:\n print('No')\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)\n"]
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s135874014', 's279446410', 's865200156', 's042770393']
[3064.0, 3064.0, 3064.0, 3064.0]
[17.0, 19.0, 18.0, 18.0]
[764, 756, 764, 659]
p02760
u247211039
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 = [input() for _ in range(N)]\n\n\ncnt=0\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] =1000\n if sum(a[j]) ==3000 or a[0][k]+a[1][k]+a[2][k]==3000 or a[0][0]+a[1][1]+a[2][2]==3000 or a[0][2]+a[1][1]+a[2][0]==3000:\n cnt +=1\nprint('Yes' if cnt>0 else 'No')", "a = [list(map(int, input().split())) for _ in range(3)]\nN=int(input())\nb = [input() for _ in range(N)]\n\n\ncnt=0\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] =1000\n if sum(a[j]) ==3000 or a[0][k]+a[1][k]+a[2][k]==3000 or a[0][0]+a[1][1]+a[2][2]==3000 or a[0][2]+a[1][1]+a[2][0]==3000:\n cnt +=1\nprint('Yes' if cnt>0 else 'No')", "a = [list(map(int, input().split())) for _ in range(3)]\nN=int(input())\nb = [int(input()) for _ in range(N)]\n\n\ncnt=0\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] =1000\n if sum(a[j]) ==3000 or a[0][k]+a[1][k]+a[2][k]==3000 or a[0][0]+a[1][1]+a[2][2]==3000 or a[0][2]+a[1][1]+a[2][0]==3000:\n cnt +=1\nprint('Yes' if cnt>0 else 'No')"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s175935735', 's591184400', 's035048976']
[9204.0, 9200.0, 9208.0]
[31.0, 30.0, 26.0]
[438, 430, 443]
p02760
u247680229
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\nN_1=[46, 70, 98]\nN_2=[5, 39, 99]\nN_3=[34, 84, 8]\n\nN=int(7)\na=[75,12,22,8,99,34,10]\n\nn=np.array([N_1,N_2,N_3])\n\nfor a_n in a:\n if a_n in n:\n n[n==a_n]=0\n else:\n pass\ni=0\n \nif np.all(n[0:,0]==0)==True:\n i=+1\n \nelif np.all(n[0:,1]==0)==True:\n i+=1\n \nelif np.all(n[0:,2]==0)==True:\n i+=1\n \nelif np.all(n[0,0:]==0)==True:\n i+=1\n \nelif np.all(n[1,0:]==0)==True:\n i+=1\n\nelif np.all(n[2,0:]==0)==True:\n i+=1\n\nelif n[0,0]==0 and n[1,1]==0 and n[2,2] ==0:\n i+=1\n \nelif n[0,2]==0 and n[1,1]==0 and n[2,0] ==0:\n i+=1\n print(i)\nif i>0:\n print("Yes")\nelse:\n print("No")\n\nprint(n)', 'a_1=list(map(int, input().split()))\na_2=list(map(int, input().split()))\na_3=list(map(int, input().split()))\n\nc=[a_1,a_2,a_3]\n\nN=int(input())\n\nb=[int(input()) for _ in range(N)]\n\nfor i in range(3):\n for j in range(3):\n if a[i][j] in b:\n a[i][j]=0\n \n \ni=0\nif a[0][0]==0 and a[0][1]==0 and a[0][2]:\n i+=1\nif a[1][0]==0 and a[1][1]==0 and a[1][2]:\n i+=1\nif a[2][0]==0 and a[2][1]==0 and a[2][2]:\n i+=1\nif a[0][0]==0 and a[1][0]==0 and a[2][0]:\n i+=1\nif a[0][1]==0 and a[1][1]==0 and a[2][1]:\n i+=1\nif a[0][2]==0 and a[1][2]==0 and a[2][2]:\n i+=1\nif a[0][0]==0 and a[1][1]==0 and a[2][2]:\n i+=1\nif a[0][2]==0 and a[1][1]==0 and a[2][0]:\n i+=1\n \nif i>0:\n print("Yes")\nelif i==0:\n print("No")', 'a,b,c=int(input()).split()\nd,e,f=int(input()).split()\ng,h,i=int(input()).split()\n\nx=[[a,b,c],[d,e,f],[g,h,i]]\nwhile True:\n b_i=int(input())\n if b_i in x:\n x[b_i]=0\nif x[:,0]==0:\n print(“Yes”)\nif x[:,1]==0:\n print(“Yes”)\nif x[:,2]==0:\n print(“Yes”)\nif x[0,:]==0:\n print(“Yes”)\nif x[1,:]==0:\n print(“Yes”)\nif x[2:,]==0:\n print(“Yes”)\nif x[0,0] and x[1,1] and x[2,2]==0:\n print(“Yes”)\nif x[0,2] and x[1,1] and x[2,0]==0:\n print(“Yes”)\nelse:\n print(“No”)', 'import numpy as np\nN_1=list(map(int, input().split()))\nN_2=list(map(int, input().split()))\nN_3=list(map(int, input().split()))\nN=int(input())\na=[int(input()) for i in range(N)]\n \nn=np.array([N_1,N_2,N_3])\n\nfor a_n in a:\n if a_n in n:\n n[n==a_n]=0\n else:\n pass\ni=0\n\n\n \nif np.all(n[0:,0]==0)==True:\n i=+1\n \nelif np.all(n[0:,1]==0)==True:\n i+=1\n \nelif np.all(n[0:,2]==0)==True:\n i+=1\n \nelif np.all(n[0,0:]==0)==True:\n i+=1\n \nelif np.all(n[1,0:]==0)==True:\n i+=1\n \nelif np.all(n[2,0:]==0)==True:\n i+=1\n \nelif n[0,0] and n[1,1] and n[2,2] ==0:\n i+=1\n\nelif n[0,2] and n[1,1] and n[2,0] ==0:\n i+=1\n\nif i>0:\n print("Yes")\nelse:\n print("No")\n', 'import numpy as np\nN_1=list(map(int, input().split()))\nN_2=list(map(int, input().split()))\nN_3=list(map(int, input().split()))\nN=int(input())\na=[int(input()) for i in range(N)]\n\nn=np.array([N_1,N_2,N_3])\n\n\nfor a_n in a:\n if a_n in n:\n n[n==a_n]=0\n else:\n pass\ni=0\n\nprint(n)\n \nif np.all(n[0:,0]==0):\n i=+1\n \nelif np.all(n[0:,1]==0):\n i+=1\n \nelif np.all(n[0:,2]==0):\n i+=1\n \nelif np.all(n[0,0:]==0):\n i+=1\n \nelif np.all(n[1,0:]==0):\n i+=1\n \nelif np.all(n[2,0:]==0):\n i+=1\n \nelif n[0,0] and n[1,1] and n[2,2] ==0:\n i+=1\n\nelif n[0,2] and n[1,1] and n[2,0] ==0:\n i+=1\n\nif i>0:\n print("Yes")\nelse:\n print("No")\n', 'a_1=list(map(int, input().split()))\na_2=list(map(int, input().split()))\na_3=list(map(int, input().split()))\n\nc=[a_1,a_2,a_3]\n\nN=int(input())\n\nb=[int(input()) for _ in range(N)]\n\nfor i in range(3):\n for j in range(3):\n if c[i][j] in b:\n c[i][j]=0\n \n \ni=0\nif c[0][0]==0 and c[0][1]==0 and c[0][2]==0:\n i+=1\nif c[1][0]==0 and c[1][1]==0 and c[1][2]==0:\n i+=1\nif c[2][0]==0 and c[2][1]==0 and c[2][2]==0:\n i+=1\nif c[0][0]==0 and c[1][0]==0 and c[2][0]==0:\n i+=1\nif c[0][1]==0 and c[1][1]==0 and c[2][1]==0:\n i+=1\nif c[0][2]==0 and c[1][2]==0 and c[2][2]==0:\n i+=1\nif c[0][0]==0 and c[1][1]==0 and c[2][2]==0:\n i+=1\nif c[0][2]==0 and c[1][1]==0 and c[2][0]==0:\n i+=1\n \nif i>0:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s167023202', 's274576989', 's632441113', 's634496368', 's836163478', 's207417039']
[14548.0, 3188.0, 2940.0, 12472.0, 12692.0, 3188.0]
[154.0, 18.0, 18.0, 148.0, 158.0, 18.0]
[656, 761, 526, 704, 676, 778]
p02760
u250362126
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
["import itertools\nimport sys\n\n[a,b,c] = [int(x) for x in input().split()]\n[d,e,f] = [int(x) for x in input().split()]\n[g,h,i] = [int(x) for x in input().split()]\nN = int(input())\nnum_list = []\nfor i in range(N):\n n = int(input())\n num_list.append(n)\nset_list = [{a,b,c},{d,e,f},{g,h,i},{a,d,g},{b,e,h},{c,f,i},{a,e,i},{c,e,g}]\nthe_set = set(num_list) & set([a,b,c,d,e,f,g,h,i])\nv = itertools.permutations(the_set,3)\nfor i in v:\n if i in set_list:\n print('Yes')\n sys.exit()\nprint('No')\n", "import itertools\n\n[a,b,c] = [int(x) for x in input().split()]\n[d,e,f] = [int(x) for x in input().split()]\n[g,h,i] = [int(x) for x in input().split()]\nN = int(input())\nnum_list = []\nfor i in N:\n n = int(input())\n num_list.append(n)\nset_list = [{a,b,c},{d,e,f},{g,h,i},{a,d,g},{b,e,h},{c,f,i},{a,e,i}]\nthe_set = set(num_list) & set([a,b,c,d,e,f,g,h,i])\nv = itertools.permutations(the_set,3)\nfor i in f:\n if i in set_list:\n print('Yes')\n break\n", "import itertools\n\n[a,b,c] = [int(x) for x in input().split()]\n[d,e,f] = [int(x) for x in input().split()]\n[g,h,i] = [int(x) for x in input().split()]\nN = int(input())\nnum_list = []\nfor i in N:\n n = int(input())\n num_list.append(n)\nset_list = [{a,b,c},{d,e,f},{g,h,i},{a,d,g},{b,e,h},{c,f,i},{a,e,i}]\nthe_set = set(num_list) & set([a,b,c,d,e,f,g])\nv = itertools.permutations(the_set,3)\nfor i in f:\n if i in set_list:\n print('Yes')\n break\n", "import itertools\nimport sys\n\n[a,b,c] = [int(x) for x in input().split()]\n[d,e,f] = [int(x) for x in input().split()]\n[g,h,i] = [int(x) for x in input().split()]\nN = int(input())\nnum_list = []\nfor i in range(N):\n n = int(input())\n num_list.append(n)\nset_list = [{a,b,c},{d,e,f},{g,h,i},{a,d,g},{b,e,h},{c,f,i},{a,e,i}]\nthe_set = set(num_list) & set([a,b,c,d,e,f,g,h,i])\nv = itertools.permutations(the_set,3)\nfor i in v:\n if i in set_list:\n print('Yes')\n sys.exit()\nprint('No')\n", "import itertools\n\n[a,b,c] = [int(x) for x in input().split()]\n[d,e,f] = [int(x) for x in input().split()]\n[g,h,i] = [int(x) for x in input().split()]\nN = int(input())\nnum_list = []\nfor i in N:\n n = int(input())\n num_list.append(n)\nset_list = [{a,b,c},{d,e,f},{g,h,i},{a,d,g},{b,e,h},{c,f,i},{a,e,i}]\nthe_set = set(N) & set([a,b,c,d,e,f,g])\nv = itertools.permutations(the_set,3)\nfor i in f:\n if i in set_list:\n print('Yes')\n break\n", "import itertools\nimport sys\n\n[a,b,c] = [int(x) for x in input().split()]\n[d,e,f] = [int(x) for x in input().split()]\n[g,h,i] = [int(x) for x in input().split()]\nN = int(input())\nnum_list = []\nfor j in range(N):\n n = int(input())\n num_list.append(n)\n\nset_list = [{a,b,c},{d,e,f},{g,h,i},{a,d,g},{b,e,h},{c,f,i},{a,e,i},{c,e,g}]\nthe_set = set(num_list) & set([a,b,c,d,e,f,g,h,i])\n\nv = itertools.permutations(the_set,3)\nfor k in v:\n if set(k) in set_list:\n print('Yes')\n sys.exit()\nprint('No')\n"]
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s165641329', 's360362101', 's752193190', 's823324140', 's939997733', 's922004228']
[3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0]
[18.0, 18.0, 17.0, 18.0, 18.0, 17.0]
[493, 450, 446, 485, 439, 500]
p02760
u250828304
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\nN = 3\n\n\nA = []\nfor i in range(N):\n array = list(map(int, input().strip().split()))\n A.append(array)\n\nA_t = [list(x) for x in zip(*A)]\nA_n = [[A[0][0],A[1][1],A[2][2]],[A[0][2],A[1][1],A[2][0]]]\nN = int(input())\nB=[]\ncnt = [0]*3\nfor i in range(N):\n B.append(int(input()))\n \ncnt[0] =0\nnum = 0\nfor j in A:\n for i in j:\n if i in B:\n cnt[num] += 1\n num +=1\nif 2 in cnt:\n print("yes")\n sys.exit(0)\ncnt = [0,0,0]\nnum = 0\nfor j in A_t:\n for i in j:\n if i in B:\n cnt[num] += 1\n num +=1\nif 2 in cnt:\n print("yes")\n sys.exit()\ncnt = [0,0,0]\nnum = 0\nfor j in A_n:\n for i in j:\n if i in B:\n cnt[num] += 1\n num +=1\nif 2 in cnt:\n print("yes")\nelse:\n print("no")', 'import sys\nN = 3\n\n\nA = []\nfor i in range(N):\n array = list(map(int, input().strip().split()))\n A.append(array)\n\nA_t = [list(x) for x in zip(*A)]\nA_n = [[A[0][0],A[1][1],A[2][2]],[A[0][2],A[1][1],A[2][0]]]\nN = int(input())\nB=[]\ncnt = [0]*3\nfor i in range(N):\n B.append(int(input()))\n \nnum = 0\nfor j in A:\n for i in j:\n if i in B:\n cnt[num] += 1\n num +=1\nif 3 in cnt:\n print("Yes")\n sys.exit(0)\ncnt = [0,0,0]\nnum = 0\nfor j in A_t:\n for i in j:\n if i in B:\n cnt[num] += 1\n num +=1\nif 3 in cnt:\n print("Yes")\n sys.exit()\ncnt = [0,0,0]\nnum = 0\nfor j in A_n:\n for i in j:\n if i in B:\n cnt[num] += 1\n num +=1\nif 3 in cnt:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s899943720', 's756198212']
[3064.0, 3064.0]
[17.0, 18.0]
[774, 764]
p02760
u252210202
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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()))\nN = int(input())\nb = [(int(input())) for _ in range(N)]\nfor i in range(3):\n for j in range(N):\n if A_1[i] == b[j]:\n A_1[i] = "a"\n elif A_2[i] == b[j]:\n A_2[i] = "a"\n elif A_3[i] == b[j]:\n A_3[i] = "a"\nprint(A_1, A_2, A_3)\n\nif A_1[0] == A_1[1] == A_1[2]:\n print("Yes")\nelif A_2[0] == A_2[1] == A_2[2]:\n print("Yes")\nelif A_3[0] == A_3[1] == A_3[2]:\n print("Yes")\nelif A_1[0] == A_2[0] == A_3[0]:\n print("Yes")\nelif A_1[1] == A_2[1] == A_3[1]:\n print("Yes")\nelif A_1[2] == A_2[2] == A_3[3]:\n print("Yes")\nelif A_1[0] == A_2[1] == A_3[2]:\n print("Yes")\nelif A_1[2] == A_2[1] == A_3[0]:\n print("Yes")\nelse:\n print("No")\n', 'A_1 = list(map(int, input().split()))\nA_2 = list(map(int, input().split()))\nA_3 = list(map(int, input().split()))\nN = int(input())\nb = [list(map(int, input().split()))for _ in range(N)]\nfor i in range(3):\n for j in range(N):\n if A_1[i] == b[j][0]:\n A_1[i] = "a"\n elif A_2[i] == b[j][0]:\n A_2[i] = "a"\n elif A_3[i] == b[j][0]:\n A_3[i] = "a"\nprint(A_1, A_2, A_3)\n\nif A_1[0] == A_1[1] == A_1[2]:\n print("Yes")\nelif A_2[0] == A_2[1] == A_2[2]:\n print("Yes")\nelif A_3[0] == A_3[1] == A_3[2]:\n print("Yes")\nelif A_1[0] == A_2[0] == A_3[0]:\n print("Yes")\nelif A_1[1] == A_2[1] == A_3[1]:\n print("Yes")\nelif A_1[2] == A_2[2] == A_3[3]:\n print("Yes")\nelif A_1[0] == A_2[1] == A_3[2]:\n print("Yes")\nelif A_1[2] == A_2[1] == A_3[0]:\n print("Yes")\nelse:\n print("No")', 'A_1 = list(map(int, input().split()))\nA_2 = list(map(int, input().split()))\nA_3 = list(map(int, input().split()))\nN = int(input())\nb = [(int(input())) for _ in range(N)]\nZ_1 = [0, 0, 0]\nZ_2 = [0, 0, 0]\nZ_3 = [0, 0, 0]\nfor i in range(3):\n for j in range(N):\n if A_1[i] == b[j]:\n Z_1[i] = 1\n elif A_2[i] == b[j]:\n Z_2[i] = 1\n elif A_3[i] == b[j]:\n Z_3[i] = 1\n\n\nif Z_1[0] == Z_1[1] == Z_1[2] == 1:\n print("Yes")\nelif Z_2[0] == Z_2[1] == Z_2[2] == 1:\n print("Yes")\nelif Z_3[0] == Z_3[1] == Z_3[2] == 1:\n print("Yes")\nelif Z_1[0] == Z_2[0] == Z_3[0] == 1:\n print("Yes")\nelif Z_1[1] == Z_2[1] == Z_3[1] == 1:\n print("Yes")\nelif Z_1[2] == Z_2[2] == Z_3[2] == 1:\n print("Yes")\nelif Z_1[0] == Z_2[1] == Z_3[2] == 1:\n print("Yes")\nelif Z_1[2] == Z_2[1] == Z_3[0] == 1:\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s127871899', 's865567357', 's876350142']
[3064.0, 3064.0, 3064.0]
[18.0, 18.0, 17.0]
[814, 838, 876]
p02760
u253799217
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\nr = [ list(map(int, input().split(' '))) for i in range(R) ]\n\ndef check():\n for y in range(R):\n f = True\n for x in range(R):\n if r[y][x] != 0:\n f = False\n break\n if f:\n return True\n \n for x in range(R):\n f = True\n for y in range(R):\n if r[y][x] != 0:\n f = False\n\t break\n if f:\n return True\n \n f = True\n for p in range(R):\n if r[p][p] != 0:\n f = False\n break\n if f:\n return True\n \n f = True\n for p in range(R):\n if r[R-1-p][p] != 0:\n f = False\n break\n return f\n \nN = int(input())\nfor i in range(N):\n v = int(input())\n \n for y in range(R):\n for x in range(R):\n if r[y][x] == v:\n r[y][x] = 0\n \nprint('Yes' if check() else 'No')", "R = 3\nr = []\nfor i in range(R):\n r[i] = list(map(int, input().split(' ')))\n\ndef check():\n for y in range(R):\n f = True\n for x in range(R):\n if r[y][x] != 0:\n f = False\n if f:\n return True\n\n for x in range(R):\n f = True\n for y in range(R):\n if r[y][x] != 0:\n f = False\n if f:\n return True\n\n f = True\n for p in range(R):\n if r[p][p] != 0:\n\t f = False\n if f:\n return True\n\n f = True\n for p in range(R):\n if r[R-1-p][p] != 0:\n\t f = False\n return f\n\nN = input()\nfor i in range(N):\n v = int(input())\n \n for y in range(R):\n for x in range(R):\n if r[y][x] == v:\n r[y][x] = 0\n\nprint('Yes' if check() else 'No')\n", "R = 3\nr = [ list(map(int, input().split(' '))) for i in range(R) ]\n\ndef check():\n for y in range(R):\n f = True\n for x in range(R):\n if r[y][x] != 0:\n f = False\n break\n if f:\n return True\n \n for x in range(R):\n f = True\n for y in range(R):\n if r[y][x] != 0:\n f = False\n break\n if f:\n return True\n \n f = True\n for p in range(R):\n if r[p][p] != 0:\n f = False\n break\n if f:\n return True\n \n f = True\n for p in range(R):\n if r[R-1-p][p] != 0:\n f = False\n break\n return f\n \nN = int(input())\nfor i in range(N):\n v = int(input())\n \n for y in range(R):\n for x in range(R):\n if r[y][x] == v:\n r[y][x] = 0\n \nprint('Yes' if check() else 'No')"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s461811958', 's869471863', 's330994656']
[2940.0, 3188.0, 3064.0]
[17.0, 19.0, 17.0]
[747, 696, 750]
p02760
u254221913
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
["A1 = list(map(int,input().split()))\nA2 = list(map(int,input().split()))\nA3 = list(map(int,input().split()))\nN = int(input())\nlistb = [input() for i in range(N)]\n\nfor item in listb:\n for i in range(3):\n if A1[i] == item:\n A1[i] = 0\n for j in range(3):\n if A2[j] == item:\n A2[j] = 0\n for k in range(3):\n if A3[k] == item:\n A3[k] = 0\nflg = false\nif sum(A1) == 0 or sum(A2) == 0 or sum(A3) == 0:\n print('Yes')\n exit()\nfor i in range(3):\n if A1[i] == A2[i] and A2[i] == A3[i]:\n print('Yes')\n exit()\nif A1[1] == A2[2] == A3[3] or A1[3] == A2[2] == A3[1]:\n print 'Yes'\n exit()\nprint('No')", "A1 = list(map(int,input().split()))\nA2 = list(map(int,input().split()))\nA3 = list(map(int,input().split()))\nN = int(input())\nlistb = [input() for i in range(N)]\n\nfor item in listb:\n for i in range(3):\n if A1[i] == item:\n A1[i] = 0\n for j in range(3):\n if A2[j] == item:\n A2[j] = 0\n for k in range(3):\n if A3[k] == item:\n A3[k] = 0\nif sum(A1) == 0 or sum(A2) == 0 or sum(A3) == 0:\n print('Yes')\n exit()\nfor i in range(3):\n if A1[i] == A2[i] and A2[i] == A3[i]:\n print('Yes')\n exit()\nif A1[1] == A2[2] == A3[3] or A1[3] == A2[2] == A3[1]:\n print('Yes')\n exit()\nprint('No')", "A1 = list(map(int,input().split()))\nA2 = list(map(int,input().split()))\nA3 = list(map(int,input().split()))\nN = int(input())\nlistb = [input() for i in range(N)]\n\nfor item in listb:\n for i in range(3):\n if A1[i] == item:\n A1[i] = 0\n for j in range(3):\n if A2[j] == item:\n A2[j] = 0\n for k in range(3):\n if A3[k] == item:\n A3[k] = 0\nif sum(A1) == 0 or sum(A2) == 0 or sum(A3) == 0:\n print('Yes')\n exit()\nfor i in range(3):\n if A1[i] == A2[i] and A2[i] == A3[i]:\n print('Yes')\n exit()\nif A1[0] == A2[1] == A3[2] or A1[2] == A2[1] == A3[0]:\n print('Yes')\n exit()\nprint('No')\n", "A1 = list(map(int,input().split()))\nA2 = list(map(int,input().split()))\nA3 = list(map(int,input().split()))\nN = int(input())\nlistb = [int(input()) for i in range(N)]\n\nfor item in listb:\n for i in range(3):\n if A1[i] == item:\n A1[i] = 0\n for j in range(3):\n if A2[j] == item:\n A2[j] = 0\n for k in range(3):\n if A3[k] == item:\n A3[k] = 0\nif sum(A1) == 0 or sum(A2) == 0 or sum(A3) == 0:\n print('Yes')\n exit()\nfor i in range(3):\n if A1[i] == A2[i] and A2[i] == A3[i]:\n print('Yes')\n exit()\nif A1[0] == A2[1] == A3[2] or A1[2] == A2[1] == A3[0]:\n print('Yes')\n exit()\nprint('No')\n"]
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s842407052', 's861035346', 's892264134', 's060678089']
[3064.0, 3064.0, 3064.0, 3064.0]
[17.0, 18.0, 17.0, 17.0]
[673, 662, 663, 668]
p02760
u255382385
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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())))\nn = int(input())\nb = []\nfor _ in range(n):\n b.append(int(input()))\n\ncheck = [[False] * 3 for _ in range(3)]\n\nfor b_one in b:\n for i in range(3):\n for j in range(3):\n if a[i][j] == b_one:\n check[i][j] = True\n\nif check[0][0] and check[0][1] and check[0][2]:\n print('Yes')\n return\nif check[1][0] and check[1][1] and check[1][2]:\n print('Yes')\n return\nif check[2][0] and check[2][1] and check[2][2]:\n print('Yes')\n return\nif check[0][0] and check[1][0] and check[2][0]:\n print('Yes')\n return\nif check[0][1] and check[1][1] and check[2][1]:\n print('Yes')\n return\nif check[0][2] and check[1][2] and check[2][2]:\n print('Yes')\n return\nif check[0][0] and check[1][1] and check[2][2]:\n print('Yes')\n return\nif check[0][2] and check[1][1] and check[2][0]:\n print('Yes')\n return\n\nprint('No')", "def resolve():\n a = []\n for _ in range(3):\n a.append(list(map(int, input().split())))\n n = int(input())\n b = []\n for _ in range(n):\n b.append(int(input()))\n\n check = [[False] * 3 for _ in range(3)]\n\n for b_one in b:\n for i in range(3):\n for j in range(3):\n if a[i][j] == b_one:\n check[i][j] = True\n\n if check[0][0] and check[0][1] and check[0][2]:\n print('Yes')\n return\n if check[1][0] and check[1][1] and check[1][2]:\n print('Yes')\n return\n if check[2][0] and check[2][1] and check[2][2]:\n print('Yes')\n return\n if check[0][0] and check[1][0] and check[2][0]:\n print('Yes')\n return\n if check[0][1] and check[1][1] and check[2][1]:\n print('Yes')\n return\n if check[0][2] and check[1][2] and check[2][2]:\n print('Yes')\n return\n if check[0][0] and check[1][1] and check[2][2]:\n print('Yes')\n return\n if check[0][2] and check[1][1] and check[2][0]:\n print('Yes')\n return\n\n print('No')\n\nresolve()"]
['Runtime Error', 'Accepted']
['s157624921', 's652672018']
[3064.0, 3064.0]
[17.0, 18.0]
[939, 1117]
p02760
u260887519
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
["lines = [input().split() for i in range(3)]\n \nnum = int(input())\nbs = []\nfor i in range(num):\n bs.append(input())\n \nhits = []\nfor i in bs:\n for row_index in range(len(lines)):\n for col_index in range(len(line)):\n if lines[row_index][col_index] == i:\n hits.append((row_index,col_index))\nrow_hits = (0,0,0)\ncol_hits = (0,0,0)\nstride_hits = (0,0)\n \nfor hit in hits:\n r = hit[0]\n c = hit[1]\n row_hits[r]+=1\n col_hits[c]+=1\n if r == c:\n stride_hits[0]+=1\n else if (r,c) == (0,2) or (r,c) == (1,1) or (r,c) == (2,0) :\n stride_hits[1]+=1\n \nif max(row_hits)>= 3 or max(col_hits)>=3 or max(stride_hits)>= 3:\n print 'Yes'\nelse:\n print 'No'\n ", "lines = [input().split() for i in range(3)]\n\nnum = int(input())\nbs = []\nfor i in range(num):\n bs.append(input())\n\nhits = []\nfor i in bs:\n for row_index in range(len(lines)):\n for col_index in range(len(line)):\n if lines[row_index][col_index] == i:\n hits.append((row_index,col_index))\nrow_hits = (0,0,0)\ncol_hits = (0,0,0)\nstride_hits = (0,0)\n\nfor hit in hits:\n r = hit[0]\n c = hit[1]\n row_hits[r]++\n col_hits[c]++\n if r == c:\n stride_hits[0]++\n else if (r,c) == (0,2) or (r,c) == (1,1) or (r,c) == (2,0) :\n stride_hits[1]++\n\nif max(row_hits)>= 3 or max(col_hits)>=3 or max(stride_hits)>= 3:\n print 'Yes'\nelse:\n print 'No'\n ", "lines = [input().split() for i in range(3)]\n \nnum = int(input())\nbs = []\nfor i in range(num):\n bs.append(input())\n \nhits = []\nfor i in bs:\n for row_index in range(len(lines)):\n for col_index in range(len(lines[row_index])):\n if lines[row_index][col_index] == i:\n hits.append((row_index,col_index))\nrow_hits = [0,0,0]\ncol_hits = [0,0,0]\nstride_hits = [0,0]\n \nfor hit in hits:\n r = hit[0]\n c = hit[1]\n row_hits[r]+=1\n col_hits[c]+=1\n if r == c:\n stride_hits[0]+=1\n if (r,c) == (0,2) or (r,c) == (1,1) or (r,c) == (2,0) :\n stride_hits[1]+=1\n \nif max(row_hits)>= 3 or max(col_hits)>=3 or max(stride_hits)>= 3:\n print ('Yes')\nelse:\n print ('No')\n "]
['Runtime Error', 'Runtime Error', 'Accepted']
['s315419112', 's372759957', 's061626503']
[3064.0, 3064.0, 3192.0]
[18.0, 17.0, 18.0]
[663, 655, 674]
p02760
u264304509
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
["A=sum([list(map(int,input().split())) for _ in range(3)],[])\nN=int(input())\nb=[int(input()) for _ in range(N)]\nf=0\nfor i in range(9):if A[i]in b:f|=1<<i\nprint('Yes'if sum(f&v==v for v in[7,23,56,84,146,273,292,448])else'No')", "A = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nb = [int(input()) for _ in range(N)]\n\nfield = 0\nfor v in b:\n\tfor i in range(9):\n\t\tif A[i // 3][i % 3] == v:\n\t\t\tf|=1<<i\nans = 0\nfor v in [7,56,73,84,146,273,292,448]:\n ans |= f&v==v;\nprint('Yes' if ans else 'No')\n", "p,r=input,range\nA=sum([list(map(int,p().split()))for _ in r(3)],[])\nb=[int(p())for _ in r(int(p()))]\nprint('YNeos'[[v for v in[7,56,73,84,146,273,292,448]if sum(1<<i for i in r(9)if A[i]in b)&v==v]::2])", "p,r=input,range\nA=sum([list(map(int,p().split()))for _ in r(3)],[])\nb=[int(p())for _ in r(int(p()))]\nprint('YNeos'[any([sum(1<<i for i in r(9)if A[i]in b)&v==v for v in[7,56,73,84,146,273,292,448]])::2])", "p,r=input,range\nA=sum([list(map(int,p().split()))for _ in r(3)],[])\nb=[int(p())for _ in r(int(p()))]\nprint('YNeos'[all([sum(1<<i for i in r(9)if A[i]in b)&v!=v for v in[7,56,73,84,146,273,292,448]])::2])"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s008231901', 's689713498', 's767751880', 's870289672', 's799050908']
[8912.0, 9220.0, 9140.0, 9200.0, 9204.0]
[27.0, 26.0, 25.0, 27.0, 28.0]
[224, 286, 202, 203, 203]
p02760
u265290982
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['a1_1, a1_2, a1_3 = map(int, input().split())\na2_1, a2_2, a2_3 = map(int, input().split())\na3_1, a3_2, a3_3 = map(int, input().split())\na_list=[a1_1, a1_2, a1_3, a2_1, a2_2, a2_3, a3_1, a3_2, a3_3]\nn = int(input())\nb=[]\nfor i in range(n):\n b_i = int(input())\n b.append(b_i)\n for j, a_j in enumerate(a_list):\n if a_j == b_i:\n a_list[j] = -1\n \nif ((a_list[0]==-1 and a_list[1] == -1 and a_list[2] == -1) or\n (a_list[3]==-1 and a_list[4] == -1 and a_list[5] == -1) or\n (a_list[6]==-1 and a_list[7] == -1 and a_list[8] == -1) or\n (a_list[0]==-1 and a_list[3] == -1 and a_list[6] == -1) or\n (a_list[1]==-1 and a_list[4] == -1 and a_list[7] == -1) or\n (a_list[2]==-1 and a_list[5] == -1 and a_list[8] == -1) or\n (a_list[0]==-1 and a_list[4] == -1 and a_list[8] == -1) or\n\t(a_list[2]==-1 and a_list[4] == -1 and a_list[6] == -1)):\n print("YES")\nelse:\n print("NO")', 'a1_1, a1_2, a1_3 = map(int, input().split())\na2_1, a2_2, a2_3 = map(int, input().split())\na3_1, a3_2, a3_3 = map(int, input().split())\na_list=[a1_1, a1_2, a1_3, a2_1, a2_2, a2_3, a3_1, a3_2, a3_3]\nn = int(input())\nb=[]\nfor i in range(n):\n b_i = int(input())\n b.append(b_i)\n for j, a_j in enumerate(a_list):\n if a_j == b_i:\n a_list[j] = -1\n \nif ((a_list[0]==-1 and a_list[1] == -1 and a_list[2] == -1) or\n (a_list[3]==-1 and a_list[4] == -1 and a_list[5] == -1) or\n (a_list[6]==-1 and a_list[7] == -1 and a_list[8] == -1) or\n (a_list[0]==-1 and a_list[3] == -1 and a_list[6] == -1) or\n (a_list[1]==-1 and a_list[4] == -1 and a_list[7] == -1) or\n (a_list[2]==-1 and a_list[5] == -1 and a_list[8] == -1) or\n (a_list[0]==-1 and a_list[4] == -1 and a_list[8] == -1) or\n\t(a_list[2]==-1 and a_list[4] == -1 and a_list[6] == -1)):\n print("YES")\nelse:\n print("NO")\n', 'a1_1, a1_2, a1_3 = map(int, input().split())\na2_1, a2_2, a2_3 = map(int, input().split())\na3_1, a3_2, a3_3 = map(int, input().split())\na_list=[a1_1, a1_2, a1_3, a2_1, a2_2, a2_3, a3_1, a3_2, a3_3]\nn = int(input())\nb=[]\nfor i in range(n):\n b_i = int(input())\n b.append(b_i)\n for j, a_j in enumerate(a_list):\n if a_j == b_i:\n a_list[j] = -1\n \nif ((a_list[0]==-1 and a_list[3] == -1 and a_list[6] == -1) or\n (a_list[1]==-1 and a_list[4] == -1 and a_list[7] == -1) or\n (a_list[2]==-1 and a_list[5] == -1 and a_list[8] == -1) or\n\t(a_list[0]==-1 and a_list[4] == -1 and a_list[8] == -1) or\n\t(a_list[2]==-1 and a_list[4] == -1 and a_list[6] == -1)):\n print("YES")\nelse:\n print("NO")', 'a1_1, a1_2, a1_3 = map(int, input().split())\na2_1, a2_2, a2_3 = map(int, input().split())\na3_1, a3_2, a3_3 = map(int, input().split())\na_list=[a1_1, a1_2, a1_3, a2_1, a2_2, a2_3, a3_1, a3_2, a3_3]\nn = int(input())\nb=[]\nfor i in range(n):\n b_i = int(input())\n b.append(b_i)\n for j in range(len(a_list)):\n if a_list[j] == b_i:\n a_list[j] = -1\nif ((a_list[0]==-1 and a_list[1] == -1 and a_list[2] == -1) or\n (a_list[3]==-1 and a_list[4] == -1 and a_list[5] == -1) or\n (a_list[6]==-1 and a_list[7] == -1 and a_list[8] == -1) or\n (a_list[0]==-1 and a_list[3] == -1 and a_list[6] == -1) or\n (a_list[1]==-1 and a_list[4] == -1 and a_list[7] == -1) or\n (a_list[2]==-1 and a_list[5] == -1 and a_list[8] == -1):\n print("Yes")\nelse:\n print("No")', 'a_list=[]\na_list.append(list(map(int, input().split())))\na_list.append(list(map(int, input().split())))\na_list.append(list(map(int, input().split())))\nn = int(input())\nb=[]\nfor i in range(n):\n b_i = int(input())\n b.append(b_i)\n for j in range(len(a_list)):\n for k in range(len(a_list[j])):\n if a_list[j][k] == b_i:\n a_list[j][k] = -1\n \nif ((a_list[0][0]==-1 and a_list[0][1] == -1 and a_list[0][2] == -1) or\n (a_list[1][0]==-1 and a_list[1][1] == -1 and a_list[1][2] == -1) or\n (a_list[2][0]==-1 and a_list[2][1] == -1 and a_list[2][2] == -1) or\n (a_list[0][0]==-1 and a_list[1][0] == -1 and a_list[2][0] == -1) or\n (a_list[0][1]==-1 and a_list[1][1] == -1 and a_list[2][1] == -1) or\n (a_list[0][2]==-1 and a_list[1][2] == -1 and a_list[2][2] == -1) or\n (a_list[0][0]==-1 and a_list[1][1] == -1 and a_list[2][2] == -1) or\n (a_list[0][2]==-1 and a_list[1][1] == -1 and a_list[2][0] == -1)):\n\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s009496277', 's068615427', 's386710113', 's479802249', 's495232236']
[3064.0, 3064.0, 3064.0, 3064.0, 3188.0]
[17.0, 18.0, 18.0, 17.0, 17.0]
[889, 890, 697, 762, 967]
p02760
u268181283
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
["arr = []\nans = []\nfor i in range(3):\n arr.extend(list(map(int,input().split())))\nN = int(input())\nfor j in range(N):\n num = int(input())\n if num in arr:\n ans.append(arr.index(num))\n print(ans)\nans = set(ans)\nif (set([0,1,2])<=ans)or(set([3,4,5])<=ans)or(set([6,7,8])<=ans)or(set([0,3,6])<=ans)or(set([1,4,7])<=ans)or(set([2,5,8])<=ans)or(set([0,4,8])<=ans)or(set([2,4,6])<=ans):\n print('Yes')\nelse:\n print('No')\n", "arr = []\nans = []\nfor i in range(3):\n arr.extend(list(map(int,input().split())))\nN = int(input())\nfor j in range(N):\n num = int(input())\n if num in arr:\n ans.append(arr.index(num))\nans = set(ans)\nif (set([0,1,2])<=ans)or(set([3,4,5])<=ans)or(set([6,7,8])<=ans)or(set([0,3,6])<=ans)or(set([1,4,7])<=ans)or(set([2,5,8])<=ans)or(set([0,4,8])<=ans)or(set([2,4,6])<=ans):\n print('Yes')\nelse:\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s067649268', 's338556106']
[3064.0, 3064.0]
[17.0, 17.0]
[423, 408]
p02760
u268318377
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 = np.array([list(map(int, input().split())) for _ in range(3)])\nn = int(input())\nfor _ in range(n):\n b = int(input())\n A = np.where(A == b, 0, A)\n \nx = np.all(A[[0, 1, 2], [0, 1, 2]] == 0)\ny = np.all(A[[0, 1, 2], [2, 1, 0]] == 0)\nz = np.any(np.sum(A, axis=0) == 0)\nw = np.any(np.sum(A, axis=1) == 0)\n\nprint(['Yes', 'No'][!x and !y and !z and !w])", "import numpy as np\n \n\nA = np.array([list(map(int, input().split())) for _ in range(3)])\nn = int(input())\nfor _ in range(n):\n b = int(input())\n A = np.where(A == b, 0, A)\n \nx = np.all(A[[0, 1, 2], [0, 1, 2]] == 0)\ny = np.all(A[[0, 1, 2], [2, 1, 0]] == 0)\nz = np.any(np.sum(A, axis=0) == 0)\nw = np.any(np.sum(A, axis=1) == 0)\n \nprint(['Yes', 'No'][not x and not y and not z and not w])"]
['Runtime Error', 'Accepted']
['s909390754', 's703088377']
[3064.0, 12488.0]
[18.0, 153.0]
[372, 386]
p02760
u270983294
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['import numpy as np\n \na1,a2,a3 = map(int,input().split())\na4,a5,a6 = map(int,input().split())\na7,a8,a9 = map(int,input().split())\n \na = np.array([[a1, a2, a3], [a4, a5, a6], [a7, a8, a9]])\n \nn = int(input)\nfor i in range(n):\n b = int(input())\n a[a == b] = 0\n\nif np.sum(a[1,:]) == 0:\n print("Yes")\nelif np.sum(a[2,:]) == 0:\n print("Yes")\nelif np.sum(a[3,:]) == 0:\n print("Yes")\nelif np.sum(a[:,1]) == 0:\n print("Yes")\nelif np.sum(a[:,2]) == 0:\n print("Yes")\nelif np.sum(a[:,3]) == 0:\n print("Yes")\nelif a[1,1] + a[2,2] + a[3,3] == 0:\n print("Yes")\nelif a[3,1] + a[2,2] + a[1,3] == 0:\n print("Yes")\nelse:\n print("No")', 'import numpy as np\n\na1,a2,a3 = map(int,input().split())\na4,a5,a6 = map(int,input().split())\na7,a8,a9 = map(int,input().split())\n\na = np.array([[a1, a2, a3], [a4, a5, a6], [a7, a8, a9]])\n\nn = int(input())\nfor i in range(n):\n b = int(input())\n np.where(a == b,0,a)\n\nif np.sum(a[0,:]) == 0:\n print("Yes")\nelif np.sum(a[1,:]) == 0:\n print("Yes")\nelif np.sum(a[2,:]) == 0:\n print("Yes")\nelif np.sum(a[:,0]) == 0:\n print("Yes")\nelif np.sum(a[:,1]) == 0:\n print("Yes")\nelif np.sum(a[:,2]) == 0:\n print("Yes")\nelif a[0,0] + a[1,1] + a[2,2] == 0:\n print("Yes")\nelif a[2,0] + a[1,1] + a[0,2] == 0:\n print("Yes")\nelse:\n print("No")', 'import numpy as np\n\na1,a2,a3 = map(int,input().split())\na4,a5,a6 = map(int,input().split())\na7,a8,a9 = map(int,input().split())\n\na = np.array([[a1, a2, a3], [a4, a5, a6], [a7, a8, a9]])\n\nn = int(input())\nfor i in range(n):\n b = int(input())\n np.where(a == b,0,a)\n\nif np.sum(a[1,:]) == 0:\n print("Yes")\nelif np.sum(a[2,:]) == 0:\n print("Yes")\nelif np.sum(a[3,:]) == 0:\n print("Yes")\nelif np.sum(a[:,1]) == 0:\n print("Yes")\nelif np.sum(a[:,2]) == 0:\n print("Yes")\nelif np.sum(a[:,3]) == 0:\n print("Yes")\nelif a[1,1] + a[2,2] + a[3,3] == 0:\n print("Yes")\nelif a[3,1] + a[2,2] + a[1,3] == 0:\n print("Yes")\nelse:\n print("No")', 'import numpy as np\n\na1,a2,a3 = map(int,input().split())\na4,a5,a6 = map(int,input().split())\na7,a8,a9 = map(int,input().split())\n\na = np.array([[a1, a2, a3], [a4, a5, a6], [a7, a8, a9]])\n\nn = int(input())\nfor i in range(n):\n b = int(input())\n a = np.where(a == b, 0, a)\n\nprint(a)\n\nif a[0,0] + a[0,1] + a[0,2] == 0:\n print("Yes")\nelif a[1,0] + a[1,1] + a[1,2] == 0:\n print("Yes")\nelif a[2,0] + a[2,1] + a[2,2] == 0:\n print("Yes")\nelif a[0,0] + a[1,0] + a[2,0] == 0:\n print("Yes")\nelif a[0,1] + a[1,1] + a[2,1] == 0:\n print("Yes")\nelif a[0,2] + a[1,2] + a[2,2] == 0:\n print("Yes")\nelif a[0,0] + a[1,1] + a[2,2] == 0:\n print("Yes")\nelif a[2,0] + a[1,1] + a[0,2] == 0:\n print("Yes")\nelse:\n print("No")', 'import numpy as np\n\na1,a2,a3 = map(int,input().split())\na4,a5,a6 = map(int,input().split())\na7,a8,a9 = map(int,input().split())\n\na = np.array([[a1, a2, a3], [a4, a5, a6], [a7, a8, a9]])\n\nn = int(input)\nfor i in range(n):\n b = int(input())\n a[a = b] = 0\n\nif np.sum(a[1,:]) = 0:\n print("Yes")\nelif np.sum(a[2,:]) = 0:\n print("Yes")\nelif np.sum(a[3,:]) = 0:\n print("Yes")\nelif np.sum(a[:,1]) = 0:\n print("Yes")\nelif np.sum(a[:,2]) = 0:\n print("Yes")\nelif np.sum(a[:,3]) = 0:\n print("Yes")\nelif a[1,1] + a[2,2] + a[3,3] = 0:\n print("Yes")\nelif a[3,1] + a[2,2] + a[1,3] = 0:\n print("Yes")\nelse:\n print("No")\n', 'import numpy as np\n \na1,a2,a3 = map(int,input().split())\na4,a5,a6 = map(int,input().split())\na7,a8,a9 = map(int,input().split())\n \na = np.array([[a1, a2, a3], [a4, a5, a6], [a7, a8, a9]])\n \nn = int(input)\nfor i in range(n):\n b = int(input())\n np.where(a == b,0,a)\n\nif np.sum(a[1,:]) == 0:\n print("Yes")\nelif np.sum(a[2,:]) == 0:\n print("Yes")\nelif np.sum(a[3,:]) == 0:\n print("Yes")\nelif np.sum(a[:,1]) == 0:\n print("Yes")\nelif np.sum(a[:,2]) == 0:\n print("Yes")\nelif np.sum(a[:,3]) == 0:\n print("Yes")\nelif a[1,1] + a[2,2] + a[3,3] == 0:\n print("Yes")\nelif a[3,1] + a[2,2] + a[1,3] == 0:\n print("Yes")\nelse:\n print("No")', 'import numpy as np\n\na1,a2,a3 = map(int,input().split())\na4,a5,a6 = map(int,input().split())\na7,a8,a9 = map(int,input().split())\n\na = np.array([[a1, a2, a3], [a4, a5, a6], [a7, a8, a9]])\n\nn = int(input())\nfor i in range(n):\n b = int(input())\n a = np.where(a == b, 0, a)\n\nif a[0,0] + a[0,1] + a[0,2] == 0:\n print("Yes")\nelif a[1,0] + a[1,1] + a[1,2] == 0:\n print("Yes")\nelif a[2,0] + a[2,1] + a[2,2] == 0:\n print("Yes")\nelif a[0,0] + a[1,0] + a[2,0] == 0:\n print("Yes")\nelif a[0,1] + a[1,1] + a[2,1] == 0:\n print("Yes")\nelif a[0,2] + a[1,2] + a[2,2] == 0:\n print("Yes")\nelif a[0,0] + a[1,1] + a[2,2] == 0:\n print("Yes")\nelif a[2,0] + a[1,1] + a[0,2] == 0:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s457349870', 's482897840', 's598694441', 's633235643', 's700200392', 's897846682', 's537404382']
[12500.0, 12436.0, 21504.0, 12020.0, 2940.0, 21504.0, 12020.0]
[149.0, 152.0, 325.0, 158.0, 17.0, 324.0, 150.0]
[630, 636, 636, 707, 619, 637, 697]
p02760
u273010357
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
["import numpy as np\nA = np.array([list(map(str, input().split())) for _ in range(3)])\nN = int(input())\nb = [input() for _ in range(N)]\n\nfor i in range(3):\n for j in range(3):\n if A[i][j] in b:\n A[i][j] = 'X'\nprint(A)\n\nif A[0][0] == A[1][1] == A[2][2] == 'X':\n print('Yes')\n exit()\n\nif A[0][2] == A[1][1] == A[2][0] == 'X':\n print('Yes')\n exit()\n\nif A[0][0] == A[0][1] == A[0][2] == 'X':\n print('Yes')\n exit()\n\nif A[1][0] == A[1][1] == A[1][2] == 'X':\n print('Yes')\n exit()\n\nif A[2][0] == A[2][1] == A[2][2] == 'X':\n print('Yes')\n exit()\n\n# t\nif A[0][0] == A[1][0] == A[2][0] == 'X':\n print('Yes')\n exit()\nif A[0][1] == A[1][1] == A[2][1] == 'X':\n print('Yes')\n exit()\nif A[0][2] == A[1][2] == A[2][2] == 'X':\n print('Yes')\n exit()\nprint('No')", "import numpy as np\nA = np.array([list(map(str, input().split())) for _ in range(3)])\nN = int(input())\nb = [input() for _ in range(N)]\n\nfor i in range(3):\n for j in range(3):\n if A[i][j] in b:\n A[i][j] = 'X'\n\nif A[0][0] == A[1][1] == A[2][2] == 'X':\n print('Yes')\n exit()\n\nif A[0][2] == A[1][1] == A[2][0] == 'X':\n print('Yes')\n exit()\n\nif A[0][0] == A[0][1] == A[0][2] == 'X':\n print('Yes')\n exit()\n\nif A[1][0] == A[1][1] == A[1][2] == 'X':\n print('Yes')\n exit()\n\nif A[2][0] == A[2][1] == A[2][2] == 'X':\n print('Yes')\n exit()\n\n# t\nif A[0][0] == A[1][0] == A[2][0] == 'X':\n print('Yes')\n exit()\nif A[0][1] == A[1][1] == A[2][1] == 'X':\n print('Yes')\n exit()\nif A[0][2] == A[1][2] == A[2][2] == 'X':\n print('Yes')\n exit()\nprint('No')"]
['Wrong Answer', 'Accepted']
['s000086795', 's622770270']
[21436.0, 21656.0]
[983.0, 906.0]
[810, 801]
p02760
u274758786
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['import sys\na = [list(map(int, input().split())) for i in range(3)]\nn = int(input())\nb = [int(input()) for i in range(n)]\n\nfor i in range(3):\n ans = True\n for j in range(3):\n if a[i][j] not in b:\n ans = False\n if ans:\n print("Yes")\n sys.exit()\nfor j in range(3):\n ans = True\n for i in range(3):\n if a[i][j] not in b:\n ans = False\n if ans:\n print("Yes")\n sys.exit()\nif all([a[0][2] in b, a[1][1] in b, a[2][2] in b]) or all([a[0][2] in b, a[1][1] in b, a[2][0] in b]):\n print("Yes")\n sys.exit()\n\nprint("No")\n', 'import sys\na = [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 ans = True\n for j in range(3):\n if a[i][j] not in b:\n ans = False\n if ans:\n print("Yes")\n sys.exit()\nfor j in range(3):\n ans = True\n for i in range(3):\n if a[i][j] not in b:\n ans = False\n if ans:\n print("Yes")\n sys.exit()\nif all([a[0][0] in b, a[1][1] in b, a[2][2] in b]) or all([a[0][2] in b, a[1][1] in b, a[2][0] in b]):\n print("Yes")\n sys.exit()\n\nprint("No")\n']
['Wrong Answer', 'Accepted']
['s802923175', 's162086546']
[3064.0, 3064.0]
[17.0, 17.0]
[595, 595]
p02760
u276686572
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['row1 = list(map(int,input().split()))\nrow2 = list(map(int,input().split()))\nrow3 = list(map(int,input().split()))\n\nn = int(input())\nnums = []\nans = "No"\n\nfor i in range(0, n):\n nums.append(int(input()))\n \nfor i in range(0,3):\n if row1[i] in nums: row1[i] == "O"\n if row2[i] in nums: row2[i] == "O"\n if row3[i] in nums: row3[i] == "O"\n \n#Columns\nfor i in range(0,3):\n if row1[i] == row2[i] == row3[i]: ans = "Yes"\n \n#Rows\nif row1 == ["O","O","O"] or row2 == ["O","O","O"] or row3 == ["O","O","O"]: ans = "Yes"\n \n#Diagonals\nif row1[0] == row2[1] == row3[2] or row1[2] == row2[1] == row3[0]: ans = "Yes"\n \nprint(ans)', 'row1 = list(map(int,input().split()))\nrow2 = list(map(int,input().split()))\nrow3 = list(map(int,input().split()))\n\nn = int(input())\nnums = []\nans = "No"\n\nfor i in range(0, n):\n nums.append(int(input()))\n\nfor i in range(0,3):\n if row1[i] in nums: row1[i] == "O"\n if row2[i] in nums: row2[i] == "O"\n if row3[i] in nums: row3[i] == "O"\n\n#Columns\nfor i in range(0,3):\n if row1[i] == row2[i] == row3[i]: ans = "Yes"\n \n#Rows\nif row1 == ["O","O","O"] or row2 == ["O","O","O"] or row3 == ["O","O","O"]: ans = "Yes"\n \n#Diagonals\nif row1[0] == row2[1] == row3[2] or row1[2] == row2[1] == row3[0]: ans = "Yes"\n \nprint(ans)\n', 'row1 = list(map(int,input().split()))\nrow2 = list(map(int,input().split()))\nrow3 = list(map(int,input().split()))\n\nn = int(input())\nnums = []\nans = "No"\n\n\nfor i in range(0, n):\n nums.append(int(input()))\n\nfor i in range(0,3):\n if row1[i] in nums: row1[i] = "O"\n if row2[i] in nums: row2[i] = "O"\n if row3[i] in nums: row3[i] = "O"\n\n#Columns\nfor i in range(0,3):\n if row1[i] == row2[i] == row3[i]: ans = "Yes"\n \n#Rows\nif row1 == ["O","O","O"] or row2 == ["O","O","O"] or row3 == ["O","O","O"]: ans = "Yes"\n \n#Diagonals\nif row1[0] == row2[1] == row3[2] or row1[2] == row2[1] == row3[0]: ans = "Yes"\n \nprint(ans)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s139633599', 's295033545', 's403065742']
[9264.0, 9260.0, 9148.0]
[27.0, 29.0, 26.0]
[627, 622, 620]
p02760
u277104886
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\ncard = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nb = [int(input()) for _ in range(N)]\na = [[0]*3 for _ in range(3)]\nfor bi in b:\n for i in range(3):\n for j in raneg(3):\n if bi == card[i][j]:\n a[i][j] = 1\n \nans = 'No'\n#tate\nfor i in range(3):\n if a[0][i] == 1 and a[1][i] == 1 and a[2][i] == 1:\n ans = 'Yes'\n \n#yoko\nfor i in range(3):\n if a[i][0] == 1 and a[i][1] == 1 and a[i][2] == 1:\n ans = 'Yes'\n \n#naname\nif a[0][0] == 1 and a[1][1] == 1 and a[2][2] == 1:\n ans = 'Yes'\nif a[1][3] == 1 and a[2][2] == 1 and a[3][1] == 1:\n ans ='Yes'\nprint(ans)", "#Bingo\ncard = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nb = list([int(input()) for _ in range(N)])\na = [[0]*3 for _ in range(3)]\nfor bi in b:\n for i in range(3):\n for j in range(3):\n if bi == card[i][j]:\n a[i][j] = 1\n \nans = 'No'\n#tate\nfor i in range(3):\n if a[0][i] == 1 and a[1][i] == 1 and a[2][i] == 1:\n ans = 'Yes'\n \n#yoko\nfor i in range(3):\n if a[i][0] == 1 and a[i][1] == 1 and a[i][2] == 1:\n ans = 'Yes'\n \n#naname\nif a[0][0] == 1 and a[1][1] == 1 and a[2][2] == 1:\n ans = 'Yes'\nif a[0][2] == 1 and a[1][1] == 1 and a[2][0] == 1:\n ans ='Yes'\nprint(ans)"]
['Runtime Error', 'Accepted']
['s415440832', 's253514025']
[3064.0, 3064.0]
[18.0, 18.0]
[671, 677]
p02760
u277298370
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
["import numpy as np\n\na1 = list(map(int, input().split(' ')))\na2 = list(map(int, input().split(' ')))\na3 = list(map(int, input().split(' ')))\nn = int(input())\n\nnums = [int(input()) for _ in range(n)]\n\narr = np.array([a1, a2, a3])\nmask = np.zeros_like(arr)\n\nfor num in nums:\n idx = np.where(arr == num)\n\n if len(idx[0]) == 0:\n pass\n else:\n mask[idx] = 1\n print(mask)\n\ns_v = np.sum(mask, axis=0)\ns_h = np.sum(mask, axis=0)\ns_diag_1 = mask[0, 0] + mask[1, 1] + mask[2, 2]\ns_diag_2 = mask[0, 2] + mask[1, 1] + mask[2, 0] \ns = np.maximum(np.concatenate([s_v, s_h, [s_diag_1], [s_diag_2]]) - 2, 0)\n\nif np.max(s) > 0:\n print('Yes')\nelse:\n print('No')", "import numpy as np\n\na1 = list(map(int, input().split(' ')))\na2 = list(map(int, input().split(' ')))\na3 = list(map(int, input().split(' ')))\nn = int(input())\n\nnums = [int(input()) for _ in range(n)]\n\narr = np.array([a1, a2, a3])\nmask = np.zeros_like(arr)\n\nfor num in nums:\n idx = np.where(arr == num)\n\n if len(idx[0]) == 0:\n pass\n else:\n mask[idx] = 1\n\ns_v = np.sum(mask, axis=0)\ns_h = np.sum(mask, axis=1)\ns_diag_1 = mask[0, 0] + mask[1, 1] + mask[2, 2]\ns_diag_2 = mask[0, 2] + mask[1, 1] + mask[2, 0] \ns = np.maximum(np.concatenate([s_v, s_h, [s_diag_1], [s_diag_2]]) - 2, 0)\n\nif np.max(s) > 0:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s582851795', 's053997221']
[12516.0, 20968.0]
[154.0, 290.0]
[673, 657]
p02760
u278001641
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['\nA11,A12,A13 = input().split()\nA21,A22,A23 = input().split()\nA31,A32,A33 = input().split()\n\nN = int(input())\na = list()\n\nfor i in range(N):\n a.append(input())\n if a[0+i] == A11:\n A11 = True\n elif a[0+i] == A12:\n A12 = True\n elif a[0+i] == A13:\n A13 = True\n elif a[0+i] == A21:\n A21 = True\n elif a[0+i] == A22:\n A22 = True\n elif a[0+i] == A23:\n A23 = True\n elif a[0+i] == A31:\n A31 = True\n elif a[0+i] == A32:\n A32 = True\n elif a[0+i] == A33:\n A33 = True\n\n\nif A11 == True and A12 == True and A13 == True:\n print("yes")\nelif A11 == True and A21 == True and A31 == True:\n print("yes")\nelif A11 == True and A22 == True and A33 == True:\n print("yes")\nelif A12 == True and A22 == True and A32 == True:\n print("yes")\nelif A13 == True and A23 == True and A33 == True:\n print("yes")\nelif A21 == True and A22 == True and A23 == True:\n print("yes")\nelif A31 == True and A32 == True and A33 == True:\n print("yes")\nelif A13 == True and A22 == True and A31 == True:\n print("yes")\n \nelse: \n print("no")\n ', '\nA1 = list(map(int, input().split()))\nA2 = list(map(int, input().split()))\nA3 = list(map(int, input().split()))\n\nN = int(input())\na = []\n\nfor i in range(N):\n a.append(int(input()))\n \n if A1[0] == a[i]:\n A1[0] = True\n elif a[i] == A1[1]:\n A1[1] = True\n elif a[i] == A1[2]:\n A1[2] = True\n elif a[i] == A2[0]:\n A2[0] = True\n elif a[i] == A2[1]:\n A2[1] = True\n elif a[i] == A2[2]:\n A2[2] = True\n elif a[i] == A3[0]:\n A3[0] = True\n elif a[i] == A3[1]:\n A3[1] = True\n elif a[i] == A3[2]:\n A3[2] = True\n\n\nif A1[0] == True and A1[1] == True and A1[2] == True:\n print("yes")\nelif A1[0] == True and A2[0] == True and A3[0] == True:\n print("yes")\nelif A1[0] == True and A2[1] == True and A3[2] == True:\n print("yes")\nelif A1[1] == True and A2[1] == True and A3[1] == True:\n print("yes")\nelif A1[2] == True and A2[2] == True and A3[2] == True:\n print("yes")\nelif A2[0] == True and A2[1] == True and A2[2] == True:\n print("yes")\nelif A3[0] == True and A3[1] == True and A3[2] == True:\n print("yes")\nelif A1[2] == True and A2[1] == True and A3[0] == True:\n print("Yes")\n \nelse: \n print("No")\n', 'A11,A12,A13 = input().split()\nA21,A22,A23 = input().split()\nA31,A32,A33 = input().split()\n\nN = int(input())\na = list()\n\nfor i in range(N):\n a.append(input())\n if a[0+i] == A11:\n A11 = True\n elif a[0+i] == A12:\n A12 = True\n elif a[0+i] == A13:\n A13 = True\n elif a[0+i] == A21:\n A21 = True\n elif a[0+i] == A22:\n A22 = True\n elif a[0+i] == A23:\n A23 = True\n elif a[0+i] == A31:\n A31 = True\n elif a[0+i] == A32:\n A32 = True\n elif a[0+i] == A33:\n A33 = True\n\n\nif A11 == True and A12 == True and A13 == True:\n print("yes")\nelif A11 == True and A21 == True and A31 == True:\n print("yes")\nelif A11 == True and A22 == True and A33 == True:\n print("yes")\nelif A12 == True and A22 == True and A32 == True:\n print("yes")\nelif A13 == True and A23 == True and A33 == True:\n print("yes")\nelif A21 == True and A22 == True and A23 == True:\n print("yes")\nelif A31 == True and A32 == True and A33 == True:\n print("yes")\nelif A13 == True and A22 == True and A31 == True:\n print("Yes")\n \nelse: \n print("No")\n \n \n \n ', '# -*- coding: utf-8 -*-\n"""\nCreated on Sun Aug 9 20:50:35 2020\n\n@author: akros\n"""\n\n# -*- coding: utf-8 -*-\n"""\nCreated on Sun Aug 9 16:51:42 2020\n\n@author: akros\n"""\n\nA1 = list(map(int, input().split()))\nA2 = list(map(int, input().split()))\nA3 = list(map(int, input().split()))\n\nN = int(input())\na = []\n\nfor i in range(N):\n a.append(int(input()))\n \n if A1[0] == a[i]:\n A1[0] = True\n elif a[i] == A1[1]:\n A1[1] = True\n elif a[i] == A1[2]:\n A1[2] = True\n elif a[i] == A2[0]:\n A2[0] = True\n elif a[i] == A2[1]:\n A2[1] = True\n elif a[i] == A2[2]:\n A2[2] = True\n elif a[i] == A3[0]:\n A3[0] = True\n elif a[i] == A3[1]:\n A3[1] = True\n elif a[i] == A3[2]:\n A3[2] = True\n\n\nif A1[0] == True and A1[1] == True and A1[2] == True:\n print("Yes")\nelif A1[0] == True and A2[0] == True and A3[0] == True:\n print("Yes")\nelif A1[0] == True and A2[1] == True and A3[2] == True:\n print("Yes")\nelif A1[1] == True and A2[1] == True and A3[1] == True:\n print("Yes")\nelif A1[2] == True and A2[2] == True and A3[2] == True:\n print("Yes")\nelif A2[0] == True and A2[1] == True and A2[2] == True:\n print("Yes")\nelif A3[0] == True and A3[1] == True and A3[2] == True:\n print("Yes")\nelif A1[2] == True and A2[1] == True and A3[0] == True:\n print("Yes")\n \nelse: \n print("No")\n\n \n \n \n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s380761060', 's632458948', 's821181306', 's446886954']
[9184.0, 9356.0, 9024.0, 9340.0]
[29.0, 33.0, 27.0, 33.0]
[1127, 1215, 1141, 1400]
p02760
u278353498
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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(N) :\n b.append(int(input()))\n\nm = [[0,0,0],[0,0,0],[0,0,0]]\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 m[j][k] = 1\nif m[0].count(1) == 3 or \\\n m[1].count(1) == 3 or \\\n m[2].count(1) == 3 or \\\n [x[0] for x in m].count(1) == 3 or \\\n [x[1] for x in m].count(1) == 3 or \\\n [x[2] for x in m].count(1) == 3 or \\\n (m[0][0] == 1 and m [1][1] == 1 and m [2][2] == 2) or \\\n (m[2][0] == 1 and m [1][1] == 1 and m [2][0] == 2) :\n print('Yes')\nelse :\n print('No')", "import math\na1 = 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\nb = []\nfor i in range(N) :\n b.append(int(input()))\n\nm = [[0,0,0],[0,0,0],[0,0,0]]\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 m[j][k] = 1\nif m[0].count(1) == 3 or \\\n m[1].count(1) == 3 or \\\n m[2].count(1) == 3 or \\\n [x[0] for x in m].count(1) == 3 or \\\n [x[1] for x in m].count(1) == 3 or \\\n [x[2] for x in m].count(1) == 3 or \\\n (x[0][0] == 1 and x [1][1] == 1 and x [2][2] == 2) or \\\n (x[2][0] == 1 and x [1][1] == 1 and x [2][0] == 2) :\n print('Yes')\nelse :\n print('No')", "import math\n\na1 = list(map(int, input().rstrip().split()))\na2 = list(map(int, input().rstrip().split()))\na3 = list(map(int, input().rstrip().split()))\na = [a1,a2,a3]\n\nm = [[0,0,0],[0,0,0],[0,0,0]]\n\nn = int(input())\nb = []\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 m[j][k] = 1\n\nif a[0].count(1) == 3 :\n print('Yes')\nelif a[1].count(1) == 3 :\n print('Yes')\nelif a[2].count(1) == 3 :\n print('Yes')\nelse :\n print('No')\n\n", "n = int(input())\nb = []\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 m[j][k] = 1\n\nif a[0].count(1) == 3 :\n print('Yes')\nelif a[1].count(1) == 3 :\n print('Yes')\nelif a[2].count(1) == 3 :\n print('Yes')\nelse :\n print('No')", "import math\na1 = 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\nb = []\nfor i in range(N) :\n b.append(int(input()))\n\nm = [[0,0,0],[0,0,0],[0,0,0]]\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 m[j][k] = 1\n\nif m[0].count(1) == 3 or \\\n m[1].count(1) == 3 or \\\n m[2].count(1) == 3 or \\\n [x[0] for x in m].count(1) == 3 or \\\n [x[1] for x in m].count(1) == 3 or \\\n [x[2] for x in m].count(1) == 3 or \\\n (x[0][0] == 1 and x [1][1] == 1 and x [2][2] == 2) or \\\n (x[2][0] == 1 and x [1][1] == 1 and x [2][0] == 2) :\n print('YES')\nelse :\n print('NO')", "import math\n\na1 = list(map(int, input().rstrip().split()))\na2 = list(map(int, input().rstrip().split()))\na3 = list(map(int, input().rstrip().split()))\na = [a1,a2,a3]\n\nm = [[0,0,0],[0,0,0],[0,0,0]]\n\nn = int(input())\nb = []\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 m[j][k] = 1\n\nif m[0].count(1) == 3 :\n print('Yes')\nelif m[1].count(1) == 3 :\n print('Yes')\nelif m[2].count(1) == 3 :\n print('Yes')\nelif m[0][0] == 1 and m[1][0] == 1 and m[2][0] ==1 :\n print('YES')\nelif m[0][1] == 1 and m[1][1] == 1 and m[2][1] ==1 :\n print('YES')\nelif m[0][2] == 1 and m[1][2] == 1 and m[2][2] ==1 :\n print('YES')\nelif m[0][0] == 1 and m[1][1] == 1 and m[2][2] ==1 :\n print('YES')\nelif m[0][2] == 1 and m[1][1] == 1 and m[2][0] ==1 :\n print('YES')\nelse :\n print('No')", "import math\n\na1 = list(map(int, input().rstrip().split()))\na2 = list(map(int, input().rstrip().split()))\na3 = list(map(int, input().rstrip().split()))\na = [a1,a2,a3]\n\nm = [[0,0,0],[0,0,0],[0,0,0]]\n\nn = int(input())\nb = []\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 m[j][k] = 1\n\nif m[0].count(1) == 3 :\n print('Yes')\nelif m[1].count(1) == 3 :\n print('Yes')\nelif m[2].count(1) == 3 :\n print('Yes')\nelif m[0][0] == 1 and m[1][0] == 1 and m[2][0] ==1 :\n print('Yes')\nelif m[0][1] == 1 and m[1][1] == 1 and m[2][1] ==1 :\n print('Yes')\nelif m[0][2] == 1 and m[1][2] == 1 and m[2][2] ==1 :\n print('Yes')\nelif m[0][0] == 1 and m[1][1] == 1 and m[2][2] ==1 :\n print('Yes')\nelif m[0][2] == 1 and m[1][1] == 1 and m[2][0] ==1 :\n print('Yes')\nelse :\n print('No')\n"]
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s105174943', 's522141822', 's602421375', 's628435104', 's672471265', 's872211493', 's374980420']
[3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3188.0, 3064.0]
[17.0, 17.0, 17.0, 17.0, 23.0, 18.0, 17.0]
[582, 740, 525, 325, 741, 873, 874]
p02760
u278356323
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
["# ABC157b\n\n\ndef main():\n import sys\n input = sys.stdin.readline\n sys.setrecursionlimit(10**6)\n \n bing = [list(map(int, input().split())) for _ in range(3)]\n n = int(input())\n b = [int(input()) for _ in range(n)]\n for num in b:\n for i in bing:\n try:\n while True:\n t = i.index(num)\n i[t] = -1\n except:\n continue\n # print(bing)\n\n naname = [((0, 0), (1, 1), (2, 2)), (2, 0), (1, 1), (0, 2)]\n if sum(bing[0]) == -3 or sum(bing[1]) == -3 or sum(bing[2]) == -3 or bing[0][0]+bing[1][0]+bing[2][0] == -3 or bing[0][1]+bing[1][1]+bing[2][1] == -3 or bing[0][2]+bing[0][2]+bing[0][2] == -3 or bing[0][0]+bing[1][1]+bing[2][2] == -3 or bing[0][2]+bing[1][1]+bing[2][0] == -3:\n print('Yes')\n exit(0)\n\n print('No')\n\n d = [(1, 0), (1, 1), (0, 1)]\n for i in range(3):\n if sum(bing[i]) == -3:\n \n\n\nif __name__ == '__main__':\n main()\n", "# ABC157b\n\n\ndef main():\n import sys\n input = sys.stdin.readline\n sys.setrecursionlimit(10**6)\n \n bing = [list(map(int, input().split())) for _ in range(3)]\n n = int(input())\n b = [int(input()) for _ in range(n)]\n for num in b:\n for i in bing:\n try:\n while True:\n t = i.index(num)\n i[t] = -1\n except:\n continue\n # print(bing)\n\n naname = [((0, 0), (1, 1), (2, 2)), (2, 0), (1, 1), (0, 2)]\n if sum(bing[0]) == -3 or sum(bing[1]) == -3 or sum(bing[2]) == -3 or bing[0][0]+bing[1][0]+bing[2][0] == -3 or bing[0][1]+bing[1][1]+bing[2][1] == -3 or bing[0][2]+bing[1][2]+bing[2][2] == -3 or bing[0][0]+bing[1][1]+bing[2][2] == -3 or bing[0][2]+bing[1][1]+bing[2][0] == -3:\n print('Yes')\n exit(0)\n\n print('No')\n\n\nif __name__ == '__main__':\n main()\n"]
['Runtime Error', 'Accepted']
['s766076933', 's477137431']
[3064.0, 3064.0]
[17.0, 17.0]
[1044, 943]
p02760
u281610856
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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())\nfor i in range(n):\n b = int(input())\n for j in range(3):\n if b in a[j]:\n idx = a[j].index(b)\n a[j][idx] = 0\nprint(a)\nfor k in range(3):\n if sum(a[k]) == 0: \n print(\'Yes\')\n exit()\n elif a[0][k] + a[1][k] + a[2][k] == 0:\n print("Yes")\n exit()\nif a[0][0] + a[1][1] + a[2][2] == 0 or a[0][2] + a[1][1] + a[2][0] == 0:\n print(\'Yes\')\nelse:\n print(\'No\')', "import numpy as np\n\n\nflag = False\narr = [list(map(int, input().split())) for _ in range(3)]\nn = int(input())\nfor i in range(n):\n b = int(input())\n for j in range(3):\n if b in arr[j]:\n idx = arr[j].index(b)\n arr[j][idx] = 0\n\narr = np.array(arr)\nfor s in arr:\n if sum(s) == 0:\n flag = True\narr = np.rot90(arr)\nfor s in arr:\n if sum(s) == 0:\n flag = True\nif arr[0][0] + arr[1][1] + arr[2][2] ==0:\n flag = True\nif arr[2][0] + arr[1][1] + arr[0][2] == 0:\n flag = True\nif flag:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s695937021', 's878028054']
[3064.0, 12492.0]
[17.0, 148.0]
[509, 571]
p02760
u281796054
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\nCopy\nCopy\nA=[]\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")', '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")\nprint(A)', '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")']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s067624339', 's719626893', 's225516210']
[3064.0, 3064.0, 3064.0]
[17.0, 18.0, 18.0]
[589, 567, 558]
p02760
u283751459
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 _ in range(n)]\nprint(bingo)\n\nfor i in range(3):\n for j in range(3):\n if bingo[i][j] in num:\n bingo[i][j] = 0\nprint(bingo)\n\nfor i in range(3):\n if bingo[i].count(0) == 3:\n print("Yes")\n exit()\n elif bingo[0][i] == 0 and bingo[1][i] == 0 and bingo[2][i] == 0:\n print("Yes")\n exit()\n else:\n pass\n\nif bingo[0][0] == 0 and bingo[1][1] == 0 and bingo[2][2] ==0:\n print("Yes")\n exit()\nelif bingo[0][2] == 0 and bingo[1][1] == 0 and bingo[2][0] == 0:\n print("Yes")\n exit()\nelse:\n print("No")\n', 'bingo = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\nnum = [int(input()) for _ in range(n)]\n\nfor i in range(3):\n for j in range(3):\n if bingo[i][j] in num:\n bingo[i][j] = 0\n\nfor i in range(3):\n if bingo[i].count(0) == 3:\n print("Yes")\n exit()\n elif bingo[0][i] == 0 and bingo[1][i] == 0 and bingo[2][i] == 0:\n print("Yes")\n exit()\n else:\n pass\n\nif bingo[0][0] == 0 and bingo[1][1] == 0 and bingo[2][2] ==0:\n print("Yes")\n exit()\nelif bingo[0][2] == 0 and bingo[1][1] == 0 and bingo[2][0] == 0:\n print("Yes")\n exit()\nelse:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s530573405', 's757560061']
[9148.0, 9264.0]
[28.0, 27.0]
[616, 590]
p02760
u284363684
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['# input\nA = []\nA_append = A.append\nfor i in range(3):\n An = list(map(int, input().split()))\n A_append(An)\nprint(A)\n\nN = int(input())\n\nb = []\nappend = b.append\nfor i in range(N):\n bn = int(input())\n append(bn)\n\n\n\nmarker = [[0 * 3], [0 * 3], [0 * 3]]\nbingo_fl = False\nfor i in b:\n if b in A:\n n, m = A.index(b)\n marker[n][m] = 1\n\n if (\n [1 * 3] in [marker[i][:] for i in range(3)] or\n [1 * 3] in [[marker[0][i], marker[1][i], marker[2][i]] for i in range(3)] or\n [1 * 3] == [marker[0][0], marker[1][1], marker[2][2]] or\n [1 * 3] == [marker[0][2], marker[1][1], marker[2][0]]\n ):\n bingo_fl = True\n break\n\nif bingo_fl is True:\n print("Yes")\nelse:\n print("No")', '# input\nA = []\nA_append = A.append\nfor i in range(3):\n An = list(map(int, input().split()))\n A_append(An)\n\nN = int(input())\n\nb = []\nappend = b.append\nfor i in range(N):\n bn = int(input())\n append(bn)\n\n\n\nmarker = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]\n\nbingo_fl = False\nfor i in b:\n for n, An in enumerate(A):\n\n if i in An:\n m = An.index(i)\n\n marker[n][m] = 1\n\n break\n\nif (\n [1, 1, 1] in [marker[i][:] for i in range(3)] or\n [1, 1, 1] in [[marker[0][i], marker[1][i], marker[2][i]] for i in range(3)] or\n [1, 1, 1] == [marker[0][0], marker[1][1], marker[2][2]] or\n [1, 1, 1] == [marker[0][2], marker[1][1], marker[2][0]]\n):\n bingo_fl = True\n\nif bingo_fl is True:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s154636964', 's076955304']
[3064.0, 3064.0]
[18.0, 17.0]
[777, 788]
p02760
u290886932
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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]\nbingomap = [[0,0,0],[0,0,0],[0,0,0]]\nprint(A)\nN = int(input())\nb = list()\nret = 'No'\nfor i in range(N):\n b.append(int(input()))\n print(b)\n for i in range(N):\n for j in range(3):\n if b[i] in A[j]:\n bingomap[j][A[j].index(b[i])] = 1\n break\n if i >= 2 :\n if checkbingo(bingomap) == True:\n ret = 'Yes'\n break\nprint(ret)\n\ndef checkbingo(map_):\n for i in range(3):\n if map_[i][0] * map_[i][1] * map_[i][2] == 1:\n return True\n if map_[0][i] * map_[0][i] * map_[0][i] == 1:\n return True\n if map_[0][0] * map_[1][1] * map_[2][2] == 1:\n return True\n if map_[0][2] * map_[1][1] * map_[2][0] == 1:\n return True\n return False ", "def checkbingo(map_):\n for i in range(3):\n if map_[i][0] * map_[i][1] * map_[i][2] == 1:\n return True\n if map_[0][i] * map_[1][i] * map_[2][i] == 1:\n return True\n if map_[0][0] * map_[1][1] * map_[2][2] == 1:\n return True\n if map_[0][2] * map_[1][1] * map_[2][0] == 1:\n return True\n return False \n\nA1 = list(map(int, input().split()))\nA2 = list(map(int, input().split()))\nA3 = list(map(int, input().split()))\nA = [A1,A2,A3]\nbingomap = [[0,0,0],[0,0,0],[0,0,0]]\nN = int(input())\nb = list()\nret = 'No'\nfor i in range(N):\n b.append(int(input()))\nfor i in range(N):\n for j in range(3):\n if b[i] in A[j]:\n bingomap[j][A[j].index(b[i])] = 1\n break\n if i >= 2 :\n if checkbingo(bingomap) == True:\n ret = 'Yes'\n break\nprint(ret)"]
['Runtime Error', 'Accepted']
['s581711532', 's681319463']
[3064.0, 3064.0]
[17.0, 17.0]
[812, 774]
p02760
u291988695
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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=[[]]*3\nfor k in range(3):\n l[k]=list(map(int,input().split()))\nn=int(input())\nll=[[0,0,0]]*3\nfor k in range(n):\n i=int(input())\n for j in range(3):\n if i in l[j]:\n ll[j][l.index(i)]=1\na=0\nif ll[0][0]==1:\n if ll[0][1]==1 and ll[0][2]==1:\n print("Yes")\n a=1\n elif ll[1][1]==1 and ll[2][2]==1:\n print("Yes")\n a=1\n elif ll[1][0]==1 and ll[2][0]==1:\n print("Yes")\n a=1\nelif ll[0][1]==1 and ll[1][1]==1 and ll[2][1]==1:\n print("Yes")\n a=1\nelif ll[0][2]==1:\n if ll[1][1]==1 and ll[2][0]==1:\n print("Yes")\n a=1\n elif ll[1][2]==1 and ll[2][2]==1:\n print("Yes")\n a=1\nelif ll[1][0]==1:\n if ll[1][1]==1 and ll[1][2]==1:\n print("Yes")\n a=1\nelif ll[2][0]==1:\n if ll[2][1]==1 and ll[2][2]==1:\n print("Yes")\n a=1\nif a==0:\n print("No")', 'l=[[]]*3\nfor k in range(3):\n l[k]=list(map(int,input().split()))\nn=int(input())\nll=[[0]*3 for i in range(3)]\nfor k in range(n):\n i=int(input())\n for j in range(3):\n if i in l[j]:\n ll[j][l[j].index(i)]=1\na=0\nif ll[0][0]==1:\n if ll[0][1]==1 and ll[0][2]==1:\n a=1\n if ll[1][1]==1 and ll[2][2]==1:\n a=1\n if ll[1][0]==1 and ll[2][0]==1:\n a=1\nif ll[0][1]==1 and ll[1][1]==1 and ll[2][1]==1:\n a=1\nif ll[0][2]==1:\n if ll[1][1]==1 and ll[2][0]==1:\n a=1\n if ll[1][2]==1 and ll[2][2]==1:\n a=1\nif ll[1][0]==1:\n if ll[1][1]==1 and ll[1][2]==1:\n a=1\nif ll[2][0]==1:\n if ll[2][1]==1 and ll[2][2]==1:\n a=1\nif a==0:\n print("No")\nelse:\n print("Yes")\n']
['Runtime Error', 'Accepted']
['s020670560', 's043618727']
[3188.0, 3064.0]
[19.0, 17.0]
[783, 674]
p02760
u294385082
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 b:\n if k == a[i][j]:\n a[i][j] = 101\n break\n \nif a[1] == [101,101,101] or a[2] == [101,101,101] or a[3] == [101,101,101]:\n print('Yes')\n exit()\nelif (a[1][1]==101 and a[2][1] ==101 and a[3][1] == 101) or (a[1][2]==101 and a[2][2] ==101 and a[3][2] == 101) and (a[1][3]==101 and a[2][3] ==101 and a[3][3] == 101):\n print('Yes')\n exit()\nelif (a[1][1]==101 and a[2][2] ==101 and a[3][3] == 101) or (a[1][3]==101 and a[2][2] ==101 and a[3][1] == 101):\n print('Yes')\n exit()\nelse:\n print('No')", "a = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\nb = [int(input()) for i in range(n)]\n \nfor i in b:\n for j in range(3):\n for k in range(3):\n if i == a[j][k]:\n a[j][k] = 0\n \nfor i in range(3):\n if sum(a[i]) == 0:\n print('Yes')\n exit()\n \nif a[0][0]+a[1][0]+a[2][0] == 0 or a[0][1]+a[1][1]+a[2][1] == 0 or a[0][2]+a[1][2]+a[2][2] == 0:\n print('Yes')\nelif a[0][0]+a[1][1]+a[2][2] == 0 or a[0][2]+a[1][1]+a[2][0] == 0:\n print('Yes')\nelse:\n print('No')\n "]
['Runtime Error', 'Accepted']
['s422355055', 's563464084']
[3064.0, 3064.0]
[18.0, 18.0]
[691, 510]
p02760
u295797489
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['for i in range(3):\n line = input().rstrip().split(\' \')\n array_1.append(line)\n\nbool_array = []\nfor i in range(3):\n tmp = []\n for j in range(3):\n tmp.append(False)\n bool_array.append(tmp)\nnum = int(input().rstrip())\nfor i in range(num):\n input_line = input().rstrip()\n for j in range(3):\n for k in range(3):\n if array_1[j][k] == input_line:\n bool_array[j][k] = True\n\nans = "No"\nfor i in range(3):\n if bool_array[i][0] and bool_array[i][1] and bool_array[i][2]:\n ans = \'Yes\'\n\n if bool_array[0][i] and bool_array[1][i] and bool_array[2][i]:\n ans = \'Yes\'\n\nif bool_array[0][0] and bool_array[1][1] and bool_array[2][2]:\n ans = \'Yes\'\n\nif bool_array[0][2] and bool_array[1][1] and bool_array[2][0]:\n ans = \'Yes\'\nprint(ans)\n', 'array_1 = []\nfor i in range(3):\n line = input().rstrip().split(\' \')\n array_1.append(line)\n\nbool_array = []\nfor i in range(3):\n tmp = []\n for j in range(3):\n tmp.append(False)\n bool_array.append(tmp)\nnum = int(input().rstrip())\nfor i in range(num):\n input_line = input().rstrip()\n for j in range(3):\n for k in range(3):\n if array_1[j][k] == input_line:\n bool_array[j][k] = True\n\nans = "No"\nfor i in range(3):\n if bool_array[i][0] and bool_array[i][1] and bool_array[i][2]:\n ans = \'Yes\'\n\n if bool_array[0][i] and bool_array[1][i] and bool_array[2][i]:\n ans = \'Yes\'\n\nif bool_array[0][0] and bool_array[1][1] and bool_array[2][2]:\n ans = \'Yes\'\n\nif bool_array[0][2] and bool_array[1][1] and bool_array[2][0]:\n ans = \'Yes\'\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s938973969', 's050317182']
[3064.0, 3064.0]
[17.0, 17.0]
[802, 815]
p02760
u296101474
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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', "row1 = input().split()\nrow2 = input().split()\nrow3 = input().split()\n\nn = int(input())\nnums = [input() for i in range(n)]\n\nrows = [row1, row2, row3]\n\nfor i in range(0, 3):\n rows += [[row1[i], row2[i], row3[i]]]\n\nrows += [[row1[0], row2[1], row3[2]]]\nrows += [[row1[2], row2[1], row3[0]]]\n\nprint(rows)\n\nfor row in rows:\n j = 0\n for num in nums:\n if num in row:\n j += 1\n if j == 3:\n print('Yes')\n exit()\n\nprint('No')\n", "one = list(map(int, input().split()))\ntwo = list(map(int, input().split()))\nthree = list(map(int, input().split()))\nn = int(input())\nout = [int(input()) for x in range(n)]\n\n\ndef judge(a_list):\n for i in a_list:\n if i not in out:\n return False\n\n return True\n\n\nfor_judge = [one, two, three]\n\nfor i in range(3):\n tmp = [one[i], two[i], three[i]]\n for_judge.append(tmp)\n\n\nnaname1 = [one[0], two[1], three[2]]\nnaname2 = [one[2], two[1], three[0]]\n\nfor_judge.append(naname1)\nfor_judge.append(naname2)\n\nfor a_list in for_judge:\n if judge(a_list):\n print('Yes')\n exit()\n\nprint('No')\n"]
['Runtime Error', 'Wrong Answer', 'Accepted']
['s339547173', 's771144249', 's907532112']
[2940.0, 3064.0, 3064.0]
[17.0, 17.0, 18.0]
[59, 471, 622]
p02760
u297089927
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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=[]\na,b,c=map(int,input().split())\nd,e,f=map(int,input().split())\ng,h,i=map(int,input().split())\nn=int(input())\nfor i in range(n):\n j=int(input())\n li.append(j)\nbingo=0\nyoko1=a and b and c in li\nyoko2=d and e and f in li\nyoko3=g and h and i in li\nyoko=yoko1 or yoko2 or yoko3\ntate1=a and d and g in li\ntate2=b and e and h in li\ntate3=c and f and i in li\ntate=tate1 or tate2 or tate3\nnana1=a and e and i in li\nnana2=c and e and g in li\nnana=nana1 or nana2\nif yoko or tate or nana:\n bingo=1\nprint("Yes" if bingo==1 else "No")\n', 'li=[]\na,b,c=map(int,input().split())\nd,e,f=map(int,input().split())\ng,h,i=map(int,input().split())\nn=int(input())\nfor num in range(n):\n j=int(input())\n li.append(j)\nbingo=0\nyoko1=(a in li) and (b in li) and (c in li)\nyoko2=(d in li) and (e in li) and (f in li)\nyoko3=(g in li) and (h in li) and (i in li)\nyoko=yoko1 or yoko2 or yoko3\ntate1=(a in li) and (d in li) and (g in li)\ntate2=(b in li) and (e in li) and (h in li)\ntate3=(c in li) and (f in li) and (i in li)\ntate=tate1 or tate2 or tate3\nnana1=(a in li) and (e in li) and (i in li)\nnana2=(c in li) and (e in li) and (g in li)\nnana=nana1 or nana2\nif yoko or tate or nana:\n bingo=1\nprint("Yes" if bingo==1 else "No")']
['Wrong Answer', 'Accepted']
['s507439670', 's152852715']
[3064.0, 3064.0]
[17.0, 17.0]
[531, 676]
p02760
u297103202
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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)]\nA_flat=[]\nfor i in range(len(A)):\n A_flat.append(A[i][0])\n A_flat.append(A[i][1])\n A_flat.append(A[i][2])\n\nN = int(input())\nb = [int(input()) for i in range(N)]\nfor i in range(len(b)):\n if b[i] in A_flat:\n index = A_flat.index(b[i])\n A_flat[index] = 0\n\n judge=False\nfor i in range(3):\n if A_flat[0+i] == A_flat[3+i] == A_flat[6+i]:\n print("Yes")\n judge = True\n break\n elif A_flat[0+i*3]==A_flat[1+i*3]==A_flat[2+i*3]:\n print("Yes")\n judge = True\n break\n elif A_flat[0]==A_flat[4]==A_flat[8] or A_flat[2]==A_flat[4]==A_flat[6]:\n print("Yes")\n judge = True\n break\n\nif judge is False:\n print("No")\n', 'A = [list(map(int,input().split())) for i in range(3)]\nA_flat=[]\nfor i in range(len(A)):\n A_flat.append(A[i][0])\n A_flat.append(A[i][1])\n A_flat.append(A[i][2])\n\nN = int(input())\nb = [int(input()) for i in range(N)]\nfor i in range(len(b)):\n if b[i] in A_flat:\n index = A_flat.index(b[i])\n A_flat[index] = 0\n\njudge=False\nfor i in range(3):\n if A_flat[0+i] == A_flat[3+i] == A_flat[6+i]:\n print("Yes")\n judge = True\n break\n elif A_flat[0+i*3]==A_flat[1+i*3]==A_flat[2+i*3]:\n print("Yes")\n judge = True\n break\n elif A_flat[0]==A_flat[4]==A_flat[8] or A_flat[2]==A_flat[4]==A_flat[6]:\n print("Yes")\n judge = True\n break\n\nif judge is False:\n print("No")\n']
['Runtime Error', 'Accepted']
['s711969037', 's574363584']
[3064.0, 3064.0]
[17.0, 17.0]
[751, 750]
p02760
u297801580
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
["a = []\nfor i in range(3):\n a.append([int(x) for x in input().split()])\nbing = [([0]*3),([0]*3),([0]*3)]\n\nN=int(input())\nbs = [int(input()) for _ in range(N)]\n\nfor b in bs:\n for i in range(3):\n for j in range(3):\n if a[i][j]==b:\n bing[i][j]=1\n\ndef isbingo(board):\n for i in range(3):\n if sum(board[i])==3:\n return True\n for j in range(3):\n if sum([board[i][j] for i in range(3)])==3:\n return True\n if sum([board[0][0],board[1][1],board[2][2]])==3:\n return True\n if sum([board[0][2],board[1][1],board[2][0]])==3:\n return True\n return False\nprint(a)\nprint('Yes'if isbingo(bing) else 'No')", "a = []\nfor i in range(3):\n a.append([int(x) for x in input().split()])\nbing = [[0]*3,[0]*3,[0]*3]\n\nN=int(input())\nbs = [int(input()) for _ in range(N)]\n\nfor b in bs:\n for i in range(3):\n for j in range(3):\n if a[i][j]==b:\n bing[i][j]=1\n\n\n\ndef isbingo(board):\n for i in range(3):\n if sum(board[i])==3:\n return True\n for j in range(3):\n if sum([board[i][j] for i in range(3)])==3:\n return True\n if sum([board[0][0],board[1][1],board[2][2]])==3:\n return True\n if sum([board[0][2],board[1][1],board[2][0]])==3:\n return True\n return False\nprint('Yes'if isbingo(bing) else 'No')"]
['Wrong Answer', 'Accepted']
['s468852389', 's262583989']
[3064.0, 3064.0]
[18.0, 17.0]
[689, 676]
p02760
u302697704
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\nAlist = []\nAlist.append(A11)\nAlist.append(A12)\nAlist.append(A13)\nAlist.append(A21)\nAlist.append(A22)\nAlist.append(A23)\nAlist.append(A31)\nAlist.append(A32)\nAlist.append(A33)\nbingolist =[0]*9\n\nN = int(input())\n#print (N)\nfor i in range(N):\n b = int(input())\n print (b)\n for j in range(len(bingolist)):\n if b ==Alist[j]:\n bingolist[j] = 1\n\nif sum(bingolist[0:3])==3 or sum(bingolist[3:6])==3 or sum(bingolist[6:9])==3 or (bingolist[0]+bingolist[3]+bingolist[6])==3 or (bingolist[1]+bingolist[4]+bingolist[7])==3 or (bingolist[2]+bingolist[5]+bingolist[8])==3 or (bingolist[0]+bingolist[4]+bingolist[8])==3 or (bingolist[2]+bingolist[4]+bingolist[6])==3:\n print ("Yes")\nelse :\n print ("No")\n#print (bingolist[0:3])\n#print (bingolist[3:6])\n#print (bingolist[6:9])\n#print (bingolist)', 'A11,A12,A13 = map(int,input().split())\nA21,A22,A23 = map(int,input().split())\nA31,A32,A33 = map(int,input().split())\n\nAlist = []\nAlist.append(A11)\nAlist.append(A12)\nAlist.append(A13)\nAlist.append(A21)\nAlist.append(A22)\nAlist.append(A23)\nAlist.append(A31)\nAlist.append(A32)\nAlist.append(A33)\nbingolist =[0]*9\n\nN = int(input())\n#print (N)\nfor i in range(N):\n b = int(input())\n #print (b)\n for j in range(len(bingolist)):\n if b ==Alist[j]:\n bingolist[j] = 1\n\nif sum(bingolist[0:3])==3 or sum(bingolist[3:6])==3 or sum(bingolist[6:9])==3 or (bingolist[0]+bingolist[3]+bingolist[6])==3 or (bingolist[1]+bingolist[4]+bingolist[7])==3 or (bingolist[2]+bingolist[5]+bingolist[8])==3 or (bingolist[0]+bingolist[4]+bingolist[8])==3 or (bingolist[2]+bingolist[4]+bingolist[6])==3:\n print ("Yes")\nelse :\n print ("No")\n#print (bingolist[0:3])\n#print (bingolist[3:6])\n#print (bingolist[6:9])\n#print (bingolist)']
['Wrong Answer', 'Accepted']
['s852564163', 's039839424']
[9052.0, 9128.0]
[32.0, 29.0]
[908, 909]
p02760
u303739137
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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()\na += input().split()\na += input().split()\nn = int(input())\nb = set([(input()) for i in range(n)])\n\nbingo = False\nif set([a[0], a[1], a[2]]).issubset(b):\n\tbingo = True\nif set([a[3], a[4], a[5]]).issubset(b):\n\tbingo = True\nif set([a[6], a[7], a[8]]).issubset(b):\n\tbingo = True\nif set([a[0], a[3], a[6]]).issubset(b):\n\tbingo = True\nif set([a[1], a[4], a[7]]).issubset(b):\n\tbingo = True\nif set([a[2], a[5], a[8]]).issubset(b):\n\tbingo = True\nif set([a[0], a[4], a[8]]).issubset(b):\n\tbingo = True\nif set([a[2], a[4], a[6]]).issubset(b):\n\tbingo = True\nprint(bingo)', 'a = input().split()\na += input().split()\na += input().split()\nn = int(input())\nb = set([(int)(input()) for i in range(n)])\n\nbingo = False\nif set([a[0], a[1], a[2]).issubset(b):\n\tbingo = True\nif set([a[3], a[4], a[5]).issubset(b):\n\tbingo = True\nif set([a[6], a[7], a[8]).issubset(b):\n\tbingo = True\nif set([a[0], a[3], a[6]).issubset(b):\n\tbingo = True\nif set([a[1], a[4], a[7]).issubset(b):\n\tbingo = True\nif set([a[2], a[5], a[8]).issubset(b):\n\tbingo = True\nif set([a[0], a[4], a[8]).issubset(b):\n\tbingo = True\nif set([a[2], a[4], a[6]).issubset(b):\n\tbingo = True\nprint(bingo)', 'a = input().split()\na += input().split()\na += input().split()\nn = int(input())\nb = set([(input()) for i in range(n)])\n\nbingo = False\nif set([a[0], a[1], a[2]]).issubset(b):\n\tbingo = True\nif set([a[3], a[4], a[5]]).issubset(b):\n\tbingo = True\nif set([a[6], a[7], a[8]]).issubset(b):\n\tbingo = True\nif set([a[0], a[3], a[6]]).issubset(b):\n\tbingo = True\nif set([a[1], a[4], a[7]]).issubset(b):\n\tbingo = True\nif set([a[2], a[5], a[8]]).issubset(b):\n\tbingo = True\nif set([a[0], a[4], a[8]]).issubset(b):\n\tbingo = True\nif set([a[2], a[4], a[6]]).issubset(b):\n\tbingo = True\nif bingo:\n print("Yes")\nprint("No") ', 'a = input().split()\na += input().split()\na += input().split()\nn = int(input())\nb = set([(input()) for i in range(n)])\n\nbingo = False\nif set([a[0], a[1], a[2]]).issubset(b):\n\tbingo = True\nif set([a[3], a[4], a[5]]).issubset(b):\n\tbingo = True\nif set([a[6], a[7], a[8]]).issubset(b):\n\tbingo = True\nif set([a[0], a[3], a[6]]).issubset(b):\n\tbingo = True\nif set([a[1], a[4], a[7]]).issubset(b):\n\tbingo = True\nif set([a[2], a[5], a[8]]).issubset(b):\n\tbingo = True\nif set([a[0], a[4], a[8]]).issubset(b):\n\tbingo = True\nif set([a[2], a[4], a[6]]).issubset(b):\n\tbingo = True\nif bingo:\n print("Yes")\nelse:\n print("No") ']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s675534742', 's914922801', 's980153694', 's036537598']
[3064.0, 2940.0, 3192.0, 3064.0]
[20.0, 17.0, 17.0, 17.0]
[577, 574, 603, 611]
p02760
u304593245
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 = [int(input()) for i in range(N)]\nprint(A)\nprint(N)\nprint(B)\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\nprint(A)\nfor i in range(3):\n if (A[i][0] == A[i][1] == A[i][2] == 0):\n print("Yes")\n exit()\n if (A[0][i] == A[1][i] == A[2][i] == 0):\n print("Yes")\n exit()\nif (A[0][0] == A[1][1] == A[2][2] == 0):\n print("Yes")\n exit()\nelif(A[0][2] == A[1][1] == A[2][0] == 0):\n print("Yes")\n exit()\nprint("No")', '\nA = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\nB = [int(input()) for i in range(N)]\nprint(A)\nprint(N)\nprint(B)\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\n#print(A)\nfor i in range(3):\n if (A[i][0] == A[i][1] == A[i][2] == 0):\n print("Yes")\n exit()\n if (A[0][i] == A[1][i] == A[2][i] == 0):\n print("Yes")\n exit()\nif (A[0][0] == A[1][1] == A[2][2] == 0):\n print("Yes")\n exit()\nelif(A[0][2] == A[1][1] == A[2][0] == 0):\n print("Yes")\n exit()\nprint("No")', '\nA = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\nB = [int(input()) for i in range(N)]\n#print(A)\n#print(N)\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\n#print(A)\nfor i in range(3):\n if (A[i][0] == A[i][1] == A[i][2] == 0):\n print("Yes")\n exit()\n if (A[0][i] == A[1][i] == A[2][i] == 0):\n print("Yes")\n exit()\nif (A[0][0] == A[1][1] == A[2][2] == 0):\n print("Yes")\n exit()\nelif(A[0][2] == A[1][1] == A[2][0] == 0):\n print("Yes")\n exit()\nprint("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s037232490', 's829382654', 's661270593']
[3064.0, 3064.0, 3188.0]
[20.0, 17.0, 19.0]
[607, 608, 611]
p02760
u305534505
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['def main():\n A = [list(map(int, input().split())) for i in range(3)]\n N = int(input())\n b = [int(input()) for i in range(N)]\n \n for i in range(3):\n for j in range(3):\n for k in range(N):\n if (A[i][j] == b(k)):\n A[i][j] = 0\n \n ans = "No"\n for 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"\n if A[0][0]+A[1][1]+A[2][2]==0:\n ans = "Yes"\n if A[0][2]+A[1][1]+A[2][0]==0:\n ans = "Yes"\n print(ans)\nmain()', 'def main():\n A = [list(map(int, input().split())) for i in range(3)]\n N = int(input())\n b = [int(i) for i in range(N)]\n \n for i in range(3):\n for j in range(3):\n for k in range(N):\n if (A[i,j] == b(k)):\n A[i,j] = 0\n \n ans = "No"\n for 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"\n if A[0,0]+A[1,1]+A[2,2]==0: ans = "Yes"\n if A[0,2]+A[1,1]+A[2,0]==0: ans = "Yes"\n print(ans)\nmain()', 'def main():\n A = [list(map(int, input().split())) for i in range(3)]\n N = int(input())\n b = [int(i) for i in range(N)]\n \n for i in range(3):\n for j in range(3):\n for k in range(N):\n if (A[i,j] == b(k)):\n A[i,j] = 0\n \n ans = "No"\n for 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"\n if A[0,0]==A[1,1]==A[2,2]==0: ans = "Yes"\n if A[0,2]==A[1,1]==A[2,0]==0: ans = "Yes"\n print(ans)\nmain()', 'def main():\n A = [list(map(int, input().split())) for i in range(3)]\n N = int(input())\n b = [int(input()) for i in range(N)]\n \n for i in range(3):\n for j in range(3):\n for k in range(N):\n if A[i][j] == b[k]:\n A[i][j] = 0\n \n ans = "No"\n for 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"\n if A[0][0]+A[1][1]+A[2][2]==0:\n ans = "Yes"\n if A[0][2]+A[1][1]+A[2][0]==0:\n ans = "Yes"\n print(ans)\nmain()']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s173157639', 's290579089', 's977369057', 's578368780']
[3064.0, 3064.0, 3064.0, 3064.0]
[17.0, 17.0, 19.0, 17.0]
[590, 530, 538, 588]
p02760
u309120194
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
["A = []\nA.append(input().split())\nA.append(input().split())\nA.append(input().split())\nN = int(input())\nb = [input() for _ in range(N)]\n \nfor i in range(N):\n for j in range(3):\n if b[i] in A[j]: A[j][A[j].index(b[i])] = True\n \nif (A[0] and A[3] and A[6]) or (A[1] and A[4] and A[7]) or (A[2] and A[5] and A[8]) or (A[0] and A[1] and A[2]) or (A[3] and A[4] and A[5]) or (A[6] and A[7] and A[8]) or (A[0] and A[4] and A[8]) or (A[2] and A[4] and A[6]): print('Yes')", "A = []\nA.append(input().split())\nA.append(input().split())\nA.append(input().split())\nN = int(input())\nb = [input() for _ in range(N)]\n \nfor i in range(N):\n for j in range(3):\n if b[i] in A[j]: A[j][A[j].index(b[i])] = True\n \nif (A[0] and A[3] and A[6]) or (A[1] and A[4] and A[7]) or (A[2] and A[5] and A[8]) or (A[0] and A[1] and A[2]) or (A[3] and A[4] and A[5]) or (A[6] and A[7] and A[8]) or (A[0] and A[4] and A[8]) or (A[2] and A[4] and A[6]): print('Yes')\nelse: print('No')", "A.append(input().split())\nA.append(input().split())\nA.append(input().split())\nN = int(input())\nb = [input() for _ in range(N)]\n\n\nfor i in range(N):\n for j in range(3):\n if b[i] in A[j]: A[j][A[j].index(b[i])] = True\n \nif (A[0][0] and A[1][0] and A[2][0]) or (A[0][1] and A[1][1] and A[2][1]) or (A[0][2] and A[1][2] and A[2][2]) or (A[0][0] and A[0][1] and A[0][2]) or (A[1][0] and A[1][1] and A[1][2]) or (A[2][0] and A[2][1] and A[2][2]) or (A[0][0] and A[1][1] and A[2][2]) or (A[0][2] and A[1][1] and A[2][0]): print('Yes')\nelse: print('No')", "A = []\nA += input().split()\nA += input().split()\nA+= input().split()\nN = int(input())\nb = [input() for _ in range(N)]\n\nfor i in range(N):\n if b[i] in A:\n A[A.index(b[i])] = '.'\n \nif (A[0] == '.' and A[3] == '.' and A[6] == '.') or (A[1] == '.' and A[4] == '.' and A[7] == '.')\nor (A[2] == '.' and A[5] == '.' and A[8] == '.') or (A[0] == '.' and A[1] == '.' and A[2] == '.')\nor (A[3] == '.' and A[4] == '.' and A[5] == '.') or (A[6] == '.' and A[7] == '.' and A[8] == '.')\nor (A[0] == '.' and A[4] == '.' and A[8] == '.') or (A[2] == '.' and A[4] == '.' and A[6] == '.'):\n print('Yes')\nelse: print('No')", "A = []\nA.append(input().split())\nA.append(input().split())\nA.append(input().split())\nN = int(input())\nb = [input() for _ in range(N)]\n \n\nfor i in range(N):\n for j in range(3):\n if b[i] in A[j]: A[j][A[j].index(b[i])] = True\n\nif (A[0][0]==True and A[1][0]==True and A[2][0]==True) or (A[0][1]==True and A[1][1]==True and A[2][1]==True) or (A[0][2]==True and A[1][2]==True and A[2][2]==True) or (A[0][0]==True and A[0][1]==True and A[0][2]==True) or (A[1][0]==True and A[1][1]==True and A[1][2]==True) or (A[2][0]==True and A[2][1]==True and A[2][2]==True) or (A[0][0]==True and A[1][1]==True and A[2][2]==True) or (A[0][2]==True and A[1][1]==True and A[2][0]==True): print('Yes')\nelse: print('No')"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s118847669', 's291529219', 's863636784', 's921522408', 's547348690']
[9248.0, 9156.0, 9120.0, 9064.0, 9144.0]
[28.0, 24.0, 23.0, 27.0, 27.0]
[469, 487, 582, 611, 730]
p02760
u311176548
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
["A=[]\nfor i in range(0,3):\n k=list(map(int,input().split(' ')))\n A.append(k)\nn=int(input())\nb=[]\nfor i in range(0,n+1):\n b.append(int(input()))\nfor i in range(0,2):\n if (A[1][i] and A[2][i] and A[0][i]) in b:\n print('Yes')\n quit()\n if (A[i][1] and A[i][2] and A[i][0]) in b:\n print('Yes')\n quit()\nif (A[0][0] and A[2][2] and A[1][1]) in b:\n print('Yes')\n quit()\nif (A[0][2] and A[2][0] and A[1][1]) in b:\n print('Yes')\n quit()\nprint('No')", "A=[]\nfor i in range(0,3):\n k=list(map(int,input().split(' ')))\n A.append(k)\nn=int(input())\nb=[]\nfor i in range(0,n):\n b.append(int(input()))\nfor i in range(0,3):\n if (A[1][i] in b and A[2][i] in b and A[0][i] in b):\n print('Yes')\n quit()\n if (A[i][1] in b and A[i][2] in b and A[i][0] in b):\n print('Yes')\n quit()\nif (A[0][0] in b and A[2][2] in b and A[1][1] in b):\n print('Yes')\n quit()\nif (A[0][2] in b and A[2][0] in b and A[1][1] in b):\n print('Yes')\n quit()\nprint('No')"]
['Runtime Error', 'Accepted']
['s503239359', 's106417637']
[3192.0, 3064.0]
[18.0, 17.0]
[492, 530]
p02760
u315354220
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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_yoko1 = list(map(int, input().split()))\nA_list_yoko2 = list(map(int, input().split()))\nA_list_yoko3 = list(map(int, input().split()))\nN = int(input())\nB_list = []\nfor i in range(N):\n B_list.append(int(input()))\n\nA_list_tate1 = []\nA_list_tate2 = []\nA_list_tate3 = []\nA_list_naname1 = []\nA_list_naname2 = []\n\nA_list_tate1.append(A_list_yoko1[0])\nA_list_tate1.append(A_list_yoko2[0])\nA_list_tate1.append(A_list_yoko3[0])\nA_list_tate2.append(A_list_yoko1[1])\nA_list_tate2.append(A_list_yoko2[1])\nA_list_tate2.append(A_list_yoko3[1])\nA_list_tate3.append(A_list_yoko1[2])\nA_list_tate3.append(A_list_yoko2[2])\nA_list_tate3.append(A_list_yoko3[2])\nA_list_naname1.append(A_list_yoko1[0])\nA_list_naname1.append(A_list_yoko2[1])\nA_list_naname1.append(A_list_yoko3[2])\nA_list_naname2.append(A_list_yoko1[2])\nA_list_naname2.append(A_list_yoko2[1])\nA_list_naname2.append(A_list_yoko3[0])\n\nA_list_yoko1_c = []\nA_list_yoko2_c = []\nA_list_yoko3_c = []\nA_list_tate1_c = []\nA_list_tate2_c = []\nA_list_tate3_c = []\nA_list_naname1_c = []\nA_list_naname2_c = []\nfor i in B_list:\n if i in A_list_yoko1:\n A_list_yoko1_c.append(A_list_yoko1.index(i))\n if i in A_list_yoko2:\n A_list_yoko2_c.append(A_list_yoko2.index(i))\n if i in A_list_yoko3:\n A_list_yoko3_c.append(A_list_yoko3.index(i))\n if i in A_list_tate1:\n A_list_tate1_c.append(A_list_tate1.index(i))\n if i in A_list_tate2:\n A_list_tate2_c.append(A_list_tate2.index(i))\n if i in A_list_tate3:\n A_list_tate3_c.append(A_list_tate3.index(i))\n if i in A_list_naname1:\n A_list_naname1_c.append(A_list_naname1.index(i))\n if i in A_list_naname2:\n A_list_naname2_c.append(A_list_naname2.index(i))\n\nif list(A_list_naname1_c) == 3 or list(A_list_naname2_c) == 3 or list(A_list_tate1_c) == 3 or list(A_list_tate2_c) == 3 or list(A_list_tate3_c) == 3 or list(A_list_yoko1_c) == 3 or list(A_list_yoko2_c) == 3 or list(A_list_yoko3_c) == 3:\n print("Yes")\nelse:\n print("No")\n\n', 'A_list_yoko1 = list(map(int, input().split()))\nA_list_yoko2 = list(map(int, input().split()))\nA_list_yoko3 = list(map(int, input().split()))\nN = int(input())\nB_list = []\nfor i in range(N):\n B_list.append(int(input()))\n\nA_list_tate1 = []\nA_list_tate2 = []\nA_list_tate3 = []\nA_list_naname1 = []\nA_list_naname2 = []\n\nA_list_tate1.append(A_list_yoko1[0])\nA_list_tate1.append(A_list_yoko2[0])\nA_list_tate1.append(A_list_yoko3[0])\nA_list_tate2.append(A_list_yoko1[1])\nA_list_tate2.append(A_list_yoko2[1])\nA_list_tate2.append(A_list_yoko3[1])\nA_list_tate3.append(A_list_yoko1[2])\nA_list_tate3.append(A_list_yoko2[2])\nA_list_tate3.append(A_list_yoko3[2])\nA_list_naname1.append(A_list_yoko1[0])\nA_list_naname1.append(A_list_yoko2[1])\nA_list_naname1.append(A_list_yoko3[2])\nA_list_naname2.append(A_list_yoko1[2])\nA_list_naname2.append(A_list_yoko2[1])\nA_list_naname2.append(A_list_yoko3[0])\n\nA_list_yoko1_c = []\nA_list_yoko2_c = []\nA_list_yoko3_c = []\nA_list_tate1_c = []\nA_list_tate2_c = []\nA_list_tate3_c = []\nA_list_naname1_c = []\nA_list_naname2_c = []\nfor i in B_list:\n if i in A_list_yoko1:\n A_list_yoko1_c.append(A_list_yoko1.index(i))\n if i in A_list_yoko2:\n A_list_yoko2_c.append(A_list_yoko2.index(i))\n if i in A_list_yoko3:\n A_list_yoko3_c.append(A_list_yoko3.index(i))\n if i in A_list_tate1:\n A_list_tate1_c.append(A_list_tate1.index(i))\n if i in A_list_tate2:\n A_list_tate2_c.append(A_list_tate2.index(i))\n if i in A_list_tate3:\n A_list_tate3_c.append(A_list_tate3.index(i))\n if i in A_list_naname1:\n A_list_naname1_c.append(A_list_naname1.index(i))\n if i in A_list_naname2:\n A_list_naname2_c.append(A_list_naname2.index(i))\n\nif len(A_list_naname1_c) == 3 or len(A_list_naname2_c) == 3 or len(A_list_tate1_c) == 3 or len(A_list_tate2_c) == 3 or len(A_list_tate3_c) == 3 or len(A_list_yoko1_c) == 3 or len(A_list_yoko2_c) == 3 or len(A_list_yoko3_c) == 3:\n print("Yes")\nelse:\n print("No")\n\n']
['Wrong Answer', 'Accepted']
['s638629700', 's768150009']
[3188.0, 3188.0]
[23.0, 18.0]
[1988, 1980]
p02760
u322099043
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\nimport sys\n\ninput = sys.stdin.readline\n\n\ndef main():\n bingo = [list(map(int, input().split())) for _ in range(3)]\n for _ in range(int(input())):\n n = int(input())\n for i in range(3):\n for j in range(3):\n if bingo[i][j] == n:\n bingo[i][j] = True\n\n ret = False\n for i in range(3):\n is_break = False\n for j in range(3):\n if bingo[i][j] is not True:\n is_break = True\n break\n if not is_break:\n ret = True\n break\n\n if ret is True:\n print('YES')\n return\n\n for i in range(3):\n is_break = False\n for j in range(3):\n if bingo[j][i] is not True:\n is_break = True\n break\n if not is_break:\n ret = True\n break\n\n if ret is True:\n print('YES')\n return\n\n if bingo[0][0] is True and bingo[1][1] is True and bingo[2][2] is True:\n print('YES')\n return\n\n if bingo[0][2] is True and bingo[1][1] is True and bingo[2][0] is True:\n print('YES')\n return\n\n print('NO')\n\n\nif __name__ == '__main__':\n main()\n", "import math\nimport sys\n\ninput = sys.stdin.readline\n\n\ndef main():\n bingo = [list(map(int, input().split())) for _ in range(3)]\n for _ in range(int(input())):\n n = int(input())\n for i in range(3):\n for j in range(3):\n if bingo[i][j] == n:\n bingo[i][j] = True\n\n ret = False\n for i in range(3):\n is_break = False\n for j in range(3):\n if bingo[i][j] is not True:\n is_break = True\n break\n if not is_break:\n ret = True\n break\n\n if ret is True:\n print('Yes')\n return\n\n for i in range(3):\n is_break = False\n for j in range(3):\n if bingo[j][i] is not True:\n is_break = True\n break\n if not is_break:\n ret = True\n break\n\n if ret is True:\n print('Yes')\n return\n\n if bingo[0][0] is True and bingo[1][1] is True and bingo[2][2] is True:\n print('Yes')\n return\n\n if bingo[0][2] is True and bingo[1][1] is True and bingo[2][0] is True:\n print('Yes')\n return\n\n print('No')\n\n\nif __name__ == '__main__':\n main()\n"]
['Wrong Answer', 'Accepted']
['s136517773', 's507149907']
[3064.0, 3064.0]
[18.0, 17.0]
[1207, 1207]
p02760
u322297639
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\ndef main():\n a_list = np.array([list(map(int, input().split())) for _ in range(3)])\n n = int(input())\n b_list = [int(input()) for _ in range(n)]\n for b in b_list:\n tmp = np.argwhere(a_list == b).tolist()\n if tmp:\n a_list[tmp[0][0], tmp[0][1]] = 0\n print(a_list)\n for i in range(3):\n \n if all([a == 0 for a in a_list[i]]):\n print("Yes")\n return\n \n for i in range(3):\n if all([a_list[j][i] == 0 for j in range(3)]):\n print("Yes")\n return\n \n if a_list[0][0] == a_list[1][1] == a_list[2][2] == 0:\n print("Yes")\n return\n if a_list[0][2] == a_list[1][1] == a_list[2][0] == 0:\n print("Yes")\n return\n print("No")\nmain()\n\n\n\n\n', 'import numpy as np\ndef main():\n a_list = np.array([list(map(int, input().split())) for _ in range(3)])\n n = int(input())\n b_list = [int(input()) for _ in range(n)]\n for b in b_list:\n tmp = np.argwhere(a_list == b).tolist()\n if tmp:\n a_list[tmp[0][0], tmp[0][1]] = 0\n for i in range(3):\n \n if all([a == 0 for a in a_list[i]]):\n print("Yes")\n return\n \n for i in range(3):\n if all([a_list[j][i] == 0 for j in range(3)]):\n print("Yes")\n return\n \n if a_list[0][0] == a_list[1][1] == a_list[2][2] == 0:\n print("Yes")\n return\n if a_list[0][2] == a_list[1][1] == a_list[2][0] == 0:\n print("Yes")\n return\n print("No")\nmain()\n']
['Wrong Answer', 'Accepted']
['s233883674', 's440567694']
[12924.0, 21012.0]
[164.0, 315.0]
[810, 788]
p02760
u323045245
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 number in b: \n for i in range(3):\n if number in a[i]: \n a[i][a[i].index(number)] = 0 \n\nif a[0][0] == a[1][1] == a[2][2] == 0 or a[2][0] == a[1][1] == a[0][2] == 0:\n print('Yes')\u3000\nelse:\n for i in range(3):\n if a[i][0] == a[i][1] == a[i][2] == 0:\n print('Yes') \n break\n elif a[0][i] == a[1][i] == a[2][i] == 0:\n print('Yes') \n break\n else:\n print('No')\n", "a = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\nb = [int(input()) for i in range(n)]\nfor number in b:\n for i in range(3):\n if number in a[i]:\n a[i][a[i].index(number)] = 0\nif a[0][0] == a[1][1] == a[2][2] == 0 or a[2][0] == a[1][1] == a[0][2] == 0:\n print('Yes')\nelse:\n for i in range(3):\n if a[i][0] == a[i][1] == a[i][2] == 0:\n print('Yes')\n break\n elif a[0][i] == a[1][i] == a[2][i] == 0:\n print('Yes')\n break\n \telse:\n \tprint('No')\n", 'bingo = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nout = [int(input()) for _ in range(N)]\n\nfor i in out: \n for j in range(3):\n if i in bingo[j]: \n bingo[j][bingo[j].index(i)] = 0\n\nif bingo[0][0] == bingo[1][1] == bingo[2][2] == 0 or bingo[0][2] == bingo[1][1] == bingo[2][0] == 0:\n print("Yes")\n\nelse :\n for i in range(3):\n if bingo[i][0] == bingo[i][1] == bingo[i][2] == 0:\n print("Yes")\n break\n elif bingo[0][i] == bingo[1][i] == bingo[2][i] == 0:\n print("Yes")\n break\n else:\n print("No")\n \n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s633166793', 's762720610', 's232526027']
[3064.0, 3064.0, 3064.0]
[18.0, 17.0, 17.0]
[830, 554, 686]
p02760
u329049771
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 = [[0]*3] * 3\n\n# a = [[i for i in map(int, input().split())] for j in range(3)]\n# n = int(input())\n\na = [[66, 85, 92], [56, 37, 86], [7, 52, 23]]\nn = 9\nB = [30, 85, 52, 48,89, 92, 26, 5, 67]\n\nd = [[0] * 3 for i in range(3)]\nfor i in range(n):\n # b = int(input())\n b = B[i]\n for j in range(3):\n for k in range(3):\n if a[j][k] == b:\n d[j][k] = 1\n# if ans[0][0] + ans[0][1] + ans[0][2] == 3 or ans[1][0] + ans[1][1] + ans[1][2] == 3 or ans[2][0] + ans[2][1] + ans[2][2] == 3 or ans[0][0] + ans[1][0] + ans[2][0] == 3 or ans[0][1] + ans[1][1] + ans[2][1] == 3 or ans[0][2] + ans[1][2] + ans[2][2] == 3 or ans[0][0] + ans[1][1] + ans[2][2] == 3 or ans[0][2] + ans[1][1] + ans[2][0] == 3:\nflag = False\nfor i in range(3):\n cnt = 0\n for j in range(3):\n cnt += d[i][j]\n if cnt == 3:\n flag = True\n\nfor i in range(3):\n cnt = 0\n for j in range(3):\n cnt += d[j][i]\n if cnt == 3:\n flag = True\n\ncnt = 0\nfor i in range(3):\n cnt += d[i][i]\n if cnt == 3:\n flag = True\n\ncnt = 0\nfor i in range(3):\n cnt += d[i][2-i]\n if cnt == 3:\n flag = True\nprint("Yes") if flag == True else print(\'No\')', 'a = [[i for i in map(int, input().split())] for j in range(3)]\nn = int(input())\n\n# a = [[66, 85, 92], [56, 37, 86], [7, 52, 23]]\n# n = 9\n# B = [30, 85, 52, 48,89, 92, 26, 5, 67]\n\nd = [[0] * 3 for i in range(3)]\nfor i in range(n):\n b = int(input())\n # b = B[i]\n for j in range(3):\n for k in range(3):\n if a[j][k] == b:\n d[j][k] = 1\n\nflag = False\n\n\nfor i in range(3):\n cnt = 0\n for j in range(3):\n cnt += d[i][j]\n if cnt == 3:\n flag = True\n\n# vertical\nfor i in range(3):\n cnt = 0\n for j in range(3):\n cnt += d[j][i]\n if cnt == 3:\n flag = True\n\n# diagonal 1\ncnt = 0\nfor i in range(3):\n cnt += d[i][i]\n if cnt == 3:\n flag = True\n\n# diagonal 2\ncnt = 0\nfor i in range(3):\n cnt += d[i][2-i]\n if cnt == 3:\n flag = True\nprint("Yes") if flag == True else print(\'No\')']
['Wrong Answer', 'Accepted']
['s328568100', 's298865246']
[3064.0, 3064.0]
[17.0, 17.0]
[1187, 883]
p02760
u333546629
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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=[int(input()) for _ in range(N)]\nA=[a0,a1,a2,a3,a4,a5,a6,a7,a8]\n\nfor i in range(N):\n for p in range(9):\n if b[i]=A[p]:\n A[p]=0\n \nif A[0]==A[1]==A[2]==0 or A[3]==A[4]==A[5]==0 or A[6]==A[7]==A[8]==0 or A[0]==A[3]==A[6]==0 0r A[1]==A[4]==A[7]==0 or A[2]==A[5]==A[8]==0 or A[0]==A[4]==A[8]==0 or A[2]==A[4]==A[6]==0:\n print("Yes")\nelse:\n print("No")\n', '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 _ in range(N)]\nA=[a0,a1,a2,a3,a4,a5,a6,a7,a8]\n\nfor i in range(N):\n for p in range(9):\n if b[i]=A[p]:\n A[p]=0\n \nif A[0]==A[1]==A[2]==0 or A[3]==A[4]==A[5]==0 or A[6]==A[7]==A[8]==0 or A[0]==A[3]==A[6]==0 or A[1]==A[4]==A[7]==0 or A[2]==A[5]==A[8]==0 or A[0]==A[4]==A[8]==0 or A[2]==A[4]==A[6]==0:\n print("Yes")\nelse:\n print("No")\n', '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 _ in range(N)]\nA=[a0,a1,a2,a3,a4,a5,a6,a7,a8]\n\nfor i in range(N):\n for p in range(9):\n if b[i]=A[p]:\n A=0\n \nif A[0]==A[1]==A[2]==0 or A[3]==A[4]==A[5]==0 or A[6]==A[7]==A[8]==0 or A[0]==A[3]==A[6]==0 0r A[1]==A[4]==A[7]==0 or A[2]==A[5]==A[8]==0 or A[0]==A[4]==A[8]==0 or A[2]==A[4]==A[6]==0:\n print("Yes")\nelse:\n print("No")', '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 _ in range(N)]\nA=[a0,a1,a2,a3,a4,a5,a6,a7,a8]\n\nfor i in range(N):\n for p in range(9):\n if b[i]==A[p]:\n A[p]=0\n \nif A[0]==A[1]==A[2]==0 or A[3]==A[4]==A[5]==0 or A[6]==A[7]==A[8]==0 or A[0]==A[3]==A[6]==0 or A[1]==A[4]==A[7]==0 or A[2]==A[5]==A[8]==0 or A[0]==A[4]==A[8]==0 or A[2]==A[4]==A[6]==0:\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s456174713', 's598328341', 's824435489', 's598971488']
[2940.0, 3060.0, 2940.0, 3192.0]
[17.0, 17.0, 17.0, 17.0]
[478, 478, 474, 479]
p02760
u333700164
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 [0]*3]\nn=int(input())\nb=[int(input()) for _ in range(n)]\n\nimport numpy as np\n\nfor i in range(3):\n a[i]=[1 if x in b else 0 for x in a[i]] \n\ns_1=max(np.sum(a,axis=0))\ns_2=max(np.sum(a,axis=1))\ns_3=a[0][0]+a[1][1]+a[2][2]\ns_4=a[0][2]+a[1][1]+a[2][0]\n\nif max(s_1,s_2,s_3,s_4)==3:\n print("Yes")\nelse:\n print("No")\nprint(a)', 'a=[list(map(int,input().split())) for _ in [0]*3]\nn=int(input())\nb=[int(input()) for _ in range(n)]\n\nimport numpy as np\n\nfor i in range(3):\n a[i]=[1 if x in b else 0 for x in a[i]] \n\ns_1=max(np.sum(a,axis=0))\ns_2=max(np.sum(a,axis=1))\ns_3=a[0][0]+a[1][1]+a[2][2]\ns_4=a[0][2]+a[1][1]+a[2][0]\n\nif max(s_1,s_2,s_3,s_4)==3:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s511894529', 's854431397']
[27192.0, 30072.0]
[118.0, 342.0]
[366, 357]
p02760
u334983390
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
["A = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nB = []\nfor j in range(N):\n b = int(input())\n B.append(b)\nA = np.array(A)\nB = np.array(B)\nboolean_matrix = np.isin(A, B)\nif boolean_matrix.sum(axis=1).max() >= 3 or boolean_matrix.sum(axis=0).max() >= 3 or np.diag(boolean_matrix).sum() >= 3 or np.diag(np.fliplr(boolean_matrix)).sum() >= 3:\n print('Yes')\nelse:\n print('No')", "A = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nB = []\nfor j in range(N):\n b = int(input())\n B.append(b)\nA = np.array(A)\nB = np.array(B)\nboolean_matrix = np.isin(A, B)\nif boolean_matrix.sum(axis=1).max() >= 3 or \\\nboolean_matrix.sum(axis=0).max() >= 3 or \\\nnp.diag(boolean_matrix).sum() >= 3 or \\\nnp.diag(np.fliplr(boolean_matrix)).sum() >= 3:\n print('Yes')\nelse:\n print('No')", "A = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nB = []\nfor j in range(N):\n b = int(input())\n B.append(b)\nA = np.array(A)\nB = np.array(B)\nboolean_matrix = np.isin(A, B)\nif boolean_matrix.sum(axis=1).max() >= 3 or \\\n boolean_matrix.sum(axis=0).max() >= 3 or \\\n np.diag(boolean_matrix).sum() >= 3 or \\\n np.diag(np.fliplr(boolean_matrix)).sum() >= 3:\n print('Yes')\nelse:\n print('No')", "import numpy as np\nA = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nB = []\nfor j in range(N):\n b = int(input())\n B.append(b)\nA = np.array(A)\nB = np.array(B)\nboolean_matrix = np.isin(A, B)\nif boolean_matrix.sum(axis=1).max() >= 3 or \\\n boolean_matrix.sum(axis=0).max() >= 3 or \\\n np.diag(boolean_matrix).sum() >= 3 or \\\n np.diag(np.fliplr(boolean_matrix)).sum() >= 3:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s456515653', 's695912770', 's722884506', 's077260402']
[9116.0, 9128.0, 9132.0, 27120.0]
[24.0, 22.0, 23.0, 115.0]
[407, 413, 422, 441]
p02760
u335278042
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 collections as c\nimport sys\ninput = sys.stdin.readline\nip = lambda : map(int, input().split())\nmod = 10**9+7\n# ##############\nA = []\nfor i in range(3):\n A.append(list(ip()))\nN = int(input())\nfor i in range(N):\n b = int(input())\n for j in range(3):\n for k in range(3):\n if A[j][k] == b:\n A[j][k] = 0\nprint(A)\nif sum(A[0]) == 0 or sum(A[1]) == 0 or sum(A[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[0][2] + A[1][1] + A[2][0] == 0):\n print('Yes')\nelse:print('No')", "import collections as c\nimport sys\ninput = sys.stdin.readline\nip = lambda : map(int, input().split())\nmod = 10**9+7\n# ##############\nA = []\nfor i in range(3):\n A.append(list(ip()))\nN = int(input())\nfor i in range(N):\n b = int(input())\n for j in range(3):\n for k in range(3):\n if A[j][k] == b:\n A[j][k] = 0\n# print(A)\nif sum(A[0]) == 0 or sum(A[1]) == 0 or sum(A[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[0][2] + A[1][1] + A[2][0] == 0):\n print('Yes')\nelse:print('No')"]
['Wrong Answer', 'Accepted']
['s650662069', 's448217809']
[3316.0, 3444.0]
[21.0, 30.0]
[635, 637]
p02760
u335281728
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['A = [list(map(int,input().split())) for i in range(3)]\nN = int(input())\nB = [list(map(int,input().split())) for i in range(N)]\n\nfor i in range(3):\n for j in range(3):\n for k in range(N):\n if A[i][j] in B[k]:\n A[i][j] = 0\nif A[0][0] == 0 and A[0][1] == 0 and A[0][2] == 0 or A[1][0] == 0 and A[1][1] == 0 and A[1][2] == 0 or A[2][0] == 0 and A[2][1] == 0 and A[2][2] == 0 or A[0][0] == 0 and A[1][0] == 0 and A[2][0] == 0 or A[0][1] == 0 and A[1][1] == 0 and A[2][1] == 0 or A[0][2] == 0 and A[1][2] == 0 and A[2][2] == 0 or A[0][0] == 0 and A[1][1] == 0 and A[2][2] == 0 or A[0][2] == 0 and A[1][1] == 0 and A[0][2] == 0:\n print("Yes")\nelse:\n print("No")\nprint(B)', 'A = [list(map(int,input().split())) for i in range(3)]\nN = int(input())\nB = [list(map(int,input())) for i in range(N)]\n\nfor i in range(3):\n for j in range(3):\n if A[i][j] in B:\n A[i][j] = 0\nif A[0][0] == 0 and A[0][1] == 0 and A[0][2] == 0 or A[1][0] == 0 and A[1][1] == 0 and A[1][2] == 0 or A[2][0] == 0 and A[2][1] == 0 and A[2][2] == 0 or A[0][0] == 0 and A[1][0] == 0 and A[2][0] == 0 or A[0][1] == 0 and A[1][1] == 0 and A[2][1] == 0 or A[0][2] == 0 and A[1][2] == 0 and A[2][2] == 0 or A[0][0] == 0 and A[1][1] == 0 and A[2][2] == 0 or A[0][2] == 0 and A[1][1] == 0 and A[0][2] == 0:\n print("Yes")\nelse:\n print("No")', 'A = [list(map(int,input().split())) for i in range(3)]\nN = int(input())\nB = [list(map(int,input().split())) for i in range(N)]\n\nfor i in range(3):\n for j in range(3):\n for k in range(N):\n if A[i][j] in B[k]:\n A[i][j] = 0\nif A[0][0] == 0 and A[0][1] == 0 and A[0][2] == 0 or A[1][0] == 0 and A[1][1] == 0 and A[1][2] == 0 or A[2][0] == 0 and A[2][1] == 0 and A[2][2] == 0 or A[0][0] == 0 and A[1][0] == 0 and A[2][0] == 0 or A[0][1] == 0 and A[1][1] == 0 and A[2][1] == 0 or A[0][2] == 0 and A[1][2] == 0 and A[2][2] == 0 or A[0][0] == 0 and A[1][1] == 0 and A[2][2] == 0 or A[0][2] == 0 and A[1][1] == 0 and A[0][2] == 0:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s281033148', 's344457546', 's762204524']
[3064.0, 3064.0, 3064.0]
[18.0, 18.0, 17.0]
[705, 650, 696]
p02760
u342062419
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 = [[input().split() for l in range(3)]]\na = np.ravel(a)\nn = int(input())\nb = [input() for i in range(n)]\nans = 'No'\n\ndef check(a,b):\n return set(a).issubset(b)\n\nfor i in range(3):\n print(a[i*3:(i*3)+2])\n if check(a[i*3:(i*3)+3],b) or check(a[i:i+6:3],b) or check(a[0:8:4],b) or check(a[2:6:2],b):\n ans = 'Yes'\n\nprint(ans)", "import numpy as np\na = [list(input()) for i in range(3)]\na = np.ravel(a)\nn = int(input())\nb = [input() for i in range(n)]\n\nans = 'No'\ndef check(a,b):\n return set(a).issubset(b)\n\nfor i in range(3):\n if check(a[i*3:i*3+2],b) or check(a[i:i+6:3],b) or check(a[0:8:4],b) or check(a[2:6:2],b):\n ans = 'Yes'\n\nprint(ans)", "# ABC157 B\nimport numpy as np\na = [list(input()) for i in range(3)]\na = np.ravel(a)\nn = int(input())\nb = [input() for i in range(n)]\nans = 'No'\nfor i in b:\n for j in range(3):\n if i in a[j*3:j*3+2] or i in a[j:j+6:3]:\n ans = 'Yes'\n if i in a[0:8:4] or i in a[2:6:2]:\n ans = 'Yes'\nprint(ans)", "import numpy as np\na = [list(input()) for i in range(3)]\na = np.ravel(a)\nn = int(input())\nb = [input() for i in range(n)]\nans = 'No'\nfor i in range(3):\n if b in a[i*3:i*3+2] or b in a[i:i+6:3] or b in a[0:8:4] or b in a[2:6:2]:\n ans = 'Yes'\nprint(ans)\n", "import numpy as np\na = [list(input()) for i in range(3)]\na = np.ravel(a)\nn = int(input())\nb = [input() for i in range(n)]\nans = 'No'\nfor i in b:\n for j in range(3):\n if i in a[j*3:j*3+2] or i in a[j:j+6:3]:\n ans = 'Yes'\nif b in a[0:8:4] or b in a[2:6:2]:\n ans = 'Yes'\nprint(ans)\n", "import numpy as np\na = [list(input()) for i in range(3)]\na = np.ravel(a)\nn = int(input())\nb = [input() for i in range(n)]\n\nans = 'No'\ndef check(a,b):\n return set(a).issubset(b)\n\nfor i in range(3):\n if check(a[j*3:j*3+2],b) or check(a[j:j+6:3],b) or check(a[0:8:4],b) or check(a[2:6:2],b):\n ans = 'Yes'\n\nprint(ans)", "import numpy as np\na = [list(input()) for i in range(3)]\na = np.ravel(a)\nn = int(input())\nb = [input() for i in range(n)]\nans = 'No'\nfor i in range(3):\n if b == a[i*3:i*3+2] or b == a[i:i+6:3] or b == a[0:8:4] or b == a[2:6:2]:\n ans = 'Yes'\nprint(ans)", "# ABC157 B\nimport numpy as np\na = [list(input()) for i in range(3)]\na = np.ravel(a)\nn = int(input())\nb = [input() for i in range(n)]\nans = 'Yes'\nfor i in range(3):\n if b not in a[i*3:i*3+2] or b not in a[i:i+6:3] or b not in a[0:8:4] or b not in a[2:6:2]:\n ans = 'No'\nprint(ans)", "# ABC157 B\nimport numpy as np\na = [[input().split() for l in range(3)]]\na = np.ravel(a)\nn = int(input())\nb = [input() for i in range(n)]\nans = 'No'\n\ndef check(a,b):\n return set(a).issubset(b)\n\nfor i in range(3):\n if check(a[i*3:(i*3)+3],b) or check(a[i:i+7:3],b) or check(a[0:9:4],b) or check(a[2:7:2],b):\n ans = 'Yes'\n\nprint(ans)"]
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s171863460', 's216577316', 's235360310', 's320493775', 's351421455', 's500460392', 's811816856', 's942063966', 's565018210']
[26960.0, 27152.0, 26784.0, 27380.0, 27028.0, 27200.0, 26568.0, 27260.0, 27192.0]
[116.0, 113.0, 118.0, 115.0, 122.0, 113.0, 120.0, 127.0, 119.0]
[358, 326, 321, 262, 303, 326, 261, 288, 343]
p02760
u345483150
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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(x) for x in input().split()] for i in range(3)]\nn=int(input())\nb=list(map(int,input().split()))\nfor i in b:\n for j in a:\n if i==j:\n j=0\nif a[0][0]==a[0][1]==a[0][2] or a[1][0]==a[1][1]==a[1][2] or a[2][0]==a[2][1]==a[2][2] or a[0][0]==a[1][0]==a[2][0] or a[0][1]==a[1][1]==a[2][1] or a[0][2]==a[1][2]==a[2][2] or a[0][0]==a[1][1]==a[2][2] or a[2][0]==a[1][1]==a[0][2]:\n print('Yes')\nelse:\n print('No')\n ", "A=[]\nfor i in range(3):\n A.append(list(map(int,input().split())))\nN=int(input())\nfor i in range(N):\n b=int(input())\n for j in range(3):\n for k in range(3):\n if A[j][k]==b:\n A[j][k]=0\n \nflag=False\nfor i in range(3):\n if A[i][:]==[0,0,0]:\n flag=True\n elif A[0][i]==0 and A[1][i]==0 and A[2][i]==0:\n flag=True\n elif A[1][1]==0 and A[0][2]==0 and A[2][0]==0:\n flag=True\n else A[0][0]==0 and A[1][1]==0 and A[2][2]==0:\n flag=True\nif flag:\n print('Yes')\nelse:\n print('No')", "A=[[int(x) for x in inout().split()]for i in range(3)]\nn=int(input())\nb=list(map(int,input().split()))\nfor i in range(3):\n if A[i][0] in b and A[i][1] in b and A[i][2] in b:\n print('Yes')\n exit()\n elif A[0][i] in b and A[1][i] in b and A[2][i] in b:\n print('Yes')\n exit()\nif A[0][0] in b and A[1][1] in b and A[2][2] in b:\n print('Yes')\n exit()\nif A[2][0] in b and A[1][1] in b and A[0][2] in b:\n print('Yes')\n exit()\nprint('No')", "A=[[int(x) for x in input().split()]for i in range(3)]\nn=int(input())\nb=list(map(int,input().split()))\nfor i in range(3):\n if A[i][0] in b and A[i][1] in b and A[i][2] in b:\n print('Yes')\n exit()\nfor i in range(3):\n if A[0][i] in b and A[1][i] in b and A[2][i] in b:\n print('Yes')\n exit()\nif A[0][0] in b and A[1][1] in b and A[2][2] in b:\n print('Yes')\n exit()\nif A[2][0] in b and A[1][1] in b and A[0][2] in b:\n print('Yes')\n exit()\nprint('No')", "A=[[int(x) for x in input().split()]for i in range(3)]\nN = int(input())\nb=list(map(int,input().split()))\n \nfor i in range(3):\n if A[i][0] in b and A[i][1] in b and A[i][2] in b:\n print('Yes')\n exit()\nfor i in range(3):\n if A[0][i] in b and A[1][i] in b and A[2][i] in b:\n print('Yes')\n exit()\nif A[0][0] in b and A[1][1] in b and A[2][2] in b:\n print('Yes')\n exit()\nif A[2][0] in b and A[1][1] in b and A[0][2] in b:\n print('Yes')\n exit() \nprint('No')", "a=[[int(x) for x in input().split()] for i in range(3)]\nn=int(input())\nb=list(map(int,input().split()))\nfor i in b:\n for j in a:\n if i==j:\n j=0\nif a[0][0]==a[0][1]==a[0][2]==a[0][0] or a[1][0]==a[1][1]==a[1][2]==a[1][0] or a[2][0]==a[2][1]==a[2][2]==a[2][0] or a[0][0]==a[1][0]==a[2][0]==a[0][0] or a[0][1]==a[1][1]==a[2][1]==a[0][1] or a[0][2]==a[1][2]==a[2][2]==a[0][2] or a[0][0]==a[1][1]==a[2][2]==a[0][0] or a[2][0]==a[1][1]==a[0][2]== a[2][0]:\n print('Yes')\nelse:\n print('No')", "A=[[int(x) for x in input().split()]for i in range(3)]\nn=int(input())\nb=list(map(int,input().split()))\nfor i in range(3):\n if A[i][0] in b and A[i][1] in b and A[i][2] in b:\n print('Yes')\n exit()\n elif A[0][i] in b and A[1][i] in b and A[2][i] in b:\n print('Yes')\n exit()\nif A[0][0] in b and A[1][1] in b and A[2][2] in b:\n print('Yes')\n exit()\nif A[2][0] in b and A[1][1] in b and A[0][2] in b:\n print('Yes')\n exit()\nprint('No')", "A=[[int(x) for x in input().split()]for i in range(3)]\nN = int(input())\nb = []\nfor i in range(N):\n b.append(int(input()))\n \nfor i in range(3):\n if A[i][0] in b and A[i][1] in b and A[i][2] in b:\n print('Yes')\n exit()\nfor i in range(3):\n if A[0][i] in b and A[1][i] in b and A[2][i] in b:\n print('Yes')\n exit()\nif A[0][0] in b and A[1][1] in b and A[2][2] in b:\n print('Yes')\n exit()\nif A[2][0] in b and A[1][1] in b and A[0][2] in b:\n print('Yes')\n exit() \nprint('No')"]
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s019962567', 's057200428', 's078733319', 's306106277', 's531314357', 's649257059', 's667205864', 's397466722']
[3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0]
[17.0, 17.0, 18.0, 18.0, 17.0, 19.0, 17.0, 18.0]
[423, 554, 475, 492, 497, 493, 475, 517]
p02760
u347452770
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 = []\nbingo[0] , bingo[1] , bingo[2] = map(int, input().split())\nbingo[3] , bingo[4], bingo[5] = map(int, input().split())\nbingo[6], bingo[7], bingo[8] = map(int, input().split())\nn = int(input())\nls = []\ncounter = 0\nfor i in range(n):\n ls[i] = int(input())\n\nfor i in range(len(bingo)):\n for j in range(len(ls)):\n if ls[j] == bingo[i]:\n bingo[i] = 0\n break\nfor i in range(len(bingo)):\n if i == 0:\n if bingo[i] + bingo[i+1] + bingo[i+2] == 0:\n counter += 1\n break\n elif bingo[i] + bingo[i+3] + bingo[i+6] == 0:\n counter += 1\n break\n elif bingo[i] + bingo[i+4] + bingo[i+8] == 0:\n counter += 1\n break\n elif i == 1:\n if bingo[i] + bingo[i+3] + bingo[i+6] == 0:\n counter += 1\n break\n elif i == 2:\n if bingo[i] + bingo[i+3] + bingo[i+6] == 0:\n counter += 1\n break\n elif bingo[i] + bingo[i+2] + bingo[i+4] == 0:\n counter += 1\n break\n elif i == 3:\n if bingo[i] + bingo[i+1] + bingo[i+2] == 0:\n counter += 1\n break\n elif i == 6:\n if bingo[i] + bingo[i+1] + bingo[i+2] == 0:\n counter += 1\n break\nif counter > 0:\n print("Yes")\nelse: \n print("No")\n ', 'bingo = [1,1,1,1,1,1,1,1,1]\nbingo[0] , bingo[1] , bingo[2] = map(int, input().split())\nbingo[3] , bingo[4], bingo[5] = map(int, input().split())\nbingo[6], bingo[7], bingo[8] = map(int, input().split())\nn = int(input())\nls = []\ncounter = 0\nfor i in range(n):\n ls.append(int(input()))\n \nfor i in range(len(bingo)):\n for j in range(len(ls)):\n if ls[j] == bingo[i]:\n bingo[i] = 0\n break\nfor i in range(len(bingo)):\n if i == 0:\n if bingo[i] + bingo[i+1] + bingo[i+2] == 0:\n counter += 1\n break\n elif bingo[i] + bingo[i+3] + bingo[i+6] == 0:\n counter += 1\n break\n elif bingo[i] + bingo[i+4] + bingo[i+8] == 0:\n counter += 1\n break\n elif i == 1:\n if bingo[i] + bingo[i+3] + bingo[i+6] == 0:\n counter += 1\n break\n elif i == 2:\n if bingo[i] + bingo[i+3] + bingo[i+6] == 0:\n counter += 1\n break\n elif bingo[i] + bingo[i+2] + bingo[i+4] == 0:\n counter += 1\n break\n elif i == 3:\n if bingo[i] + bingo[i+1] + bingo[i+2] == 0:\n counter += 1\n break\n elif i == 6:\n if bingo[i] + bingo[i+1] + bingo[i+2] == 0:\n counter += 1\n break\nif counter > 0:\n print("Yes")\nelse: \n print("No")']
['Runtime Error', 'Accepted']
['s780249951', 's364589775']
[3064.0, 3188.0]
[18.0, 18.0]
[1170, 1188]
p02760
u349888092
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 = [[0 for i in range(3)] for j in range(3)]\nfor x in range(3):\n Y = list(map(int,input().split()))\n\n #print(Y[0])\n for y in range(3):\n X[x][y] = Y[y]\n# print(x,y,X[x][y],Y[y])\nprint(X)\n\n\nN = int(input())\nB = []\nfor x in range(N):\n B.append(int(input()))\n#print(X)\n\nfor x in B:\n for y in range(3):\n for z in range(3):\n if(X[y][z] == x):\n X[y][z] = "Bingo"\nans = "No"\nfor x in range(3):\n if(X[x][0] == "Bingo" and X[x][1] == "Bingo" and X[x][2]):\n ans = "Yes"\n if(X[0][x] == "Bingo" and X[1][x] == "Bingo" and X[2][x]):\n ans = "Yes"\nif(X[0][0] == "Bingo" and X[1][1] == "Bingo" and X[2][2]):\n ans = "Yes"\nif(X[0][2] == "Bingo" and X[1][1] == "Bingo" and X[2][0]):\n ans = "Yes"\nprint(ans)', 'X = [[0 for i in range(3)] for j in range(3)]\nfor x in range(3):\n Y = list(map(int,input().split()))\n\n #print(Y[0])\n for y in range(3):\n X[x][y] = Y[y]\n# print(x,y,X[x][y],Y[y])\nprint(X)\n\n\nN = int(input())\nB = []\nfor x in range(N):\n B.append(int(input()))\n#print(X)\n\nfor x in B:\n for y in range(3):\n for z in range(3):\n if(X[y][z] == x):\n X[y][z] = True\nans = "No"\nfor x in range(3):\n if(X[x][0] == True and X[x][1] == True and X[x][2] == True):\n ans = "Yes"\n if(X[0][x] == True and X[1][x] == True and X[2][x] == True):\n ans = "Yes"\nif(X[0][0] == True and X[1][1] == True and X[2][2] == True):\n ans = "Yes"\nif(X[0][2] == True and X[1][1] == True and X[2][0] == True):\n ans = "Yes"\nprint(ans)', 'X = [[0 for i in range(3)] for j in range(3)]\nfor x in range(3):\n Y = list(map(int,input().split()))\n\n #print(Y[0])\n for y in range(3):\n X[x][y] = Y[y]\n# print(x,y,X[x][y],Y[y])\n#print(X)\n\n\nN = int(input())\nB = []\nfor x in range(N):\n B.append(int(input()))\n#print(X)\n\nfor x in B:\n for y in range(3):\n for z in range(3):\n if(X[y][z] == x):\n X[y][z] = True\nans = "No"\nfor x in range(3):\n if(X[x][0] == True and X[x][1] == True and X[x][2] == True):\n ans = "Yes"\n if(X[0][x] == True and X[1][x] == True and X[2][x] == True):\n ans = "Yes"\nif(X[0][0] == True and X[1][1] == True and X[2][2] == True):\n ans = "Yes"\nif(X[0][2] == True and X[1][1] == True and X[2][0] == True):\n ans = "Yes"\nprint(ans)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s260399352', 's406105259', 's711771843']
[3064.0, 3064.0, 3188.0]
[17.0, 17.0, 19.0]
[797, 802, 803]
p02760
u352402050
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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)]\nprint(A)\n\nfor i in range(3):\n for j in range(3):\n if A[i][j] in b:\n A[i][j] = 0\n \nfor i in range(3):\n if A[i][0] + A[i][1] + A[i][2] == 0 or A[0][i] + A[1][i] + A[2][i] == 0 or A[0][0]+A[1][1]+A[2][2] ==0 or A[2][0]+A[1][1]+A[0][2] ==0:\n print('Yes')\n break\n \n else:\n print('No')\n break", "A = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\nb = [int(input()) for i in range(N)]\njudge = 0\n\nfor i in range(3):\n for j in range(3):\n if A[i][j] in b:\n A[i][j] = 0\n \nfor i in range(3):\n if A[i][0] + A[i][1] + A[i][2] == 0 or A[0][i] + A[1][i] + A[2][i] == 0 or A[0][0]+A[1][1]+A[2][2] ==0 or A[2][0]+A[1][1]+A[0][2] ==0:\n judge += 1\n \n else:\n judge += 0\n \nif judge >= 1:\n print('Yes')\n \nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s122782720', 's899516160']
[3064.0, 3064.0]
[17.0, 18.0]
[421, 457]
p02760
u353652911
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['for i in range(n):\n bb=int(input())\n for j in range(3):\n if bb==b1[j]:\n b1[j]=0\n elif bb==b2[j]:\n b2[j]=0\n elif bb==b3[j]:\n b3[j]=0\nif sum(b1)==0 or sum(b2)==0 or sum(b3)==0:\n print("Yes")\nelif b1[0]==b2[0]==b3[0]==0:\n print("Yes")\nelif b1[1]==b2[1]==b3[1]==0:\n print("Yes")\nelif b1[2]==b2[2]==b3[2]==0:\n print("Yes")\n\n \nelif b1[0]==b2[1]==b3[2]==0:\n print("Yes")\nelif b1[2]==b2[1]==b3[0]==0:\n print("Yes")\nelse:\n print("No")', 'b1=list(map(int,input().split()))\nb2=list(map(int,input().split()))\nb3=list(map(int,input().split()))\nn=int(input())\n\nfor i in range(n):\n bb=int(input())\n for j in range(3):\n if bb==b1[j]:\n b1[j]=0\n elif bb==b2[j]:\n b2[j]=0\n elif bb==b3[j]:\n b3[j]=0\nif sum(b1)==0 or sum(b2)==0 or sum(b3)==0:\n print("Yes")\nelif b1[0]==b2[0]==b3[0]==0:\n print("Yes")\nelif b1[1]==b2[1]==b3[1]==0:\n print("Yes")\nelif b1[2]==b2[2]==b3[2]==0:\n print("Yes")\nelif b1[0]==b2[1]==b3[2]==0:\n print("Yes")\nelif b1[2]==b2[1]==b3[0]==0:\n print("Yes")\nelse:\n print("No")\n\n\n']
['Runtime Error', 'Accepted']
['s227487681', 's633990443']
[3064.0, 3064.0]
[18.0, 17.0]
[509, 624]
p02760
u353919145
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\n# Squares conditions\nif (chosen == 8):\n for i in range(3):\n for j in range (3):\n if not (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', "bingoSheet = [0 for x in range(9)]\n\nfor i in range(3):\n bingoRow = input().split()\n for j in range(3):\n bingoSheet[i*3 + j] = int(bingoRow[j])\n\nbingoCount = int(input())\n\nresponses = []\n\nfor i in range(bingoCount):\n responses.append(int(input()))\n\nhasBingo = False\n\nstep = 1\ninitialIndex = 0\n\nfor i in range(3):\n firstIndex = i*3\n subList = [bingoSheet[index] for index in [firstIndex, firstIndex+1, firstIndex+2]]\n if (all(elem in responses for elem in subList)):\n hasBingo = True\n break\n\nfor i in range(3):\n firstIndex = i\n subList = [bingoSheet[index] for index in [firstIndex, firstIndex+3, firstIndex+6]]\n if (all(elem in responses for elem in subList)):\n hasBingo = True\n break\n\nsubList = [bingoSheet[index] for index in [0, 4, 8]]\nif (all(elem in responses for elem in subList)):\n hasBingo = True\n\nsubList = [bingoSheet[index] for index in [2, 4, 6]]\nif (all(elem in responses for elem in subList)):\n hasBingo = True\n\nif hasBingo:\n print('Yes')\n quit()\n\nprint('No')\nquit()\n"]
['Wrong Answer', 'Accepted']
['s572011863', 's427334304']
[9296.0, 9232.0]
[27.0, 30.0]
[1055, 1054]
p02760
u355649707
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 numpy as np\n\n card = np.array([list(map(int, input().split())) for _ in range(3)])\n n = int(input())\n for _ in range(n):\n b = int(input())\n card = np.where(card == b, 0, card)\n\n is_bingo = False\n is_bingo = np.sum(card, axis=0).min() == 0\n is_bingo = np.sum(card, axis=1).min() == 0\n is_bingo = np.sum(np.diag(card)) == 0\n is_bingo = np.sum(np.diag(np.fliplr(card))) == 0\n\n print('Yes' if is_bingo else 'No')\n\n\nif __name__ == '__main__':\n main()\n", "def main():\n import numpy as np\n\n card = np.array([list(map(int, input().split())) for _ in range(3)])\n n = int(input())\n for _ in range(n):\n b = int(input())\n card = np.where(card == b, 0, card)\n\n is_bingo = False\n is_row_bingo = np.sum(card, axis=0).min() == 0\n is_column_bingo = np.sum(card, axis=1).min() == 0\n is_diag_bingo1 = np.sum(np.diag(card)) == 0\n is_diag_bingo2 = np.sum(np.diag(np.fliplr(card))) == 0\n\n print('Yes' if is_row_bingo or is_column_bingo or is_diag_bingo1 or is_diag_bingo2 else 'No')\n\n\nif __name__ == '__main__':\n main()\n"]
['Wrong Answer', 'Accepted']
['s381218735', 's840404204']
[12432.0, 12432.0]
[150.0, 150.0]
[513, 595]
p02760
u357751375
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
["a11,a12,a13 = input().split()\na21,a22,a23 = input().split()\na31,a32,a33 = input().split()\n\nn = int(input())\nb = list()\ni = 0\n\nfor i in range(n):\n b.append(int(input()))\n\nif a11 in b:\n a11 = 'T'\n\nif a12 in b:\n a12 = 'T'\n\nif a13 in b:\n a13 = 'T'\n\nif a21 in b:\n a21 = 'T'\n\nif a22 in b:\n a22 = 'T'\n\nif a23 in b:\n a23 = 'T'\n\nif a31 in b:\n a31 = 'T'\n\nif a32 in b:\n a32 = 'T'\n\nif a33 in b:\n a33 = 'T'\n\nif a11 == 'T':\n if a12 == 'T':\n if a13 == 'T':\n print('Yes')\n exit()\n \n if a22 == 'T':\n if a33 == 'T':\n print('Yes')\n exit()\n \n if a21 == 'T':\n if a31 == 'T':\n print('Yes')\n exit()\n\nelif a12 == 'T':\n if a22 == 'T':\n if a32 == 'T':\n print('Yes')\n exit()\n\nelif a13 == 'T':\n if a22 == 'T':\n if a31 == 'T':\n print('Yes')\n exit()\n\n if a23 == 'T':\n if a33 == 'T':\n print('Yes')\n exit()\n\nelif a21 == 'T':\n if a22 == 'T':\n if a23 == 'T':\n print('Yes')\n exit()\n\nelif a31 == 'T':\n if a32 == 'T':\n if a33 == 'T':\n print('Yes')\n exit()\n\nelse:\n print('No')", "a11,a12,a13 = input().split()\na21,a22,a23 = input().split()\na31,a32,a33 = input().split()\n\nn = int(input())\nb = list()\ni = 0\n\nfor i in range(n):\n b.append(int(input()))\n\n\nif a11 in b:\n a11 = 'T'\n\nif a12 in b:\n a12 = 'T'\n\nif a13 in b:\n a13 = 'T'\n\nif a21 in b:\n a21 = 'T'\n\nif a22 in b:\n a22 = 'T'\n\nif a23 in b:\n a23 = 'T'\n\nif a31 in b:\n a31 = 'T'\n\nif a32 in b:\n a32 = 'T'\n\nif a33 in b:\n a33 = 'T'\n\nif a11 == 'T':\n if a12 == 'T':\n if a13 == 'T':\n print('Yes')\n exit()\n \n if a22 == 'T':\n if a33 == 'T':\n print('Yes')\n exit()\n \n if a21 == 'T':\n if a31 == 'T':\n print('Yes')\n exit()\n\nelif a12 == 'T':\n if a22 == 'T':\n if a32 == 'T':\n print('Yes')\n exit()\n\nelif a13 == 'T':\n if a22 == 'T':\n if a31 == 'T':\n print('Yes')\n exit()\n\n if a23 == 'T':\n if a33 == 'T':\n print('Yes')\n exit()\n\nelif a21 == 'T':\n if a22 == 'T':\n if a23 == 'T':\n print('Yes')\n exit()\n\nelif a31 == 'T':\n if a32 == 'T':\n if a33 == 'T':\n print('Yes')\n exit()\n\nelse:\n print('No')", "a = [list(map(int,input().split())) for i in range(3)]\nn = int(input())\nfor i in range(n):\n b = int(input())\n for x in range(3):\n for y in range(3):\n if a[x][y] == b:\n a[x][y] = 'o'\nfor x in range(3):\n if a[x][0] == a[x][1] == a[x][2] == 'o':\n print('Yes')\n exit(0)\nfor y in range(3):\n if a[0][y] == a[1][y] == a[2][y] == 'o':\n print('Yes')\n exit(0)\nif a[0][0] == a[1][1] == a[2][2] == 'o':\n print('Yes')\nelif a[0][2] == a[1][1] == a[2][0] == 'o':\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Wrong Answer', 'Accepted']
['s395797166', 's573447024', 's286535299']
[3064.0, 3064.0, 9096.0]
[17.0, 18.0, 28.0]
[1234, 1234, 562]
p02760
u362771726
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['import sys\nfrom io import StringIO\nimport unittest\n\nimport numpy as np\n\ndef resolve():\n a = np.array([list(map(int, input().split())) for _ in range(3)])\n n = int(input())\n b = set([int(input()) for _ in range(n)])\n flag = 0\n\n for i in range(3):\n if set(a[i]).issubset(b) or set(a[:, i]).issubset(b):\n flag = 1\n break\n\n if set([a[0][0], a[1][1], a[2][2]]).issubset(b):\n flag = 1\n\n if flag == 1:\n print(\'Yes\')\n else:\n print(\'No\')\n\n\n\nclass TestClass(unittest.TestCase):\n def assertIO(self, input, output):\n stdout, stdin = sys.stdout, sys.stdin\n sys.stdout, sys.stdin = StringIO(), StringIO(input)\n resolve()\n sys.stdout.seek(0)\n out = sys.stdout.read()[:-1]\n sys.stdout, sys.stdin = stdout, stdin\n self.assertEqual(out, output)\n def test_入力例_1(self):\n input = """84 97 66\n79 89 11\n61 59 7\n7\n89\n7\n87\n79\n24\n84\n30"""\n output = """Yes"""\n self.assertIO(input, output)\n def test_入力例_2(self):\n input = """41 7 46\n26 89 2\n78 92 8\n5\n6\n45\n16\n57\n17"""\n output = """No"""\n self.assertIO(input, output)\n def test_入力例_3(self):\n input = """60 88 34\n92 41 43\n65 73 48\n10\n60\n43\n88\n11\n48\n73\n65\n41\n92\n34"""\n output = """Yes"""\n self.assertIO(input, output)\n\nif __name__ == "__main__":\n unittest.main()\n ', 'import sys\nfrom io import StringIO\nimport unittest\n\nimport numpy as np\n\ndef resolve():\n a = np.array([list(map(int, input().split())) for _ in range(3)])\n n = int(input())\n b = set([int(input()) for _ in range(n)])\n flag = 0\n\n for i in range(3):\n if set(a[i]).issubset(b) or set(a[:, i]).issubset(b):\n flag = 1\n break\n\n if set([a[0][0], a[1][1], a[2][2]]).issubset(b) or set([a[0][2], a[1][1], a[2][0]]).issubset(b):\n flag = 1\n\n if flag == 1:\n print(\'Yes\')\n else:\n print(\'No\')\n\n\n\nclass TestClass(unittest.TestCase):\n def assertIO(self, input, output):\n stdout, stdin = sys.stdout, sys.stdin\n sys.stdout, sys.stdin = StringIO(), StringIO(input)\n resolve()\n sys.stdout.seek(0)\n out = sys.stdout.read()[:-1]\n sys.stdout, sys.stdin = stdout, stdin\n self.assertEqual(out, output)\n def test_入力例_1(self):\n input = """84 97 66\n79 89 11\n61 59 7\n7\n89\n7\n87\n79\n24\n84\n30"""\n output = """Yes"""\n self.assertIO(input, output)\n def test_入力例_2(self):\n input = """41 7 46\n26 89 2\n78 92 8\n5\n6\n45\n16\n57\n17"""\n output = """No"""\n self.assertIO(input, output)\n def test_入力例_3(self):\n input = """60 88 34\n92 41 43\n65 73 48\n10\n60\n43\n88\n11\n48\n73\n65\n41\n92\n34"""\n output = """Yes"""\n self.assertIO(input, output)\n\nif __name__ == "__main__":\n # unittest.main()\n resolve()']
['Wrong Answer', 'Accepted']
['s054279966', 's293422337']
[12312.0, 12440.0]
[157.0, 160.0]
[1417, 1465]
p02760
u364774090
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
["A = [[j for j in list(map(int, input().split()))] for i in range(3)]\nN = int(input())\nB = []\nfor _ in range(N):\n\tb = int(input())\n\tfor r in A:\n\t\tfor i in range(len(r)):\n\t\t\tif r[i] == b:\n\t\t\t\tr[i] = 0\nans = False\nfor i in range(3):\n\tif sum(A[i]) == 0:\n\t\tans = True\nif not ans:\n\tfor i in range(3):\n\t\tif A[0][i] + A[1][i] + A[2][i == 0:\n\t\t\tans = True\nif not ans:\n\tif A[0][0] + A[1][1] + A[2][2] == 0:\n\t\tans = True\n\telif A[0][2] + A[1][1] + A[2][0] == 0:\n\t\tans = True\nif ans:\n\tprint('Yes')\nelse:\n\tprint('No')\n", "A = [[j for j in list(map(int, input().split()))] for i in range(3)]\nN = int(input())\nB = []\nfor _ in range(N):\n\tb = int(input())\n\tfor r in A:\n\t\tfor i in range(len(r)):\n\t\t\tif r[i] == b:\n\t\t\t\tr[i] = 0\nans = False\nfor i in range(3):\n\tif sum(A[i]) == 0:\n\t\tans = True\nif not ans:\n\tfor i in range(3):\n\t\tif A[0][i] + A[1][i] + A[2][i] == 0:\n\t\t\tans = True\nif not ans:\n\tif A[0][0] + A[1][1] + A[2][2] == 0:\n\t\tans = True\n\telif A[0][2] + A[1][1] + A[2][0] == 0:\n\t\tans = True\nif ans:\n\tprint('Yes')\nelse:\n\tprint('No')\n"]
['Runtime Error', 'Accepted']
['s188586989', 's024092493']
[8956.0, 9120.0]
[27.0, 29.0]
[504, 505]
p02760
u365375535
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
["import numpy as np\n\ndef run():\n A = [list(map(int, input().split())) for n in range(3)]\n A = np.array(A)\n N = int(input())\n for n in range(N):\n b = int(input())\n for i in range(3):\n for j in range(3):\n a = A[i][j]\n if a == b:\n A[i][j] = 0\n print(A)\n ans = 1\n left = 0\n right = 0\n for i in range(3):\n ans = min(ans, np.sum(A, axis=0)[i])\n ans = min(ans, np.sum(A, axis=1)[i])\n left += A[i][i]\n right += A[i][2-i]\n ans = min(ans, left, right)\n if ans == 0:\n print('Yes')\n else:\n print('No')\n \n\nif __name__ == '__main__':\n run()\n", "import numpy as np\n\ndef run():\n A = [list(map(int, input().split())) for n in range(3)]\n A = np.array(A)\n N = int(input())\n for n in range(N):\n b = int(input())\n for i in range(3):\n for j in range(3):\n a = A[i][j]\n if a == b:\n A[i][j] = 0\n ans = 1\n left = 0\n right = 0\n for i in range(3):\n ans = min(ans, np.sum(A, axis=0)[i])\n ans = min(ans, np.sum(A, axis=1)[i])\n left += A[i][i]\n right += A[i][2-i]\n ans = min(ans, left, right)\n if ans == 0:\n print('Yes')\n else:\n print('No')\n \n\nif __name__ == '__main__':\n run()\n"]
['Wrong Answer', 'Accepted']
['s630124012', 's710903162']
[12640.0, 12496.0]
[154.0, 149.0]
[594, 583]
p02760
u366836739
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\ndef main():\n a = list(map(int, input().split()))\n b = list(map(int, input().split()))\n c = list(map(int, input().split()))\n A = [a,b,c]\n n = int(input())\n B = []\n C = []\n for i in range(n):\n B.append(int(input()))\n for i in range(3):\n for j in range(3):\n if A[i][j] in B:\n C.append(i*10 + j)\n if 0 and 1 and 2 in C:\n print("Yes")\n elif 10 and 11 and 12 in C:\n print("Yes")\n elif 20 and 21 and 22 in C:\n print("Yes")\n elif 0 and 10 and 20 in C:\n print("Yes")\n elif 1 and 11 and 21 in C:\n print("Yes")\n elif 2 and 12 and 22 in C:\n print("Yes")\n elif 0 and 11 and 22 in C:\n print("Yes")\n else:\n print("No")\n ', '# coding: utf-8\ndef main():\n a = list(map(int, input().split()))\n b = list(map(int, input().split()))\n c = list(map(int, input().split()))\n A = [a,b,c]\n n = int(input())\n B = []\n C = []\n for i in range(n):\n B.append(int(input()))\n for i in range(3):\n for j in range(3):\n if A[i][j] in B:\n C.append(i*10 + j)\n D = []\n if 0 in C:\n D += [1,4,7]\n if 1 in C:\n D += [1,5]\n if 2 in C:\n D += [1,6,8]\n if 10 in C:\n D += [2,4]\n if 11 in C:\n D += [2,5,7,8]\n if 12 in C:\n D += [2,6]\n if 20 in C:\n D += [3,4,8]\n if 21 in C:\n D += [3,5]\n if 22 in C:\n D += [3,6,7]\n for i in range(1,9):\n if D.count(i) == 3:\n print("Yes")\n quit()\n print("No")\n \n\nif __name__ == \'__main__\':\n main()']
['Wrong Answer', 'Accepted']
['s380788186', 's295546721']
[3064.0, 3188.0]
[18.0, 19.0]
[771, 866]
p02760
u367147039
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['a=[]\nfor i in range(3):\n a.append(list(map(int,input().split())))\nn=input()\nfor i in range(n):\n b=int(input())\n for j in range(3):\n for k in range(3):\n if a[i][j]==b:\n a[i][j]=0\n\nans=0\nfor l in range(3):\n if a[l][0]==0 and a[l][1]==0 and a[l][2]==0:\n ans=1\n break\n elif a[0][l]==0 and a[1][l==0 and a[2][l]==:\n ans=1\n break\n\nif ans==1:\n print("Yes")\nelif a[1][1]==0 and a[2][2]==0 and a[0][0]==0:\n print("Yes")\nelif a[0][2]==0 and a[1][1]==0 and a[2][0]==0:\n print("Yes")\nelse:\n print("No")\n', 'a=[]\nfor i in range(3):\n a.append(list(map(int,input().split())))\nn=int(input())\nfor i in range(n):\n b=int(input())\n for j in range(3):\n for k in range(3):\n if a[k][j]==b:\n a[k][j]=0\n\nans=0\nfor l in range(3):\n if a[l][0]==0 and a[l][1]==0 and a[l][2]==0:\n ans=1\n break\n elif a[0][l]==0 and a[1][l]==0 and a[2][l]==0:\n ans=1\n break\n\n\n\n\nif ans==1:\n print("Yes")\nelif a[1][1]==0 and a[2][2]==0 and a[0][0]==0:\n print("Yes")\nelif a[0][2]==0 and a[1][1]==0 and a[2][0]==0:\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Accepted']
['s560577352', 's151900501']
[9008.0, 9240.0]
[24.0, 28.0]
[579, 589]
p02760
u368579103
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 = [int(input()) for i in range(n)]\ntotal = []\ns = 0\n \nfor i in range(n):\n for k in range(3):\n for j in range(3):\n if b[i] == int(a[k][j]):\n total.append(s + j)\n s = s + 3\nif ((0 and 1 and 2) in total) or ((3 and 4 and 5) in total) or ((6 and 7 and 8) in total) or ((0 and 3 and 6) in total) or ((1 and 4 and 7) in total) or ((2 and 5 and 8) in total) or ((0 and 4 and 8) in total) or ((2 and 4 and 6) in total):\n print("Yes")\nelse:\n print("No")', 'a = [input().split() for i in range(3)]\nn = int(input())\nb = [int(input()) for i in range(n)]\ntotal = []\ns = 0\n \nfor i in range(n):\n for k in range(3):\n for j in range(3):\n if b[i] == int(a[k][j]):\n if k < 1: \n total.append(s + j)\n else:\n total.append(k + j)\n s = s + 3\nif ((0 and 1 and 2) in total) or ((3 and 4 and 5) in total) or ((6 and 7 and 8) in total) or ((0 and 3 and 6) in total) or ((1 and 4 and 7) in total) or ((2 and 5 and 8) in total) or ((0 and 4 and 8) in total) or ((2 and 4 and 6) in total):\n print("Yes")\nelse:\n print("No")', 'a = [input().split() for i in range(3)]\nn = int(input())\nb = [int(input()) for i in range(n)]\ntotal = []\n \nfor i in range(n):\n for k in range(3):\n for j in range(3):\n if b[i] == int(a[k][j]):\n total.append(k * 3 + j)\n \nif 0 in total and 1 in total and 2 in total: \n print("Yes")\nelif 3 in total and 4 in total and 5 in total: \n print("Yes")\nelif 6 in total and 7 in total and 8 in total: \n print("Yes")\nelif 0 in total and 3 in total and 6 in total: \n print("Yes")\nelif 1 in total and 4 in total and 7 in total: \n print("Yes")\nelif 2 in total and 5 in total and 8 in total: \n print("Yes")\nelif 0 in total and 4 in total and 8 in total: \n print("Yes")\nelif 2 in total and 4 in total and 6 in total: \n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s514851651', 's964678859', 's648417308']
[3064.0, 3064.0, 3064.0]
[20.0, 18.0, 17.0]
[524, 589, 767]
p02760
u373047809
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['# Atcoder ABC 157\n\n\na = []\n for i in range(3):\n a.append(list(map(int,input().split())))\n\nn = int(input())\n\nfor _ in range(n): #b_n roop\n b = int(input())\n for i in range(3):\n for j in range(3):\n if b == a[i][j]:\n a[i][j] == 0 #make a 0\n \nfor i in range(3):\n if sum(a[i]) == 0: \n print("Yes")\n exit()\n if sum(a[0][i],a[1][i],a[2][i]) == 0: \n print("Yes")\n exit()\n\nif sum(a[0][0],a[1][1],a[2][2]) == 0: \n print("Yes")\n exit()\n\nif sum(a[2][0],a[1][1],a[0][2]) == 0: \n print("Yes")\n exit()\n\n\nprint("No")', '# Atcoder ABC 157\n\n\na = []\n for i in range(3):\n a.append(list(map(int, input().split())))\n\nn = int(input())\n\nfor _ in range(n): #b_n roop\n b = int(input())\n for i in range(3):\n for j in range(3):\n if b == a[i][j]:\n a[i][j] = 0 #make a 0\n \nfor i in range(3):\n if sum(a[i]) == 0: \n print("Yes")\n exit()\n if sum([a[0][i], a[1][i], a[2][i]]) == 0: \n print("Yes")\n exit()\n\nif sum([a[0][0], a[1][1], a[2][2]]) == 0: \n print("Yes")\n exit()\n\nif sum([a[2][0], a[1][1], a[0][2]]) == 0: \n print("Yes")\n exit()\n\n', '# Atcoder ABC 157\n\n\na = []\n for i in range(3):\n a.append(list(map(int,input().split())))\n\nn = int(input())\n\nfor _ in range(n): #b_n roop\n b = int(input())\n for i in range(3):\n for j in range(3):\n if b == a[i][j]:\n a[i][j] = 0 #make a 0\n \nfor i in range(3):\n if sum(a[i]) == 0: \n print("Yes")\n exit()\n if sum(a[0][i],a[1][i],a[2][i]) == 0: \n print("Yes")\n exit()\n\nif sum(a[0][0],a[1][1],a[2][2]) == 0: \n print("Yes")\n exit()\n\nif sum(a[2][0],a[1][1],a[0][2]) == 0: \n print("Yes")\n exit()\n\n\nprint("No")', '# Atcoder ABC 157\n\n\na = []\nfor i in range(3):\n a.append(list(map(int, input().split())))\n\nn = int(input())\n\nfor _ in range(n): #b_n roop\n b = int(input())\n for i in range(3):\n for j in range(3):\n if b == a[i][j]:\n a[i][j] = 0 #make a 0\n \nfor i in range(3):\n bingo = False\n if sum(a[i]) == 0: \n print("Yes")\n exit()\n if sum([a[0][i], a[1][i], a[2][i]]) == 0: \n print("Yes")\n exit()\n\nif sum([a[0][0], a[1][1], a[2][2]]) == 0: \n print("Yes")\n exit()\n\nif sum([a[2][0], a[1][1], a[0][2]]) == 0: \n print("Yes")\n exit()\n\n\nprint("No")']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s288808692', 's317000371', 's666420283', 's638511156']
[2940.0, 2940.0, 2940.0, 3064.0]
[17.0, 18.0, 17.0, 17.0]
[665, 665, 664, 694]
p02760
u374082254
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['A1 = list(map(int, input().split()))\nA2 = list(map(int, input().split()))\nA3 = list(map(int, input().split()))\n\nA = A1 + A2 + A3\nN = int(input())\n\nindex = []\nfor i in range(N):\n index.append(A.index(int(input())))\n\nif (0 in index and 3 in index and 6 in index) or \\\n (1 in index and 4 in index and 7 in index) or \\\n (2 in index and 5 in index and 8 in index) or \\\n (0 in index and 4 in index and 8 in index) or \\\n (2 in index and 4 in index and 6 in index) or \\\n (3 in index and 4 in index and 5 in index) or \\\n (6 in index and 7 in index and 8 in index):\n print("Yes")\nelse:\n print("No")', '\nA1 = list(map(int, input().split()))\nA2 = list(map(int, input().split()))\nA3 = list(map(int, input().split()))\n\nA = A1 + A2 + A3\nN = int(input())\n\nindex = []\nfor i in range(N):\n inp = int(input())\n if inp in A:\n index.append(A.index(inp))\n\nif \\\n (0 in index and 3 in index and 6 in index) or \\\n (1 in index and 4 in index and 7 in index) or \\\n (2 in index and 5 in index and 8 in index) or \\\n (0 in index and 4 in index and 8 in index) or \\\n (2 in index and 4 in index and 6 in index) or \\\n (0 in index and 1 in index and 2 in index) or \\\n (3 in index and 4 in index and 5 in index) or \\\n (6 in index and 7 in index and 8 in index):\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Accepted']
['s434920952', 's872559991']
[3064.0, 3064.0]
[17.0, 17.0]
[609, 710]
p02760
u375477204
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['A = [0]*3\nb = [0]*N\nfor i in range(0, 3):\n A[i] = list(map(int, input().split()))\nN = int(input())\nfor i in range(0, N):\n b[i] = int(input())\nfor i in range(0, 3):\n for j in range(0, 3):\n for k in range(0, N):\n if A[i][j] == b[k]:\n A[i][j] = 0\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:\n print ("Yes")\nelif A[0][1] == A[1][1] == A[2][1] == 0:\n print ("Yes")\nelif A[0][2] == A[1][2] == A[2][2] == 0:\n print ("Yes")\nelif A[0][0] == A[1][1] == A[2][2] == 0:\n print ("Yes")\nelif A[0][2] == A[1][1] == A[2][0] == 0:\n print ("Yes")\nelse:\n print ("No")', 'A = [0]*3\nb = [0]*N\nfor i in range(0, 3):\n A[i] = list(map(int, input().split()))\nN = int(input())\nfor i in range(0, N):\n b[i] = int(input())\nfor i in range(0, 3):\n for j in range(0, 3):\n for k in range(0, N):\n if A[i][j] == b[k]:\n A[i][j] = 0\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:\n print ("Yes")\nelif A[0][1] == A[1][1] == A[2][1] == 0:\n print ("Yes")\nelif A[0][2] == A[1][2] == A[2][2] == 0 :\n print ("Yes")\nelif A[0][0] == A[1][1] == A[2][2] == 0:\n print ("Yes")\nelif A[0][2] == A[1][1] == A[2][0] == 0:\n print ("Yes")\nelse:\n print ("No")', 'A = [0]*3\nfor i in range(0, 3):\n A[i] = list(map(int, input().split()))\nN = int(input())\nb = [0]*N\nfor i in range(0, N):\n b[i] = int(input())\nfor i in range(0, 3):\n for j in range(0, 3):\n for k in range(0, N):\n if A[i][j] == b[k]:\n A[i][j] = 0\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:\n print ("Yes")\nelif A[0][1] == A[1][1] == A[2][1] == 0:\n print ("Yes")\nelif A[0][2] == A[1][2] == A[2][2] == 0:\n print ("Yes")\nelif A[0][0] == A[1][1] == A[2][2] == 0:\n print ("Yes")\nelif A[0][2] == A[1][1] == A[2][0] == 0:\n print ("Yes")\nelse:\n print ("No")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s337459699', 's882730711', 's480256202']
[3064.0, 3064.0, 3064.0]
[17.0, 17.0, 17.0]
[685, 686, 685]
p02760
u378702452
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 = input()\nB = list(map(int, input().split()))\nans = False\n\nbingolist = []\nfor i in range(3):\n bingolist.append([A[i][0], A[i][1], A[i][2]])\n bingolist.append([A[0][i], A[1][i], A[2][i]])\n\nbingolist.append([A[0][0], A[1][1], A[2][2]])\nbingolist.append([A[2][0], A[1][1], A[0][2]])\n\nfor i in bingolist:\n ans = True if (i[0] in B and i[1] in B and i[2] in B)\n \nprint(ans)', 'A = [list(map(int, input().split())) for _ in range(3)]\nn = int(input())\nB = [int(input()) for _ in range(n)]\nans = False\n\nbingolist = []\nfor i in range(3):\n bingolist.append([A[i][0], A[i][1], A[i][2]])\n bingolist.append([A[0][i], A[1][i], A[2][i]])\n\nbingolist.append([A[0][0], A[1][1], A[2][2]])\nbingolist.append([A[2][0], A[1][1], A[0][2]])\n\nfor i in bingolist:\n if i[0] in B and i[1] in B and i[2] in B: ans = True\n \nprint("Yes" if ans else "No")\n']
['Runtime Error', 'Accepted']
['s014488406', 's067220721']
[3064.0, 3064.0]
[17.0, 17.0]
[430, 455]
p02760
u381959472
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\nAList = []\nBingoList = [[0, 0, 0],\n [0, 0, 0],\n [0, 0, 0]]\n\nfor i in range(3):\n AList.append(list(map(int, input().split())))\n \n\nN = int(input())\n\ntmp = -1\nfor i in range(N):\n tmp = int(input())\n for p in range(3):\n for q in range(3):\n if AList[p][q] == tmp:\n BingoList[i][q] = 1\n\nfor i in range(3):\n if BingoList[i][0] == 1 and BingoList[i][1] == 1 and BingoList[i][2] == 1:\n print('Yes')\n sys.exit(0)\n\nfor i in range(3):\n if BingoList[0][i] == 1 and BingoList[1][i] == 1 and BingoList[2][i] == 1:\n print('Yes')\n sys.exit(0)\n\nif BingoList[0][0] == 1 and BingoList[1][1] == 1 and BingoList[2][2] == 1:\n print('Yes')\nelif BingoList[2][0] == 1 and BingoList[1][1] == 1 and BingoList[0][2] == 1:\n print('Yes')\nelse:\n print('No')", "import sys\n\nAList = []\nBingoList = [[0, 0, 0],\n [0, 0, 0],\n [0, 0, 0]]\n\nfor i in range(3):\n AList.append(list(map(int, input().split())))\n \n\nN = int(input())\n\ntmp = -1\nfor i in range(N):\n tmp = int(input())\n for p in range(3):\n for q in range(3):\n if AList[p][q] == tmp:\n BingoList[i][q] = 1\n\nfor i in range(3):\n if BingoList[i][0] == 1 and BingoList[i][1] == 1 and BingoList[i][2] == 1:\n print('Yes')\n sys.exit(0)\n\nfor i in range(3):\n if BingoList[0][i] == 1 and BingoList[1][i] == 1 and BingoList[2][i] == 1:\n print('Yes')\n sys.exit(0)\n\nif BingoList[0][0] == 1 and BingoList[1][1] == 1 and BingoList[2][2] == 1:\n print('Yes')\nelif BingoList[2][0] == 1 and BingoList[1][1] == 1 and BingoList[0][2] == 1:\n print('Yes')\nelse:\n print('No')", "import sys\n\nAList = []\nBingoList = [[0, 0, 0],\n [0, 0, 0],\n [0, 0, 0]]\n\nfor i in range(3):\n AList.append(list(map(int, input().split())))\n \n\nN = int(input())\n\ntmp = -1\nfor i in range(N):\n tmp = int(input())\n for p in range(3):\n for q in range(3):\n if AList[p][q] == tmp:\n BingoList[p][q] = 1\n\nfor i in range(3):\n if BingoList[i][0] == 1 and BingoList[i][1] == 1 and BingoList[i][2] == 1:\n print('Yes')\n sys.exit(0)\n\nfor i in range(3):\n if BingoList[0][i] == 1 and BingoList[1][i] == 1 and BingoList[2][i] == 1:\n print('Yes')\n sys.exit(0)\n\nif BingoList[0][0] == 1 and BingoList[1][1] == 1 and BingoList[2][2] == 1:\n print('Yes')\nelif BingoList[2][0] == 1 and BingoList[1][1] == 1 and BingoList[0][2] == 1:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s724125494', 's822253190', 's167952058']
[3064.0, 3064.0, 3064.0]
[18.0, 17.0, 41.0]
[849, 849, 849]
p02760
u382169090
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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(int(A1))\n A.append(int(A2))\n A.append(int(A3))\n\nN = int(input())\nb = []\n\nfor i in range(N):\n b.append(int(input()))\n\nmatch = ''\n\nfor star in b:\n for i, item in enumerate(A):\n if item == star:\n match += str(i)\n\nmatch = sorted(match)\nmatch = ''.join(match)\n\nprint(match)\n\nif '012' in match:\n print('Yes')\nelif '345' in match:\n print('Yes')\nelif '678' in match:\n print('Yes')\nelif '0' in match:\n if '3' in match:\n if '6' in match:\n print('Yes')\n if '4' in match:\n if '8' in match:\n print('Yes')\nelif '1' in match:\n if '4' in match:\n if '7' in match:\n print('Yes')\nelif '2' in match:\n if '4' in match:\n if '6' in match:\n print('Yes')\n if '5' in match:\n if '8' in match:\n print('Yes')\nelse:\n print('No')", "A = []\nfor i in range(3):\n A1,A2,A3 = map(int,input().split())\n A.append(int(A1))\n A.append(int(A2))\n A.append(int(A3))\n\nN = int(input())\nb = []\n\nfor i in range(N):\n b.append(int(input()))\n\nmatch = ''\n\nfor star in b:\n for i, item in enumerate(A):\n if item == star:\n match += str(i)\n\nmatch = sorted(match)\nmatch = ''.join(match)\n\nif '012' in match:\n print('Yes')\nelif '345' in match:\n print('Yes')\nelif '678' in match:\n print('Yes')\nelif '0' in match:\n if '3' in match:\n if '6' in match:\n print('Yes')\n elif '4' in match:\n if '8' in match:\n print('Yes')\nelif '1' in match:\n if '4' in match:\n if '7' in match:\n print('Yes')\nelif '2' in match:\n if '4' in match:\n if '6' in match:\n print('Yes')\n elif '5' in match:\n if '8' in match:\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")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s393210485', 's817754058', 's261130350']
[3188.0, 3064.0, 3064.0]
[20.0, 19.0, 17.0]
[834, 824, 766]
p02760
u382407432
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['a1 = list(map(int,input().split()))\na2 = list(map(int,input().split()))\na3 = list(map(int,input().split()))\n\nl1=[a1[0],a2[0],a3[0]]\nl2=[a1[1],a2[1],a3[1]]\nl3=[a1[2],a2[2],a3[2]]\nl4=[a1[0],a1[1],a1[2]]\nl5=[a2[0],a2[1],a2[2]]\nl6=[a3[0],a3[1],a3[2]]\nl7=[a1[0],a2[1],a3[2]]\nl8=[a1[2],a2[1],a3[0]]\n\nN=int(input())\nfor i in range(N):\n b=int(input())\n try:\n a1.remove(b)\n else:\n pass\n try:\n a2.remove(b)\n else:\n pass\n try:\n a3.remove(b)\n else:\n pass\nif(sum(l1)==0 or sum(l2)==0 or sum(l3)==0 or sum(l4)==0 or sum(l5)==0 or sum(l6)==0 or sum(l7)==0 or sum(l1)==8):\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()))\n\nN=int(input())\nfor i in range(N):\n b=int(input())\n if(a1[0]==b):\n a1[0]=0\n if(a1[1]==b):\n a1[1]=0\n if(a1[2]==b):\n a1[2]=0\n if(a2[0]==b):\n a2[0]=0\n if(a2[1]==b):\n a2[1]=0\n if(a2[2]==b):\n a2[2]=0\n if(a3[0]==b):\n a3[0]=0\n if(a3[1]==b):\n a3[1]=0\n if(a3[2]==b):\n a3[2]=0 \nl1=[a1[0],a2[0],a3[0]]\nl2=[a1[1],a2[1],a3[1]]\nl3=[a1[2],a2[2],a3[2]]\nl4=[a1[0],a1[1],a1[2]]\nl5=[a2[0],a2[1],a2[2]]\nl6=[a3[0],a3[1],a3[2]]\nl7=[a1[0],a2[1],a3[2]]\nl8=[a1[2],a2[1],a3[0]]\nif(sum(l1)==0 or sum(l2)==0 or sum(l3)==0 or sum(l4)==0 or sum(l5)==0 or sum(l6)==0 or sum(l7)==0 or sum(l8)==0):\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s749504498', 's675722073']
[3064.0, 3192.0]
[17.0, 18.0]
[616, 779]
p02760
u384122990
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['A1 = list(map(int, input().split()))\nA2 = list(map(int, input().split()))\nA3 = list(map(int, input().split()))\nN = input()\nb = [(int(input())) for _ in range(N)]\n\nprint(A1)', '\nA = [list(map(int, input().split())) for i in range(3)]\nN = int(input())\nb = [(int(input())) for _ in range(N)]\n\nbingo1 = [0, 0, 0]\nbingo2 = [0, 0, 0]\nbingo3 = [0, 0, 0]\n\n\nfor i in range(3):\n for j in range(N):\n if A[i][0] == b[j]:\n bingo1[i] = 1\n if A[i][1] == b[j]:\n bingo2[i] = 1\n if A[i][2] == b[j]:\n bingo3[i] = 1\n \n\n\nif bingo1[0] == bingo1[1] == bingo1[2] == 1:\n print("Yes")\nelif bingo2[0] == bingo2[1] == bingo2[2] == 1:\n print("Yes")\nelif bingo3[0] == bingo3[1] == bingo3[2] == 1:\n print("Yes")\nelif bingo1[0] == bingo2[0] == bingo3[0] == 1:\n print("Yes")\nelif bingo1[1] == bingo2[1] == bingo3[1] == 1:\n print("Yes")\nelif bingo1[2] == bingo2[2] == bingo3[2] == 1:\n print("Yes")\nelif bingo1[0] == bingo2[1] == bingo3[2] == 1:\n print("Yes")\nelif bingo1[2] == bingo2[1] == bingo3[0] == 1:\n print("Yes")\nelse:\n print("No")\n\n']
['Runtime Error', 'Accepted']
['s539064929', 's988465781']
[3060.0, 3064.0]
[18.0, 18.0]
[172, 927]
p02760
u384476576
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
["a_list = []\nfor i in range(3):\n for j in list(map(int, input().split())):\n a_list.append()\n\nN = int(input())\n\nb_list = []\nfor i in range(N):\n b_list.append(int(input())) \n \nfor b in b_list:\n if b in a_list:\n a_list[a_list.index(b)] = 0\n# 123\n# 456\n# 789\n\nline_list = [\n a_list[:3], # 123\n a_list[3:6], # 456\n a_list[6:9], # 789\n a_list[::3], # 147\n a_list[1::3], # 258\n a_list[2::3], # 369\n a_list[::4], # 159\n a_list[2:7:2], # 357 \n]\nline_sum_list = list(map(sum, line_list))\nif 0 in line_sum_list:\n print('Yes')\nelse:\n print('No') ", "a_list = []\nfor i in range(3):\n for j in list(map(int, input().split())):\n a_list.append(j)\n\nN = int(input())\n\nb_list = []\nfor i in range(N):\n b_list.append(int(input())) \n \nfor b in b_list:\n if b in a_list:\n a_list[a_list.index(b)] = 0\n# 123\n# 456\n# 789\n\nline_list = [\n a_list[:3], # 123\n a_list[3:6], # 456\n a_list[6:9], # 789\n a_list[::3], # 147\n a_list[1::3], # 258\n a_list[2::3], # 369\n a_list[::4], # 159\n a_list[2:7:2], # 357 \n]\nline_sum_list = list(map(sum, line_list))\nif 0 in line_sum_list:\n print('Yes')\nelse:\n print('No') "]
['Runtime Error', 'Accepted']
['s076251571', 's564258725']
[3064.0, 3064.0]
[18.0, 18.0]
[668, 669]
p02760
u387080888
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['a=[]\nb=[]\nfor _ in range(3):\n a.append(list(map(int,input().split())))\nfor _ in range(int(input())):\n b.append(int(input()))\nfor i in range(N):\n for j in range(3):\n for k in range(3):\n if b[i]==a[k][j]:\n a[k][j]=0\nif (a[0][0]==0 and a[0][1]==0 and a[0][2]==0)or(a[1][0]==0 and a[1][1]==0 and a[1][2]==0) or (a[2][0]==0 and a[2][1]==0 and a[2][2]==0) or (a[0][0]==0 and a[1][0]==0 and a[2][0]==0) or (a[0][1]==0 and a[1][1]==0 and a[2][1]==0) or (a[0][2]==0 and a[1][2]==0 and a[2][2]==0) or (a[0][0]==0 and a[1][1]==0 and a[2][2]==0) or (a[0][2]==0 and a[1][1]==0 and a[2][0]==0):\n print("Yes")\nelse:\n print("No")', 'a=[]\nb=[]\nfor _ in range(3):\n a.append(list(map(int,input().split())))\nN=int(input())\nfor _ in range(N):\n b.append(int(input()))\nfor i in range(N):\n for j in range(3):\n for k in range(3):\n if b[i]==a[k][j]:\n a[k][j]=0\nif (a[0][0]==0 and a[0][1]==0 and a[0][2]==0)or(a[1][0]==0 and a[1][1]==0 and a[1][2]==0) or (a[2][0]==0 and a[2][1]==0 and a[2][2]==0) or (a[0][0]==0 and a[1][0]==0 and a[2][0]==0) or (a[0][1]==0 and a[1][1]==0 and a[2][1]==0) or (a[0][2]==0 and a[1][2]==0 and a[2][2]==0) or (a[0][0]==0 and a[1][1]==0 and a[2][2]==0) or (a[0][2]==0 and a[1][1]==0 and a[2][0]==0):\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s202170187', 's384195730']
[3064.0, 3064.0]
[18.0, 17.0]
[661, 665]
p02760
u391675400
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['a =[ list(map(int,input().split())) for _ in range(3)]\nn = int(input())\nb = [int(input()) for _ in range(n)]\n\nbingo = []\nfor i in range(3):\n for j in range(3):\n for k in range(n):\n print(a[i][j])\n if a[i][j] == b[k]:\n a[i][j] = 0\n\nfor i in range(3):\n if a[i][0] == 0 and a[i][1] == 0 and a[i][2] == 0 :\n print("Yes")\n exit()\n elif a[0][i] == 0 and a[0][i] == 0 and a[0][i] == 0 :\n print("Yes")\n exit()\n elif a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0:\n print("Yes")\n exit()\n elif a[0][2] == 0 and a[1][1] == 0 and a[2][0] == 0:\n print("Yes")\n exit()\n else:\n print("No")\n exit()', 'a =[ list(map(int,input().split())) for _ in range(3)]\nn = int(input())\nb = [int(input()) for _ in range(n)]\n\nbingo = []\nfor i in range(3):\n for j in range(3):\n for k in range(n):\n if a[i][j] == b[k]:\n a[i][j] = 0\n#print(a)\nfor i in range(3):\n if a[i][0] == 0 and a[i][1] == 0 and a[i][2] == 0 :\n print("Yes")\n exit()\nfor i in range(3):\n if a[0][i] == 0 and a[1][i] == 0 and a[2][i] == 0 :\n print("Yes")\n exit()\nif a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0:\n print("Yes")\n exit()\nif a[0][2] == 0 and a[1][1] == 0 and a[2][0] == 0:\n print("Yes")\n exit()\n\nprint("No")\nexit()']
['Wrong Answer', 'Accepted']
['s320644610', 's891155320']
[3064.0, 3064.0]
[17.0, 17.0]
[713, 675]
p02760
u393253137
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 = [0]*9\n\n\nfor _ in range(3):\n A += [int(i) for i in input().split()]\n\n\nn=int(input())\nfor _ in range(n):\n b = int(input())\n for i, a in enumerate(A):\n if b == a:\n B[i] = 1\n\n\nC = [[1,2,3],[4,5,6],[7,8,9],[1,4,7],[2,5,8],[3,6,9],[1,5,9],[3,5,7]]\nflag = 0\n\n\nfor a,b,c in C:\n if B[a-1] and B[b-1] and B[c-1]:\n flag = 1\nprint('Yes' if Chk else 'No')", "A = []\nB = [0]*9\n\n\nfor _ in range(3):\n A += [int(i) for i in input().split()]\n\n\nn=int(input())\nfor _ in range(n):\n b = int(input())\n for i, a in enumerate(A):\n if b == a:\n B[i] = 1\n\n\nC = [[1,2,3],[4,5,6],[7,8,9],[1,4,7],[2,5,8],[3,6,9],[1,5,9],[3,5,7]]\nflag = 0\n\n\nfor a,b,c in C:\n if B[a-1] and B[b-1] and B[c-1]:\n flag = 1\nprint('Yes' if flag else 'No')"]
['Runtime Error', 'Accepted']
['s150288182', 's709124227']
[3316.0, 3444.0]
[19.0, 19.0]
[583, 584]
p02760
u393881437
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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()))\nresult = 'No'\n\nn = int(input())\nfor i in range(n):\n\tIn = int(input())\n \n\ta1 = ['' if a1[j] == In else a1[j] for j in range(3)]\n\ta2 = ['' if a2[j] == In else a2[j] for j in range(3)]\n\ta3 = ['' if a3[j] == In else a3[j] for j in range(3)]\n\nprint(a1)\nprint(a2)\nprint(a3)\n# tate\nfor i in range(2):\n\tif a1[i] == '' and a2[i] == '' and a3[i] == '':\n\t\tresult = 'Yes'\n\t\tbreak\n# yoko\nif a1.count('') == 3:\n\t\tresult = 'Yes'\nif a2.count('') == 3:\n\t\tresult = 'Yes'\nif a3.count('') == 3:\n\t\tresult = 'Yes'\n\n# naname\nif a1[0] == '' and a2[1] == '' and a3[2] == '':\n\t\tresult = 'Yes'\n \nif a1[2] == '' and a2[1] == '' and a3[1] == '':\n\t\tresult = 'Yes'\nprint(result)", "a1 = list(map(int, input().split()))\na2 = list(map(int, input().split()))\na3 = list(map(int, input().split()))\nresult = 'No'\n\nn = int(input())\nfor i in range(n):\n\tIn = int(input())\n \n\ta1 = ['' if a1[j] == In else a1[j] for j in range(3)]\n\ta2 = ['' if a2[j] == In else a2[j] for j in range(3)]\n\ta3 = ['' if a3[j] == In else a3[j] for j in range(3)]\n \n# tate\nfor i in range(3):\n\tif a1[i] == '' and a2[i] == '' and a3[i] == '':\n\t\tresult = 'Yes'\n\t\tbreak\n# yoko\nif a1.count('') == 3:\n\t\tresult = 'Yes'\nif a2.count('') == 3:\n\t\tresult = 'Yes'\nif a3.count('') == 3:\n\t\tresult = 'Yes'\n\n# naname\nif a1[0] == '' and a2[1] == '' and a3[2] == '':\n\t\tresult = 'Yes'\n \nif a1[2] == '' and a2[1] == '' and a3[0] == '':\n\t\tresult = 'Yes'\nprint(result)"]
['Wrong Answer', 'Accepted']
['s124458625', 's914608459']
[3064.0, 3064.0]
[18.0, 18.0]
[764, 738]
p02760
u399517478
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
['n1 = list(map(int, input().split()))\nn2 = list(map(int, input().split()))\nn3 = list(map(int, input().split()))\narr = []\nz=0\nfor i in range(10):\n arr.append(int(input()))\n if arr[i] == n1[0] or arr[i] == n1[1] or arr[i] == n1[2] or arr[i] == n2[0] or arr[i] == n2[1] or arr[i] == n2[2] or arr[i] == n3[0] or arr[i] == n3[1] or arr[i] == n3[2]:\n z+=1\nif z >= 3: print("Yes")\nelse: print("No")', 'n1 = list(map(int, input().split()))\nn2 = list(map(int, input().split()))\nn3 = list(map(int, input().split()))\narr = []\nz=0\nfor i in range(10):\n arr.append(int(input()))\n if arr[i] == n1[0] or arr[i] == n1[1] or arr[i] == n1[2] or arr[i] == n2[0] or arr[i] == n2[1] or arr[i] == n2[2] or arr[i] == n3[0] or arr[i] == n3[1] or arr[i] == n3[2]:\n z+=1\nif z >= 3: print("Yes")\nelse: 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', 'Runtime Error', 'Accepted']
['s238354099', 's351206687', 's319580941']
[3064.0, 3064.0, 3064.0]
[18.0, 17.0, 17.0]
[403, 403, 766]
p02760
u405080602
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 _ in range(3)]\nN = int(input())\nB = set([int(input()) for _ in range(N)])\n\nX = []\nX += [set(A[i]) for i in range(3)]\nX += [set([A[j][i] for j in range(3)]) for i in range(3)]\nX += [set([A[0][2], A[1][1], A[2][0]]), set([A[2][2], A[1][1], A[0][0]])]\n\nfor x in X:\n if x in B:\n print('Yes')\n break\nelse:\n print('No')", "A = [list(map(int, input().split(' '))) for i in range(3)]\nN = int(input())\nB = set([int(input()) for i in range(N)])\n\nX = []\nX += [set(A[i]) for i in range(3)]\nX += [set([A[j][i] for j in range(3)]) for i in range(3)]\nX += [set([A[0][2], A[1][1], A[2][0]]), set([A[2][2], A[1][1], A[0][0]])]\n\nfor x in X:\n if x <= B: \n print('Yes')\n break\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s848691788', 's835494722']
[3064.0, 3064.0]
[17.0, 18.0]
[379, 444]
p02760
u408791346
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 = list(int(input()) for _ in range(n))\n\nfor i in b:\n if i in a :\n a[a.index(a)] = "h"\n\nif a[0:3].count("h") == 3 or a[3:6].count("h") == 3 or a[6:9].count("h") == 3:\n print("Yes")\nelif a[0] == "h" and a[4] == "h" and a[8] == "h":\n print("Yes")\nelif a[2] == "h" and a[4] == "h" and a[6] == "h":\n print("Yes")\nelif a[0] == "h" and a[3] == "h" and a[6] == "h":\n print("Yes") \nelif a[1] == "h" and a[4] == "h" and a[7] == "h":\n print("Yes") \nelif a[2] == "h" and a[5] == "h" and a[8] == "h":\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\nn = int(input())\nb = list(int(input()) for _ in range(n))\n\nfor i in b:\n if i in a :\n a[a.index(i)] = "h"\n\nif a[0:3].count("h") == 3 or a[3:6].count("h") == 3 or a[6:9].count("h") == 3:\n print("Yes")\nelif a[0] == "h" and a[4] == "h" and a[8] == "h":\n print("Yes")\nelif a[2] == "h" and a[4] == "h" and a[6] == "h":\n print("Yes")\nelif a[0] == "h" and a[3] == "h" and a[6] == "h":\n print("Yes") \nelif a[1] == "h" and a[4] == "h" and a[7] == "h":\n print("Yes") \nelif a[2] == "h" and a[5] == "h" and a[8] == "h":\n print("Yes") \nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s181755149', 's810123768']
[3064.0, 3064.0]
[17.0, 17.0]
[695, 695]
p02760
u409542115
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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\nbingonum=[[0,0,0],[0,0,0],[0,0,0]]\nbingo=[["False","False","False"],["False","False","False"],["False","False","False"]]\nfor i in range(3):\n bingonum[i][0],bingonum[i][1],bingonum[i][2] = map(int,input().split())\n\nN = int(input())\nb=[]\nfor _ in range(N):\n b.append(input())\nfor x in range(N):\n for i in range(3):\n for j in range(3):\n if bingonum[i][j]==b[x]:\n bingo[i][j]="True"\n\nIsBingo = "No"\nfor i in range(3):\n if (bingo[i][0] and bingo[i][1] and bingo[i][2])=="True":\n IsBingo="Yes"\n if (bingo[0][i] and bingo[1][i] and bingo[2][i])=="True":\n IsBingo="Yes"\nif (bingo[0][0] and bingo[1][1] and bingo[2][2] =="True") or (bingo[0][2] and bingo[1][1]and bingo[2][0]=="True"):\n IsBingo="Yes"\nprint(IsBingo)', 'bingonum=[[0,0,0],[0,0,0],[0,0,0]]\nbingo=[["False","False","False"],["False","False","False"],["False","False","False"]]\nfor i in range(3):\n bingonum[i][0],bingonum[i][1],bingonum[i][2] = map(int,input().split())\n\nN = int(input())\nb=[]\nfor _ in range(N):\n b.append(int(input())\nfor x in range(N):\n for i in range(3):\n for j in range(3):\n if bingonum[i][j]==b[x]:\n bingo[i][j]="True"\n\nIsBingo = "No"\nfor i in range(3):\n if bingo[i][0] =="True" and bingo[i][1] =="True" and bingo[i][2] =="True":\n IsBingo="Yes"\n if bingo[0][i] =="True" and bingo[1][i] =="True" and bingo[2][i] =="True":\n IsBingo="Yes"\nif (bingo[0][0] =="True" and bingo[1][1] =="True" and bingo[2][2] =="True") or (bingo[0][2] =="True" and bingo[1][1] =="True" and bingo[2][0]=="True"):\n IsBingo="Yes"\nprint(IsBingo)', '\n\nbingonum=[[0,0,0],[0,0,0],[0,0,0]]\nbingo=[["False","False","False"],["False","False","False"],["False","False","False"]]\nfor i in range(3):\n bingonum[i][0],bingonum[i][1],bingonum[i][2] = map(int,input().split())\n\nN = int(input())\nb=[]\nfor _ in range(N):\n b.append(input())\nfor x in range(N):\n for i in range(3):\n for j in range(3):\n if bingonum[i][j]==b[x]:\n bingo[i][j]="True"\n\nIsBingo = "No"\nfor i in range(3):\n if (bingo[i][0] and bingo[i][1] and bingo[i][2])=="True":\n IsBingo="Yes"\n elif (bingo[0][i] and bingo[1][i] and bingo[2][i])=="True":\n IsBingo="Yes"\nif (bingo[0][0] and bingo[1][1] and bingo[2][2] =="True") or (bingo[0][2] and bingo[1][1]and bingo[2][0]=="True"):\n IsBingo="Yes"\nprint(IsBingo)\n', 'bingonum=[[0,0,0],[0,0,0],[0,0,0]]\nbingo=[["False","False","False"],["False","False","False"],["False","False","False"]]\nfor i in range(3):\n bingonum[i][0],bingonum[i][1],bingonum[i][2] = map(int,input().split())\n\nN = int(input())\nb=[]\nfor _ in range(N):\n b.append(input())\nfor x in range(N):\n for i in range(3):\n for j in range(3):\n if bingonum[i][j]==b[x]:\n bingo[i][j]="True"\n\nIsBingo = "No"\nfor i in range(3):\n if bingo[i][0] =="True" and bingo[i][1] =="True" and bingo[i][2] =="True":\n IsBingo="Yes"\n if bingo[0][i] =="True" and bingo[1][i] =="True" and bingo[2][i] =="True":\n IsBingo="Yes"\nif (bingo[0][0] =="True" and bingo[1][1] =="True" and bingo[2][2] =="True") or (bingo[0][2] =="True" and bingo[1][1] =="True" and bingo[2][0]=="True"):\n IsBingo="Yes"\nprint(IsBingo)', '\n\nbingonum=[[0,0,0],[0,0,0],[0,0,0]]\nbingo=[["False","False","False"],["False","False","False"],["False","False","False"]]\nfor i in range(3):\n bingonum[i][0],bingonum[i][1],bingonum[i][2] = map(int,input().split())\n\nN = int(input())\nb=[]\nfor _ in range(N):\n b.append(input())\n\nfor x in range(N):\n for i in range(3):\n for j in range(3):\n if bingonum[i][j]==b[x]:\n bingo[i][j]="True"\n\nIsBingo = "No"\nfor i in range(3):\n if bingo[i][0] =="True" and bingo[i][1] =="True" and bingo[i][2] =="True":\n IsBingo="Yes"\n if bingo[0][i] =="True" and bingo[1][i] =="True" and bingo[2][i] =="True":\n IsBingo="Yes"\nif (bingo[0][0] =="True" and bingo[1][1] =="True" and bingo[2][2] =="True") or (bingo[0][2] =="True" and bingo[1][1] =="True" and bingo[2][0]=="True"):\n IsBingo="Yes"\nprint(IsBingo)\n\n', 'bingonum=[[0,0,0],[0,0,0],[0,0,0]]\nbingo=[["False","False","False"],["False","False","False"],["False","False","False"]]\nfor i in range(3):\n bingonum[i][0],bingonum[i][1],bingonum[i][2] = map(int,input().split())\n\nN = int(input())\nb=[]\nfor _ in range(N):\n b.append(int(input()))\nfor x in range(N):\n for i in range(3):\n for j in range(3):\n if bingonum[i][j]==b[x]:\n bingo[i][j]="True"\n\nIsBingo = "No"\nfor i in range(3):\n if bingo[i][0] =="True" and bingo[i][1] =="True" and bingo[i][2] =="True":\n IsBingo="Yes"\n if bingo[0][i] =="True" and bingo[1][i] =="True" and bingo[2][i] =="True":\n IsBingo="Yes"\nif (bingo[0][0] =="True" and bingo[1][1] =="True" and bingo[2][2] =="True") or (bingo[0][2] =="True" and bingo[1][1] =="True" and bingo[2][0]=="True"):\n IsBingo="Yes"\nprint(IsBingo)']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s012513503', 's222776674', 's241641706', 's744473076', 's882327585', 's150832085']
[3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0]
[18.0, 17.0, 18.0, 19.0, 18.0, 17.0]
[832, 846, 835, 842, 906, 847]
p02760
u411858517
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will 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 _ in range(3)]\nN = int(input())\nnumber = [int(input()) for _ in range(N)]\n\ncheck = [0 for _ in range(3)]\n\nfor i in range(N):\n for j in range(3):\n for k in range(3):\n if bingo[j][k] == N[i]:\n check[j][k] = 1\n \nans = 'No'\nfor i in range(3):\n if check[i][0] == 1 and check[i][1] == 1 and check[i][2] == 1:\n ans = 'Yes'\n \nfor i in range(3):\n if check[0][i] == 1 and check[1][i] == 1 and check[2][i] == 1:\n ans = 'Yes'\n \nif check[0][0] == 1 and check[1][1] == 1 and check[2][2] == 1:\n ans = 'Yes'\n \nif check[0][2] == 1 and check[1][1] == 1 and check[2][0] == 1:\n ans = 'Yes'\n \nprint(ans)\n ", "bingo = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nnumber = [int(input()) for _ in range(N)]\n\ncheck = [[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 bingo[j][k] == N[i]:\n check[j][k] = 1\n \nans = 'No'\nfor i in range(3):\n if check[i][0] == 1 and check[i][1] == 1 and check[i][2] == 1:\n ans = 'Yes'\n \nfor i in range(3):\n if check[0][i] == 1 and check[1][i] == 1 and check[2][i] == 1:\n ans = 'Yes'\n \nif check[0][0] == 1 and check[1][1] == 1 and check[2][2] == 1:\n ans = 'Yes'\n \nif check[0][2] == 1 and check[1][1] == 1 and check[2][0] == 1:\n ans = 'Yes'\n \nprint(ans)", "bingo = [list(map(int, input().split())) for _ in range(3)]\nN = int(input())\nnumber = [int(input()) for _ in range(N)]\n\ncheck = [[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 bingo[j][k] == number[i]:\n check[j][k] = 1\n \nans = 'No'\nfor i in range(3):\n if check[i][0] == 1 and check[i][1] == 1 and check[i][2] == 1:\n ans = 'Yes'\n \nfor i in range(3):\n if check[0][i] == 1 and check[1][i] == 1 and check[2][i] == 1:\n ans = 'Yes'\n \nif check[0][0] == 1 and check[1][1] == 1 and check[2][2] == 1:\n ans = 'Yes'\n \nif check[0][2] == 1 and check[1][1] == 1 and check[2][0] == 1:\n ans = 'Yes'\n \nprint(ans)\n"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s017841745', 's323215440', 's289476197']
[3064.0, 3064.0, 3064.0]
[18.0, 18.0, 17.0]
[671, 688, 694]
p02760
u411923565
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
["# B - Bingo\nimport itertools\nA = list()\nfor o in range(3):\n a = list(map(int, input().split()))\n A.append(a)\nN = int(input())\nb = list(int(input()) for p in range(N))\n\nbingo = [[A[0],A[1],A[2]],[A[0][0],A[1][0],A[2][0]],[A[1][0],A[1][1],A[2][1]],[A[2][0],A[2][1],A[2][2]],[A[0][0],A[1][1],A[2][2]],[A[0][2],A[1][1],A[2][0]]]\nprint(bingo)\n\nB_perm = [] \nB = itertools.permutations(b,3)\nfor i in B:\n B_perm.append(list(i))\n \nresult = 'No'\nfor j in range(len(B_perm)):\n if B_perm[j] in bingo: \n result = 'Yes'\n\nprint(result)", "# B - Bingo\nimport itertools\nA = list()\nfor o in range(3):\n a = list(map(int, input().split()))\n A.append(a)\nN = int(input())\nb = list(int(input()) for p in range(N))\n\nbingo = [A[0],A[1],A[2],[A[0][0],A[1][0],A[2][0]],[A[1][0],A[1][1],A[2][1]],[A[2][0],A[2][1],A[2][2]],[A[0][0],A[1][1],A[2][2]],[A[0][2],A[1][1],A[2][0]]]\n\nB_perm = [] \nB = itertools.permutations(b,3)\nfor i in B:\n B_perm.append(list(i))\nprint(B_perm)\n \nresult = 'No'\nfor j in range(len(B_perm)):\n if B_perm[j] in bingo: \n result = 'Yes'\n\nprint(result)", "# B - Bingo\nimport itertools\nA = list()\nfor o in range(3):\n a = list(map(int, input().split()))\n A.append(a)\nN = int(input())\nb = list(int(input()) for p in range(N))\n\nbingo = [A[0],A[1],A[2],[A[0][0],A[1][0],A[2][0]],[A[1][0],A[1][1],A[1][2]],[A[2][0],A[2][1],A[2][2]],[A[0][0],A[1][1],A[2][2]],[A[0][2],A[1][2],A[2][2]],[A[0][2],A[1][1],A[2][0]]]\n\nB_perm = [] \nB = itertools.permutations(b,3)\nfor i in B:\n B_perm.append(list(i))\n \nresult = 'No'\nfor j in range(len(B_perm)):\n if B_perm[j] in bingo: \n result = 'Yes'\n print('yes',B_perm[j])\n\nprint(result)", "# B - Bingo\nimport itertools\nA = list()\nfor o in range(3):\n a = list(map(int, input().split()))\n A.append(a)\nN = int(input())\nb = list(int(input()) for p in range(N))\n\nbingo = [A[0],A[1],A[2],[A[0][0],A[1][0],A[2][0]],[A[0][1],A[1][1],A[2][1]],[A[0][0],A[1][1],A[2][2]],[A[0][2],A[1][2],A[2][2]],[A[0][2],A[1][1],A[2][0]]]\n\nB_perm = [] \nB = itertools.permutations(b,3)\nfor i in B:\n B_perm.append(list(i))\n \nresult = 'No'\nfor j in range(len(B_perm)):\n if B_perm[j] in bingo: \n result = 'Yes'\n print('yes',B_perm[j])\n\nprint(result)", "# B - Bingo\nimport itertools\nA = list()\nfor o in range(3):\n a = list(map(int, input().split()))\n A.append(a)\nN = int(input())\nb = list(int(input()) for p in range(N))\n\nbingo = [A[0],A[1],A[2],[A[0][0],A[1][0],A[2][0]],[A[0][1],A[1][1],A[2][1]],[A[0][0],A[1][1],A[2][2]],[A[0][2],A[1][2],A[2][2]],[A[0][2],A[1][1],A[2][0]]]\n\nB_perm = [] \nB = itertools.permutations(b,3)\nfor i in B:\n B_perm.append(list(i))\n\nresult = 'No'\nfor j in range(len(B_perm)):\n if B_perm[j] in bingo: \n result = 'Yes'\n\nprint(result)"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s316608611', 's326797668', 's475762064', 's813973172', 's567151716']
[9264.0, 9144.0, 9184.0, 9208.0, 9268.0]
[26.0, 33.0, 31.0, 34.0, 30.0]
[617, 616, 659, 633, 598]
p02760
u417365712
2,000
1,048,576
We have a bingo card with a 3\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}. The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet contains some of those numbers, we will mark them on our sheet. Determine whether we will have a bingo when the N numbers are chosen, that is, the sheet will contain three marked numbers in a row, column, or diagonal.
["*inputs, = map(int, open(0).read().split())\nA = inputs[:9]\nB = inputs[9:]\n\nC = [0] * 9\nfor b in B:\n if b in A:\n C[A.index(b)] = 1\n \nif any([\n all(C[:3]), all(C[3:6]), all(C[6:]),\n all(C[::3]), all(C[1::3]), all(C[2::3]),\n all([C[0], C[4], C[8]]), all([C[2], C[4], C[6]])\n ]):\n print('Yes')\nelse:\n print('No')\nprint(C)", "*inputs, = map(int, open(0).read().split())\nA = inputs[:9]\nB = inputs[9:]\n\nC = [0] * 9\nfor b in B:\n if b in A:\n C[A.index(b)] = 1\n \nif any([\n all(C[:3]), all(C[3:6]), all(C[6:]),\n all(C[::3]), all(C[1::3]), all(C[2::3]),\n all([C[0], C[4], C[8]]), all([C[2], C[4], C[6]])\n ]):\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s154992685', 's619039646']
[3064.0, 3064.0]
[17.0, 18.0]
[341, 332]