Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
S=input()

if S == 'SUN':
    print(7)
else if S == 'MON':
    print(6)
else if S == 'TUE':
    print(5)
else if S == 'WED':
    print(4)
else if S == 'THS':
    print(3)
else if S == 'FRI':
    print(2)
else if S == 'SAT':
    print(1)


Fixed submission:
S=input()

if S == 'SUN':
    print(7)
elif S == 'MON':
    print(6)
elif S == 'TUE':
    print(5)
elif S == 'WED':
    print(4)
elif S == 'THU':
    print(3)
elif S == 'FRI':
    print(2)
elif S == 'SAT':
    print(1)

Buggy python submission (verdict: Runtime Error):
S=input()

if S = 'SUN':
    print(7)
else if S == 'MON':
    print(6)
else if S == 'TUE':
    print(5)
else if S == 'WED':
    print(4)
else if S == 'THS':
    print(3)
else if S == 'FRI':
    print(2)
else if S == 'SAT':
    print(1)


Fixed submission:
S=input()

if S == 'SUN':
    print(7)
elif S == 'MON':
    print(6)
elif S == 'TUE':
    print(5)
elif S == 'WED':
    print(4)
elif S == 'THU':
    print(3)
elif S == 'FRI':
    print(2)
elif S == 'SAT':
    print(1)

Buggy python submission (verdict: Runtime Error):
S=input()

if S = 'SUN':
    print(7)
else if S == 'MON':
    print(1)
else if S == 'TUE':
    print(2)
else if S == 'WED':
    print(3)
else if S == 'THS':
    print(4)
else if S == 'FRI':
    print(5)
else if S == 'SAT':
    print(6)


Fixed submission:
S=input()

if S == 'SUN':
    print(7)
elif S == 'MON':
    print(6)
elif S == 'TUE':
    print(5)
elif S == 'WED':
    print(4)
elif S == 'THU':
    print(3)
elif S == 'FRI':
    print(2)
elif S == 'SAT':
    print(1)

Buggy python submission (verdict: Runtime Error):
S=input()

if S = 'SUN':
    print(7)
else if S = 'MON':
    print(1)
else if S = 'TUE':
    print(2)
else if S = 'WED':
    print(3)
else if S = 'THS':
    print(4)
else if S = 'FRI':
    print(5)
else if S = 'SAT':
    print(6)

Fixed submission:
S=input()

if S == 'SUN':
    print(7)
elif S == 'MON':
    print(6)
elif S == 'TUE':
    print(5)
elif S == 'WED':
    print(4)
elif S == 'THU':
    print(3)
elif S == 'FRI':
    print(2)
elif S == 'SAT':
    print(1)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
import math
from collections import Counter
import itertools
import fractions
#from functools import reduce

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

# ###########################################
 
N,K,Q=MI()
A=[K]*N
q=[0]*Q
for i in range(Q):
    q[i]=II()

for x in q:
    for i in range(len(A)):
        if i != x-1:
            A[i] -=1
for a in A:
    if a >0:
        print('Yes')
    else:
        print('No')





Fixed submission:
import sys
import math
from collections import Counter
import itertools
import fractions
#from functools import reduce

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

# ###########################################
 
N,K,Q=MI()
A=[K-Q]*N
q=[0]*Q
for i in range(Q):
    q[i]=II()

for x in q:
    A[x-1] +=1
for a in A:
    if a >0:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Runtime Error):
import sys
from math import gcd


# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")



a,b=MI()
x=a
if x >= b:
    print(1)
    exit()
for i in range(2,21):
    x+=(a-1)
    if x >= b:
        print(i)
        exit()

Fixed submission:
import sys

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")



a,b=MI()
x=a

if b == 1:
    print(0)
    exit()
if x >= b:
    print(1)
    exit()
for i in range(2,21):
    x+=(a-1)
    if x >= b:
        print(i)
        exit()
Buggy python submission (verdict: Time Limit Exceeded):
import sys
import math
from collections import Counter
import itertools
import fractions
#from functools import reduce

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

# ###########################################
 
N=II()
H=LI()

ans=0

for i in range(N):
    tmp=0
    while i+1<N:
        if H[i]>=H[i+1]:
            tmp+=1
            i+=1
        else:
            break
            
    ans=max(ans,tmp)
print(ans)

Fixed submission:
import sys
import math
from collections import Counter
import itertools
import fractions
#from functools import reduce

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

# ###########################################
 
