Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
def hikaku(n1, n2):
    for x, y in zip(n1, n2):
        if ord(x) == ord(y):
            continue
        else:
            if ord(x) < ord(y):
                return False
    return True
num, length = map(int, input().split())
wlist = []
for i in range(num):
    wlist.append(input())
kumi = [(x, y) for x in range(num) for y in range(x, num) if x != y]
for x, y in kumi:
    if hikaku(wlist[x], wlist[y]):
        wlist[x], wlist[y] = wlist[y], wlist[x]
print(wlist[0] + wlist[1] + wlist[2])


Fixed submission:
def hikaku(n1, n2):
    for x, y in zip(n1, n2):
        if ord(x) == ord(y):
            continue
        else:
            return True if ord(x) > ord(y) else False
num, length = map(int, input().split())
wlist = []
for i in range(num):
    wlist.append(input())
for n in range(num - 1):
    kumi = [(x, x+1) for x in range(num - 1 - n)]
    if kumi:
        for x, y in kumi:
            if hikaku(wlist[x], wlist[y]):
                wlist[x], wlist[y] = wlist[y], wlist[x]
dst = ""
for w in wlist:
    dst += w
print(dst)
Buggy python submission (verdict: Runtime Error):

def solve():
    N, K = map(int, input().split())
    data = [int(input()) for _ in range(N)]
    data.sort()
    ans = []
    cnt = 0
    while True:
        h_max1 = data[cnt + K - 1]
        h_min1 = data[cnt]
        h_max2 = data[-cnt-1]
        h_min2 = data[-cnt - K]
        tmp1 = h_max1 - h_min1
        tmp2 = h_max2 - h_min2
        ans.append(tmp1)
        ans.append(tmp2)
        cnt = cnt + 1
        if data[cnt] == data[-cnt-K]:
            break

    print(min(ans))


solve()

Fixed submission:

def solve():
    N, K = map(int, input().split())
    data = [int(input()) for _ in range(N)]
    data.sort()
    ans = []
    cnt = 0
    while True:
        if data[cnt] >= data[-cnt-K]:
            break
        h_max1 = data[cnt + K - 1]
        h_min1 = data[cnt]
        h_max2 = data[-cnt-1]
        h_min2 = data[-cnt - K]
        tmp1 = h_max1 - h_min1
        tmp2 = h_max2 - h_min2
        ans.append(tmp1)
        ans.append(tmp2)
        cnt = cnt + 1
        if data[cnt] >= data[-cnt-K]:
            break

    print(min(ans))


solve()

Buggy python submission (verdict: Runtime Error):

def solve():
    N, K = map(int, input().split())
    data = [int(input()) for _ in range(N)]
    data.sort()
    ans = []
    cnt = 0
    while True:
        h_max1 = data[cnt + K - 1]
        h_min1 = data[cnt]
        h_max2 = data[-cnt-1]
        h_min2 = data[-cnt - K]
        tmp1 = h_max1 - h_min1
        tmp2 = h_max2 - h_min2
        ans.append(tmp1)
        ans.append(tmp2)
        cnt = cnt + 1
        if data[cnt] == data[-cnt-K]:
            break

    print(min(ans))


solve()

Fixed submission:

def solve():
    N, K = map(int, input().split())
    data = [int(input()) for _ in range(N)]
    data.sort()
    ans = []
    cnt = 0
    while True:
        if data[cnt] >= data[-cnt-K]:
            break
        h_max1 = data[cnt + K - 1]
        h_min1 = data[cnt]
        h_max2 = data[-cnt-1]
        h_min2 = data[-cnt - K]
        tmp1 = h_max1 - h_min1
        tmp2 = h_max2 - h_min2
        ans.append(tmp1)
        ans.append(tmp2)
        cnt = cnt + 1
        if data[cnt] >= data[-cnt-K]:
            break

    print(min(ans))


solve()
Buggy python submission (verdict: Runtime Error):
import math
if __name__ == '__main__':
  
  S = input()
  index = range(0, len(S)-2)
  comp_num = 753
  min = 0
  tempmin = math.inf
  for i in index:
    temp = int (S[i]+S[i+1]+S[i+2])
    min = abs(comp_num - temp)
    if (min >= tempmin):
      break
    tempmin = min


  print(min)

Fixed submission:

