TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.  In Taknese, the plural form of a noun is spelled based on the following rules:    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.   * If a noun's singular form ends with `s`, append `es` to the end of the singular form.  You are given the singular form S of a Taknese noun. Output its plural form.

Submission attempts (in order):
N = int(input(""))
d = 0
for a in range(N):
  for b in range(N):
    for c in range(N):
      if a*b+c == N:
        d += 1

import sys
input = sys.stdin.readline
N = int(input())
d = 0
for a in range(1,N):
  for b in range(1,N):
    for c in range(1,N):
      if a*b+c == N:
        d += 1
print(d)

for y in range(10**3):
  for z in range(10**3):
    if 1+y*y == 2*z:
      print("x=1,y="+str(y)+",z="+str(z))

N = int(input(""))
d = 0
for a in range(N):
  for b in range(N):
    for c in range(N):
      if a*b+c == N:
        d += 1
print(d)

S = input("")
if S[-1] == "s":
  print(S+"es")
else:
  print(S+"s")

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.  In Taknese, the plural form of a noun is spelled based on the following rules:    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.   * If a noun's singular form ends with `s`, append `es` to the end of the singular form.  You are given the singular form S of a Taknese noun. Output its plural form.

Submission attempts (in order):
input=(S)
if S[-1]!="s":
  	print(S+"s")
elif S[-1]=="s":
  	print(S+"es")

S=input()
if S[-1]=="s":
  	print(S+"es")
else:
  	print(S+"s")

Verdicts: Runtime Error

Accepted
Problem: In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.  In Taknese, the plural form of a noun is spelled based on the following rules:    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.   * If a noun's singular form ends with `s`, append `es` to the end of the singular form.  You are given the singular form S of a Taknese noun. Output its plural form.

Submission attempts (in order):
word = input()
if(word[-s] == 's'):
	print(word+'es')
else:
	print(word+'s')

word = input()
	if(word[-1] == 's'):
  		print(word+'es')
 	else:
      print(word+'s')

word = input()
	if(word[-s] == 's'):
    	print(word+'es')
    else:
    	print(word+'s')

word = input()
	if(word[-s] == 's'):
    	print(word+'es')
    else:
    	print(word+'s')

word = input()
if(word[-1] == 's'):
	print(word+'es')
else:
	print(word+'s')

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.  In Taknese, the plural form of a noun is spelled based on the following rules:    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.   * If a noun's singular form ends with `s`, append `es` to the end of the singular form.  You are given the singular form S of a Taknese noun. Output its plural form.

Submission attempts (in order):
word = input()

last = word[-1]

if last == 's':
  word = f'{word}es'
else:
  word = f'{word}s'
  


word = input()

if word[-1] == 's':
  word = f'{word}es'
else:
  word = f'{word}s'
  
print(word)

Verdicts: Wrong Answer

Accepted
Problem: In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.  In Taknese, the plural form of a noun is spelled based on the following rules:    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.   * If a noun's singular form ends with `s`, append `es` to the end of the singular form.  You are given the singular form S of a Taknese noun. Output its plural form.

Submission attempts (in order):
S = input()

print(S[-1])
if S[-1] == 's':
    print(S + 'es')
else:
    print(S + 's')


S = input()

if S[-1] == 's':
    print(S + 'es')
else:
    print(S + 's')

Verdicts: Wrong Answer

Accepted
Problem: In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.  In Taknese, the plural form of a noun is spelled based on the following rules:    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.   * If a noun's singular form ends with `s`, append `es` to the end of the singular form.  You are given the singular form S of a Taknese noun. Output its plural form.

Submission attempts (in order):
n = int(input())  
num_list = []
for i in range(n):
    num_list.append(list(map(int,input().split())))

ans = []
for i in range(n):
  a = num_list[i]
  a1= a[0]
  a2 = a[1]
  if a1 == a2:
    ans.append(1)
    if i > 1 and ans[i-2] == 1 and ans[i-1] == 1 and ans[i] == 1:
      print('Yes')
      break
  else:
    ans.append(0)
if len(ans) == n:
  print('No')


n = input()
if n[-1] == 's':
  print(n+'es')
else:
  print(n+'s')

Verdicts: Runtime Error

Accepted
Problem: In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.  In Taknese, the plural form of a noun is spelled based on the following rules:    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.   * If a noun's singular form ends with `s`, append `es` to the end of the singular form.  You are given the singular form S of a Taknese noun. Output its plural form.

Submission attempts (in order):
""" A
"""
import sys
import math
from functools import reduce
from bisect import bisect_left

def readString():
    return sys.stdin.readline()

def readInteger():
    return int(readString())