N=II()
H=LI()

ans=0
tmp=0
current=H[0]

for i in range(1,N):
    if current >= H[i]:
        tmp+=1
    else:
        ans=max(ans,tmp)
        tmp=0
    current=H[i]

print(max(ans,tmp))
Buggy python submission (verdict: Runtime Error):
import sys

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

N = int(input())
ans = 0
for i in range(1, N + 1):
    if len(str(i)) % 2 == 1:
    ans += 1
print(ans)


Fixed submission:
import sys

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

N = int(input())
ans = 0
for i in range(1, N + 1):
    if len(str(i)) % 2 == 1:
        ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
import math
from collections import Counter
import itertools
import fractions
import datetime
from decimal import Decimal
#from functools import reduce

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

# ###########################################

s=II()
l=[s]
cnt = 1
while True:
    cnt += 1
    if s%2==0:
        s/=2
    else:
        s = 3*s+1
    if s in se:
        print(cnt)
        exit()
    else:
        l.append(s)

Fixed submission:
import sys
import math
from collections import Counter
import itertools
import fractions
import datetime
from decimal import Decimal
#from functools import reduce

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

# ###########################################

s=II()
l=[s]
cnt = 1
while True:
    cnt += 1
    if s%2==0:
        s/=2
    else:
        s = 3*s+1
    if s in l:
        print(cnt)
        exit()
    else:
        l.append(s)
Buggy python submission (verdict: Time Limit Exceeded):
#! env python
# -*- coding: utf-8 -*-

import os
import sys


# ac_py.main
# Date: 2020/06/14
# Filename: main 
# Author: acto_mini

def main():
    N = int(input())
    S = input()
    ans = 1000000000
    for i in range(N):
        count = 0
        count += S[0:i].count("W")
        count += S[i+1:N].count("E")
        ans = min(ans, count)

    print(ans)
    return


if __name__ == '__main__':
    main()


Fixed submission:
#! env python
# -*- coding: utf-8 -*-

import os
import sys
from itertools import accumulate


# ac_py.main
# Date: 2020/06/14
# Filename: main 
# Author: acto_mini

def main():
    N = int(input())
    S = input()
    ans = 1000000000

    W = list()
    E = list()
    for i in range(N):
        flag = S[i] == "W"
        W.append(int(flag))
        E.append(int(not flag))

    #
    W_l = accumulate([0] + W[:-1])
    E_r = accumulate([0] + list(reversed(E[1:N])))

    for w, e in zip(W_l, reversed(list(E_r))):
        ans = min(ans, w + e)

    print(ans)
    return


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
#! env python
# -*- coding: utf-8 -*-

import os
import sys


# ac_py.main
# Date: 2020/06/16
# Filename: main 
# Author: acto_mini

def main():
    K, S = map(int, input().split())

    ans = 0
    for i in range(K + 1):
        for j in range(K + 1):
            for p in range(K + 1):
                if (i + j + p) == S: ans += 1
    print(ans)
    return


if __name__ == '__main__':
    main()


Fixed submission:
#! env python
# -*- coding: utf-8 -*-

import os
import sys


# ac_py.main
# Date: 2020/06/16
# Filename: main 
# Author: acto_mini

def main():
    K, S = map(int, input().split())

    ans = 0
    for i in range(K + 1):
        for j in range(K + 1):
            if 0 <= (S - i - j) <= K:
                ans += 1
    print(ans)
    return


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())

if a<c<b or b<c<a:
    print("Yes")
else
    print("No")




Fixed submission:
a,b,c=map(int,input().split())

if a<c<b or b<c<a:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
nums = input().split()
[X, Y] = list(map(int, nums))

if Y <= 4 * X && Y >= 2 * X:
    print('Yes')
else:
    print('No')


Fixed submission:
nums = input().split()
X, Y = list(map(int, nums))

if Y <= 4 * X and Y >= 2 * X and Y % 2 == 0:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))
ans = 1
for i in A:
    ans *=i


if ans > pow(10,18):
    print(-1)
else:
    print(ans)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
A.sort()
ans = 1
for i in A:
    ans *=i
    if i==0:
        print(0)
        exit()
    elif ans > pow(10,18):
        print(-1)
        exit()
    else:
        continue


print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
a=int(input())
b=list(map(int,input().split()))
c={}
for i in set(b):
    c[i]=b.count(i)


for i in range(a):
    if i+1 in b:
        print(c[i+1])
    else:
        print(0)