if __name__ == '__main__':
  
  S = input()
  comp_num = 753
  min = 10000000000000000
  for i in range(0, len(S)-2):
    temp = int (S[i]+S[i+1]+S[i+2])
    tempmin = abs(comp_num - temp)
    
    if tempmin <= min:
      min = tempmin
  print(min)
Buggy python submission (verdict: Runtime Error):

if __name__ == "__main__":
    N,K = input().split()
    D = input().split()
    num = set([str(i) for i in range(10)])
    
    diff = num^set(D)
    print(diff)
    ans = N
    while True:
        strN = set(list(ans))
        if strN - diff:
            ans += 1
        else:
            break
    print(ans)

Fixed submission:

def main():
    N, K = input().split(" ")

    D = list(input().split(" "))
    use_num = list(set([str(i) for i in range(10)]) - set(D))

    N = int(N)
    i = N
    while True:

        if not set(str(i)) <= set(use_num) and i >= N:
            i += 1
        else:
            print(i)
            break

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):

if __name__ == "__main__":
    N, K = input().split(" ")
    D = input().split()
    num = set([str(i) for i in range(10)])
    diff = num ^ set(D)

    temp = N
    while True:
        setN = set(list(N))
        if setN - diff:
            temp += 1
        else:
            break
    print(temp)


Fixed submission:

def main():
    N, K = input().split(" ")

    D = list(input().split(" "))
    use_num = list(set([str(i) for i in range(10)]) - set(D))

    N = int(N)
    i = N
    while True:

        if not set(str(i)) <= set(use_num) and i >= N:
            i += 1
        else:
            print(i)
            break

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
import os

if __name__ == "__main__":
    temp = input().split(" ")
    N = temp[0]
    L = int(temp[1])
    D = list(map(int, input().split(" ")))
    
    like = []
    for i in range(0, 10):
        if D.count(i) == 0:
            like.append(i)
   
    ans = []
    for n in N:
        for l in like:
            if int(l) >= int(n):
                ans.append(l)
                break
    if int("".join(map(str, ans))) < int("".join(map(str, N))):
        ans = []
        for i in range(0, len(N)):
            ans.append(min(like))
            
    print("".join(map(str, ans)))  
    

Fixed submission:

def main():
    N, K = input().split(" ")

    D = list(input().split(" "))
    use_num = list(set([str(i) for i in range(10)]) - set(D))

    N = int(N)
    i = N
    while True:

        if not set(str(i)) <= set(use_num) and i >= N:
            i += 1
        else:
            print(i)
            break

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
        if set(input().split())==set("1974"):
          print("Yes")
        else:
          print("No")  

Fixed submission:
if set(input().split())==set("1974"):
	print("YES")
else:
	print("NO")

Buggy python submission (verdict: Runtime Error):
    if set(input().split())==set([1,9,7,4]):
      print("Yes")
    else:
      print("No")  

Fixed submission:
if set(input().split())==set("1974"):
	print("YES")
else:
	print("NO")

Buggy python submission (verdict: Runtime Error):
if set(input().split())==aet([1,9,7,4]):
  print("Yes")
else:
  print("No")  

Fixed submission:
if set(input().split())==set("1974"):
	print("YES")
else:
	print("NO")

Buggy python submission (verdict: Runtime Error):
a=[int(i) for i in input().split(" ")]
kouho=[1,9,7,4]
for k in a:
	if k in kouho:
        kouho.pop(k)
if kouho==[]:
    print("YES")
else:
    print("NO")


Fixed submission:
a=[int(i) for i in input().split(" ")]
kouho=set([1,9,7,4])
for k in a:
    if k in kouho:
        kouho.remove(k)
if kouho==set([]):
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
import copy
siken_kazu=int(input())
junbido=[int(i) for i in input().split(" ")]
goukakudo=[int(i) for i in input().split(" ")]
yoyudo=[junbido[i]-goukakudo[i] for i in range(siken_kazu)]
shoki_yoyudo=copy.deepcopy(yoyudo)
k=0
hantei=2
if sum(junbido)<sum(goukakudo):
    k=-1
elif min(yoyudo)>=0:
    pass
else:
    while hantei>1:
        hantei=0
        a=max(yoyudo)
        for i in range(siken_kazu):
            if yoyudo[i]==a:
                kiroku=i
                break
        for i in range(siken_kazu):
            if yoyudo[kiroku]==0:
                break
            elif yoyudo[i]<0:
                hantei=2
                if yoyudo[kiroku]>=-yoyudo[i]:
                    yoyudo[kiroku]-=-yoyudo[i]
                    yoyudo[i]=0
                elif yoyudo[kiroku]<-yoyudo[i]:
                    yoyudo[kiroku]=0
                    yoyudo[i]+=-yoyudo[kiroku]
