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
p02547
u408148811
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n=int(input())\na=[]\nfor i in range(n):\n x,y=map(int,input().split())\n a.append([x,y])\nf=0;\nfor i in range(n-2):\n if (a[i][0]=a[i][1]and a[i+1][0]=a[i+1][1] and a[i+2][0]=a[i+2][1]):\n f=1\nif f:\n print("Yes")\nelse :\n print("No")\n ', 'n=int(input())\na=[]\nfor i in range(n):\n x,y=map(int,input().split())\n a.append([x,y])\nf=0;\nfor i in range(n-2):\n if (a[i][0]==a[i][1]and a[i+1][0]==a[i+1][1] and a[i+2][0]==a[i+2][1]):\n f=1\nif f:\n print("Yes")\nelse :\n print("No")\n ']
['Runtime Error', 'Accepted']
['s881639224', 's360591609']
[9024.0, 9192.0]
[26.0, 28.0]
[237, 240]
p02547
u409609062
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['if __name__ == \'__main__\':\n try:\n count = []\n result = 0\n T = int(input())\n for _ in range(T):\n x, y = map(int, input().split())\n count.append([x, y])\n\n for i in range(T-2):\n if count[i][0] == count[i][1] and count[i+1][0] == count[i+1][1] and count[i][1+2][0] == count[i+2][1]:\n print("Yes")\n exit(0)\n else:\n print("No")\n except Exception:\n pass', 'if __name__ == \'__main__\':\n try:\n count = []\n result = 0\n T = int(input())\n for _ in range(T):\n x, y = map(int, input().split())\n count.append([x, y])\n\n for i in range(T-2):\n if count[i][0] == count[i][1] and count[i+1][0] == count[i+1][1] and count[i+2][0] == count[i+2][1]:\n print("Yes")\n exit(0)\n else:\n print("No")\n except Exception:\n pass', 'if __name__ == \'__main__\':\n try:\n count = []\n result = 0\n T = int(input())\n for _ in range(T):\n x, y = map(int, input().split())\n count.append([x, y])\n\n for i in range(T-2):\n if count[i][0] == count[i][1] and count[i+1][0] == count[i+1][1] and count[i+2][0] == count[i+2][1]:\n print("Yes")\n exit(0)\n\n print("No")\n except Exception:\n pass']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s419383148', 's574597123', 's037275101']
[9144.0, 9136.0, 8932.0]
[27.0, 26.0, 31.0]
[483, 480, 455]
p02547
u414050834
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n=int(input())\nl=[]\nj=0\nfor i in range(n):\n a=list(map(int,input().split()))\n l.append(a)\nfor k in range(n-2):\n if l[k+2][0]==l[k+2][1] and l[k+3][0]==l[k+1][1] and l[k+4][0]==l[k+4][1]:\n j+=1\n break\nif j==1:\n print('Yes')\nelse:\n print('No')", "n=int(input())\nl=[]\nj=0\nfor i in range(n):\n a=list(map(int,input().split()))\n l.append(a)\nfor k in range(n-2):\n if l[k][0]==l[k][1] and l[k+1][0]==l[k+1][1] and l[k+2][0]==l[k+2][1]:\n j+=1\n break\nif j==1:\n print('Yes')\nelse:\n print('No')\n"]
['Runtime Error', 'Accepted']
['s772585196', 's652937787']
[9224.0, 9192.0]
[32.0, 26.0]
[252, 249]
p02547
u415581265
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n = int(input())\n\neq = 1\nprev = False\nfor i in range(n):\n d = [int(s) for s in input().split(' ')]\n if d[0] == d[1]:\n if prev:\n eq += 1\n prev = True\n else:\n prev = False\n eq = 1\n\nif eq >= 3:\n print('Yes')\nelse:\n print('No')\n", "n = int(input())\n\neq = 0\nmx = 0\nprev = False\nfor i in range(n):\n d = [int(s) for s in input().split(' ')]\n if d[0] == d[1]:\n if prev:\n eq += 1\n prev = True\n mx = max(eq, mx)\n else:\n prev = False\n eq = 0\n\nif mx >= 2:\n print('Yes')\nelse:\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s987998731', 's515109231']
[9100.0, 9192.0]
[32.0, 33.0]
[278, 310]
p02547
u419655514
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['def readInt():\n return int(input())\ndef readList():\n return list(map(int,input().split()))\ndef readMap():\n\treturn map(int,input().split())\ndef readStr():\n return input()\ninf=float(\'inf\')\nmod = 10**9+7\nimport math\ndef solve(n,A):\n count=0\n for x,y in A:\n if x==y:\n count+=1\n else:\n count=0\n if count==3:\n return True\n return False\n\nn=readInt()\nA=[]\nfor _ in range(n):\n A.append(readList())\nif solve(n,A):\n print("YES")\nelse:\n print("NO")', 'def readInt():\n return int(input())\ndef readList():\n return list(map(int,input().split()))\ndef readMap():\n\treturn map(int,input().split())\ndef readStr():\n return input()\ninf=float(\'inf\')\nmod = 10**9+7\nimport math\ndef solve(n,A):\n count=0\n for x,y in A:\n if x==y:\n count+=1\n else:\n count=0\n if count==3:\n return True\n return False\n\nn=readInt()\nA=[]\nfor _ in range(n):\n A.append(readList())\nif solve(n,A):\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s283200054', 's652570983']
[9208.0, 9200.0]
[29.0, 32.0]
[517, 518]
p02547
u422977492
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n=int(input())\nc=0\nfor i in range(n):\n a,b=map(int,input().split())\n if a==b:\n c+=1\nif c>3:\n print("Yes")\nelse:\n print("No")', 'n=int(input())\nc=0\nfor i in range(n):\n a,b=map(int,input().split())\n if a==b:\n c+=1\n else:\n c=0\nif c>2:\n print("Yes")\nelse:\n print("No")\n#print(c)', 'n=int(input())\nc=0\nm=0\nfor i in range(n):\n a,b=map(int,input().split())\n if a==b:\n c+=1\n else:\n c=0\n m=max(c,m)\nif m>=3:\n print("Yes")\nelse:\n print("No")\n#print(c)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s209883370', 's230120545', 's680416710']
[9108.0, 9136.0, 9176.0]
[27.0, 25.0, 33.0]
[131, 157, 175]
p02547
u435974296
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["N=int(input())\nL=0\nfor i in range(N):\n K=set(map(int,input().split()))\n if len(K)==1:\n L+=1\n else:\n L=0\nif L>=3:\n print('Yes')\nelse:\n print('No')\n", "N=int(input())\nL=0\nfor i in range(N):\n K=set(map(int,input().split()))\n if len(K)==1:\n L+=1\n if L==3:\n print('Yes')\n break\n else:\n L=0\nif L<3:\n print('No')"]
['Wrong Answer', 'Accepted']
['s559974229', 's237805377']
[9164.0, 9120.0]
[29.0, 27.0]
[175, 210]
p02547
u438070303
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
[' doubletCount = 0\n cases = int(input())\n for roll in range(cases):\n d1, d2 = map(int, input().split())\n if d1 == d2:\n doubletCount += 1\n else:\n doubletCount = 0\n \n if doubletCount >= 3:\n print("Yes")\n break\n \n if roll == cases - 1:\n print("No")', 'doubletCount = 0\ncases = int(input())\nfor roll in range(cases):\n d1, d2 = map(int, input().split())\n if d1 == d2:\n doubletCount += 1\n else:\n doubletCount = 0\n \n if doubletCount >= 3:\n print("Yes")\n break\n \n if roll == cases - 1:\n print("No")']
['Runtime Error', 'Accepted']
['s798180989', 's742981777']
[8932.0, 9172.0]
[26.0, 28.0]
[361, 317]
p02547
u451233002
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['S = []\nfor _ in range(N):\n S.append(input().split())\nG = []\nfor i in range(N):\n if S[i][0] == S[i][1]:\n G.append("1")\n else:\n G.append("0")\n\nAN = (\'\'.join(G))\n\nif "111" in AN:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\nS = []\nfor j in range(N):\n S.append(input().split())\nG = []\nfor i in range(N):\n if S[i][0] == S[i][1]:\n G.append("1")\n else:\n G.append("0")\n\nAN = (\'\'.join(G))\n\nif "111" in AN:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s817826637', 's325751103']
[9104.0, 9128.0]
[28.0, 29.0]
[219, 236]
p02547
u458967973
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["num = input()\nd = []\nfor n in range(num):\n t, s = input().split()\n d.append([t,s])\nflag = 0\nfor n in range(num):\n if(n<num-2):\n if(d[n][0]==d[n][1] and d[n+1][0]==d[n+1][1] and d[n+2][0]==d[n+2][1]):\n flag = 1\nif flag == 1:\n print('Yes')\nelse:\n print('No')", "num = input()\nd = []\nnum = int(num)\nfor n in range(num):\n t, s = input().split()\n d.append([t,s])\nflag = 0\nfor n in range(num):\n if(n<num-2):\n if(d[n][0]==d[n][1] and d[n+1][0]==d[n+1][1] and d[n+2][0]==d[n+2][1]):\n flag = 1\nif flag == 1:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s355570326', 's114602416']
[9004.0, 9200.0]
[28.0, 30.0]
[289, 304]
p02547
u460859277
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n = int(input())\ncounter = 0\nvalue = False\nfor i in range(n):\n a,b = map(int, input().split())\n if i == 0:\n if a == b:\n counter+=1\n value = True\n else:\n if a == b and value == True:\n counter+=1\n value = True\n elif a == b and value == False:\n counter = 1\n value = True\n else:\n value = False\n print(counter)\n\nif counter >= 3:\n print("Yes")\nelse:\n print("No")', 'n = int(input())\ncounter = 0\ncoutlist = []\nvalue = False\nfor i in range(n):\n a,b = map(int, input().split())\n if i == 0:\n if a == b:\n counter+=1\n coutlist.append(counter)\n value = True\n else:\n if a == b and value == True:\n counter+=1\n value = True\n coutlist.append(counter)\n elif a == b and value == False:\n counter = 1\n value = True\n coutlist.append(counter)\n else:\n counter = 0\n value = False\n coutlist.append(counter)\n\nif max(coutlist) >= 3:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s681207702', 's013401949']
[9204.0, 8992.0]
[34.0, 31.0]
[480, 652]
p02547
u467541330
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['N = int(input())\n\ncount = 0\nflag = 0\n\nfor i in range(N):\n N,M = map(int, input().split())\n if N == M:\n count += 1\n else:\n count = 0\n if count >= 3:\n flag = 1\n \nif flag == 1:\n print("yes")\nelse:\n print("no")', 'N = int(input())\n\ncount = 0\nflag = 0\n\nfor i in range(N):\n N,M = map(int, input().split())\n if N == M:\n count += 1\n else:\n count = 0\n if count >= 3:\n flag = 1\n \nif flag == 1:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s224403528', 's857094320']
[9172.0, 9100.0]
[29.0, 29.0]
[223, 223]
p02547
u468972478
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n = int(input())\ns = 0\nfor i in range(n):\n a, b = map(int, input().split())\n if a == b:\n s += 1\n else:\n s = 0\nprint("Yes" if s >= 3 else "No")', 'n = int(input())\ns = 0\nfor i in range(n):\n if s == 3:\n break\n a, b = map(int, input().split())\n if a == b:\n s += 1\n else:\n s = 0\nprint("Yes" if s >= 3 else "No")']
['Wrong Answer', 'Accepted']
['s374973866', 's049062817']
[9164.0, 9164.0]
[29.0, 35.0]
[151, 174]
p02547
u471217476
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n=int(input())\nl=[list(map(int,input().split())) for _ in range(n)]\nf=[]\nfor x in l:\n\tf.append(x[0]==x[1])\nl=f.copy()\ni=0\nwhile i<n:\n\tj=0\n\twhile i+j<n and l[i+j]==l[i] and l[i]:\n\t\tj+=1 \n\tif j>2:\n\t\tprint('Yes')\n\t\tbreak\t\n\ti+=j\nelse:\n\tprint('No')\n\t", "n=int(input())\nl=[list(map(int,input().split())) for _ in range(n)]\nf=[]\nfor x in l:\n\tf.append(x[0]==x[1])\nl=f.copy()\ni=0\nwhile i<n:\n\tj=1\n\twhile i+j<n and l[i+j]==l[i] and l[i]:\n\t\tj+=1 \n\tif j>2:\n\t\tprint('Yes')\n\t\tbreak\t\n\ti+=j\nelse:\n\tprint('No')\n\t"]
['Time Limit Exceeded', 'Accepted']
['s100683437', 's253005753']
[9100.0, 9184.0]
[2205.0, 27.0]
[245, 245]
p02547
u473234868
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n = int(input())\ntotal = 0\n\nfor i in range(n):\n a,b = map(int,split().input())\n if a == b:\n total += 1\n if total == 3:\n break\n else:\n total = 0\nif total == 3:\n print('Yes')\nelse:\n print('No')", "n = int(input())\ntotal = 0\n\nfor i in range(n):\n a,b = map(int, input().split())\n if a == b:\n total += 1\n if total == 3:\n break\n else:\n total = 0\nif total == 3:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s310223412', 's031790242']
[9168.0, 9116.0]
[29.0, 28.0]
[210, 211]
p02547
u476674874
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['def main():\n N = int(input())\n zoro = 0\n for _ in range(N):\n d1 , d2 = map(int,input().split())\n if d1 == d2:\n zoro += 1\n else:\n zoro = 0\n if zoro > 2:\n print("yes")\n return\n print("No")\n\nif __name__ == \'__main__\':\n main()\n', 'def main():\n N = int(input())\n zoro = 0\n dice = []\n for _ in range(N):\n dice.append(list(map(int, input().split())))\n\n \n for d1, d2 in dice:\n if d1 == d2:\n zoro += 1\n else:\n zoro = 0\n if zoro > 2:\n break\n \n ans = "Yes" if zoro > 2 else "No"\n print(ans)\n\nif __name__ == \'__main__\':\n main()\n']
['Wrong Answer', 'Accepted']
['s648753466', 's671642786']
[9164.0, 9180.0]
[30.0, 29.0]
[310, 380]
p02547
u490510787
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n=int(input())\nlst1=[]\nlst2=[]\ncount=0\nfor _ in range(n):\n m,k=[int(x) for x in input().split()]\n lst1.append(m)\n lst2.append(k)\nif(n<3):\n print('NO')\nelse:\n \n for i in range(n-2):\n if(lst1[i]==lst2[i] and lst1[i+1]==lst2[i+1] and lst1[i+2]==lst2[i+2]):\n count=3\n break\n if(count>=3):\n print('YES')\n else:\n print('NO')\n ", "n=int(input())\nlst1=[]\nlst2=[]\ncount=0\nfor _ in range(n):\n m,k=[int(x) for x in input().split()]\n lst1.append(m)\n lst2.append(k)\nif(n<3):\n print('NO')\nelse:\n \n for i in range(n-2):\n if(lst1[i]==lst2[i] and lst1[i+1]==lst2[i+1] and lst1[i+2]==lst2[i+2]):\n count=3\n break\n if(count==3):\n print('YES')\n else:\n print('NO')\n ", "n=int(input())\nlst1=[]\nlst2=[]\ncount=0\nfor _ in range(n):\n m,k=[int(x) for x in input().split()]\n lst1.append(m)\n lst2.append(k)\nfor i in range(n-2):\n if(lst1[i]==lst2[i] and lst1[i+1]==lst2[i+1] and lst1[i+2]==lst2[i+2]):\n count=3\n break\nif(count==3):\n print('Yes')\nelse:\n print('No')\n "]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s411503457', 's522333220', 's560875659']
[9188.0, 9196.0, 9192.0]
[28.0, 30.0, 34.0]
[390, 390, 322]
p02547
u497200058
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["N = int(input())\nnum = 0\nfor i in range(N):\n D = list(map(int, input().split(' ')))\n if D[0] == D[1]:\n num += 1\n else:\n num = 0\n\nif num >= 3:\n print('Yes')\nelse:\n print('No')\n", "N = int(input())\nnum = 0\nans = False\nfor i in range(N):\n D = list(map(int, input().split(' ')))\n if D[0] == D[1]:\n num += 1\n if num >= 3:\n ans = True\n else:\n num = 0\n\nif ans:\n print('Yes')\nelse:\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s180535263', 's129753021']
[9016.0, 9172.0]
[30.0, 28.0]
[186, 227]
p02547
u505493564
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["import sys\nsi=sys.stdin.readline\n\nn=int(si())\nt=0\nwhile n:\n n-=1\n a,b=[int(e) for e in si().split()]\n if a==b:\n t+=1\n else:\n t=0\nif t>=3:\n print('Yes')\nelse:\n print('No')\n ", "import sys\nsi = sys.stdin.readline\n\nn = int(si())\nt = 0\nflag = False\nwhile n:\n n -= 1\n a, b = [int(e) for e in si().split()]\n if a == b:\n t += 1\n else:\n t = 0\n if t >= 3:\n flag = True\nif flag:\n print('Yes')\nelse:\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s590543027', 's602276268']
[9168.0, 9156.0]
[31.0, 29.0]
[185, 268]
p02547
u514343483
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['N=int(input())\nx = [list(map(int, input().split())) for i in range(N)]\nA="NO"\nfor n in range(N-2):\n if x[n][0]==x[n][1] and x[n+1][0]==x[n+1][1] and x[n+2][0]==x[n+2][1]:\n A="YES"\n break\nprint(A)', 'N=int(input())\nx = [list(map(int, input().split())) for i in range(N)]\nA="NO"\nfor n in range(N-2):\n if x[n][0]==x[n][1] and x[n+1][0]==x[n+1][1] and x[n+2][0]==x[n+2][1]:\n A="YES"\n break\nprint(A)', 'N=int(input())\n\nX=[]\nY=[]\nfor _ in range(N):\n x, y = map(int, input().split())\n X.append(x)\n Y.append(y)\nA="NO"\nfor n in range(N-2):\n if X[n]==Y[n] and X[n+1]==Y[n+1] and X[n+2]==Y[n+2]:\n A="YES"\n break\nprint(A)', 'N=int(input())\n\nX=[]\nY=[]\nfor _ in range(N):\n x, y = map(int, input().split())\n X.append(x)\n Y.append(y)\n \nA="NO"\nfor n in range(N-2):\n if X[n]==Y[n]:\n if X[n+1]==Y[n+1]:\n if X[n+2]==Y[n+2]:\n A="YES"\n break\n else:\n continue\n else:\n continue\n else:\n continue\nprint(A)', 'N=int(input())\n\nX=[]\nY=[]\nfor _ in range(N):\n x, y = map(int, input().split())\n X.append(x)\n Y.append(y)\n \nA="No"\nfor n in range(N-2):\n if X[n]==Y[n]:\n if X[n+1]==Y[n+1]:\n if X[n+2]==Y[n+2]:\n A="Yes"\n break\n else:\n continue\n else:\n continue\n else:\n continue\nprint(A)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s067570652', 's105260368', 's480563897', 's541811710', 's605943352']
[9176.0, 9144.0, 9116.0, 9188.0, 9116.0]
[30.0, 29.0, 31.0, 33.0, 28.0]
[212, 212, 237, 383, 383]
p02547
u514390882
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['N = int(input())\nflug = False\ncnt = 0\nfor _ in range(N):\n D1, D2 = list(map(int, input().split())) \n if D1 == D2:\n cnt += 1\n else:\n cnt = 0\n if cnt >= 3:\n flug = True\nif flug:\n print("YES")\nelse:\n print("NO")', 'N = int(input())\nflug = False\ncnt = 0\nfor _ in range(N):\n D1, D2 = list(map(int, input().split())) \n if D1 == D2:\n cnt += 1\n else:\n cnt = 0\n if cnt >= 3:\n flug = True\nif flug:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s968903413', 's152767180']
[9176.0, 9176.0]
[29.0, 29.0]
[247, 247]
p02547
u528993843
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n=int(input())\nk=0\nfor i in range(n):\n a,b=map(int,input().split())\n if(a==b):\n k+=1\nif(k>=3):\n print("YES")\nelse:\n print("NO")', 'n=int(input())\nk=0\nc=0\nfor i in range(n):\n a,b=map(int,input().split())\n if(a==b):\n k+=1\n if(k>=3):\n c=1\n else:\n k=0\n\nif(c==1):\n print("YES")\nelse:\n print("NO")\n', 'n=int(input())\nk=0\nc=0\nfor i in range(n):\n a,b=map(int,input().split())\n if(a==b):\n k+=1\n if(k>=3):\n c=1\n else:\n k=0\n\nif(c==1):\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s593410278', 's799449635', 's067813863']
[9052.0, 9172.0, 9188.0]
[31.0, 30.0, 30.0]
[134, 190, 190]
p02547
u531599639
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n = int(input())\nans = 0\nfor _ in range(n):\n a,b = map(int,input().split())\n if a==b:\n ans += 1\n else:\n ans = 0\nprint('Yes' if ans>=3 else 'No')", "n = int(input())\nans = 0\ntmp = 0\nfor _ in range(n):\n a,b = map(int,input().split())\n if a==b:\n tmp += 1\n else:\n ans = max(ans,tmp)\n tmp = 0\nans = max(ans,tmp)\nprint('Yes' if ans>=3 else 'No')"]
['Wrong Answer', 'Accepted']
['s897206908', 's323466854']
[9168.0, 9192.0]
[32.0, 34.0]
[153, 203]
p02547
u533232830
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['cnt = 0\nfor _ in range(n):\n a, b = map(int, input().split())\n if a == b:\n cnt += 1\n else:\n cnt = 0\n \n if cnt == 3:\n print("Yes")\n exit()\n\nprint("No")', 'n = int(input())\ncnt = 0\nfor _ in range(n):\n a, b = map(int, input().split())\n if a == b:\n cnt += 1\n else:\n cnt = 0\n \n if cnt == 3:\n print("Yes")\n exit()\n\nprint("No")']
['Runtime Error', 'Accepted']
['s379447202', 's143549010']
[9100.0, 9104.0]
[31.0, 27.0]
[166, 183]
p02547
u534372121
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['N = int(input())\nflag = 0\nans = "No"\nfor i in range(N):\n A,B = input().split()\n if A == B: \n flag += 1\n if flag == 3:\n ans = "Yes"\n break\n else:\n flag = 0\n \n \nprint(ans)', 'N = int(input())\nflag = 0\nans = "No"\nfor i in range(N):\n A,B = input().split()\n if A == B: \n flag += 1\n else:\n flag = 0\n if flag == 3:\n ans = "Yes"\n break\n \nprint(ans)']
['Wrong Answer', 'Accepted']
['s903585411', 's032099533']
[9020.0, 9176.0]
[28.0, 30.0]
[192, 189]
p02547
u536235324
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['# -*- coding: utf-8 -*-\n"""\nCreated on Sat Sep 19 13:06:46 2020\n\n@author: Admin\n"""\n\nn=int(input())\nl=[]\nflag=0\nfor i in range(n):\n a,b=input().split()\n w=[int(a),int(b)]\n l.append(w)\nfor i in range(len(l)-2):\n if l[i][0]==l[i][1] and l[i+1][0]==l[i+1][1] and l[i+2][0]==l[i+2][1]:\n print(\'yes\')\n flag=1\n break\nif flag==0:\n print(\'no\')', '# -*- coding: utf-8 -*-\n"""\nCreated on Sat Sep 19 13:06:46 2020\n\n@author: Admin\n"""\n\nn=int(input())\nl=[]\nflag=0\nfor i in range(n):\n a,b=input().split()\n w=[int(a),int(b)]\n l.append(w)\nfor i in range(len(l)-2):\n if l[i][0]==l[i][1] and l[i+1][0]==l[i+1][1] and l[i+2][0]==l[i+2][1]:\n print(\'Yes\')\n flag=1\n break\nif flag==0:\n print(\'No\')']
['Wrong Answer', 'Accepted']
['s440466394', 's197875958']
[9200.0, 9196.0]
[27.0, 31.0]
[371, 371]
p02547
u546853743
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n=int(input())\nfor i in range(n):\n a,b=list(map(int,input().split()))\nfor i in range(n-2):\n if a[i]==b[i] and a[i+1]==b[i+1] and a[i+2]==b[i+2]:\n print('Yes')\n exit()\nprint('No')", "n=int(input())\nk=0\nl=0\nfor i in range(n):\n a,b=map(int,input().split())\n if a==b:\n k += 1\n if k==3:\n print('Yes')\n exit()\n else:\n k = 0\nprint('No')"]
['Runtime Error', 'Accepted']
['s603673593', 's351201126']
[9180.0, 9128.0]
[28.0, 30.0]
[198, 199]
p02547
u555125997
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n = int(input())\nc, d = [], []\nfor i in range(n):\n a, b = [int(i) for i in input().split()]\n c.append(a)\n d.append(b)\n\ncount = 1\n\nfor i in range(1, n):\n if c[i-1] == c[i] and d[i-1] == d[i]:\n count += 1\n else:\n count = 1\n if count == 3:\n break\n\nif count == 3:\n print('Yes')\n\nelse:\n print('No')\n", "n = int(input())\nc, d = [], []\nfor i in range(n):\n a, b = [int(i) for i in input().split()]\n c.append(a)\n d.append(b)\n\ncount = 0\n\nfor i in range(0, n):\n if c[i] == d[i]:\n count += 1\n else:\n count = 0\n if count == 3:\n break\n\nif count == 3:\n print('Yes')\n\nelse:\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s196474642', 's756554266']
[9080.0, 9152.0]
[29.0, 30.0]
[339, 318]
p02547
u556610039
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['num = int(input())\nans = 0\ncnt = 0\nfor x in range(num):\n d1, d2 = map(int, input().split())\n if d1 == d2: cnt += 1\n else: \n ans = max(cnt, 2)\n cnt = 0\nans = max(cnt, 2)\nif ans >= 3: print("Yes")\nelse: print("No")', 'num = int(input())\nans = 0\ncnt = 0\nfor x in range(num):\n d1, d2 = map(int, input().split())\n if d1 == d2: cnt += 1\n else: \n ans = max(cnt, ans)\n cnt = 0\nans = max(cnt, ans)\nif ans >= 3: print("Yes")\nelse: print("No")']
['Wrong Answer', 'Accepted']
['s156259377', 's601322432']
[9184.0, 9184.0]
[29.0, 25.0]
[236, 240]
p02547
u561636464
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['A = list(map(int, input().split()))\nN = A[0]\nD = A[1:N*2+1]\nD1 = []\nD2 = []\nfor i in range(N):\n D1.append(D[2 * i])\n D2.append(D[2 * i + 1])\nans = "No"\nfor i in range(N - 2):\n if D1[i] == D[i]:\n if D[i + 1] == D[i + 1]:\n if D[i + 2] == D[i + 2]:\n ans = "Yes"\n break\nprint(ans)', 'N = int(input())\nD = [input().split() for _ in range(N)]\nans = "no"\nfor i in range(N - 2):\n if D[i][0] == D[i][1]:\n if D[i + 1][0] == D[i + 1][1]:\n if D[i + 2][0] == D[i + 2][1]:\n ans = "yes"\n break\nprint(ans)', 'N = int(input())\nD = [input().split() for _ in range(N)]\nans = "No"\nfor i in range(N - 2):\n if D[i][0] == D[i][1]:\n if D[i + 1][0] == D[i + 1][1]:\n if D[i + 2][0] == D[i + 2][1]:\n ans = "Yes"\n break\nprint(ans)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s367406195', 's649102416', 's663854474']
[9220.0, 9184.0, 9128.0]
[25.0, 34.0, 38.0]
[334, 261, 261]
p02547
u571537830
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n = int(input())\nd = []\nfor i in range(n):\n x = list(map(int, input().split()))\n d.append(x)\n\nd2 = []\nans = "No"\n\nfor i in range(n):\n for j in range(2):\n d2.append(d[i][j])\n\nprint(d2)\n\nfor i in range(0, len(d2)-2):\n if d2[i] == d2[i+1] and d2[i] == d2[i+2]:\n ans = "Yes"\n break\n\nprint(ans)', 'n = int(input())\nd = []\nfor i in range(n):\n x = list(map(int, input().split()))\n d.append(x)\n\nd2 = []\nans = "No"\n\nfor i in range(n):\n if d[i][0] == d[i][1]:\n d2.append(1)\n else:\n d2.append(0)\n\nfor i in range(0, n-2):\n if d2[i] == 1 and d2[i+1] == 1 and d2[i+2] == 1:\n ans = "Yes"\n break\n\nprint(ans)']
['Wrong Answer', 'Accepted']
['s518846827', 's510060954']
[9200.0, 9200.0]
[31.0, 28.0]
[322, 341]
p02547
u571999153
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n = int(input())\ncount = 0\nans = 0\nfor i in range(n):\n a,b = map(int, input().split())\n if a == b:\n count += 1\n else:\n count = 0\n if count >= 3:\n ans = 1\n break\nif ans = 1:\n print('Yes')\nelse:\n print('No')", "n = int(input())\ncount = 0\nans = 'No'\nfor i in range(n):\n a,b = map(int, input().split())\n if a == b:\n count += 1\n else:\n count = 0\n if count >= 3:\n ans = 'Yes'\n break\nprint(ans)\n"]
['Runtime Error', 'Accepted']
['s199889500', 's584670343']
[9044.0, 9068.0]
[23.0, 26.0]
[224, 195]
p02547
u573512968
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['N=int(input())\ncount=0\nlst=[]\nfor i in range(N):\n x,y=map(int,input().split())\n # l=[]\n # l.append(x)\n # l.append(y)\n # lst.append(l)\n if x==y:\n count+=1\n if x!=y:\n break\nif count==3:\n print("Yes")\nelse:\n print("No")', 'N=int(input())\ncount=0\nl=[]\nfor i in range(N):\n x,y=map(int,input().split())\n # l=[]\n # l.append(x)\n # l.append(y)\n # lst.append(l)\n if x==y:\n count+=1\n if x!=y:\n l.append(count)\n count=0\nif len(l)==0:\n \n l.append(count)\nl.sort()\nx2=l[-1]\nif x2>=3:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s944119054', 's502159692']
[9168.0, 9188.0]
[29.0, 30.0]
[257, 335]
p02547
u574888872
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['def func(D):\n comb = 0\n for item in D:\n if item[0]==item[1]:\n comb+=1\n else:\n comb=0\n \n if comb==3:\n return "Yes" \n return "No"\n\nif __name__ == "__main__":\n N = int(input())\n D = [map(int, input().split()) for _ in range(N)]\n print(func(D))', 'def func(D):\n comb = 0\n for item in D:\n if item[0]==item[1]:\n comb+=1\n else:\n comb=0\n \n if comb==3:\n return "Yes" \n return "No"\n\nif __name__ == "__main__":\n N = int(input())\n D = [list(map(int, input().split())) for _ in range(N)]\n print(func(D))']
['Runtime Error', 'Accepted']
['s630289490', 's770308804']
[9168.0, 9192.0]
[26.0, 28.0]
[280, 286]
p02547
u577134002
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n=int(input())\ns=0\nfor i in range(n):\n lis=input().split()\n if lis[0]==lis[1]:\n s+=1\n else:\n s=0\nif s>=3:\n print("Yes")\nelse:\n print("No")', 'n=int(input())\ns=0\nok=0\nfor i in range(n):\n lis=input().split()\n if lis[0]==lis[1]:\n s+=1\n if s>=3:\n ok=1\n else:\n s=0\nif ok==1:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s647104031', 's455130680']
[9164.0, 9092.0]
[31.0, 33.0]
[149, 179]
p02547
u577139181
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['num = int(input())\n\ncount = 0\nflag = False\nfor i in range(num):\n a,b = read().split()\n if a == b:\n count += 1\n if count >= 3:\n print("Yes")\n flag = True\n break\n else:\n count = 0\nif flag:\n print("No")', 'num = int(input())\n\ncount = 0\nfor i in range(num):\n a,b = read().split()\n if a == b:\n count += 1\n if count >= 3:\n print(Yes)\n return()\n else:\n count = 0\nprint("No")', 'num = int(input())\n\ncount = 0\nflag = False\nfor i in range(num):\n a,b = input().split()\n if a == b:\n count += 1\n if count >= 3:\n print("Yes")\n flag = True\n break\n else:\n count = 0\nif not flag:\n print("No")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s694690581', 's790834557', 's860919041']
[9096.0, 9004.0, 9032.0]
[23.0, 25.0, 32.0]
[265, 216, 270]
p02547
u578930448
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n = int(input())\ncount = 0\na = []\n\nfor i in range(n):\n al, be = map(int, input().split())\n if al == be:\n count += 1\n if count >= 3:\n print("Yes")\n else:\n count = 0\nelse:\n print("No")\n', 'n = int(input())\na = []\nfound = False\ncount = 0\nfor i in range(n):\n al, b = map(int, input().split())\n a.append((a, b))\n if found:\n print("Yes")\n break\n if a[i][0] == a[i][1]:\n count += 1\n if count >= 3: # that means that the i is in last 3 numbers\n print("Yes")\n break\n else:\n count = 0\nelse:\n print("No")\n', 'n = int(input())\ncount = 0\n\nfor i in range(n):\n al, be = map(int, input().split())\n if al == be:\n count += 1\n if count >= 3:\n print("Yes")\n break\n else:\n count = 0\nelse:\n print("No") if count < 3 else print("Yes")\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s190044770', 's563705487', 's420141557']
[9164.0, 9176.0, 9164.0]
[28.0, 32.0, 27.0]
[201, 338, 269]
p02547
u581636201
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['N=int(input())\nT=False\nk=0\nfor i in range(N):\n D1,D2=map(int,input().split())\n if D1==D2:\n k+=1\n if k>=3:\n T=True\n else:\n k=0\n print(k)\nif T:\n print("Yes")\nelse:\n print("No")', 'N=int(input())\nT=False\nk=0\nfor i in range(N):\n D1,D2=map(int,input().split())\n if D1==D2:\n k+=1\n if k>=3:\n T=True\n else:\n k=0\nif T:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s909762928', 's539412298']
[9180.0, 9176.0]
[33.0, 32.0]
[224, 211]
p02547
u609176437
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['import sys\n\nn = int(input())\ndeme = [input().split() for i in range(n)]\n\n#print(deme)\n\ntoki = 0\n\nfor i in range(n):\n if deme[i][0] == deme[i][1]:\n toki += 1\n if toki >= 3:\n print("YES")\n sys.exit(0)\n \n else:toki = 0\n\nprint("NO")\n\n ', 'import sys\n\nn = int(input())\ndeme = [input().split() for i in range(n)]\n\n#print(deme)\n\ntoki = 0\n\nfor i in range(n):\n if deme[i][0] == deme[i][1]:\n toki += 1\n if toki >= 3:\n print("Yes")\n sys.exit(0)\n \n else:toki = 0\n\nprint("No")']
['Wrong Answer', 'Accepted']
['s589609087', 's199032450']
[9012.0, 9172.0]
[31.0, 31.0]
[255, 249]
p02547
u635759013
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['N = int(input())\nnums =[]\ncount = 0\nswitch = False\nfor i in range(N):\n nums.append([int(x) for x in input().split()]\n\nfor j in nums:\n if j[0] == j[1]:\n count += 1\n elif j[0] != j[1]:\n count = 0\n if count == 3:\n switch = True\nif switch == True:\n print("Yes")\nelif switch == False:\n print("No")', 'N = int(input())\nnums =[]\ncount = 0\nswitch = False\nfor i in range(N):\n nums.append([int(x) for x in input().split()])\n\nfor j in nums:\n if j[0] == j[1]:\n count += 1\n elif j[0] != j[1]:\n count = 0\n if count == 3:\n switch = True\nif switch == True:\n print("Yes")\nelif switch == False:\n print("No")\n']
['Runtime Error', 'Accepted']
['s305252292', 's155283933']
[9016.0, 9176.0]
[25.0, 28.0]
[331, 333]
p02547
u636582303
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['N = int(input())\n\nmulArr = []\nfor _ in range(N):\n arr = list(map(int, input().split(" ")))\n mulArr.append(arr)\nprint(mulArr)\n\nresult = 0\nfor i in range(0, len(mulArr) - 2):\n print(i)\n if mulArr[i][0] == mulArr[i][1] and mulArr[i + 1][0] == mulArr[i + 1][1] and mulArr[i + 2][0] == mulArr[i + 2][1]:\n result += 1\n\nprint(result)\nif result != 0:\n print("Yes")\nelse:\n print("No")\n', 'N = int(input())\n\nmulArr = []\nfor _ in range(N):\n arr = list(map(int, input().split(" ")))\n mulArr.append(arr)\n# print(mulArr)\n\nresult = 0\nfor i in range(0, len(mulArr) - 2):\n # print(i)\n if mulArr[i][0] == mulArr[i][1] and mulArr[i + 1][0] == mulArr[i + 1][1] and mulArr[i + 2][0] == mulArr[i + 2][1]:\n result += 1\n\n# print(result)\nif result != 0:\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s603249043', 's574122724']
[9196.0, 9192.0]
[30.0, 30.0]
[385, 391]
p02547
u645183909
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['cnt = 0\nzorome = 0\nnum = input()\n\nwhile cnt < num:\n mass = input().split()\n \n if(mass[0] == mass[1]):\n zorome += 1\n \n if(zorome >= 3):\n break\n \n cnt += 1\n\nprint("Yes" if zorome >= 3 else "No")', 'cnt = 0\nzorome = 0\nnum = input()\n\nwhile cnt < num:\n mass = input().split()\n \n if(mass[0] == mass[1]):\n zorome += 1\n \n if(zorome >= 3):\n break\n else:\n zorome = 0\n \n cnt += 1\n\nprint("Yes" if zorome >= 3 else "No")\n', 'cnt = 0\nzorome = 0\nnum = int(input())\n\nwhile cnt < num:\n mass = input().split()\n \n if(mass[0] == mass[1]):\n zorome += 1\n \n if(zorome >= 3):\n break\n else:\n zorome = 0\n \n cnt += 1\n\nprint("Yes" if zorome >= 3 else "No")\n\n\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s508778462', 's796129264', 's519974307']
[9108.0, 9108.0, 9168.0]
[20.0, 31.0, 31.0]
[211, 235, 242]
p02547
u655048024
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['N =int(input())\nD = []\nfor i in range(n):\n D.append([])\n\nfor i in range(N):\n\tfor j in range(2):\n \tD[i][j]=int(input())\n\nfor x in range(N-2):\n \tif D[x][1]==D[x][2] and D[x+1][1]==D[x+1][2] and D[x+2][1]==D[x+2][2]:\n \tprint("Yes")\n break\n else:\n \tprint("No")\n', 'N =int(input())\nD = []\nfor i in range(N):\n d_1,d_2 = map(int,input().split())\n D.append([d_1,d_2])\nfor x in range(N-2):\n if D[x][0]==D[x][1] and D[x+1][1]==D[x+1][0] and D[x+2][1]==D[x+2][0]:\n print("Yes")\n break\n else:\n print("No")\n', 'n = int(input())\nans = "No"\nj = 0\nfor i in range(n):\n d,dd = map(str,input().split())\n if(d==dd):\n if(j>0):\n j += 1\n else:\n j=0\n if(j=>3):\n ans = "Yes"\nprint(ans)\n', 'n = int(input())\nans = "No"\nj = 0\nfor i in range(n):\n d,dd = map(str,input().split())\n if(d==dd):\n if(j>0):\n j += 1\n if(j==3):\n ans = "Yes"\n else:\n j=0\nprint(ans)', 'n = int(input())\nans = "No"\nj = 0\nfor i in range(n):\n d,dd = map(str,input().split())\n if(d==dd):\n if(j>0):\n j += 1\n else:\n j = 0\n if(j==3):\n ans = "Yes"\nprint(ans)', 'n = int(input())\nans = "No"\nj = 0\nfor i in range(n):\n d,dd = map(str,input().split())\n if(d==dd):\n if(j>0):\n j += 1\n else:\n j=0\n if(j>=3):\n ans = "Yes"\nprint(ans)\n', 'import sys\nN =int(input())\nD = []\nfor i in range(N):\n d_1,d_2 = map(int,input().split())\n D.append([d_1,d_2])\nfor x in range(N-2):\n if D[x][0]==D[x][1] and D[x+1][1]==D[x+1][0] and D[x+2][1]==D[x+2][0]:\n print("Yes")\n sys.exit()\nprint("No")\n']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s283196313', 's318315226', 's346538675', 's597950073', 's790066108', 's937798834', 's793217558']
[8884.0, 9140.0, 9008.0, 9140.0, 9172.0, 9168.0, 9180.0]
[26.0, 32.0, 28.0, 29.0, 27.0, 29.0, 28.0]
[324, 246, 181, 184, 190, 181, 250]
p02547
u657818166
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n = int(input())\nt = []\ni = 0\nfor _ in range(n):\n x, y = map(int, input().split())\n if x == y:\n i += 1\n else:\n i = 0\n t.append(i)\nif(len(filter(lambda x: x >= 3, t)) == 0):\n print("No")\nelse:\n print("Yes")\n', 'n = int(input())\nt = []\ni = 0\nfor _ in range(n):\n x, y = map(int, input().split())\n if x == y:\n i += 1\n else:\n i = 0\n t.append(i)\nif(len(list(filter(lambda x: x >= 3, t))) == 0):\n print("No")\nelse:\n print("Yes")\n']
['Runtime Error', 'Accepted']
['s470572297', 's448565138']
[9172.0, 9176.0]
[27.0, 32.0]
[238, 244]
p02547
u667024514
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n = int(input())\nlis = list(map(int,input().split()))\nans = 0\nfor i in range(n):\n if lis[i][0] == lis[i][1]:\n ans += 1\n else:\n ans = 0\n if ans == 3:\n print("Yes")\n exit()\nprint("No")', 'n = int(input())\nlis = [list(map(int,input().split())) for i in range(n)]\nans = 0\nfor i in range(n):\n if lis[i][0] == lis[i][1]:\n ans += 1\n else:\n ans = 0\n if ans == 3:\n print("Yes")\n exit()\nprint("No")\n']
['Runtime Error', 'Accepted']
['s346714890', 's958760747']
[9148.0, 9192.0]
[30.0, 32.0]
[197, 218]
p02547
u684743124
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n=int(input())\nfor i in range(n):\n a,b=map(int,input().split())\n if a==b:\n ct+=1\n if ct==3:\n print("Yes")\n break\n else:\n ct==0\nelse:\n print("No")', 'n=int(input())\nct=0\nfor i in range(n):\n a,b=map(int,input().split())\n if a==b:\n ct+=1\n if ct==3:\n print("Yes")\n break\n else:\n ct=0\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s510101677', 's353122312']
[9168.0, 9016.0]
[27.0, 29.0]
[168, 172]
p02547
u688055251
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['N = int(input())\n\nd1=[]\nd2=[]\n\ncont=0\nfor i in range(N):\n D1,D2=map(int,input().split())\n\n d1.append(D1)\n d2.append(D2)\n\nfor i in range(len(d1)):\n if d1[i]==d2[i]:\n cont+=1\n else:\n cont=0\nif cont>=3:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\n\nd1=[]\nd2=[]\n\ncont=0\nfor i in range(N):\n D1,D2=map(int,input().split())\n\n d1.append(D1)\n d2.append(D2)\n\nfor i in range(len(d1)):\n if d1[i]==d2[i]:\n cont+=1\n else:\n cont=0\n\n if cont==3:\n break\n \nif cont>=3:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s532763241', 's150524825']
[9188.0, 9196.0]
[34.0, 28.0]
[267, 303]
p02547
u688908698
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n = int(input())\nd = []\nfor i in range(n):\n d.append(list(map(int,input().split())))\nrow = []\nfor i in range(n):\n if d[i][0]==d[i][1]:\n row.append(True)\n else:\n row.append(False)\nres = False\nfor i in range(n-2):\n print(row[i:i+3])\n if all(row[i:i+3]):\n res = True\nif res:\n print('Yes')\nelse:\n print('No')", "n = int(input())\nd = []\nfor i in range(n):\n d.append(list(map(int,input().split())))\nrow = []\nfor i in range(n):\n if d[i][0]==d[i][1]:\n row.append(True)\n else:\n row.append(False)\nres = False\nfor i in range(n-2):\n if all(row[i:i+3]):\n res = True\nif res:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s434352675', 's266176654']
[9012.0, 9192.0]
[29.0, 28.0]
[346, 324]
p02547
u692939738
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n =int(input())\nfirst =[]\nsecond =[]\nfor i in range(n):\n d1 , d2 = map(int , input().split())\n first.append(d1)\n second.append(d2)\n\nfor i in range(n-2):\n count = 0\n for j in range(i ,i+3):\n if first[j]==second[j]:\n count +=1\n else:\n break\n \n if count ==3:\n print("YES")\n break\n \nelse:\n print("NO")', 'n =int(input())\nfirst =[]\nsecond =[]\nfor i in range(n):\n d1 , d2 = map(int , input().split())\n first.append(d1)\n second.append(d2)\n\nfor i in range(n-2):\n count = 0\n for j in range(i ,i+3):\n if first[j]==second[j]:\n count +=1\n else:\n break\n \n if count ==3:\n print("Yes")\n break\n \nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s995380969', 's095362077']
[9136.0, 9192.0]
[32.0, 31.0]
[382, 382]
p02547
u697615293
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['N = int(input())\n\nxy = [map(int,input().split()) for _ in range(N)]\nx,y = [list(i) for i in zip(*xy)]\n\nans = 0\n\nfor i in range(N):\n if x[i] == y[i]:\n ans +=1\n else:\n ans = 0\n \nif ans >= 3:\n print("Yes")\n \nelse:\n print("No")', 'N = int(input())\n\nxy = [map(int,input().split()) for _ in range(N)]\nx,y = [list(i) for i in zip(*xy)]\n\nans = 0\n\nfor i in range(N):\n if x[i] == y[i]:\n ans +=1\n else:\n ans -=1\n \nif ans >= 3:\n print("Yes")\n \nelse:\n print("No")', 'N = int(input())\n\nxy = [map(int,input().split()) for _ in range(N)]\nx,y = [list(i) for i in zip(*xy)]\n\nans = 0\nflag = False\n\nfor i in range(N):\n if x[i] == y[i]:\n ans +=1\n elif ans >= 3:\n flag = True\n ans = 0\n else:\n ans = 0\n \nif ans >= 3 or flag ==True:\n print("Yes")\n \nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s018955232', 's582866643', 's312770512']
[9176.0, 8908.0, 9200.0]
[36.0, 27.0, 29.0]
[259, 259, 343]
p02547
u699912843
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["import math\n\n\ndef a():\n s = input()\n if s[-1] == 's':\n print(s + 'es')\n else:\n print(s + 's')\n\n\ndef b():\n n = int(input())\n d = []\n for i in range(n):\n d.append(list(map(int, input().split())))\n for i in range(n - 2):\n if d[i + 2][0] == d[i + 2][1] and \\\n d[i + 1][0] == d[i + 1][1] and \\\n d[i][0] == d[i][1]:\n print('yes')\n break\n else:\n print('No')\n\n\ndef c():\n pass\n\n\ndef d():\n pass\n\n\n# a()\nb()\n# c()\n# d()\n", "import math\n\n\ndef a():\n s = input()\n if s[-1] == 's':\n print(s + 'es')\n else:\n print(s + 's')\n\n\ndef b():\n n = int(input())\n d = []\n for i in range(n):\n d.append(list(map(int, input().split())))\n for i in range(n - 2):\n if d[i + 2][0] == d[i + 2][1] and \\\n d[i + 1][0] == d[i + 1][1] and \\\n d[i][0] == d[i][1]:\n print('Yes')\n break\n else:\n print('No')\n\n\ndef c():\n pass\n\n\ndef d():\n pass\n\n\n# a()\nb()\n# c()\n# d()\n"]
['Wrong Answer', 'Accepted']
['s171960424', 's263721853']
[9204.0, 9204.0]
[31.0, 28.0]
[522, 522]
p02547
u702399883
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n=int(input())\ncount=0\nfor i in range(n):\n d1,d2=list(map(int,input().split()))\n if d1==d2:\n count+=1\nif count>=3:\n print('YES')\nelse:\n print('NO')", "n=int(input())\ncount=0\nlists=[]\nfor i in range(n):\n d1,d2=list(map(int,input().split()))\n lists.append([d1,d2])\nfor i in range(n-2):\n if lists[i][0]==lists[i][1] and lists[i+1][0]==lists[i+1][1] and lists[i+2][0]==lists[i+2][1]:\n print('Yes')\n break\n elif i==n-3:\n print('No')\n break\n else:\n continue\n"]
['Wrong Answer', 'Accepted']
['s653870599', 's258942786']
[9164.0, 9188.0]
[30.0, 25.0]
[166, 351]
p02547
u706330549
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n = int(input())\n\ncnt = 0\nflg = 0\n\nfor i in range(n):\n a, b = map(int, input().split())\n\n if a == b:\n cnt += 1\n if cnt >= 3:\n flg = 1\n else:\n cnt = 0\n\n print(cnt)\n print(flg)\n\nif flg == 1:\n print("Yes")\nelse:\n print("No")\n', 'n = int(input())\n\ncnt = 0\nflg = 0\n\nfor i in range(n):\n a, b = map(int, input().split())\n\n if a == b:\n cnt += 1\n if cnt >= 3:\n flg = 1\n else:\n cnt = 0\n\nif flg == 1:\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s841357202', 's035947272']
[9180.0, 9116.0]
[34.0, 30.0]
[275, 244]
p02547
u715985689
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n = int(input().strip())\ncount = 0\nfor i in range(n):\n a,b = map(int,input().strip().split())\n if a == b and count == 3:\n print('Yes')\n exit(0)\n elif a == b:\n count += 1\n elif(a != b):\n count = 0\nprint('No')\n", "n = int(input().strip())\ncount = 0\nfor i in range(n):\n a,b = map(int,input().strip().split())\n if a == b and count == 3:\n print('YES')\n elif a == b:\n count += 1\n else:\n count = 0\nprint('NO')", "n = int(input().strip())\ncount = 0\nfor i in range(n):\n a,b = map(int,input().strip().split())\n if a == b and count == 3:\n print('Yes')\n elif a == b:\n count += 1\n else:\n count = 0\nprint('No')\n", "n = int(input().strip())\ncount = 0\nfor i in range(n):\n a,b = map(int,input().strip().split())\n if a == b and count == 3:\n print('Yes')\n exit(0)\n elif a == b:\n count += 1\n else:\n count = 0\nprint('No')\n", "n = int(input().strip())\ncount = 0\nfor i in range(n):\n a,b = map(int,input().strip().split())\n if a == b and count == 3:\n print('Yes')\n exit(0)\n elif a == b:\n count += 1\n elif(a != b):\n count = 0\nif count == 3:\n\tprint('Yes')\nelse:\n\tprint('No')\n", "n = int(input().strip())\ncount = 0\nfor i in range(n):\n a,b = map(int,input().strip().split())\n if count == 3:\n print('Yes')\n exit(0)\n elif a == b:\n count += 1\n elif(a != b):\n count = 0\nif count == 3:\n\tprint('Yes')\nelse:\n\tprint('No')\n"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s388948794', 's393020889', 's649312214', 's783013574', 's865813160', 's636616686']
[9140.0, 9176.0, 8848.0, 9120.0, 9024.0, 9104.0]
[27.0, 29.0, 33.0, 28.0, 29.0, 29.0]
[224, 203, 204, 216, 260, 249]
p02547
u723345499
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n = int(input())\nd = [list(map(int, input().split()))for _ in range(n)]\n\u200b\ncnt = 0\nfor i, (p, q) in enumerate(d):\n if p == q:\n cnt += 1\n else:\n cnt = 0\n if cnt == 3: \n print("Yes")\n break\nelse:\n print("No")\n5', 'n = int(input())\nd = [list(map(int, input().split()))for _ in range(n)]\n\u200b\ncnt = 0\nfor i, (p, q) in enumerate(d):\n if p == q:\n cnt += 1\n else:\n cnt = 0\n if cnt == 3: \n print("Yes")\n break\nelse:\n print("No")\n', 'n = int(input())\nd = [list(map(int, input().split()))for _ in range(n)]\n\ncnt = 0\nfor i, (p, q) in enumerate(d):\n if p == q:\n cnt += 1\n else:\n cnt = 0\n if cnt == 3:\n print("Yes")\n break\nelse:\n print("No")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s048820726', 's563761558', 's782543432']
[9012.0, 8956.0, 9172.0]
[32.0, 28.0, 36.0]
[256, 255, 243]
p02547
u727072969
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['N = int(input())\nD = [list(map(int, input().split())) for _ in range(N)]\ni = 0\ncount = 0\nwhile i < N:\n if D[i][0] == D[i][1]:\n count += 1\n else:\n count = 0\n i += 1\n\nif count >= 3:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\nD = [list(map(int, input().split())) for _ in range(N)]\ni = 0\ncount = 0\nwhile i < N:\n if D[i][0] == D[i][1]:\n count += 1\n else:\n count = 0\n i += 1\n\nif count >= 3:\n print("Yes")\nelse:\n print("No")\n', 'N = int(input())\nD = [list(map(int, input().split())) for _ in range(N)]\ncount = 0\nfor i in range(N-2):\n if D[i][0]==D[i][1] and D[i+1][0]==D[i+1][1] and D[i+2][0]==D[i+2][1]:\n print("Yes")\n exit()\n\nprint("No")\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s234889723', 's830814619', 's357302891']
[9152.0, 9136.0, 9084.0]
[30.0, 29.0, 30.0]
[241, 242, 228]
p02547
u728910348
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n = int(input())\ndata = []\nzoro = []\nyn = False\nfor i in range(n):\n data = input().split()\n if data[0] == data[1]:\n zoro += [True]\n else:\n zoro += [False]\n if i > 1 and (zoro[i] == True or zoro[i-1] == True or zoro[i-2] == True):\n yn = True\nprint(zoro)\nprint("Yes") if yn == True else print("No")', 'n = int(input())\ndata = []\nzoro = []\nyn = False\nfor i in range(n):\n data = input().split()\n if data[0] == data[1]:\n zoro += [True]\n else:\n zoro += [False]\n if i > 1 and (zoro[i] == True and zoro[i-1] == True and zoro[i-2] == True):\n yn = True\nprint("Yes") if yn == True else print("No")']
['Wrong Answer', 'Accepted']
['s366764447', 's187527298']
[9192.0, 9156.0]
[31.0, 33.0]
[329, 319]
p02547
u729133443
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["print('NYoe s'[[0]*3in[eval(t.replace(*' -'))for t in open(0)]::2])", "print('NYoe s'[[*'111']in[str(len({*t.split()}))for t in open(0)][1:]::2])", "print('NYoe s'[[*'000']in[str(eval(t.replace(*' -')))for t in open(0)]::2])", "print('NYoe s'[[*'000']in[eval(t.replace(*' -'))for t in open(0)]::2])", "print('NYoe s'[[*'000']in[eval(eval(t.replace(*' -')))for t in open(0)]::2])", "print('NYoe s'['111'in''.join(str(len({*t.split()}))for t in open(0))[1:]::2])"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s032130310', 's192222409', 's382778045', 's643308285', 's706500646', 's299295728']
[9064.0, 8944.0, 9120.0, 8872.0, 9068.0, 9068.0]
[27.0, 31.0, 29.0, 28.0, 25.0, 34.0]
[67, 74, 75, 70, 76, 78]
p02547
u734377285
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n = int(input())\ncount = 0\nfor i in range(n):\n a,b = map(int,input().split())\n if a==b:\n count += 1\n else:\n count = 0\nprint('Yes' if count > 2 else 'No')\n", "n = int(input())\ncount = 0\nfor i in range(n):\n a,b = map(int,input().split())\n if count >2 :\n break\n elif a==b:\n count += 1\n else:\n count = 0\nprint('Yes' if count > 2 else 'No')\n"]
['Wrong Answer', 'Accepted']
['s517123861', 's313170431']
[9152.0, 9016.0]
[28.0, 25.0]
[177, 211]
p02547
u742260762
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['N == int(input())\ncount = 0\nfor i in range(N-1):\n s = list(map(int, input().split()))\n if s[0] == s[1]:\n count += 1\nif count >= 3:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\ncount = 0\nfor i in range(N-1):\n a, b = list(map(int, input().split()))\n if a == b:\n count += 1\n else:\n count == 0\n if count == 3:\n print("Yes")\n break\nprint("No") \n \n \n\n\n \n', 'N = int(input())\nc = 0\nfor i in range(N):\n a, b = map(int, input().split())\n if a == b:\n c += 1\n else:\n c =0\n if c == 3:\n break\nif c == 3:\n print("Yes")\nelse:\n print("No")\n \n']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s214552704', 's953974294', 's600019365']
[9104.0, 9100.0, 9088.0]
[23.0, 27.0, 29.0]
[170, 233, 190]
p02547
u743504636
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['def divisor(n): \n i = 1\n count = 0\n while i * i < n:\n if n%i == 0:\n count += 2\n i += 1\n if i * i == n:\n \tcount =+ 1\n return count\n \nn = int(input())\n\ncount = 0\nfor num in range(n):\n\tcount += divisor(num)\nprint(count)', "n = int(input())\nnumList = []\nfor x in range(n):\n\tnum = [int(x) for x in input().split()]\n\tif num[0] == num[1]:\n\t\tnumList.append('True')\n\telse:\n\t\tnumList.append('False')\n\t\t\n\t\njudge = 'No'\nfor x in range(len(numList)-2):\n if numList[x] == 'True':\n if numList[x+1] == 'True':\n if numList[x+2] == 'True':\n judge = 'Yes'\nprint(judge)\n"]
['Wrong Answer', 'Accepted']
['s900153233', 's381549603']
[9204.0, 9184.0]
[27.0, 30.0]
[261, 354]
p02547
u743878367
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['N = int(input())\n\nflag = 0\nans = 0\n\nfor i in range(N):\n a,b = map(int,input().split())\n if a == b:\n flag += 1\n print(flag)\n if flag == 3:\n ans += 1\n else:\n flag = 0\n print(flag)\nif ans >= 1:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\n\nflag = 0\n\nfor i in range(N):\n a,b = map(int,input().split())\n if a == b:\n flag += 1\n else:\n flag = 0\n\nif flag >= 3:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\n\nflag = 0\nans = 0\n\nfor i in range(N):\n a,b = map(int,input().split())\n if a == b:\n flag += 1\n if flag == 3:\n ans += 1\n else:\n flag = 0\nif ans >= 1:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s185036492', 's832209159', 's445515120']
[9188.0, 9192.0, 9204.0]
[30.0, 34.0, 30.0]
[284, 195, 244]
p02547
u752200367
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['count = 0\nfor i in range(int(input())):\n l = list(map(int, input().split()))\n if l[0] == l[1]:\n count += 1\n elif l[0] != l[1]:\n count = 0\nif count >= 3:\n print("Yes")\nelif count < 3:\n print("No")\n', 'count = 0\nfor i in range(int(input())):\n l = list(map(int, input().split()))\n if l[0] == l[1]:\n count += 1\n elif l[0] != l[1]:\n count = 0\nif count >= 3:\n print("Yes")\nelse:\n print("No")', 'count = 0\nfor i in range(int(input())):\n l = list(map(int, input().split()))\n if l[0] == l[1]:\n count += 1\n elif l[0] != l[1]:\n count = 0\n if count >= 3:\n print("Yes")\n break\nif count < 3:\n print("No")\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s643068879', 's855293528', 's493692217']
[9004.0, 9084.0, 9064.0]
[36.0, 28.0, 30.0]
[225, 214, 245]
p02547
u754511616
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n=int(input())\ncount=0\nfor i in range(n):\n me1,me2=list(map(int,input().split()))\n if me1==me2:\n count+=1\nif count==n:\n print('Yes')\nelse:\n print('No')", "n=int(input())\ncount=0\nfor i in range(n):\n me1,me2=list(map(int,input().split()))\n if me1==me2:\n count+=1\n if count==3:\n break\n else:\n count=0\nif count>=n:\n print('Yes')\nelse:\n print('No')", "n=int(input())\ncount=0\nfor i in range(n):\n me1,me2=list(map(int,input().split()))\n if me1==me2:\n count+=1\n if count==3:\n break\n else:\n count=0\nif count>=3:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s107389050', 's236070123', 's719222592']
[9176.0, 9176.0, 9044.0]
[35.0, 30.0, 32.0]
[158, 207, 207]
p02547
u762469320
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n = int(input())\nlst = []\nfor i in range(n):\n\tlst.append(list(map(int,input().split())))\nprint(lst)\n\ncnt = 0\n\nfor i in range(n):\n\tif lst[i][0]==lst[i][1]:\n\t\tcnt += 1\n\telse:\n\t\tcnt = 0\n\tif cnt == 3:\n\t\tprint('Yes')\n\t\texit()\nprint('No')", "n = int(input())\nlst = []\nfor i in range(n):\n\tlst.append(list(map(int,input().split())))\n\ncnt = 0\n\nfor i in range(n):\n\tif lst[i][0]==lst[i][1]:\n\t\tcnt += 1\n\telse:\n\t\tcnt = 0\n\tif cnt == 3:\n\t\tprint('Yes')\n\t\texit()\nprint('No')"]
['Wrong Answer', 'Accepted']
['s561659722', 's957075879']
[9140.0, 9136.0]
[26.0, 27.0]
[232, 221]
p02547
u766734191
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['N = int(input())\n\nnums = []\nfor a in range(N):\n ci = []\n ci.append(int(input()))\n ci.append(int(input()))\n nums.append(ci)\n\nzoro = maximum = 0\nfor a in range(N):\n if nums[a][0] == nums[a][1]:\n zoro += 1\n maximum = max(maximum, zoro)\n else:\n zoro = 0', 'N = int(input())\n\ninfo = []\nfor i in range(N):\n chis = input().split()\n info.append(chis)\n\nmaximum = zoro = 0\nfor each in info:\n if each[0] == each[1]:\n zoro += 1\n maximum = max(maximum, zoro)\n else:\n zoro = 0\n\nif maximum > 2:\n print("Yes")\nelse:\n print("No")\n\n']
['Runtime Error', 'Accepted']
['s631553109', 's887938422']
[9176.0, 9176.0]
[27.0, 30.0]
[264, 300]
p02547
u769095634
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n = int(input())\ncount = 0\nflag = False\nfor i in range(n):\n a, b = map(int, input().split())\n if a == b:\n if count == 2:\n flag = True\n else:\n count += 1\n else:\n count = 0\nif flag:\n print(Yes)\nelse:\n print("No")', 'n = int(input())\ncount = 0\nflag = False\nfor i in range(n):\n a, b = map(int, input().split())\n if a == b:\n if count == 2:\n flag = True\n else:\n count += 1\n else:\n count = 0\nif flag:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s103832121', 's718286250']
[9172.0, 9196.0]
[25.0, 28.0]
[268, 270]
p02547
u773081031
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n = int(input())\nd = []\nz = 0\n\nfor i in range(n):\n d1, d2 = map(int, input().split())\n z = z+1 if d1==d2 else 0\n d.append(z)\n\nprint(max(d))', "n = int(input())\nd = []\nz = 0\n\nfor i in range(n):\n d1, d2 = map(int, input().split())\n z = z+1 if d1==d2 else 0\n d.append(z)\n\nans = 'Yes' if max(d)>=3 else 'No'\nprint(ans)\n"]
['Wrong Answer', 'Accepted']
['s720906325', 's247071961']
[9124.0, 9128.0]
[30.0, 28.0]
[142, 175]
p02547
u773686010
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['N = int(input())\nct = 0\nfor i in range(N):\n s,g = map(int,input().split())\n if s == g:\n ct += 1\n else:\n ct = 0\n if ct == 3:\n print("yes")\n break\nelse:\n print("No")', 'N = int(input())\nct = 0\nflg = 0\nfor i in range(N):\n s,g = map(int,input().split())\n if s == g:\n ct += 1\n else:\n ct = 0\n if ct == 3:\n flg = 1\n\nprint(("No","Yes")[flg == 1])']
['Wrong Answer', 'Accepted']
['s409614156', 's087659579']
[9164.0, 9176.0]
[31.0, 33.0]
[206, 204]
p02547
u777800738
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["x=int(input())\ncount=0\nfor a in range(x):\n b=input().split(' ')\n if int(b[0])==int(b[1]):\n count+=1\n else:\n count=0\n if count==3:\n break\nif count==3:\n print('yes')\nelse:\n print('no')", "x=int(input())\ncount=0\nfor a in range(x):\n b=input().split(' ')\n if int(b[0])==int(b[1]):\n count+=1\n else:\n count=0\n if count==3:\n break\nif count==3:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s200786558', 's262823699']
[9112.0, 9196.0]
[28.0, 27.0]
[197, 197]
p02547
u785354231
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n = int(input())\n\naffilé = 0\nok = 0\n\n\nfor i in range(n):\n d1, d2 = [int(k) for k in input().split()]\n if d1 == d2:\n affilé += 1\n elif d1 != d2:\n affilé = 0\n \n\n if affilé == 3:\n ok = 1\n\nif ok == 0:\n print('NO')\nelse:\n print('YES')\n", "n = int(input())\n\naffilé = 0\n\nfor i in range(n):\n d1, d2 = [int(k) for k in input().split()]\n if d1 == d2:\n affilé += 1\n elif d1 != d2:\n affilé == 0\n \n\n if affilé == 3:\n print('YES')\n exit()\n\n print('NO')\n", "n = int(input())\n\naffilé = 0\n\nfor i in range(n):\n d1, d2 = [int(k) for k in input().split()]\n if d1 == d2:\n affilé += 1\n elif d1 != d2:\n affilé == 0\n \n\n if affilé == 3:\n print('YES')\n exit()\n\nprint('NO')\n", "n = int(input())\n\naffilé = 0\nok = 0\n\n\nfor i in range(n):\n d1, d2 = [int(k) for k in input().split()]\n if d1 == d2:\n affilé += 1\n elif d1 != d2:\n affilé = 0\n \n\n if affilé == 3:\n ok = 1\n\nif ok == 0:\n print('No')\nelse:\n print('Yes')\n"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s165644920', 's268086511', 's644457787', 's625793721']
[9236.0, 9240.0, 9228.0, 9236.0]
[24.0, 32.0, 25.0, 29.0]
[250, 227, 225, 250]
p02547
u785618718
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['N = str(input())\n\ncount = 0\nyes = False\n\nfor i in range(N):\n a , b = map(int, input().split())\n \n if a==b:\n count +=1\n if count >= 3:\n print("Yes")\n yes = True\n break\n else:\n count = 0\n\nif !yes:\n print("No")', 'N = str(input())\n\ncount = 0\nyes = False\n\nfor i in range(N):\n a , b = map(int, input().split())\n \n if a==b:\n count +=1\n if count >= 3:\n print("Yes")\n yes = True\n break\n else:\n count = 0\n\nif not(yes):\n print("No")', 'N = int(input())\n\ncount = 0\nyes = False\n\nfor i in range(N):\n a , b = map(int, input().split())\n \n if a==b:\n count +=1\n if count >= 3:\n print("Yes")\n yes = True\n break\n else:\n count = 0\n\nif not(yes):\n print("No")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s310840243', 's353484321', 's657271611']
[9036.0, 9056.0, 9180.0]
[24.0, 28.0, 27.0]
[236, 240, 240]
p02547
u785728112
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n = int(input())\nfor i in range(n):\n d = map(int, input().split())\n\n\nanswer = 'No'\n\ncount = 0\nfor i in range(n):\n if d[i][0] != d[i][1]:\n count = 0\n else:\n count += 1\n\n if count == 3:\n answer = 'Yes'\n break\n\nprint(answer)\n", 'def judge():\n cnt = 0 \n for _ in range(N):\n x, y = map(int, input().split())\n if x == y:\n cnt += 1\n else:\n cnt = 0\n if cnt == 3:\n return True\n return False\n\nN = int(input())\n\nif judge(): \n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s422373823', 's331386367']
[9056.0, 9176.0]
[25.0, 25.0]
[260, 298]
p02547
u790970861
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['dice_num_list = []\nequal_index_list = []\n\nN = int(input())\n\nfor i in range(1, N + 1):\n d1, d2 = input().split(" ")\n dice_num_list.append([d1, d2])\n\nequal_index_list = [i for i, x in enumerate(dice_num_list) if x[0] == x[1]]\n\nif len(equal_index_list) < 3:\n print(\'No\')\n exit(0)\nfor index in equal_index_list:\n if equal_index_list[index + 1] == index + 1 and equal_index_list[index + 2] == index + 2:\n print("Yes")\n exit(0)\nprint("No")', 'dice_num_list = []\nequal_index_list = []\n\nN = int(input())\n\nfor i in range(1, N + 1):\n d1, d2 = input().split(" ")\n dice_num_list.append([d1, d2])\n\nequal_index_list = [i for i, x in enumerate(dice_num_list) if x[0] == x[1]]\n\nl = len(equal_index_list)\nif l < 3:\n print(\'No\')\n exit(0)\n\nfor i in range(l - 2):\n if equal_index_list[i] + 1 == equal_index_list[i + 1] and equal_index_list[i] + 2 == equal_index_list[i + 2]:\n print("Yes")\n exit(0)\n\nprint("No")']
['Runtime Error', 'Accepted']
['s669384625', 's327926033']
[9212.0, 9148.0]
[26.0, 25.0]
[462, 482]
p02547
u793981991
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["rolls = int(input())\ndices = []\nfor _ in range(rolls):\n dices.append(list(map(int, input().split())))\n\ndoubles = [d1 == d2 for d1,d2 in dices]\n\nfor i in range(1,rolls):\n doubles[i] *= (doubles[i] + doubles[i-1])\n if double[i] == 3:\n print('Yes')\n exit()\n\nprint('No')\n\n\n", "rolls = int(input())\ndices = []\nfor _ in range(rolls):\n dices.append(list(map(int, input().split())))\n \ndoubles = [d1 == d2 for d1,d2 in dices]\n \nfor i in range(1,rolls):\n doubles[i] *= (doubles[i] + doubles[i-1])\n if doubles[i] == 3:\n print('Yes')\n exit()\n \nprint('No')"]
['Runtime Error', 'Accepted']
['s584333239', 's671422818']
[9184.0, 9192.0]
[27.0, 30.0]
[278, 279]
p02547
u813042907
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n=int(input())\ncount=0\nren=0\nfor i in range(n):\n a,b=map(int,input().split())\n if a==b and count<3:\n count+=1\n ren=1\n else:\n count=0\nif count>=3:\n print("Yes")\nelse:\n print("No")', 'n=int(input())\ncount=0\nren=0\nfor i in range(n):\n a,b=map(int,input().split())\n if a==b:\n if count<3:\n count+=1\n ren=1\n else if count<3:\n count=0\nif count>=3:\n print("Yes")\nelse:\n print("No")', 'n=int(input())\ncount=0\nren=0\nfor i in range(n):\n a,b=map(int,input().split())\n if a==b:\n if count<3:\n count+=1\n ren=1\n elif count<3:\n count=0\nif count>=3:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s162068581', 's537442087', 's242730348']
[9180.0, 9016.0, 9172.0]
[33.0, 27.0, 35.0]
[192, 211, 208]
p02547
u816552564
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['N=input()\nn=int(N)\nfor s in range(n):\n ds1,ds2=input().split()\nif ds1==ds2 and d(s+1)1==d(s+1)2 and d(s+2)1==d(s+2)2:\n print("Yes")\nelse:\n print("No")', 'N=input()\nn=int(N)\nx=0\nfor s in range(n):\n ds1,ds2=input().split()\n Ds1=int(ds1)\n Ds2=int(ds2)\n if Ds1==Ds2:\n x+=1\n else:\n x+=0\nif x>3:\n print("Yes")\nelse:\n print("No")', 'N=input()\nn=int(N)\nx=0\nfor s in range(n):\n ds1,ds2=input().split()\n if ds1==ds2:\n x+=1\n else:\n x=0\n if x==3:\n print("Yes")\n break\nelse:\n print("No")']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s535687581', 's579278025', 's993303409']
[9020.0, 9172.0, 9180.0]
[28.0, 27.0, 29.0]
[153, 181, 165]
p02547
u817247382
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n = int(input())\ncount = 0\n\nfor i in range(n):\n d1, d2 = map(int,input().split())\n\n if d1 == d2 :\n count += 1\n else:\n count = 0\n\n\nif count >= 3:\n print("Yes")\nelse:\n print("No")', 'n = int(input())\nnum_of_double = 0\n\nfor i in range(n):\n d1 = int(input())\n d2 = int(input())\n\n if d1 == d2:\n num_of_double += 1\n\nif num_of_double >= 3:\n print("Yes")\nelse:\n print("No")', 'n = int(input())\ncount = 0\nflag = 0\n\nfor i in range(n):\n d1, d2 = map(int,input().split())\n\n if d1 == d2 :\n count += 1\n else:\n count = 0\n\n if count == 3:\n flag = 1\n\n\nif flag == 1:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s591964294', 's888406669', 's632917523']
[9112.0, 9192.0, 9204.0]
[26.0, 25.0, 26.0]
[206, 206, 251]
p02547
u819495227
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['N = int(input())\n\ni = 0\nres = False\n\nfor _ in range(N): \n a, b = map(int,input().split())\n\n if a == b:\n print("matched")\n i += 1\n else:\n i = 0\n \n if i >= 3:\n res = True\n\nprint("Yes" if res else "No")', 'N = int(input())\n\ni = 0\nres = False\n\nfor _ in range(N): \n a, b = map(int,input().split())\n\n if a == b:\n i += 1\n else:\n i = 0\n \n if i >= 3:\n res = True\n\nprint("Yes" if res else "No")']
['Wrong Answer', 'Accepted']
['s624539576', 's161146354']
[9176.0, 9172.0]
[31.0, 28.0]
[247, 222]
p02547
u825161822
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n=int(input())\nans=0\nx=-1\nfor i in range(n):\n a,b=map(int,input().split())\n if a==b and i==x+1:\n ans+=1\n x=i\n if ans==3:\n x=0\n break\nif ans==3:\n print('Yes')\nelse:\n print('No')", "n=int(input())\nans=0\nc=[]\nx=0\nfor i in range(n):\n a,b=map(int,input().split())\n if a==b:\n c.append(i)\nfor i in range(len(c)-2):\n if c[i]==c[i+1]-1 and c[i+1]==c[i+2]-1:\n print('Yes')\n x=1\n break\nif x==0:\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s703877588', 's398562326']
[9180.0, 9156.0]
[29.0, 25.0]
[231, 257]
p02547
u835090251
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n=int(input())\nxy = [map(int, input().split()) for _ in range(n)]\nx, y = [list(i) for i in zip(*xy)]\na=0\nfor i in range(n):\n if x[i]==y[i]:\n a+=1\n \tif a==3:\n break\n else:\n a=0\n \nif a>=3:\n print("Yes")\nelse:\n print("No")', 'n=int(input())\nxy = [map(int, input().split()) for _ in range(n)]\nx, y = [list(i) for i in zip(*xy)]\na=0\nfor i in range(n):\n if x[i]==y[i]:\n a+=1\n if a==3:\n break\n else:\n a=0\n \nif a>=3:\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Accepted']
['s675813219', 's714725791']
[9036.0, 9180.0]
[27.0, 30.0]
[238, 240]
p02547
u835095496
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["def run(n, _in_list):\n '''\n '''\n is_doublet_count = 0\n for x in _in_list:\n _in = list(x)\n if _in[0] ==_in[1]:\n is_doublet_count += 1\n else:\n is_doublet_count = 0\n \n print('Yes' if is_doublet_count >= 3 else 'No')\n \n\n\n\n\nif __name__ == '__main__':\n n = int(input())\n _in_list = [map(int, input().split()) for _ in range(n)]\n run(n, _in_list)", "def run(n, _in_list):\n '''\n '''\n is_doublet_count = 0\n for x in _in_list:\n if is_doublet_count == 3:\n break\n _in = list(x)\n if _in[0] ==_in[1]:\n is_doublet_count += 1\n else:\n is_doublet_count = 0\n \n print('Yes' if is_doublet_count >= 3 else 'No')\n \n\n\n\n\nif __name__ == '__main__':\n n = int(input())\n _in_list = [map(int, input().split()) for _ in range(n)]\n run(n, _in_list)"]
['Wrong Answer', 'Accepted']
['s541749762', 's434711546']
[9188.0, 9228.0]
[31.0, 29.0]
[412, 464]
p02547
u847075829
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n = int(input)\ncount = 0\nans = 'No'\nfor _ in range(n):\n\ta,b = map(int,input().split(' '))\n if a!=b:\n \tcount = 0 \n else:\n \tcount+=1\n if count ==3:\n \tans = 'Yes'\nprint(ans) ", "n = int(input)\ncount = 0\nans = 'No'\nfor _ in range(n):\n\ta , b = map(int,input().split(' '))\n if a!=b:\n \tcount = 0 \n else:\n \tcount += 1\n if count == 3:\n \tans = 'Yes'\nprint(ans) \n", "n = int(input)\ncount = 0\nans = 'No'\nfor _ in range(n):\n\ta,b = map(int,input().split(' ')\n if a!=b:\n \tans = 0 \n else:\n \tcount+=1\n if count ==3:\n \tans = 'Yes'\nprint(ans) ", "n = int(input)\ncount = 0\nans = 'No'\nfor i in range(n):\n a , b = map(int,input().split(' '))\n if a!=b:\n \tcount = 0 \n else:\n \tcount += 1\n if count == 3:\n \tans = 'Yes'\nprint(ans) \n", "n = int(input)\ncount = 0\nans = 'No'\nfor _ in range(n):\n\ta,b = map(int,input().split(' ')\n if a!=b:\n \tcount = 0 \n else:\n \tcount+=1\n if count ==3:\n \tans = 'Yes'\nprint(ans) \n", "n = int(input)\ncount = 0\nans = 'No'\nfor i in range(n):\n a , b = map(int,input().split(' '))\n if a!=b:\n count = 0 \n else:\n count += 1\n if count == 3:\n ans = 'Yes'\nprint(ans)\n", "n = int(input)\ncount = 0\nans = 'No'\nfor i in range(n):\n a , b = map(int,input().split(' '))\n if a!=b:\n count = 0 \n else:\n count += 1\n if count == 3:\n ans = 'Yes'\nprint(ans) ", "n = int(input())\ncount = 0\nans = 'No'\nfor i in range(n):\n a , b = map(int,input().split(' '))\n if a!=b:\n count = 0 \n else:\n count += 1\n if count == 3:\n ans = 'Yes'\nprint(ans)"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s004635820', 's152497573', 's252824291', 's349488142', 's441138587', 's799485672', 's929466088', 's422198367']
[8952.0, 9012.0, 8956.0, 8960.0, 9016.0, 9076.0, 9100.0, 9112.0]
[25.0, 28.0, 28.0, 27.0, 31.0, 24.0, 28.0, 33.0]
[193, 202, 193, 205, 196, 206, 207, 207]
p02547
u850512471
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['cnt = int(input())\nchain = 0\nfirst = 0\nsecond = 0\n\nfor i in range(cnt):\n nList = list(map(int, input().split()))\n first = nList.pop()\n second = nList.pop()\n if first == second:\n chain = chain + 1\n else:\n chain = 0\n\nif chain >= 3:\n print("Yes")\nelse:\n print("No")\n', 'cnt = int(input())\nchain = 0\nfirst = 0\nsecond = 0\n\nfor i in range(cnt):\n nList = list(map(int, input().split()))\n first = nList.pop()\n second = nList.pop()\n if first == second:\n chain = chain + 1\n if chain >= 3:\n break\n else:\n chain = 0\n\nif chain >= 3:\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s302451202', 's284741934']
[9176.0, 9092.0]
[26.0, 28.0]
[298, 339]
p02547
u853728588
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n = int(input())\nxy = [map(int, input().split()) for _ in range(n)]\nx, y = [list(i) for i in zip(*xy)]\ncount = 0\ntotal = 0\n\nfor _ in range(n):\n total += 1\n if x[n] == y[n]:\n count += 1\n if count == 3:\n print("Yes")\n break\n else:\n count = 0\n if total == n and count < 3:\n print("No")', 'n = int(input())\ncount = 0\n\nfor _ in range(n):\n d1, d2 = map(int, input().split())\n if d1 == d2:\n count += 1\n if count >= 3:\n print("Yes")\n exit()\n else:\n count = 0\nprint("No")']
['Runtime Error', 'Accepted']
['s108856687', 's856530168']
[9152.0, 9044.0]
[27.0, 28.0]
[308, 199]
p02547
u856636328
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n = int(input())\nc = 0\nc1=0\nfor x in range(n):\n a,b = map(int,input().split())\n if a==b:\n c+=1\n if c==3:\n c1 = 1\n \tprint('Yes')\n \tbreak\n else:\n c=0\nif c1==0:\n print('No')\n", "n = int(input())\nc = 0\nc1=0\nfor x in range(n):\n a,b = map(int,input().split())\n if a==b:\n c+=1\n if c==3:\n c1 = 1\n print('Yes')\n break\n else:\n c=0\nif c1==0:\n print('No')", "n = int(input())\nc = 0\nc1=0\nfor x in range(n):\n a,b = map(int,input().split())\n if a==b:\n c+=1\n if c==3:\n c1 = 1\n print('Yes')\n break\n else:\n c=0\nif c1==0:\n print('No')\n"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s269542089', 's920940101', 's394699888']
[9020.0, 8956.0, 9104.0]
[29.0, 24.0, 32.0]
[203, 200, 205]
p02547
u858742833
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['def main():\n N = int(input())\n z = 0\n for i in range(N):\n d1, d2 = map(int, input().split())\n if d1 == d2:\n z += 1\n else:\n z = 0\n if z >= 3:\n return True\n\n return False\n\n# print("Yes" if main() else "No")\nprint(main())\n', 'def main():\n N = int(input())\n z = 0\n for i in range(N):\n d1, d2 = map(int, input().split())\n if d1 == d2:\n z += 1\n else:\n z = 0\n if z >= 3:\n return True\n\n return False\n\nprint("Yes" if main() else "No")\n']
['Wrong Answer', 'Accepted']
['s076076716', 's070806337']
[9160.0, 9160.0]
[28.0, 32.0]
[292, 276]
p02547
u863723142
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['num=int(input())\nre=0\nres=0\nfor i in range(num):\n a=input().split(" ")\n if a[0]==a[1]:\n re +=1\n if re>=3:\n res=1\n else:\n re=0\n\nif(re<3):\n print("No")\nelse:\n print("Yes")', 'num=int(input())\nre=0\nres=0\nfor i in range(num):\n a=input().split(" ")\n if a[0]==a[1]:\n re +=1\n if re>=3:\n res=1\n else:\n re=0\n\nif(res==0):\n print("No")\nelse:\n print("Yes")']
['Wrong Answer', 'Accepted']
['s054789856', 's157595788']
[9172.0, 9172.0]
[35.0, 31.0]
[216, 218]
p02547
u872259176
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['d1,d2 = [],[]\nn = int(input())\nfor i in range(n):\n a,b=map(int,input().split())\n d1.append(a)\n d2.append(b)\nfor i in n-2:\n if d1[i] == d2[i] and d1[i+1] == d2[i+1] and d1[i+2] == d2[i+2]:\n\tprint("Yes")\n return 0\n\nprint("No")\n', 'ans = 0\ncount = 0\nlist = []\nfor i in 100:\n a,b=input().split()\n list.append((int(a), int(b)))\nl = list[0][0]\nfor i in l:\n if list[i][0] == list[i][1]:\n count += 1\n if count >= 3:\n ans = 1\n else:\n count = 0\n\nif ans == 1:\n print("Yes")\nelse print("No")\n', 'count = 0\nn = int(input())\nfor i in range(n):\n a,b=map(int,input().split())\n if a == b:\n count += 1\n if count >= 3:\n\t\tprint("Yes")\n else:\n count = 0\n\nprint("No")', 'ans = 0\ncount = 0\nlist = []\nfor i in range(100):\n a,b=input().split()\n list.append((int(a), int(b)))\nl = list[0][0]\nfor i in l+1:\n if list[i][0] == list[i][1]:\n count += 1\n if count >= 3:\n ans = 1\n else:\n count = 0\n\nif ans == 1:\n print("Yes")\nelse :print("No")', 'ans = 0\ncount = 0\nfor i in sys.stdin:\n a,b=input().split()\n list.append((int(a), int(b)))\nl = list[0][0]\nfor 1 in l:\n if list[i][0] == list[i][1]:\n count += 1\n if count >= 3:\n and = 1\n else:\n count = 0\n\nif ans == 1:\n print("Yes")\nelse print("No")', 'd1,d2 = [],[]\nn = int(input())\nfor i in range(n):\n a,b=input().split()\n d1.append(a)\n d2.append(b)\nfor i in n-2:\n if d1[i] == d2[i] and d1[i+1] == d2[i+1] and d1[i+2] == d2[i+2]:\n\tprint("Yes")\n return 0\n\nprint("No")\n', 'ans = 0\ncount = 0\nfor i in 100:\n a,b=input().split()\n list.append((int(a), int(b)))\nl = list[0][0]\nfor i in l:\n if list[i][0] == list[i][1]:\n count += 1\n if count >= 3:\n ans = 1\n else:\n count = 0\n\nif ans == 1:\n print("Yes")\nelse print("No")\n', 'list = []\nn = input()\nfor i in range(n):\n a,b=input().split()\n list.append((int(a), int(b)))\nfor i in n-2:\n if list[i][0] == list[i][1] and list[i+1][0] == list[i+1][1] and list[i+2][0] == list[i+2][1]:\n\tprint("Yes")\n return 0\n\nprint("No")\n', 'list = []\nn = input()\nfor i in range(n):\n a,b=input().split()\n list.append((int(a), int(b)))\nfor i in n-2:\n if list[i][0] == list[i][1] and list[i+1][0] == list[i+1][1] and list[i+2][0] == list[i+2][1]:\n\tprint("Yes")\n return 0\n\nelse :print("No")', 'count = 0\nn = int(input())\nfor i in range(n):\n a,b=map(int,input().split())\n if a == b:\n count += 1\n if count >= 3:\n\t\tprint("Yes")\n \treturn 0\n\nprint("No")\n', 'ans = 0\ncount = 0\nfor i in 100:\n a,b=input().split()\n list.append((int(a), int(b)))\nl = list[0][0]\nfor i in l:\n if list[i][0] == list[i][1]:\n count += 1\n if count >= 3:\n and = 1\n else:\n count = 0\n\nif ans == 1:\n print("Yes")\nelse print("No")\n', 'ans = "No"\ncount = 0\nn = int(input())\nfor i in range(n):\n a,b=map(int,input().split())\n if a == b:\n count += 1\n if count >= 3:\n ans ="Yes"\n else:\n count = 0\n\nprint(ans)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s380489682', 's399251755', 's431532066', 's457592913', 's581898615', 's693028425', 's746203574', 's759578502', 's767214282', 's867956204', 's997428628', 's434376409']
[8976.0, 8992.0, 8964.0, 9112.0, 8972.0, 8980.0, 8992.0, 8956.0, 8952.0, 9016.0, 9036.0, 9160.0]
[25.0, 28.0, 21.0, 25.0, 27.0, 26.0, 25.0, 26.0, 24.0, 28.0, 23.0, 25.0]
[236, 274, 173, 283, 269, 227, 264, 248, 253, 164, 264, 187]
p02547
u875584014
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["N=int(input())\nj=0\nfor i in range(N):\n D1,D2=map(int,input().split())\n if D1==D2:\n j+=1\n else:\n j=0\nif j>=3:\n print('Yes')\nelse:\n print('No')", "N=int(input())\nj=0\nJ=0\nfor i in range(N):\n D1,D2=map(int,input().split())\n if D1==D2:\n j+=1\n if j>=3:\n J=3\n else:\n j=0\nif J>=3:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s341335731', 's601300337']
[9168.0, 9184.0]
[31.0, 33.0]
[152, 179]
p02547
u879866069
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['N = int(input())\ncount = 0\nfor i in range(N):\n di_1, di_2 = int(input().split())\n if di_1 == di_2:\n count += 1\n else:\n count = 0\nif count >= 3:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\ncount = 0\nfor i in range(N):\n di_1, di_2 = [int(i) for i in input().split()]\n if di_1 == di_2:\n count += 1\n else:\n count = 0\nif count >= 3:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\ncount = 0\ncount_max = count\nfor i in range(N):\n di_1, di_2 = [int(i) for i in input().split()]\n if di_1 == di_2:\n count += 1\n else:\n count_max = max([count_max, count])\n count = 0\nif count >= 3:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\ncount = 0\ncount_max = count\nfor i in range(N):\n di_1, di_2 = [int(i) for i in input().split()]\n if di_1 == di_2:\n count += 1\n else:\n count_max = max([count_max, count])\n count = 0\ncount_max = max([count_max, count])\nif count_max >= 3:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s179232316', 's832852891', 's971202228', 's329660967']
[9164.0, 9164.0, 9180.0, 9184.0]
[25.0, 30.0, 40.0, 28.0]
[205, 218, 280, 320]
p02547
u889282850
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["N = int(input())\nl = [list(map(int, input().split())) for l in range(N)]\n\nlast = 0\nfor item in l:\n if last == 0 and l[0] == l[1]:\n last = 1\n if last == 1 and l[0] == l[1]:\n last = 2\n if last == 2 and l[0] == l[1]:\n last = 3\n break\n last == 0\n\nif last == 3:\n print('Yes')\nelse:\n print('No')", "N = int(input())\nl = [list(map(int, input().split())) for l in range(N)]\n\nlast = 0\nfor item in l:\n if last == 0 and l[0] == l[1]:\n last = 1\n if last == 1 and l[0] == l[1]:\n last == 2\n if last == 2 and l[0] == l[1]:\n last == 3\n break\n last == 0\n\nif last == 3:\n print('Yes')\nelse:\n print('No')", "N = int(input())\nl = [list(map(int, input().split())) for l in range(N)]\n\nlast = 0\nfor item in l:\n if last == 0 and l[0] == l[1]:\n last = 1\n elif last == 1 and l[0] == l[1]:\n last = 2\n elif last == 2 and l[0] == l[1]:\n last = 3\n break\n last == 0\n\nif last == 3:\n print('Yes')\nelse:\n print('No')", "N = int(input())\nl = [list(map(int, input().split())) for l in range(N)]\n\nlast = 0\nfor item in l:\n if last == 0 and item[0] == item[1]:\n last = 1\n continue\n elif last == 1 and item[0] == item[1]:\n last = 2\n continue\n elif last == 2 and item[0] == item[1]:\n last = 3\n break\n else:\n last = 0\n\nif last == 3:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s356130258', 's826765666', 's900119717', 's976091437']
[9204.0, 9128.0, 9196.0, 9080.0]
[38.0, 31.0, 26.0, 29.0]
[307, 309, 311, 364]
p02547
u889405092
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["N=int(input())\nx = [list(map(int, input().split())) for i in range(N)]\ncount=0\nfor i in range(N-2):\n if x[i][0]==x[i][1] and x[i+1][0]==x[i+1][1] and x[i+2][0]==x[i+2][1]:\n count=count+1\n else:\n count=count\nelse:\n if count>0 :\n print'Yes'\n else :\n print'No'", "N=int(input())\nx = [list(map(int, input().split())) for i in range(N)]\ncount=0\nfor i in range(N-2):\n if x[i][0]==x[i][1] and x[i+1][0]==x[i+1][1] and x[i+2][0]==x[i+2][1]:\n count=count+1\n else:\n count=count+0\nelse:\n if count>0 :\n print('Yes')\n else :\n print('No')"]
['Runtime Error', 'Accepted']
['s885753119', 's605775907']
[9072.0, 9196.0]
[27.0, 36.0]
[275, 281]
p02547
u892340697
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n = int(input())\nd = [list(map(int, input().split())) for _ in range(n)]\n\nc = 0\nans = False\nfor i in d:\n if d[0] == d[1]:\n c += 1\n if c >=3:\n ans = True\n break\n else:\n c = 0\nif ans:\n print(\'Yes\')\nelse:\n print("No")', 'n = int(input())\nd = [list(map(int, input().split())) for _ in range(n)]\n\nc = 0\nans = False\nfor i in d:\n if i[0] == i[1]:\n\n c += 1\n if c >=3:\n ans = True\n break\n else:\n c = 0\nif ans:\n print(\'Yes\')\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s839523260', 's685132141']
[9180.0, 9188.0]
[29.0, 30.0]
[269, 270]
p02547
u894606367
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n = int(input()) \nnum_list = []\nfor i in range(n):\n num_list.append(list(map(int,input().split())))\n\nans = []\nfor i in range(n):\n a = num_list[i]\n a1= a[0]\n a2 = a[1]\n if a1 == a2:\n ans.append(1)\n if i > 1 and ans[i-2] == 1 and ans[i-1] == 1 and ans[i] == 1:\n print('Yes')\n break\n else:\n ans.append(0)\nif 0 in ans :\n print('No')", "n = int(input()) \nnum_list = []\nfor i in range(n):\n num_list.append(list(map(int,input().split())))\n\nans = []\nfor i in range(n):\n a = num_list[i]\n a1= a[0]\n a2 = a[1]\n if a1 == a2:\n ans.append(1)\n if i > 1 and ans[i-2] == 1 and ans[i-1] == 1 and ans[i] == 1:\n print('Yes')\n break\n else:\n ans.append(0)\nif 0 in ans and len(ans) == n :\n print('No')"]
['Wrong Answer', 'Accepted']
['s532378151', 's539456302']
[9212.0, 9140.0]
[36.0, 24.0]
[357, 375]
p02547
u907865484
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["N = input()\n\nresult = False\ncount = 0\n\nfor range(N):\n D1,D2 = map(int,input().split())\n if D1 == D2:\n count += 1\n else:\n count = 0\n\n if count > 2:\n result = True\n break\n\nif result:\n print('Yes')\nelse:\n print('No')\n", "N = int(input())\n\nresult = False\ncount = 0\n\nfor i in range(N):\n D1,D2 = map(int,input().split())\n if D1 == D2:\n count += 1\n else:\n count = 0\n\n if count > 2:\n result = True\n break\n\nif result:\n print('Yes')\nelse:\n print('No')\n"]
['Runtime Error', 'Accepted']
['s354255582', 's495457763']
[9012.0, 9180.0]
[22.0, 30.0]
[260, 270]
p02547
u909273183
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['def dice(N):\n for i in range(len(N)-2):\n if N[i][0]==N[i][1] and N[i+1][0]==N[i+1][1] and N[i+2][0]==N[i+2][1]:\n return "Yes"\n return "No"\n\nNumber=int(input("N="))\nN=[]\nfor i in range(Number):\n x,y=input().split()\n N.append([int(x), int(y)])\nprint(dice(N))\n', 'def dice(N):\n for i in range(len(N)-2):\n if N[i][0]==N[i][1] and N[i+1][0]==N[i+1][1] and N[i+2][0]==N[i+2][1]:\n return "Yes"\n return "No"\n\nNumber=int(input())\nN=[]\nfor i in range(Number):\n x,y=input().split()\n N.append([int(x), int(y)])\nprint(dice(N))\n']
['Wrong Answer', 'Accepted']
['s992002086', 's713064315']
[9192.0, 9184.0]
[32.0, 31.0]
[287, 283]
p02547
u914214809
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["def solution(arr):\n count = 0\n for i, val in enumerate(arr):\n if i > 0 and arr[i - 1] == val:\n count += 1\n else:\n count = 0\n if count == 2:\n return 'Yes'\n return 'No'\nn = int(input())\narr = []\nfor _ in range(n):\n arr.append(input())\nprint(solution(arr)", " def solution(arr):\n count = 0\n for i, val in enumerate(arr):\n if i > 0 and arr[i - 1] == val:\n count += 1\n else:\n count = 0\n if count == 2:\n return 'Yes'\n return 'No'\n n = int(input())\n arr = []\n for _ in range(n):\n arr.append(input())\n print(solution(arr))", "def solution(arr):\n count = 0\n for i, val in enumerate(arr):\n if arr[i - 1] == val:\n count += 1\n else:\n count = 0\n if count == 2:\n return 'Yes'\n return 'No'\nn = int(input())\narr = []\nfor _ in range(n):\n arr.append(input())\nprint(solution(arr))", "def solution(arr):\n count = 0\n for i, j in arr:\n if i == j:\n count += 1\n else:\n count = 0\n if count == 3:\n return 'Yes'\n return 'No'\nn = int(input())\narr = []\nfor _ in range(n):\n arr.append([ int(i) for i in input().split()])\nprint(solution(arr))"]
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s592897853', 's747739171', 's937911155', 's039954282']
[8988.0, 8940.0, 9188.0, 9140.0]
[25.0, 22.0, 32.0, 30.0]
[280, 341, 271, 274]
p02547
u914408528
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
['n = int(input())\n\nnumber = 0\nfor i in range(n):\n a, b = map(int, input().split())\n if a == b:\n number += 1\n else:\n number = 0\n if number == 3:\n print("Yes")\n\nprint("No")', 'n = int(input())\n\nnumber = 0\nfor i in range(n):\n if number == 3:\n print("Yes")\n a, b = map(int, input().split())\n if a == b:\n number += 1\n else:\n number = 0\n\nprint("No")\n', 'n = int(input())\n\nanswer = "No"\nnumber = 0\nfor i in range(n):\n a, b = map(int, input().split())\n if a == b:\n number += 1\n else:\n number = 0\n if number == 3:\n answer = "Yes"\n\nprint(answer)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s451111136', 's680690729', 's584741283']
[9164.0, 9156.0, 9160.0]
[35.0, 25.0, 30.0]
[182, 183, 201]
p02547
u919730120
2,000
1,048,576
Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}. Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.
["n=int(input())\nans=0\nfor i in range(n):\n\ta,b=map(int,input().split())\n\tif a==b:\n\t\tans+=1\n\telse:\n\t\tans=0\nif ans>=3:\n\tprint('Yes')\nelse:\n\tprint('No')", "n=int(input())\nans=0\nf=0\nfor i in range(n):\n\ta,b=map(int,input().split())\n\tif a==b:\n\t\tans+=1\n\telse:\n\t\tans=0\n\tif ans>=3:\n\t\tf=1\nif f==1:\n\tprint('Yes')\nelse:\n\tprint('No')"]
['Wrong Answer', 'Accepted']
['s799370651', 's617946659']
[9192.0, 9184.0]
[29.0, 30.0]
[147, 167]