Fixed submission:
a=int(input())
b=list(map(int,input().split()))
c={}
for i in range(len(b)):
    try:
        c[b[i]]+=1
    except KeyError:
        c[b[i]]=1

    
for i in range(a):
    try:
        print(c[i+1])
    except KeyError:
        print(0)

Buggy python submission (verdict: Time Limit Exceeded):
a=int(input())
b=list(map(int,input().split()))
for i in range(a):
    print(b.count(i+1))


Fixed submission:
a=int(input())
b=list(map(int,input().split()))
c={}
for i in range(len(b)):
    try:
        c[b[i]]+=1
    except KeyError:
        c[b[i]]=1

    
for i in range(a):
    try:
        print(c[i+1])
    except KeyError:
        print(0)
Buggy python submission (verdict: Runtime Error):
a=list(input())
if a[2]==a[3] and a[4]==a[5]:
  print('Yes')
else:
  prin('No')


Fixed submission:
a=list(input())
if a[2]==a[3] and a[4]==a[5]:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Time Limit Exceeded):
s=list(input())
q=int(input())
a=[]
state=0
for i in range(q):
  a.append(input().split())
for i in range(q):
  if a[i][0]=='1':
    state=state^1
  else:
    if (a[i][1]=='1' and state==0) or (a[i][1]=='2' and state==1):
      s.insert(0,a[i][2])
    else:
      s.append(a[i][2])
out=''
if state==1:
  state=-1
else:
  state=1
for x in s[::state]:
  out+=x
print(out)


Fixed submission:
s=input()
q=int(input())

state=0
x,y='',''
for i in range(q):
  a=input().split()
  if a[0]=='1':
    state=state^1
  else:
    if (a[1]=='1' and state==0) or (a[1]=='2' and state==1):
      x=a[2]+x
    else:
      y=y+a[2]
out=x+s+y
if state==0:
  print(out)
else:
  print(out[::-1])
Buggy python submission (verdict: Runtime Error):
a=int(inputu())
b=list(map(int,input().split()))
out=0
for i in range(a):
  for j in range(i-1):
    out=out+b[i]*b[j]
    
print(out)

Fixed submission:
a=int(input())
b=list(map(int,input().split()))
out=0
for i in range(a):

  for j in range(i+1,a):

    out=out+b[i]*b[j]
    
print(out)
Buggy python submission (verdict: Time Limit Exceeded):
a=list(map(int,input().split()))
b=0
c=1
while(c*a[0]<(a[2]+0.5)):
  b=b+a[1]
  
print(b)

Fixed submission:
a=list(map(int,input().split()))
b=0
c=1
while(c*a[0]<(a[2]+0.5)):
  b=b+a[1]
  c=c+1
  
print(b)
Buggy python submission (verdict: Runtime Error):
a=input().split('/')
a=a[0]+a[1]+a[2]:
if int(a) > 2019430
  print("TDB")
else:
  print('Heisei')


Fixed submission:
a=input().split('/')
a=a[0]+a[1]+a[2]
if int(a) > 20190430:
  print("TBD")
else:
  print('Heisei')

Buggy python submission (verdict: Runtime Error):
a=input().split('/')
a=a[0]+a[1]+a[2]
if int(a) > 2019430
  print("TDB")
else
  print('Heisei')

Fixed submission:
a=input().split('/')
a=a[0]+a[1]+a[2]
if int(a) > 20190430:
  print("TBD")
else:
  print('Heisei')
Buggy python submission (verdict: Runtime Error):
a=int(input())

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

Fixed submission:
a=int(input())
 
if a == 7 or a == 5 or a == 3:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
a=list(map(int,input().split()))
b=[]
c=[1]*(a[0]-1)
for i in range(a[1]):
  b.append(list(map(int,input().split())))
b=sorted(b,key=lambda b:b[1])
for i in range(a[1]):
  if i!=0 and b[i-1][0]>=b[i][0]:
    continue
  if 0 in c[(b[i][0]-1):b[i][1]]:
    continue
  else:
    c[(b[i][1])-2]=0

print(c.count(0))

Fixed submission:
a=list(map(int,input().split()))
out=abs(a[1]-a[0])+abs(a[2]-a[1])
for i in range(3):
    if i ==0:
        b=a[1]
        c=a[2]
    elif i==1:
        b=a[0]
        c=a[2]
    else:
        b=a[0]
        c=a[1]
    if ((abs(b-a[i])+abs(c-b))<out):
        out=abs(b-a[i])+abs(c-b)
    if ((abs(c-a[i])+abs(b-c))<out):
        out=abs(c-a[i])+abs(b-c)