for i in range(siken_kazu):
    if shoki_yoyudo[i]!=yoyudo[i]:
        k+=1
print(k)

Fixed submission:
import copy
siken_kazu=int(input())
junbido=[int(i) for i in input().split(" ")]
goukakudo=[int(i) for i in input().split(" ")]
yoyudo=[junbido[i]-goukakudo[i] for i in range(siken_kazu)]
counter=0
shakkin=0
tyokin=0
if sum(junbido)<sum(goukakudo):
    counter=-1
else:
    for i in yoyudo:
        if i<0:
            counter+=1
            shakkin-=i
    yoyudo=sorted(yoyudo,reverse=True)
    for i in yoyudo:
        if tyokin>=shakkin:
            break
        else:
            tyokin+=i
            counter+=1
print(counter)

Buggy python submission (verdict: Time Limit Exceeded):
import copy
siken_kazu=int(input())
junbido=[int(i) for i in input().split(" ")]
goukakudo=[int(i) for i in input().split(" ")]
yoyudo=[junbido[i]-goukakudo[i] for i in range(siken_kazu)]
shoki_yoyudo=copy.deepcopy(yoyudo)
k=0
if sum(junbido)<sum(goukakudo):
    k=-1
elif min(yoyudo)>=0:
    pass
else:
    while min(yoyudo)<0:
        a=max(yoyudo)
        for i in range(siken_kazu):
            if yoyudo[i]==a:
                kiroku=i
                break
        for i in range(siken_kazu):
            if yoyudo[kiroku]==0:
                break
            elif yoyudo[i]<0:
                if yoyudo[kiroku]>=-yoyudo[i]:
                    yoyudo[kiroku]-=-yoyudo[i]
                    yoyudo[i]=0
                elif yoyudo[kiroku]<-yoyudo[i]:
                    yoyudo[kiroku]=0
                    yoyudo[i]+=-yoyudo[kiroku]
for i in range(siken_kazu):
    if shoki_yoyudo[i]!=yoyudo[i]:
        k+=1
print(k)
    

Fixed submission:
import copy
siken_kazu=int(input())
junbido=[int(i) for i in input().split(" ")]
goukakudo=[int(i) for i in input().split(" ")]
yoyudo=[junbido[i]-goukakudo[i] for i in range(siken_kazu)]
counter=0
shakkin=0
tyokin=0
if sum(junbido)<sum(goukakudo):
    counter=-1
else:
    for i in yoyudo:
        if i<0:
            counter+=1
            shakkin-=i
    yoyudo=sorted(yoyudo,reverse=True)
    for i in yoyudo:
        if tyokin>=shakkin:
            break
        else:
            tyokin+=i
            counter+=1
print(counter)
Buggy python submission (verdict: Runtime Error):
a = [False,False,False,False]
for x in input().split():
  if(x == 1):
    a[0] =True
  else if(x == 9):
    a[1] = True
  else if(x == 4):
    a[2] = True
  else if(x == 7):
    a[3] = True

all = True
for x in a:
  all &= x

print('YES' if all else 'NO')


Fixed submission:
a = [False,False,False,False]
for x in input().split():
  x = int(x)
  if(x == 1):
    a[0] = True
  elif(x == 9):
    a[1] = True
  elif(x == 4):
    a[2] = True
  elif(x == 7):
    a[3] = True
 
all = True
for x in a:
  all &= x
 
print('YES' if all else 'NO')
Buggy python submission (verdict: Runtime Error):
word = 'keyence'
l = input()
now = 0
start = False
for w in l:
  if word[now] == w:
    now += 1
  else:
    if start:
      return
    else:
      start = True
  if now == len(word):
    print('YES')
    exit()
print('NO')


Fixed submission:
word = 'keyence'
l = input()
i = l.find(word)
if i == 0 or i == (len(l)-len(word)) :
  print('YES')
  exit()

for i in range(1,len(word)):
  a = word[:i]
  b = word[i:]
  #print(l[:len(a)], l[-len(b):])
  if l[:len(a)] == a and l[-len(b):] == b:
    print('YES')
    exit()
print('NO')

Buggy python submission (verdict: Runtime Error):
word = 'keyence'
l = input()
now = 0
for w in l:
  if word[now] == w:
    now ++
  if now == len(word):
    print('YES')
    exit()