def readStringSet(n):
    return sys.stdin.readline().split(" ")[:n]

def readIntegerSet(n):
    return list(map(int, readStringSet(n)))

def readIntegerMatrix(n, m):
    return [lambda _: readIntegerSet(m) for _ in range(0, n)]

def main(S):
    return S + "es" if S.endswith("s") else S + "s"

if __name__ == "__main__":
    _S = readString()

    print(main(_S))

""" A
"""
import sys
import math
from functools import reduce
from bisect import bisect_left

def readString():
    return sys.stdin.readline()

def readInteger():
    return int(readString())

def readStringSet(n):
    return sys.stdin.readline().split(" ")[:n]

def readIntegerSet(n):
    return list(map(int, readStringSet(n)))

def readIntegerMatrix(n, m):
    return [lambda _: readIntegerSet(m) for _ in range(0, n)]

def main(S):
    return S + "es" if S.endswith("s") else S + "s"

if __name__ == "__main__":
    _S = readString().rstrip()

    print(main(_S))

Verdicts: Wrong Answer

Accepted
Problem: In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.  In Taknese, the plural form of a noun is spelled based on the following rules:    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.   * If a noun's singular form ends with `s`, append `es` to the end of the singular form.  You are given the singular form S of a Taknese noun. Output its plural form.