print(out)
Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
for i in range(len(a)):
    if a==b:
        print("Yes")
        break
    
    a=a[-1]+a
    a=a[:len(a)-1]
else:
    print("No"

Fixed submission:
a=input()
b=input()
for i in range(len(a)):
    if a==b:
        print("Yes")
        break
    
    a=a[-1]+a
    a=a[:len(a)-1]
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
a=list(map(int,input().split()))
b=[]
c=[1]*(a[0]-1)
for i in range(a[1]):
  b.append(list(map(int,input().split())))
b=sorted(b,key=lambda b:b[1])
for i in range(a[1]):
  if i!=0 and b[i-1][0]>=b[i][0]:
    continue
  if 0 in c[(b[i][0]-1):b[i][1]]:
    continue
  else:
    c[(b[i][1])-2]=0

print(c.count(0))

Fixed submission:
a=list(map(int,input().split()))
b=[]
c=0
r=0
for i in range(a[1]):
  b.append(list(map(int,input().split())))
b=sorted(b,key=lambda b:b[1])

for i in range(a[1]):
  if b[i][0]<=r:
    continue
  else:
    c=c+1
    r=b[i][1]-1

print(c)

Buggy python submission (verdict: Time Limit Exceeded):
a=list(map(int,input().split()))
b=[]
c=[1]*(a[0]-1)
for i in range(a[1]):
  b.append(list(map(int,input().split())))
b=sorted(b,key=lambda b:b[1])
for i in range(a[1]):
  if i!=0 and b[i-1][0]>b[i][0]:
    continue
  if 0 in c[(b[i][0]-1):b[i][1]]:
    continue
  else:
    c[(b[i][1])-2]=0

print(c.count(0))

Fixed submission:
a=list(map(int,input().split()))
b=[]
c=0
r=0
for i in range(a[1]):
  b.append(list(map(int,input().split())))
b=sorted(b,key=lambda b:b[1])

for i in range(a[1]):
  if b[i][0]<=r:
    continue
  else:
    c=c+1
    r=b[i][1]-1

print(c)

Buggy python submission (verdict: Time Limit Exceeded):
a=list(map(int,input().split()))
b=[]
c=[1]*(a[0]-1)
for i in range(a[1]):
  b.append(list(map(int,input().split())))
b=sorted(b,key=lambda b:b[1])
for i in range(a[1]):
  if 0 in c[(b[i][0]-1):b[i][1]]:
    continue
  else:
    c[(b[i][1])-2]=0

print(c.count(0))

Fixed submission:
a=list(map(int,input().split()))
b=[]
c=0
r=0
for i in range(a[1]):
  b.append(list(map(int,input().split())))
b=sorted(b,key=lambda b:b[1])

for i in range(a[1]):
  if b[i][0]<=r:
    continue
  else:
    c=c+1
    r=b[i][1]-1

print(c)
Buggy python submission (verdict: Runtime Error):
a=list(input())
if 'a' in a & 'b' in a & 'c' in a:
  print('Yes')
else:
  print('No')

Fixed submission:
a=list(input())
if ('a' in a) & ('b' in a) & ('c' in a):
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
s=input()
s.split()
if (int(s[0])+int(s[1]))>=int(s[3]):
  print('Yes')
else:
  print('No')

Fixed submission:
s=input().split()
if (int(s[0])+int(s[1]))>=int(s[2]):
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
s=input()
s.split()
if (int(s[0])+int(s[1]))>=int(s[3]):
  print('YES')
else:
  print('NO')

Fixed submission:
s=input().split()
if (int(s[0])+int(s[1]))>=int(s[2]):
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
a=import()
b=import()
c=import()
print(a[0]+b[1]+c[2])

Fixed submission:
a=input()
b=input()
c=input()
print(a[0]+b[1]+c[2])
Buggy python submission (verdict: Runtime Error):
import sys

input = sys.stdin.readline

A=[int(input()) for _ in range(5)]

for i,a in enumerate(A):
  if a == 0:
    print(i)
    break

Fixed submission:
import sys
 
input = sys.stdin.readline
 
s = input().rstrip()
 
s_1 = s.split(" ")
 
s_i = list(map(int,s_1))

for i,a in enumerate(s_i):
  if a == 0:
    print(i+1)
    break