print('NO')


Fixed submission:
word = 'keyence'
l = input()
i = l.find(word)
if i == 0 or i == (len(l)-len(word)) :
  print('YES')
  exit()

for i in range(1,len(word)):
  a = word[:i]
  b = word[i:]
  #print(l[:len(a)], l[-len(b):])
  if l[:len(a)] == a and l[-len(b):] == b:
    print('YES')
    exit()
print('NO')
Buggy python submission (verdict: Runtime Error):
import math
a = 0
input_str = input()
input_str_list = []
for x in input_str:
    try:
       input_str_list.append(int(x))
    except:
       pass
if len(input_str_list) == 4:
  pass
else:
  print("NO")
  exit()

if math.modf(float(input_str))[0] == 0.0:
  pass
else:
  print("NO")
  exit()
  

for i in range(len(input_str)):
  if input_str[i] == '1':
    a+=1
  elif input_str[i] == '9':
    a+=1
  elif input_str[i] == '7':
    a+=1
  elif input_str[i] == '4':
    a+=1
if a==4:
  print("YES")
else:
  print("NO")

Fixed submission:
import math
a = 0
b = 0
c = 0
d = 0
input_str = input().split()
input_str_list = []

## 少数を省く
for x in input_str:
    try:
       input_str_list.append(int(x))
    except:
      print("NO")
      exit()

for i in range(len(input_str_list)):
  if input_str_list[i] == 1:
    a+=1
  elif input_str_list[i] == 9:
    b+=1
  elif input_str_list[i] == 7:
    c+=1
  elif input_str_list[i] == 4:
    d+=1
if a==1 and b==1 and c==1 and d==1:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
import math 

a = 0
input_flo = float(input())
if math.modf(input_flo)[0] == 0.0:
  if len(str(int(input_flo))) == 4:
    input_str=str(int(input_flo))    
  else:
    print("NO")
    exit()
else:
  print("NO")
  exit()

for i in range(len(input_str)):
  if input_str[i] == '1':
    a+=1
  elif input_str[i] == '9':
    a+=1
  elif input_str[i] == '7':
    a+=1
  elif input_str[i] == '4':
    a+=1
    
if a==4:
  print("YES")
else:
  print("NO")

Fixed submission:
import math
a = 0
b = 0
c = 0
d = 0
input_str = input().split()
input_str_list = []

## 少数を省く
for x in input_str:
    try:
       input_str_list.append(int(x))
    except:
      print("NO")
      exit()

for i in range(len(input_str_list)):
  if input_str_list[i] == 1:
    a+=1
  elif input_str_list[i] == 9:
    b+=1
  elif input_str_list[i] == 7:
    c+=1
  elif input_str_list[i] == 4:
    d+=1
if a==1 and b==1 and c==1 and d==1:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
a = 0
input_str = input()
if int(input_str)//10000 >=1:
  print("NO")
  exit()
for i in range(len(input_str)):
  if input_str[i] == '1':
    a+=1
  elif input_str[i] == '9':
    a+=1
  elif input_str[i] == '7':
    a+=1
  elif input_str[i] == '4':
    a+=1
if a==4:
  print("YES")
else:
  print("NO")

Fixed submission:
import math
a = 0
b = 0
c = 0
d = 0
input_str = input().split()
input_str_list = []

## 少数を省く
for x in input_str:
    try:
       input_str_list.append(int(x))
    except:
      print("NO")
      exit()

for i in range(len(input_str_list)):
  if input_str_list[i] == 1:
    a+=1
  elif input_str_list[i] == 9:
    b+=1
  elif input_str_list[i] == 7:
    c+=1
  elif input_str_list[i] == 4:
    d+=1
if a==1 and b==1 and c==1 and d==1:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):

S = list(input())

str = ["k","e","y","e","n","c","e"]
false = 0
split = 0

for i in S :
    if i==str[0]:
        str.pop(0)
        if false > 0 :
            split += 1
            false = 0
    else:
        false += 1

if len(str)==0:
    if split <=1 :
        print("YES") 
    else :
        print("NO")
else :
    print("NO")

Fixed submission:
s=input()
n = len(s)

for i in range(n): #文字列の長さ分繰り返す
    for j in range(i,n): #
        tmp = s[:i]+s[j:]
        if tmp == "keyence":
            print("YES")
            quit()

