Problem p02547 (python)

Fixed submission:
ans = "No"
count = 0
n = int(input())
for i in range(n):
  a,b=map(int,input().split())
  if a == b:
    count += 1
    if count >= 3:
        ans ="Yes"
  else:
    count = 0

print(ans)

Buggy submission (verdict: Runtime Error):
count = 0
n = int(input())
for i in range(n):
  a,b=map(int,input().split())
  if a == b:
    count += 1
    if count >= 3:
		print("Yes")
  else:
    count = 0

print("No")

Buggy submission (verdict: Runtime Error):
count = 0
n = int(input())
for i in range(n):
  a,b=map(int,input().split())
  if a == b:
    count += 1
    if count >= 3:
		print("Yes")
  	return 0

print("No")

Buggy submission (verdict: Runtime Error):
d1,d2 = [],[]
n = int(input())
for i in range(n):
    a,b=map(int,input().split())
    d1.append(a)
    d2.append(b)
for i in n-2:
  if d1[i] == d2[i] and d1[i+1] == d2[i+1] and d1[i+2] == d2[i+2]:
	print("Yes")
  return 0

print("No")

Buggy submission (verdict: Runtime Error):
d1,d2 = [],[]
n = int(input())
for i in range(n):
    a,b=input().split()
    d1.append(a)
    d2.append(b)
for i in n-2:
  if d1[i] == d2[i] and d1[i+1] == d2[i+1] and d1[i+2] == d2[i+2]:
	print("Yes")
  return 0

print("No")

Buggy submission (verdict: Runtime Error):
list = []
n = input()
for i in range(n):
    a,b=input().split()
    list.append((int(a), int(b)))
for i in n-2:
  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]:
	print("Yes")
  return 0

print("No")

Buggy submission (verdict: Runtime Error):
list = []
n = input()
for i in range(n):
    a,b=input().split()
    list.append((int(a), int(b)))
for i in n-2:
  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]:
	print("Yes")
  return 0

else :print("No")

Buggy submission (verdict: Runtime Error):
ans = 0
count = 0
list = []
for i in range(100):
    a,b=input().split()
    list.append((int(a), int(b)))
l = list[0][0]
for i in l+1:
  if list[i][0] == list[i][1]:
    count += 1
    if count >= 3:
      ans = 1
  else:
    count = 0

if ans == 1:
  print("Yes")
else :print("No")

Buggy submission (verdict: Runtime Error):
ans = 0
count = 0
list = []
for i in 100:
    a,b=input().split()
    list.append((int(a), int(b)))
l = list[0][0]
for i in l:
  if list[i][0] == list[i][1]:
    count += 1
    if count >= 3:
      ans = 1
  else:
    count = 0

if ans == 1:
  print("Yes")
else print("No")

Buggy submission (verdict: Runtime Error):
ans = 0
count = 0
for i in 100:
    a,b=input().split()
    list.append((int(a), int(b)))
l = list[0][0]
for i in l:
  if list[i][0] == list[i][1]:
    count += 1
    if count >= 3:
      ans = 1
  else:
    count = 0

if ans == 1:
  print("Yes")
else print("No")

Buggy submission (verdict: Runtime Error):
ans = 0
count = 0
for i in 100:
    a,b=input().split()
    list.append((int(a), int(b)))
l = list[0][0]
for i in l:
  if list[i][0] == list[i][1]:
    count += 1
    if count >= 3:
      and = 1
  else:
    count = 0

if ans == 1:
  print("Yes")
else print("No")

Buggy submission (verdict: Runtime Error):
ans = 0
count = 0
for i in sys.stdin:
    a,b=input().split()
    list.append((int(a), int(b)))
l = list[0][0]
for 1 in l:
  if list[i][0] == list[i][1]:
    count += 1
    if count >= 3:
      and = 1
  else:
    count = 0

if ans == 1:
  print("Yes")
else print("No")