Submission attempts (in order):
N=int(input())
a=1
count=0
while a<N:
  b=1
  #print(a,b)
  for i in range(N//a+1):
    c=N-a*b
    if c>0:
      count+=1
      #print(a,b,c)
    b+=1
  a+=1
print(count)

moji=input()
c=len(moji)
if moji[c-1]=="s":
  print(moji+"es")
else:
  print(moji+"s")

Verdicts: Runtime Error

Accepted
Problem: In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.  In Taknese, the plural form of a noun is spelled based on the following rules:    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.   * If a noun's singular form ends with `s`, append `es` to the end of the singular form.  You are given the singular form S of a Taknese noun. Output its plural form.

Submission attempts (in order):
S=input()
if S[-1]==s:
    print(S+"es")
else:
    print(S+"s")

S=str(input())
if s[-1]=s:
    print(S+"es")
else:
    print(S+"s")

S=input()
if S[-1:]=="s":
    print("S"+"es")
else:
    print("S"+"s")

S=str(input())
if S[-1]==s:
    print(S+"es")
else:
    print(S+"s")


S=input()
if S[-1]==s:
    print("S"+"es")
else:
    print("S"+"s")

S=str(input())
if S[-1]==s:
    print(S+"es")
else:
    print(S+"s")

S=input()
if S[-1:]=="s":
    print(S+"es")
else:
    print(S+"s")

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.  In Taknese, the plural form of a noun is spelled based on the following rules:    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.   * If a noun's singular form ends with `s`, append `es` to the end of the singular form.  You are given the singular form S of a Taknese noun. Output its plural form.

Submission attempts (in order):
N = int(input())
A=[list(map(int, input().split())) for i in range(N)]
num = 0
zoro = 0
while num < N:
  if A[num][0] ==A[num][1]:
    num +=1
    zoro +=1 
  else:
    num +=1
    if zoro >2:
      zoro = zoro
    else:
      zoro = 0
if zoro >2 :
  print("Yes")
else:
  print("No")

N = int(input())
A=[list(map(int, input().split())) for i in range(N)]
num = 0
zoro = 0
while num < N:
  if A[num][0] ==A[num][1]:
    num +=1
    zoro +=1 
  else:
    num +=1
    if zoro >2:
      zoro = zoro
    else:
      zoro = 0
if zoro >2 :
  print("Yes")
else:
  print("No")

text = input()
tend = len(text)
text2 = ""
if text[len(text)-1:len(text)] == "s":
    text2 = text +'es'
else:
    text2 = text +'s'
print(text2) 


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.  In Taknese, the plural form of a noun is spelled based on the following rules:    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.   * If a noun's singular form ends with `s`, append `es` to the end of the singular form.  You are given the singular form S of a Taknese noun. Output its plural form.

Submission attempts (in order):
N = int(input())
count = 0
c = 0
for i in range(N):
    d1,d2 = input().split()
    if d1==d2:
        count+=1
        if count==3:
            c =1
            sys.exit()
    else:
        count=0
if c==1:
    print('Yes')
else:
    print('No')

S = input()
if S[-1]=='s':
    s = S+'s'
else:
    s = S+'es'
print(s)

S = input()
if S=='s':
    s = S+'s'
else:
    s = S+'es'
print(s)

N = int(input())
count = 0
c = 0
for i in range(N):
    d1,d2 = input().split()
    if d1==d2:
        count+=1
        if count==3:
            c =1

    else:
        count=0
if c==1:
    print('Yes')
else:
    print('No')

N = int(input())
count = 0
c = 0
for i in range(N):
    d1,d2 = input().split()
    if d1==d2:
        count+=1
        if count==3:
            c =1
    else:
        count=0
if count==1:
    print('Yes')
else:
    print('No')

S = input()
if S[-1]=='s':
    s = S+'es'
else:
    s = S+'s'
print(s)

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.  In Taknese, the plural form of a noun is spelled based on the following rules:    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.   * If a noun's singular form ends with `s`, append `es` to the end of the singular form.  You are given the singular form S of a Taknese noun. Output its plural form.

Submission attempts (in order):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy
 


def main():
  	s = input()
   	if s[-1] == "s":
        print(s + "es")
   	else:
        print(s + "s")

if __name__ == "__main__":
    main()

import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy
 


def main():
   s = input()
   if s[-1] == "s":
        print(s + "es")
    else:
        print(s + "s")

if __name__ == "__main__":
    main()

import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy
 


def main():
    s = input()
    if s[-1] == "s":
        print(s + "es")
    else:
        print(s + "s")

if __name__ == "__main__":
    main()

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.  In Taknese, the plural form of a noun is spelled based on the following rules:    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.   * If a noun's singular form ends with `s`, append `es` to the end of the singular form.  You are given the singular form S of a Taknese noun. Output its plural form.

Submission attempts (in order):
line = input()

if line[len(line)] == ("s"):
  line += "es"
else:
  line += "s"
print(line)

line = input()
 
if line[len(line)-1] == ("s"):
  line += "es"
else:
  line += "s"
print(line)

Verdicts: Runtime Error

Accepted
Problem: In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.  In Taknese, the plural form of a noun is spelled based on the following rules:    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.   * If a noun's singular form ends with `s`, append `es` to the end of the singular form.  You are given the singular form S of a Taknese noun. Output its plural form.

Submission attempts (in order):
import sys
readline = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
#mod = 998244353
INF = 10**18
eps = 10**-7

n,x,m=map(int,input().split())
s=set()
l=[]
flag=False
cnt=1
ans=0

l.append(x)
for i in range(m):
  if x not in s:
    s.add(x)
    x=(x**2)%m
    l.append(x)
  else:
    break

h=len(l)
cnt=1
num=0
for i in range(h):
  if l[i]==l[h-1]:
    while l[i+cnt]!=l[h-1]:
      cnt+=1
    flag=True
    break
  else:
    num+=1
    ans+=l[i]

n-=num
if num!=0:
  del l[h-1]
  del l[0:num]

if n>=len(l):
  mod=n%len(l)
  ans+=sum(l)*(n//len(l))
  for i in range(1,mod):
    ans+=l[i-1]
  print(ans)
else:
  for i in range(n):
    ans+=l[i]
  print(ans)

import sys
readline = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
#mod = 998244353
INF = 10**18
eps = 10**-7
s=str(input())
if s[len(s)-1]=='s':
  print(s+'es')
else:
  print(s+'s')

Verdicts: Runtime Error

Accepted
Problem: In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.  In Taknese, the plural form of a noun is spelled based on the following rules:    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.   * If a noun's singular form ends with `s`, append `es` to the end of the singular form.  You are given the singular form S of a Taknese noun. Output its plural form.

Submission attempts (in order):
s = list(input())
if s[-1] == s:
    for i in s:
        print(i,end = "")
        print("es")
else:
    for i in s:
        print(i,end = "")
        print("s")

s = input()
if s[-1] == "s":print(s+"es")
else:print(s+"s")

Verdicts: Wrong Answer

Accepted
Problem: In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.  In Taknese, the plural form of a noun is spelled based on the following rules:    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.   * If a noun's singular form ends with `s`, append `es` to the end of the singular form.  You are given the singular form S of a Taknese noun. Output its plural form.

Submission attempts (in order):
word = input()

if word[-1] == "s":
  print(word + "es")
else:
  print(word)

word = input()
if word[-1] == "s":
  print(word + "es)
else:
  print(word)


word = input()
if word[-1] == "s":
  print(word + "es")
else:
  print(word + "s")

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.  In Taknese, the plural form of a noun is spelled based on the following rules:    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.   * If a noun's singular form ends with `s`, append `es` to the end of the singular form.  You are given the singular form S of a Taknese noun. Output its plural form.

Submission attempts (in order):
n = int(input())
import math
ans = 0
for a in range(1, n):
  ans += math.floor((n - 1) / a)
print(ans)

S=list(input())
if S[len(S)-1]=="s":
  S.append("es")
else:
  S.append("s")
s="".join(S)
print(s)

Verdicts: Runtime Error

Accepted
Problem: In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.  In Taknese, the plural form of a noun is spelled based on the following rules:    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.   * If a noun's singular form ends with `s`, append `es` to the end of the singular form.  You are given the singular form S of a Taknese noun. Output its plural form.

Submission attempts (in order):
a=input()
e=a[len(a)-1:len(a)-1]
if e == "s":
    print(a+"es")
else:
    print(a+"s"

a=input()
e=a[len(a)-1:len(a)]
if e == "s":
    print(a+"es")
else:
    print(a+"s")

Verdicts: Runtime Error

Accepted
Problem: In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.  In Taknese, the plural form of a noun is spelled based on the following rules:    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.   * If a noun's singular form ends with `s`, append `es` to the end of the singular form.  You are given the singular form S of a Taknese noun. Output its plural form.

Submission attempts (in order):
x=input()
print(x+'s' if x[len(x)-1]!=s else x[0:len(x)-1]+"es")

x=input()
print(x+'s' if x[len(x)-1]!='s' else x+"es")


Verdicts: Runtime Error

Accepted
Problem: In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.  In Taknese, the plural form of a noun is spelled based on the following rules:    * If a noun's singular form does not end with `s`, append `s` to the end of the singular form.   * If a noun's singular form ends with `s`, append `es` to the end of the singular form.  You are given the singular form S of a Taknese noun. Output its plural form.

Submission attempts (in order):
m = input()
c = m[-1]
if c == 's':
  print(m+'es')
else:
  print(c+'s')

m = input()
c = m[-1]
if c == 's':
  print(m+'es')
else:
  print(m+'s')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N=int(input())
counter=0
flag=0
for i in range(N):
     D1, D2=map(int,input().split())
     if D1==D2:
         counter+=1
     else:
         counter=0
         if counter>=3:
             flag=1
             break
if flag==1:
    print('Yes')
else:
    print('No')

N=int(input())
counter=0
flag=0
for i in range(N):
     D1, D2=map(int,input().split())
     if D1==D2:
         counter+=1
         if counter>=3:
             flag=1
             break
     else:
         counter=0
if flag==1:
    print('Yes')
else:
    print('No')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
sub_yes = 0
max_yes = 0
for i in range(N):
    d1,d2 = map(int,input().split())
    if d1 == d2:
        sub_yes += 1
    else:
        max_yes = sub_yes
        sub_yes = 0
if max_yes >= 3:
    print("yes")
else:
    print("no")

N = int(input())
sub_yes = 0
max_yes = 0
for i in range(N):
    d1,d2 = map(int,input().split())
    if d1 == d2:
        sub_yes += 1
    else:
        max_yes = sub_yes
        sub_yes = 0
if sub_yes > max_yes:
    max_yes = sub_yes
if max_yes >= 3:
    print("yes")
else:
    print("no")

N = int(input())
sub_yes = 0
max_yes = 0
for i in range(N):
    d1,d2 = map(int,input().split())
    if d1 == d2:
        sub_yes += 1
    else:
        if sub_yes > max_yes:
            max_yes = sub_yes
        sub_yes = 0

if sub_yes > max_yes:
    max_yes = sub_yes
if max_yes >= 3:
    print("yes")
else:
    print("no")

N = int(input())
sub_yes = 0
max_yes = 0
for i in range(N):
    d1,d2 = map(int,input().split())
    if d1 == d2:
        sub_yes += 1
        if sub_yes > max_yes:
            max_yes = sub_yes
    else:
        if sub_yes > max_yes:
            max_yes = sub_yes
        sub_yes = 0
if max_yes >= 3:
    print("yes")
else:
    print("no")

N = int(input())
sub_yes = 0
max_yes = 0
for i in range(N):
    d1,d2 = map(int,input().split())
    if d1 == d2:
        sub_yes += 1
    else:
        max_yes = sub_yes
        sub_yes = 0

if sub_yes > max_yes:
    max_yes = sub_yes
# print(max_yes)
# print(sub_yes)
if max_yes >= 3:
    print("yes")
else:
    print("no")

N = int(input())
sub_yes = 0
max_yes = 0
for i in range(N):
    d1,d2 = map(int,input().split())
    if d1 == d2:
        sub_yes += 1
        if sub_yes > max_yes:
            max_yes = sub_yes
    else:
        if sub_yes > max_yes:
            max_yes = sub_yes
        sub_yes = 0
if max_yes >= 3:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import os,sys
c=0

n=input()
for i range(n):
    m=input()
    one=m[0]
    two=m[2]
    if(one==two):
        c+=1
    
if(c>=3):
    print('Yes')
else:
    print('No')


import os,sys
c=0

n=input()
for i in range(int(n)):
    m=input()
    one=m[0]
    two=m[2]
    if(one==two):
        c+=1
    else:
        c=0
    
if(c>=3):
    print('Yes')
else:
    print('No')


import os,sys
c=0
ok=False
n=input()
for i in range(int(n)):
    m=input()
    one=m[0]
    two=m[2]
    if one==two:
        c+=1
    else:
        c=0
    if c>=3:
        ok=True
    
if(ok):
    print('Yes')
else:
    print('No')


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
l = [list(map(int, input().split())) for i in range(n)]
#print(l[0][0])
#print(l[0][1])
ans = n-2
ans1 = 0

for m in range(ans):
  if l[m][0]  == l[m][1] and l[m+1][0] == l[m+1][1] and l[m+2][0] == l[m+2][1]:
    ans1 += 1
  else:
    ans1 = 0
    
    
if ans1 >= 1:
  print("Yes")
else:
  print("No")

n = int(input())
l = [list(map(int, input().split())) for i in range(n)]
#print(l[0][0])
#print(l[0][1])
ans = n-2
ans1 = 0

for m in range(ans):
  if l[m][0]  == l[m][1] and l[m+1][0] == l[m+1][1] and l[m+2][0] == l[m+2][1]:
    ans1 += 1
  else:
    ans1 = 0
    
    
if ans1 >= 1:
  print("Yes")
else:
  print("No")

n = int(input())
l = [list(map(int, input().split())) for i in range(n)]
#print(l[0][0])
#print(l[0][1])
ans = n-2
ans1 = 0

for m in range(ans):
  if l[m][0]  == l[m][1] and l[m+1][0] == l[m+1][1] and l[m+2][0] == l[m+2][1]:
    ans1 += 1
 
    
    
if ans1 >= 1:
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
cnt=0
for _ in range(n):
    a,b=map(int,input()split())
    if a==b:
        cnt+=1
        if cnt>=3:
            break
    else:
        cnt=0
if cnt>=3:
    print("Yes")
else:
    print("No")

n = int(input())
cnt=0
for _ in range(n):
    a,b=map(int,input().split())
    if a==b:
        cnt+=1
        if cnt>=3:
            break
    else:
        cnt=0
if cnt>=3:
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
i = input()
idx = 0

while idx < i:
  	cnt = 0
	for _ in range(3):
      d1, d2 = list(map(int, input.split(' ')))
      if d1 == d2:
        cnt += 1
    if cnt == 3:
      print('Yes')
    else:
      idx += 1

print('No')

N = input()
lst = []
for _ in range(N):
  d1, d2 = map(int, input.split(' '))
  lst.append((d1, d2))
  
idx = 0
while idx < N-3:
  cnt = 0
  for _ in range(3):
    d1, d2 = lst[idx]
    if d1 == d2:
      cnt += 1
  
  if cnt == 3:
    print('Yes')
    break
  else:
    idx += 1
print('No')


Copy
Copy
N = int(input())
lst = []
for _ in range(N):
  d1, d2 = map(int, input().split(' '))
  lst.append((d1, d2))
  
idx = 0
while idx < N-3:
  cnt = 0
  for _ in range(3):
    d1, d2 = lst[idx]
    if d1 == d2:
      cnt += 1
  
  if cnt == 3:
    print('Yes')
    break
  else:
    idx += 1
print('No')

i = input()
idx = 0

while idx < i:
  	cnt = 0
	for _ in range(3):
      d1, d2 = list(map(int, input.split(' ')))
      if d1 == d2:
        cnt += 1
    if cnt == 3:
      return 'Yes'
    else:
      idx += 3

print('No')

N = input()

idx = 0
while idx < N-3:
  cnt = 0
  for _ in range(3):
    d1, d2 = map(int, input.split(' '))
    if d1 == d2:
      cnt += 1
  
  if cnt == 3:
    print('Yes')
    break
  else:
    idx += 1
print('No')

N = int(input())
lst = []
for _ in range(N):
  d1, d2 = map(int, input.split(' '))
  lst.append((d1, d2))
  
idx = 0
while idx < N-3:
  cnt = 0
  for _ in range(3):
    d1, d2 = lst[idx]
    if d1 == d2:
      cnt += 1
  
  if cnt == 3:
    print('Yes')
    break
  else:
    idx += 1
print('No')

N = int(input())
lst = []
for _ in range(N):
  d1, d2 = map(int, input().split(' '))
  lst.append((d1, d2))
  
idx = 0
flag = False
while idx < N-2:
  cnt = 0
  for i in range(3):
    d1, d2 = lst[i+idx]
    if d1 == d2:
      cnt += 1
  if cnt == 3:
    flag = True
    break
  else:
    idx += 1
 
print('Yes' if flag else 'No')

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
a = [input().split(" ") for i in range(n)]
num = 0
nummax = 0
for i in range(n):
  print(a[i][0])
  if int(a[i][0])==int(a[i][1]):
    num+=1
  else:
    if num> nummax:
      nummax = num
      num=0
if nummax>3:
  print('Yes')
else:
  print('No')

n = int(input())
a = [input().split(" ") for i in range(n)]
num = 0
nummax = 0
for i in range(n):
  if int(a[i][0])==int(a[i][1]):
    num+=1
  else:
    if num> nummax:
      nummax = num
    num=0
if num> nummax:
   nummax = num
if nummax>=3:
  print('Yes')
else:
  print('No')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=input()

c=0
flag=0
for i in range(n):
  a,b = map(int(),input().split())
  if(a==b):
    c+=1
  else:
    c=0
  if(c==3):
    print("Yes")
    flag=1
    break
if(flag==0):
  print("No")

n=input()

c=0
flag=0
for i in range(n):
  a,b = map(int,input().split())
  if(a==b):
    c+=1
  else:
    c=0
  if(c==3):
    print("Yes")
    flag=1
    break
if(flag==0):
  print("No")

n=int(input())

c=0
flag=0
for i in range(n):
  a,b = map(int,input().split())
  if(a==b):
    c+=1
  else:
    c=0
  if(c==3):
    print("Yes")
    flag=1
    break
if(flag==0):
  print("No")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N=int(input())
p=False
s=0
for i in range(N):
  a,b=map(int,input().split())
  if a==b:
    s+=1
    if s==3:
      break
  else:
    s=0
print("Yes" if p else "No")

N=int(input())
p=False
s=0
for i in range(N):
  a,b=map(int,input().split())
  if a==b:
    s+=1
    if s==3:
      p=True
      break
  else:
    s=0
print("Yes" if p else "No")


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
cnt = 0
ans = False
for i in range(N):
    a, b = input().split()
    print(a, b)
    if a == b:
        cnt += 1
    else:
        cnt = 0
    if cnt == 3:
        ans True
        break
    print(cnt)
print('Yes' if ans else 'No')



N = int(input())
cnt = 0
ans = False
for i in range(N):
    a, b = input().split()
    if a == b:
        cnt += 1
    else:
        cnt = 0
    if cnt == 3:
        ans = True
        break
print('Yes' if ans else 'No')



Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
l=[]
m=[]
for i in range(0,n):
  a,b=map(int,input().split())
  l.append(a)
  m.append(b)
c=0
i=0
while i<=n-3:
  if l[i]==m[i] and l[i+1]==m[i+1] and l[i+2]==m[i+2]:
      c=3
  i=i+2
if c==3:
  print('Yes')
else:
  print('No')


n=int(input())
l=[]
m=[]
for i in range(0,n):
  a,b=map(int,input().split())
  l.append(a)
  m.append(b)
c=0
for i in range(0,n):
  if l[i]==m[i]:
    c=c+1
  else:
    c=0
if c==3:
  print('Yes')
else:
  print('No')

n=int(input())
l=[]
m=[]
for i in range(0,n):
  a,b=map(int,input().split())
  l.append(a)
  m.append(b)
c=0
i=0
while i<=n-3:
  if l[i]==m[i] and l[i+1]==m[i+1] and l[i+2]==m[i+2]:
      c=3
  i=i+1
if c==3:
  print('Yes')
else:
  print('No')


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
flag= True
count = 0
for i in range(n):
  a,b = list(map(int, input().split()))
  if a==b:
    count += 1
  else:
    count= 0
  if count==3:
    flag = True
if flag:
  print("yes")
else:
  print("No")
 

n = int(input())
flag= True
count = 0
for i in range(n):
  a,b = list(map(int, input().split()))
  if a==b:
    count += 1
  else:
    count= 0
  if count==3:
    flag = True
if flag:
  print("yes")
else:
  print("no")

n = int(input())

count = 0
for i in range(n):
  a,b = list(map(int, input().split()))
  print(a,b)

n = int(input())
flag= False
count = 0
for i in range(n):
  a,b = list(map(int, input().split()))
  if a==b:
    count += 1
  else:
    count= 0
  if count==3:
    flag = True
if flag:
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def ProgramB():
    
    num = int(input())
    
    before = 'No'
    count = 0
    max_count = 0

    for i in range(num):
        data = list(map(int,input().split()))

        if num == 0:

            if data[0] == data[1]:
                before = 'Yes'
                count = count + 1
                
                if count > max_count:
                    max_count = count
    
            else:
                before = 'No'
                count = 0

        else:
            if data[0] == data[1] and before == 'Yes':
                before = 'Yes'
                count = count + 1
                
                if count > max_count:
                    max_count = count
    
            else:
                before = 'No'
                count = 0
            
            
    if max_count >= 3:        
        print('Yes')
        
    else:
        print('No')
        
        
if __name__ == '__main__':
    ProgramB()



def ProgramB():
    
    num = int(input())
    
    count = 0
    max_count = 0

    for i in range(num):
        data = list(map(int,input().split()))

        if num == 0:

            if data[0] == data[1]:
                count = count + 1
                
                if count > max_count:
                    max_count = count
    
            else:
                count = 0

        else:
            if data[0] == data[1]:
                count = count + 1
                
                if count > max_count:
                    max_count = count
    
            else:
                count = 0
            
            
    if max_count >= 3:        
        print('Yes')
        
    else:
        print('No')
        
        
if __name__ == '__main__':
    ProgramB()



Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
i = int(input())
count = 0
for i in range(i):
  a, b = input().split(' ')
  if a == b:
    count += 1
print('Yes' if count >= 3 else 'No'


i = int(input())
count = 0
for i in range(i):
  a, b = input().split(' ')
  if a == b:
    count += 1
  else:
    count = 0
print('Yes' if count >= 3 else 'No')


i = int(input())
count = 0
res = False
for i in range(i):
  a, b = input().split(' ')
  if a == b:
    count += 1
  else:
    count = 0
  if count >= 3:
    res = True
print('Yes' if res else 'No')


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
count=0
for i in range(N):
  p,q=map(int,input().split(' '))
  if count<3:
	if p==q:
      count+=1
    else:
      count=0
  else:
    pass
if count>=3:
  print('Yes')
else:
  print('No')

N= int(input())
count=0
for i in range(N):
  p,q=map(int,input().split(' '))
  if p==q:
    count+=1
	else:
    count=0

if count>=3:
  print('Yes')
else:
  print('No')
		


N= int(input())
count=0
for i in range(N):
	p,q=list(map(int,input().split(' ')))
    if p==q:
		count+=1
	else:
      	count=0

if count>=3:
  print('Yes')
else:
  print('No')
		


N= int(input())
count=0
for i in range(N):
	p,q=map(int,input().split(' '))
    if p==q:
		count+=1
	else:
      	count=0

if count>=3:
  print('Yes')
else:
  print('No')
		

N= int(input())
count=0
for i in range(N):
  p,q=map(int,input().split(' '))
  if count<3:
    if p==q:
      count+=1
    else:
      count=0
  else:
    pass

if count>=3:
  print('Yes')
else:
  print('No')

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
D = [map(int, input().split()) for i in range(N)]

seq = 0
for i in range(len(D)):
    if D[i][0] == D[i][1]:
        if D[i+1][0] == D[i+1][1]:
            if D[i+2][0] == D[i+2][1]:
                print('Yes')
                exit()

print('No')


N = int(input())
D = [list(map(int, input().split())) for i in range(N)]

seq = 0
for i in range(len(D)-2):
    if D[i][0] == D[i][1]:
        if D[i+1][0] == D[i+1][1]:
            if D[i+2][0] == D[i+2][1]:
                print('Yes')
                exit()
print('No')


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
count=0

for num in range(n):
    d1,d2 = map(int,input().split())
    if d1 == d2:
        count += 1
else:
    if count>0:
        print("Yes")
    else:
        print("No")v

n = int(input())
count=0
flg=0

for num in range(n):
    d1,d2 = map(int,input().split())
    if d1 == d2:
        count += 1
        if count>= 3:
            flg = 1

    else:
        count=0
else:
    if count > 3 | flg >0:
        print("Yes")
    else:
        print("No")
        

n = int(input())
count=0
flg=0

for num in range(n):
    d1,d2 = map(int,input().split())
    if d1 == d2:
        count += 1
        if count>= 3:
            flg = 1
    else:
        count=0
else:
    if count > 3 or flg >0:
        print("Yes")
    else:
        print("No")

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())

d12 = [map(int, input().split()) for _ in range(n)]
d1, d2 = [list(i) for i in zip(*d12)]

for i in range(n-2):
  if d1[i] == d2[i]:
    if d1[i+1] == d2[i+1]:
      if d1[i+2] == d2[i+2]:
        print("YES")
        break
else:
  print("NO")

n = int(input())

d12 = [map(int, input().split()) for _ in range(n)]
d1, d2 = [list(i) for i in zip(*d12)]

for i in range(n-2):
  if d1[i] == d2[i]:
    if d1[i+1] == d2[i+1]:
      if d1[i+2] == d2[i+2]:
        print("Yes")
        break
else:
  print("No")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = input() 
temp = 0
for i in range(n):
  d,w = map(int,input().split())
  if d==w:
    temp += 1 
    if temp == 3 :
      print("Yes")
      exit()
  else:
    temp = 0 
    
print("No")
    
    

n = int(input()) 
temp = 0
for i in range(n):
  d,w = map(int,input().split())
  if d==w:
    temp += 1 
    if temp == 3 :
      print("Yes")
      exit()
  else:
    temp = 0 
    
print("No")

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
#include <algorithm>
#include<bits/stdc++.h>

#include <string>
using namespace std;

int main(){
        int n,a,b;
        int cnt=0;
        cin>>n;
        
        for(int i=0;i<n;i++){
                cin>>a>>b;
                if(a==b){
                        cnt++;
                }else{
                        cnt=0;
                }
                if(cnt==3){
                        cout<<"Yes"<<endl;
                        return 0;
                }
                
        }
        cout<<"No"<<endl;
        return 0;
}


n=int(input())
lst=[list(map(int,input().split())) for _ in range(n)]
# print(lst)
cnt=0
ans="No"
for i in range(n):
    a,b=lst[i]
    # print(a,b)
    if a==b:
        cnt+=1
    else:
        cnt=0
    if cnt==3:
        # print(a,b,cnt)
        ans="Yes"
        break

print(ans)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
d = [input().split(" ") for _ in range(n)]

f = False
for i in range(n-2):
    if d[i][0] == d[i][1] and not f :
        print(d[i+1], d[i+2])
        if d[i+1][0] == d[i+1][1] and d[i+2][0] == d[i+2][1]:
            f = True
if f:
    print("Yes")
else:
    print("No")

n = int(input())
d = [input().split(" ") for _ in range(n)]

for i in range(n-2):
    if d[i][0] == d[i][1]:
        if d[i+1][0] == d[i][1] and d[i+2][0] == d[i+2][1]:
            print("Yes")
print("No")

n = int(input())
d = [input().split(" ") for _ in range(n)]

f = False
for i in range(n-2):
    if d[i][0] == d[i][1] and not f :
        if d[i+1][0] == d[i+1][1] and d[i+2][0] == d[i+2][1]:
            f = True
if f:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
p = [list(map(int,input().split())) for i in range(n)]
 
 
a = p[0]
b = 0
ans  = 0
tf = 1
 
for j in range(n):
  if sum(p[j]) // 2 ** 2 == sum(p[j]):
    ans += 1
  else:
    ans = 0
  if ans == 3:
    tf = 0
    print("Yes")
    break
    
if tf == 1:
  print("No")

n = int(input())
p = [list(map(int, input().split())) for i in range(n)]

ans = 0
ck = 0

for i in range(n):
  if p[i][0] == p[i][1]:
    ans += 1
    if ans == 3:
      ck = 1
      print("Yes")
      break
  else:
    ans = 0
    
if ck == 0:
  print("No")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
g=0
for i in range(n):
  a,b=map(int,input().split(" "))
  if a==b:
    g=g+1
    if g==3:
      break
      break
  else:
    g=0
print(g)
if g==3:
  print("Yes")
else:
  print("No")

n=int(input())
g=0
for i in range(n):
  a,b=map(int,input().split(" "))
  if a==b:
    g=g+1
    if g==3:
      break
      break
  else:
    g=0


if g==3:
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
# coding:utf-8
n = int(input())
count = 0

for i in range(n):
    d1, d2 = map(int, input().split())

    if d1 == d2:
        count += 1

    if count == 3:
        print('Yes')
        exit()
    else:
        count = 0

print('No')


# coding:utf-8
n = int(input())
count = 0

for i in range(n):
    d1, d2 = map(int, input().split())

    if d1 == d2:
        count += 1
    else:
        count = 0

    if count == 3:
        print('Yes')
        exit()


print('No')


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
l = []
t = 1
for _ in range(n):
  x = list(map(int,input().split())
  l.append(x)
count = 0
for i, j in l:
  if i == j:
    count += 1
  if i!=j:
    count = 0
  if count == 3:
  	t = 0
    print("Yes")
    break
if t:
  print("No")
  

n = int(input())
count = 0
t = 1
for _ in range(n):
  a, b = map(int,input().split())
  if a==b:
    count += 1
  if a!=b:
    count = 0
  if count == 3:
    t = 0
if t:
  print("No")
else:
  print("Yes")

Verdicts: Runtime Error

Accepted