print("NO")
Buggy python submission (verdict: Runtime Error):
input = raw_input()

if(input>9):
    print("error")
elif(input == 3 or input == 5 or input == 7):
    print("YES")
else:
    print("NO")

Fixed submission:

inp = input()

if inp == "3" or inp == "5" or inp == "7" :
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
a=int(input())
if a=3 or a=5 or a=7:
    print("YES")
else:
    print("NO ")

Fixed submission:
a=int(input())
if a==3 or a==5 or a==7:
    print("YES")
else:
    print("NO ")
Buggy python submission (verdict: Runtime Error):
if int(input())==1:
    print("Hello World!")
else:
    a,b = map(int, input().split())
    print(a+b)

Fixed submission:
n = int(input())
if n == 1:
    print("Hello World")
else:
    A = int(input())
    B = int(input())
    print(A+B)
Buggy python submission (verdict: Runtime Error):
n=int(input())
for i in range(n):
    if (n-i)%4==0 and i%7==0:
        print("Yes")
        exit()
    else:
        print("No")

Fixed submission:
n, k = map(int, input().split())
if n%k==0:
    print("0")
else:
    print("1")
Buggy python submission (verdict: Runtime Error):
t = int(input())
a, b, c, d = map(int, input().split())
for i in range(t):
    if a>=b and c >=b and d>=b:
        print("Yes")
    else:
        print("No")

Fixed submission:
n  = int(input())
a = list(map(int,input().split()))

ans = 0
for i in range (n-1):
    if a[i] == a[i+1]:
        a[i+1] = -1
        ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
n  = int(input())
a = map(int, [input() for i in range(n)])

for i in range (n-1):
    count = 0
    if a[i] == a[i+1]:
        count += 1
        for j in range(n):
            count += 1
            a[i+1] = j
    ans = min(count, ans)
print(ans)

Fixed submission:
n  = int(input())
a = list(map(int,input().split()))

ans = 0
for i in range (n-1):
    if a[i] == a[i+1]:
        a[i+1] = -1
        ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int, input().split())
print(a+b+c+d)

Fixed submission:
a=input()
b=[]

for i in range(len(a)):
    if a[i]=='+':
        b.append(1)
    else:
        b.append(-1)

        
print(sum(b))
Buggy python submission (verdict: Runtime Error):
a,b=map(int, input().split())
print(sum([1:b])-(b-a))

Fixed submission:
a,b=map(int, input().split())
print(int((b-a)*(b-a+1)/2-b))
Buggy python submission (verdict: Runtime Error):
n=int(input())
ans=inf
for i in range(n):
    ans=min(ans,sum(list(n-i))+sum(list(i)))
print(ans)

Fixed submission:
from numpy import inf
n=int(input())
ans=inf
for i in range(n-1):
    ans=min(ans,sum(list(map(int, list(str(n-i-1)))))+sum(list(map(int, list(str(i+1))))))
print(ans)
Buggy python submission (verdict: Runtime Error):
n, m, x =map(int, input().split())
a = list(map(int, input().split()))
ans=inf

for i in range(m):
    if a[i+1]<x<a[i+2]:
        ans=min(ans,min(i+1,m-i-1))
print(ans)

Fixed submission:
from numpy import inf
n, m, x =map(int, input().split())
a = list(map(int, input().split()))
ans=inf
if x<a[0] or a[m-1]<x:
    print(0)
    exit()
for i in range(m-1):
    if a[i]<x<a[i+1]:
        ans=min(ans,min(i+1,m-i-1))
print(ans)
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
c = input()
x = input()
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if x == i*500 + j*100 + k*50:
                ans += 1
print(ans)

Fixed submission:
a, b, c, x = map(int, [input() for i in range(4)])
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if x == i*500 + j*100 + k*50:
                ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
a, b, c, x = map(int, input().split())
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if x == i*500 + j*100 + k*50:
                ans +=1
print(ans)

Fixed submission:
a, b, c, x = map(int, [input() for i in range(4)])
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if x == i*500 + j*100 + k*50:
                ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
a, b, c, x = map(int, input().split())
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if x == i*500 + j*100 + k*50:
                ans +=1
print(ans)

Fixed submission:
a, b, c, x = map(int, [input() for i in range(4)])
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if x == i*500 + j*100 + k*50:
                ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
a, b = map(int , input().split())
if (a*b) % 2 = 1:
    print("Odd")
else:
    print("Even")


Fixed submission:
a, b = map(int , input().split())
if (a*b) % 2:
    print("Odd")
else:
    print("Even")
Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(n):
    t, x, y = map(int, input().split())
    if x + y < t or (x+y-t)%2 /= 0:
        print("No")
        exit()
print("Yes")

Fixed submission:
n = int(input())
ti=0
xi=0
yi=0
for i in range(n):
    t, x, y = map(int, input().split())
    if abs(x-xi) + abs(y-yi) > abs(t-ti) or (abs(x-xi) + abs(y-yi) + abs(t-ti)) % 2 != 0:
        print("No")
        exit()
    ti=t
    xi=x
    yi=y
print("Yes")

Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(n):
    t, x, y = map(int, input().split())
    if x + y < t or (x+y-t)%2 /= 0
        print("No")
        exit()
print("Yes")

Fixed submission:
n = int(input())
ti=0
xi=0
yi=0
for i in range(n):
    t, x, y = map(int, input().split())
    if abs(x-xi) + abs(y-yi) > abs(t-ti) or (abs(x-xi) + abs(y-yi) + abs(t-ti)) % 2 != 0:
        print("No")
        exit()
    ti=t
    xi=x
    yi=y
print("Yes")

Buggy python submission (verdict: Runtime Error):
n = input()
for i in range(n):
    t, x, y = map(int, input().split())
    if x + y < t or (x+y-t)%2 /= 0
        print("No")
        exit()
print("Yes")

Fixed submission:
n = int(input())
ti=0
xi=0
yi=0
for i in range(n):
    t, x, y = map(int, input().split())
    if abs(x-xi) + abs(y-yi) > abs(t-ti) or (abs(x-xi) + abs(y-yi) + abs(t-ti)) % 2 != 0:
        print("No")
        exit()
    ti=t
    xi=x
    yi=y
print("Yes")

Buggy python submission (verdict: Runtime Error):
n = input()
for i in range(n):
    t, x, y = map(int, input().split())
    if x + y <= t or (x+y-t)%2 /= 0
        print("No")
        exit()
print("Yes")

Fixed submission:
n = int(input())
ti=0
xi=0
yi=0
for i in range(n):
    t, x, y = map(int, input().split())
    if abs(x-xi) + abs(y-yi) > abs(t-ti) or (abs(x-xi) + abs(y-yi) + abs(t-ti)) % 2 != 0:
        print("No")
        exit()
    ti=t
    xi=x
    yi=y
print("Yes")
Buggy python submission (verdict: Runtime Error):
n = input()
print(len(set(list(map(int, [input() for i in range(n)])))))

Fixed submission:
n = int(input())
print(len(set(list(map(int, [input() for i in range(n)])))))

Buggy python submission (verdict: Runtime Error):
n = int(input())
print(len(set(list(map(int, [input() for i in range(n+1)])))))

Fixed submission:
n = int(input())
print(len(set(list(map(int, [input() for i in range(n)])))))

Buggy python submission (verdict: Runtime Error):
n = input()
print(len(set(list(map(int, [input() for i in range(n+1)])))))

Fixed submission:
n = int(input())
print(len(set(list(map(int, [input() for i in range(n)])))))
Buggy python submission (verdict: Runtime Error):
n, y = map(int, input().split())
ans = 0
for i in range(n+1):
    for j in range(n+1-i):
        for k in range(n+1-i-j):
            if y == 10000*i + 5000*j + 1000*k:
                print(i j k)
                ans += 1
if ans == 0:
    print("-1 -1 -1")

Fixed submission:
n, y = map(int, input().split())
ans = 0
for i in range(n+1):
    for j in range(n+1-i):
        if y == 10000*i + 5000*j + 1000*(n-i-j):
            print(i, j, n-i-j)
            ans += 1
            exit()
if ans == 0:
    print("-1 -1 -1")

Buggy python submission (verdict: Runtime Error):
n. y = map(int, input().split())
ans = 0
for i in range(n+1):
    for j in range(n+1-i):
        for k in range(n+1-i-j):
            if y == 10000*i + 5000*j + 1000*k:
                print(i j k)
                ans += 1
if ans == 0:
    print("-1 -1 -1")

Fixed submission:
n, y = map(int, input().split())
ans = 0
for i in range(n+1):
    for j in range(n+1-i):
        if y == 10000*i + 5000*j + 1000*(n-i-j):
            print(i, j, n-i-j)
            ans += 1
            exit()
if ans == 0:
    print("-1 -1 -1")