Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
x,y,z = map(int, input().split())

if (x == y and y != z) or (x==z and y !=z) or (a !=b and b==c):
  print("Yes")
else:
  print("No")


Fixed submission:
x,y,z = map(int, input().split())

if (x == y and y != z) or (x==z and y !=z) or (x !=y and y==z):
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
x,y,z = map(int, input().split())

if (x == y and y != z) or (x==z and y !=z) or (a !=b and b==c)
  print("Yes")
else:
  print("No")


Fixed submission:
x,y,z = map(int, input().split())

if (x == y and y != z) or (x==z and y !=z) or (x !=y and y==z):
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,input().split())

if (a==b && a!=c) || (a==c&&a!=b) ||(b==c&&b!=a):
    print('Yes')
else:
    print('No')

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

if (a==b and a!=c) or (a==c and a!=b) or (b==c and b!=a):
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,input().split())

if (a==b && a!=c) || (a==c&&a!=b) ||(b==c&&b!=a):
    print('yes')
else:
    print('no')

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

if (a==b and a!=c) or (a==c and a!=b) or (b==c and b!=a):
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
N = int(input())

strs = []
dicts = {}
for i in range(N):
    s = input()
    if dicts.get(s) is not None:
        dicts[s] += 1
    else:
        dicts[s] = 1

dict_sorted = sorted(dict.items(), key=lambda x:x[1])

i = 0
for s in dict_sorted.key():
    if dicts[s] >= i:
        print(s)
    i = dicts[s]

Fixed submission:
N = int(input())

strs = []
dicts = {}
for i in range(N):
    s = input()
    if dicts.get(s) is not None:
        dicts[s] += 1
    else:
        dicts[s] = 1

dict_sorted = sorted(dicts.items(), key=lambda x:x[1], reverse=True)

i = 0
sts = []
for s in dict_sorted:
    if dicts[s[0]] == dicts[dict_sorted[0][0]]:
        sts.append(s[0])
    i = dicts[s[0]]

for s in sorted(sts):
    print(s)
Buggy python submission (verdict: Runtime Error):
#coding: utf-8
import numpy as np

A = input()
B = input()
C = input()
if((A==B and A!=C) or (A==C and A!=B )or (A!=B and B==C)):
    print ("Yes")
else:
    print("No")

Fixed submission:
#coding: utf-8
import numpy as np

A,B,C = raw_input().split()
if((A==B and A!=C) or (A==C and A!=B )or (A!=B and B==C)):
    print ("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())

s=[]
for i in range(n):
    s.append(sorted(input()))

count=0
for i in range(n-1):
    for j in range(n-i-1):
        if s[i]==s[n-j-1]: 
            count=count+1

print(count)

Fixed submission:
n =int(input())

s=[]
ans=0
count=1

for i in range(n):
    s.append("".join(sorted(input())))

s.sort()
for i in range(n-1):
    if s[i] == s[i+1]:
        count=count+1
    else:
        ans=ans+count*(count-1)/2
        count=1

ans=ans+count*(count-1)/2

print(int(ans))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())

s=[]
so=[]
for i in range(n):
    s.append(input())
    so.append(sorted(s[i]))
count=0
for i in range(n-1):
    for j in range(n-i-1):
        if so[i]==so[n-j-1]: 
            count=count+1


print(count)

Fixed submission:
n =int(input())

s=[]
ans=0
count=1

for i in range(n):
    s.append("".join(sorted(input())))

s.sort()
for i in range(n-1):
    if s[i] == s[i+1]:
        count=count+1
    else:
        ans=ans+count*(count-1)/2
        count=1

ans=ans+count*(count-1)/2

print(int(ans))
Buggy python submission (verdict: Runtime Error):
n=input()
v=input().split()
#vin=[int(i) for i in v]
nlis=list(n)
nint=int(n)
part_num=int((nint/2))
ev_num=[]
for i in range(part_num):
    ev = 2*i
    ev_num.extend(v[ev])
count_ev=[]
for i in range(part_num):
    count=0
    count_ev.append(ev_num.count(ev_num[i]))
    
ans_ev=min(count_ev)

od_num=[]
for i in range(part_num):
    od = (2*i) + 1
    od_num.extend(v[od])
count_od=[]
for i in range(part_num):
    count=0
    count_od.append(od_num.count(od_num[i]))
ans_od=min(count_od)

if v.count(v[0]) == len(v):
    ans=part_num
else:
    ans=ans_ev+ans_od
print(ans)  

Fixed submission:
n=input()
n=list(n)
if n[0]=='1':
    n[0]='9'
elif n[0]=='9':
    n[0]='1'
if n[1]=='1':
    n[1]='9'
elif n[1]=='9':
    n[1]='1'
if n[2]=='1':
    n[2]='9'
elif n[2]=='9':
    n[2]='1'
ans=int("".join(n))
print(ans)
Buggy python submission (verdict: Runtime Error):
l,n=map(int,input().split())

s=[]
for i in range(n):
    s.append(input())

order=sorted(s)
ans=''.join(order)

print(ans)

Fixed submission:
n,l=map(int,input().split())
s=sorted([input() for i in range(n)])
print(*s,sep="")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
dc={}
for i in range(N):
  s=input()
  if s in dc:
    dc[s]=dc[s]+1
  else:
    dc[s]=1

w = [kv[0] for kv in dc.items() if kv[1] == max(dc.values())]
w.sort()
for s in w:
  print(s)

Fixed submission:
N = int(input())
dc={}
for i in range(N):
  s=input()
  if s in dc:
    dc[s]+=1
  else:
    dc[s]=1
m=max(dc.values())
w = [kv[0] for kv in dc.items() if kv[1] == m]
w.sort()
for p in w:
  print(p)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
s = ['' for i in range(N)]
for i in range(N):
  s[i]=input()

lsts=list(set(s))
lrl=list(range(len(lsts)))
n = [0 for i in lrl]
for i in lrl:
  n[i]=s.count(lsts[i])
  
w=[lsts[i] for i in lrl if n[i]==max(n)]
w.sort()
for wd in w:
  print(wd)

Fixed submission:
N = int(input())
dc={}
for i in range(N):
  s=input()
  if s in dc:
    dc[s]+=1
  else:
    dc[s]=1
m=max(dc.values())
w = [kv[0] for kv in dc.items() if kv[1] == m]
w.sort()
for p in w:
  print(p)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
s = ['' for i in range(N)]
for i in range(N):
  s[i]=input()

lsts=list(set(s))
lsts.sort()
n = [0 for i in range(len(lsts))]
for i in range(len(lsts)):
  n[i]=s.count(lsts[i])
  
ind=[i for i in range(len(lsts)) if n[i]==max(n)]
for i in ind:
  print(lsts[i])

Fixed submission:
N = int(input())
dc={}
for i in range(N):
  s=input()
  if s in dc:
    dc[s]+=1
  else:
    dc[s]=1
m=max(dc.values())
w = [kv[0] for kv in dc.items() if kv[1] == m]
w.sort()
for p in w:
  print(p)
Buggy python submission (verdict: Runtime Error):
import sys

line = sys.argv[1]
digits = line.split(' ')
nums = [int(s) for s in digits]

res = 'No'
if num[0] == num[1]:
  if num[0] != num[2]:
    res = 'Yes'
    
if num[1] == num[2]:
  if num[1] != num[0]:
    res = 'Yes'
    
if num[2] == num[0]:
  if num[2] != num[1]:
    res = 'Yes'
return res

Fixed submission:
import sys
 
line = [l for l in sys.stdin][0]
digits = line.split(' ')
num = [int(s) for s in digits]
 
res = 'No'
if num[0] == num[1]:
  if num[0] != num[2]:
    res = 'Yes'
    
if num[1] == num[2]:
  if num[1] != num[0]:
    res = 'Yes'

if num[2] == num[0]:
  if num[2] != num[1]:
    res = 'Yes'
    
print(res)

Buggy python submission (verdict: Runtime Error):
a,b,c=input(map(int,split()))
if a==b and b==c and c==a:
  print('No')
elif a!=b and b!=c and c!=a:
  print('No')
else:
  print('Yes')

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

if a==b and b==c and c==a:
  print('No')
elif a!=b and b!=c and c!=a:
  print('No')
else:
  print('Yes')

Buggy python submission (verdict: Runtime Error):
a,b,c=input(map(int,split()))
if a==b==c:
  print('No')
elif a!=b and b!=c and c!=a:
  print('No')
else:
  print('Yes')

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

if a==b and b==c and c==a:
  print('No')
elif a!=b and b!=c and c!=a:
  print('No')
else:
  print('Yes')
Buggy python submission (verdict: Runtime Error):
N=int(input())
li=map(int,input().split())
for k in li:
  if k %2=0:
    if k%3=0 or k%5=0:
      continue
    else:
      print('APPROVED')
      break
  else:
    continue
  print('DENIED')

Fixed submission:
N=int(input())
li=map(int,input().split())
a=0
for k in li:
  if k %2==0:
    if k%3==0 or k%5==0:
      continue
    else:
      a=1
      break
if a==0:
  print('APPROVED')
else:
  print('DENIED')
Buggy python submission (verdict: Runtime Error):
N=int(input())
li=map(string,input().split())
dic={}
for k in li:
  dic[k]+=1
max_dic= max(dic)
print(max_dic)

Fixed submission:
N = int(input())
D = {}
for _ in range(N):
    S = input()
    if S not in D: D[S]=0
    D[S]+=1

M = max(D.values())
for S in sorted(list(D)):
    if D[S]==M:
      print(S)
Buggy python submission (verdict: Time Limit Exceeded):
from functools import reduce

n = int(input())
v = list(map(int, input().split(' ')))

partial_sum = lambda a, b: a + [min(a[-1], b)]
mini = reduce(partial_sum, v[1:], v[0:1])

ans = 0
for i in range(len(v)):
    if (v[i] == mini[i]):
        ans += 1

print(ans)

Fixed submission:
from functools import reduce

n = int(input())
v = list(map(int, input().split(' ')))

ans = 0
mini = v[0]
for i in range(len(v)):
    mini = min(mini, v[i])
    if (mini == v[i]):
        ans += 1

print(ans)
Buggy python submission (verdict: Runtime Error):
a=int(input().split(" "))
a1,a2,a3=int(a[0]),int(a[1]),int(a[2])
ans="No"
if a1!=a2 and (a1==a3 or a2==a3):
  ans="Yes"
if a1!=a3 and (a1==a2 or a2==a3):
  ans="Yes"
if a2!=a3 and (a1==a2 or a1==a3):
  ans="Yes"
  
print(ans)

Fixed submission:
a=input().split(" ")
a1,a2,a3=int(a[0]),int(a[1]),int(a[2])
ans="No"
if a1!=a2 and (a1==a3 or a2==a3):
  ans="Yes"
if a1!=a3 and (a1==a2 or a2==a3):
  ans="Yes"
if a2!=a3 and (a1==a2 or a1==a3):
  ans="Yes"
  
print(ans)

Buggy python submission (verdict: Runtime Error):
a=int(input().split(" "))
a1,a2,a3=int(a[0]),(a[1]),int(a[2])
ans="No"
if a1!=a2 and (a1==a3 or a2==a3):
  ans="Yes"
if a1!=a3 and (a1==a2 or a2==a3):
  ans="Yes"
if a2!=a3 and (a1==a2 or a1==a3):
  ans="Yes"
  
print(ans)

Fixed submission:
a=input().split(" ")
a1,a2,a3=int(a[0]),int(a[1]),int(a[2])
ans="No"
if a1!=a2 and (a1==a3 or a2==a3):
  ans="Yes"
if a1!=a3 and (a1==a2 or a2==a3):
  ans="Yes"
if a2!=a3 and (a1==a2 or a1==a3):
  ans="Yes"
  
print(ans)

Buggy python submission (verdict: Runtime Error):
a=int(input().split(" "))
a1,a2,a3=int(a[0]),(a[1]),int(a[2])
ans="No"
if a1!=a2 and (a1==a3 or a2==a3):
  ans="Yes"
if a1!=a3 and (a1==a2 or a2==a3):
  ans="Yes"
if a2!=a3 and (a1==a2 or a1==a3):
  ans="Yes"

Fixed submission:
a=input().split(" ")
a1,a2,a3=int(a[0]),int(a[1]),int(a[2])
ans="No"
if a1!=a2 and (a1==a3 or a2==a3):
  ans="Yes"
if a1!=a3 and (a1==a2 or a2==a3):
  ans="Yes"
if a2!=a3 and (a1==a2 or a1==a3):
  ans="Yes"
  
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
x=int(input())
s={2}
if x==2:
	print(2)
else:
	for i in range(3,10**6):
		if all(i%j!=0 for j in s):
			s.add(i)
			if i>=x:
				print(i)
				break


Fixed submission:
x=int(input())
counter=0
while counter==0:
	counter=1
	for i in range(2,x):
		if x%i==0:
			counter=0
	if counter==1:
		print(x)
	else:
		x+=1
Buggy python submission (verdict: Runtime Error):
s=list(input())
count=0
if len(s)%2==0:
    for i in range(1,(len(s)//2)+1):
        if s[i-1]!=s[-i]:
            count+=1
else:
    for i in range(1,(len(s)//2))
        if s[i-1]!=s[-i]:
            count+=1
print(count)

Fixed submission:
s=list(input())
count=0
for i in range(len(s)//2):
    if s[i]!=s[-i-1]:
        count+=1
print(count)
Buggy python submission (verdict: Runtime Error):
x=int(input())
a=int(str(x)[-2:])
b=int(str(x)[:-2])
counter=0
while a>=5:
	a-=5
	counter+=1
while a>=4:
	a-=4
	counter+=1
while a>=3:
	a-=3
	counter+=1
while a>=2:
	a-=2
	counter+=1
while a>=1:
	a-=1
	counter+=1
print(1 if counter<=b else 0)


Fixed submission:
x=int(input())
if x<100:
	print(0)
elif x>=100:
	a=int(str(x)[-2:])
	b=int(str(x)[:-2])
	counter=0
	while a>=5:
		a-=5
		counter+=1
	while a>=4:
		a-=4
		counter+=1
	while a>=3:
		a-=3
		counter+=1
	while a>=2:
		a-=2
		counter+=1
	while a>=1:
		a-=1
		counter+=1
	print(1 if counter<=b else 0)

Buggy python submission (verdict: Runtime Error):
x=int(input())
a=int(str(x)[-2:])
b=int(str(x)[:-2])
counter=0
while a>=5:
	a-=5
	counter+=1
while a>=4:
	a-=4
	counter+=1
while a>=3:
	a-=3
	counter+=1
while a>=2:
	a-=2
	counter+=1
while a>=1:
	a-=1
	counter+=1
print(1 if counter<b else 0)


Fixed submission:
x=int(input())
if x<100:
	print(0)
elif x>=100:
	a=int(str(x)[-2:])
	b=int(str(x)[:-2])
	counter=0
	while a>=5:
		a-=5
		counter+=1
	while a>=4:
		a-=4
		counter+=1
	while a>=3:
		a-=3
		counter+=1
	while a>=2:
		a-=2
		counter+=1
	while a>=1:
		a-=1
		counter+=1
	print(1 if counter<=b else 0)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
s=list(input())
b=[]
for i in range(1000):
	while len(str(i))<3:
		i="0"+str(i)
	for j in range(n):
		if str(i)[0]==s[j]:
			for k in range(j+1,n):
				if str(i)[1]==s[k]:
					for l in range(k+1,n):
						if str(i)[2]==s[l]:
							b.append(i)
							break
					break
			break
print(len(set(b)))

Fixed submission:
n=int(input())
s=list(input())
counter=0
for i in range(1000):
	while len(str(i))<3:
		i="0"+str(i)
	i=str(i)
	if i[0] in s:
		a=s.index(i[0])
		if i[1] in s[a+1:]:
			b=s[a+1:].index(i[1])+a+1
			if i[2] in s[b+1:]:
				counter+=1
print(counter)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
s=list(input())
b=[]
for i in range(1000):
	while len(str(i))<3:
		i="0"+str(i)
	for j in range(n):
		if str(i)[0]==s[j]:
			for k in range(j+1,n):
				if str(i)[1]==s[k]:
					for l in range(k+1,n):
						if str(i)[2]==s[l]:
							b.append(i)	
print(len(set(b)))

Fixed submission:
n=int(input())
s=list(input())
counter=0
for i in range(1000):
	while len(str(i))<3:
		i="0"+str(i)
	i=str(i)
	if i[0] in s:
		a=s.index(i[0])
		if i[1] in s[a+1:]:
			b=s[a+1:].index(i[1])+a+1
			if i[2] in s[b+1:]:
				counter+=1
print(counter)
Buggy python submission (verdict: Time Limit Exceeded):
N,K,Q=map(int,input().split())
listA=[int(input()) for i in range(Q)]
listK=[K for i in range(N)]
for i in listA:
	for j in range(0,N):
		if i !=j:
			listK[j-1]=listK[j-1]-1
for i in range(1,N+1):
	print('Yes' if listK[i-1]>0 else 'No')

Fixed submission:
n,k,q=map(int,input().split())
plis=[0]*n
for i in range(q):
	a=int(input())
	plis[a-1]+=1
for i in range(n):
	if plis[i]>q-k:
		print("Yes")
	else:
		print("No")
Buggy python submission (verdict: Runtime Error):
N=int(input())
listA=list(map(int,input().split()))
listB=list(map(int,input().split()))
listC=list(map(int,input().split()))
sumB=int(sum(listB))
for i in range(1,N-1):
    if listA[i] == listA[i-1]+1:
        sumB=sumB+int(listC[listA[i-2]])
print(sumB)

Fixed submission:
N=int(input())
listA=list(map(int,input().split()))
listB=list(map(int,input().split()))
listC=list(map(int,input().split()))
sumB=int(sum(listB))
for i in range(1,N):
    if listA[i] == listA[i-1]+1:
        sumB=sumB+int(listC[listA[i-1]-1])
print(sumB)

Buggy python submission (verdict: Runtime Error):
N=int(input())
listA=list(map(int,input().split()))
listB=list(map(int,input().split()))
listC=list(map(int,input().split()))
sumB=int(sum(listB))
for i in range(1,N-1):
    if listA[i] == listA[i-1]+1:
        sumB=sumB+int(listC[listA[i-2]])
print(sumB)

Fixed submission:
N=int(input())
listA=list(map(int,input().split()))
listB=list(map(int,input().split()))
listC=list(map(int,input().split()))
sumB=int(sum(listB))
for i in range(1,N):
    if listA[i] == listA[i-1]+1:
        sumB=sumB+int(listC[listA[i-1]-1])
print(sumB)

Buggy python submission (verdict: Runtime Error):
N=int(input())
listA=list(map(int,input().split()))
listB=list(map(int,input().split()))
listC=list(map(int,input().split()))
sumB=int(sum(listB))
print("sumB",sumB)
for i in range(1,N-1):
    if listA[i] == listA[i-1]+1:
        sumB=sumB+int(listC[listA[i-2]])
print(sumB)

Fixed submission:
N=int(input())
listA=list(map(int,input().split()))
listB=list(map(int,input().split()))
listC=list(map(int,input().split()))
sumB=int(sum(listB))
for i in range(1,N):
    if listA[i] == listA[i-1]+1:
        sumB=sumB+int(listC[listA[i-1]-1])
print(sumB)
Buggy python submission (verdict: Runtime Error):
import numpy as np
N=int(input())
list=list(map(int,input().split()))
np_list=np.array(list)
inv_np_list=1/np_list
print(1/(sum(inv_np_list)))

Fixed submission:
a=int(input())
s=input()
print(s if a>= 3200 else 'red')
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
orislis=[]
oricount=[]
for i in range(n):
	s=sorted(list(input()))
	if s not in orislis:
		orislis.append(s)
		oricount.append(1)
	else:
		oricount[orislis.index(s)]+=1
ans=0
for i in oricount:
	z=(i*(i-1))/2
	ans+=z
print(int(ans))

Fixed submission:
from collections import Counter
n=int(input())
slis=[]
for i in range(n):
	s=sorted(list(input()))
	slis.append(s)
ctr=Counter()
ans=0
for s in slis:
	a="".join(s)
	if a in ctr:
		ans+=ctr[a]
	ctr[a] +=1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
slis=[]
orislis=[]
clis=[]
for i in range(n):
	a=sorted(list(input()))
	slis.append(a)
	if a not in orislis:
		orislis.append(a)
for i in orislis:
	a=0
	for j in slis:
		if i==j:
			a+=1
	clis.append(a)
ans=0
for i in clis:
	b=(i*(i-1))/2
	ans+=b
print(int(ans))

Fixed submission:
from collections import Counter
n=int(input())
slis=[]
for i in range(n):
	s=sorted(list(input()))
	slis.append(s)
ctr=Counter()
ans=0
for s in slis:
	a="".join(s)
	if a in ctr:
		ans+=ctr[a]
	ctr[a] +=1
print(ans)
Buggy python submission (verdict: Runtime Error):
N=input()
Num = len(N)
if Num == 5:
		Ans = (int(N)-9999) + 900 + 9
elif Num == 4:
		Ans = 900 + 9
elif Num == 3:
		Ans = (int(N)-99) + 9
elif Num == 2:
		Ans = 9
elif Num == 1:
		Ans = N
elif Num == 6:
		Ans = 90000 + 900 + 9    
print(Ans)

Fixed submission:
A,B,C=map(int,input().split())
print(0 if C<A-B else C-(A-B))
Buggy python submission (verdict: Runtime Error):
N=input()
Num = len(N)
if Num == 5:
		Ans = (int(N)-9999) + 900 + 9
elif Num == 4:
		Ans = 900 + 9
elif Num == 3:
		Ans = (int(N)-99) + 9
elif Num == 2:
		Ans = 9
elif Num == 1:
		Ans = N
print(Ans)

Fixed submission:
N=input()
Num = len(N)
if Num == 5:
		Ans = (int(N)-9999) + 900 + 9
elif Num == 4:
		Ans = 900 + 9
elif Num == 3:
		Ans = (int(N)-99) + 9
elif Num == 2:
		Ans = 9
elif Num == 1:
		Ans = N
elif Num == 6:
  Ans = 90000 + 900 + 9
print(Ans)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
alis=[int(input()) for i in range(n)]
anslis=[0]*n
if alis.count(max(alis))>=2:
	for i in range(n):
		print(max(alis))
else:
	for i in range(n):
		if i!=alis.index(max(alis)):
			print(max(alis))
		else:
			print(sorted(alis)[-2])

Fixed submission:
n=int(input())
alis=[int(input()) for i in range(n)]
anslis=[max(alis)]*n
if alis.count(max(alis))==1:
	anslis[alis.index(max(alis))]=sorted(alis)[-2]
for i in range(n):
	print(anslis[i])
Buggy python submission (verdict: Runtime Error):
n=int(input())
dlis=sorted(list(map(int,input().split())))
print(dlis[int((n/2)+2)]-dlis[int(n/2)+1])


Fixed submission:
n=int(input())
dlis=sorted(list(map(int,input().split())))
print(dlis[int((n/2))]-dlis[int(n/2)-1])
Buggy python submission (verdict: Runtime Error):
x,a=int(input())
print(0 if x<a else 10)

Fixed submission:
x,a=map(int,input().split())
print(0 if x<a else 10)
Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
alis=[]
for i in range(m):
	a=int(input())
	alis.append(a)
if 1 in alis:
	dp=[1,0]
else:
	dp=[1,1]
for i in range(2,n+1):
	if i in alis:
		d=0
		dp.append(d)
	else:
		d=dp[i-2]+dp[i-1]
		dp.append(d)
print(dp[n]%(10**9+7))


Fixed submission:
n,m=map(int,input().split())
alis=set([])
for i in range(m):
	a=int(input())
	alis.add(a)
if 1 in alis:
	dp=[1,0]
else:
	dp=[1,1]
for i in range(2,n+1):
	if i in alis:
		d=0
		dp.append(d)
	else:
		d=dp[i-2]+dp[i-1]
		dp.append(d)
print(dp[n]%(10**9+7))
Buggy python submission (verdict: Time Limit Exceeded):
n,q=map(int,input().split())
s=input()
slis=[0]*n
for i in range(len(s)-1):
	if s[i]+s[i+1]=="AC":
		slis[i]='1'
for j in range(q):
	l,r=map(int,input().split())
	print(slis[l-1:r-1].count("1"))

Fixed submission:
N,Q=map(int,input().split())
S=input()
count=[0]*N
for i in range(1,N):
    count[i]+=count[i-1]
    if S[i-1:i+1]=="AC":count[i]+=1
for i in range(Q):
    l,r=map(int,input().split())
    print(count[r-1]-count[l-1])

Buggy python submission (verdict: Time Limit Exceeded):
n,q=map(int,input().split())
s=input()
slis=[]
for i in range(len(s)-1):
	slis.append(s[i]+s[i+1])
for j in range(q):
	l,r=map(int,input().split())
	print(slis[l-1:r-1].count("AC"))

Fixed submission:
N,Q=map(int,input().split())
S=input()
count=[0]*N
for i in range(1,N):
    count[i]+=count[i-1]
    if S[i-1:i+1]=="AC":count[i]+=1
for i in range(Q):
    l,r=map(int,input().split())
    print(count[r-1]-count[l-1])

Buggy python submission (verdict: Time Limit Exceeded):
n,q=map(int,input().split())
s=input()
slis=[]
for i in range(len(s)-1):
	slis.append(s[i]+s[i+1])
for j in range(q):
	l,r=map(int,input().split())
	t_slis=slis[l-1:r-1]
	print(t_slis.count("AC"))


Fixed submission:
N,Q=map(int,input().split())
S=input()
count=[0]*N
for i in range(1,N):
    count[i]+=count[i-1]
    if S[i-1:i+1]=="AC":count[i]+=1
for i in range(Q):
    l,r=map(int,input().split())
    print(count[r-1]-count[l-1])

Buggy python submission (verdict: Time Limit Exceeded):
n,q=map(int,input().split())
slis=list(input())
ta_slis=[]
for i in range(q):
	l,r=map(int,input().split())
	t_slis=slis[l-1:r]
	counter=0
	for j in range(len(t_slis)-1):
		if t_slis[j]=='A':
			if t_slis[j+1]=='C':
				counter+=1
	print(counter)

Fixed submission:
N,Q=map(int,input().split())
S=input()
count=[0]*N
for i in range(1,N):
    count[i]+=count[i-1]
    if S[i-1:i+1]=="AC":count[i]+=1
for i in range(Q):
    l,r=map(int,input().split())
    print(count[r-1]-count[l-1])
Buggy python submission (verdict: Runtime Error):
h,w=map(int,input().split())
a=[""]*h
for i in range(h):
	a[i]=input()

row=[False]*h
col=[False]*w
for i in range(h):
	for i in range(w):
		if a[i][j]=="#":
			row[i]=True
			col[j]=True
			
for i in range(h):
	if row[i]:
		for j in range(w):
			if col[j]:
				print(a[i][j],end='')
				print()

Fixed submission:
h,w=map(int,input().split())
a=[""]*h
for i in range(h):
	a[i]=input()

row=[False]*h
col=[False]*w
for i in range(h):
	for j in range(w):
		if a[i][j]=="#":
			row[i]=True
			col[j]=True
			
for i in range(h):
	if row[i]:
		for j in range(w):
			if col[j]:
				print(a[i][j],end='')
		print()
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=int(input())
print('Yes' if n%500 =< a else 'No')

Fixed submission:
n=int(input())
a=int(input())
print('Yes' if n%500 <= a else 'No')
Buggy python submission (verdict: Runtime Error):
n=int(input())
a,b=2,1
for i in range(2,n+1):
	c=a+b
	a,b=b,c
print(c)

Fixed submission:
n=int(input())
a,b=2,1
for i in range(2,n+1):
	c=a+b
	a,b=b,c
print(c if n!=1 else 1)
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input())
print(a if b-c ==0 else b if a-c ==0 else c)

Fixed submission:
a,b,c=map(int,input().split())
print(a if b-c ==0 else b if a-c ==0 else c)
Buggy python submission (verdict: Runtime Error):
n=str(input())
print('Yes' if 9 in n else "No")

Fixed submission:
n=str(input())
print('Yes' if "9" in n else "No")
Buggy python submission (verdict: Runtime Error):
a,b=int(input().split())
print("error" if a+b > 10 else a+b)

Fixed submission:
a,b=map(int,input().split())
print("error" if a+b >= 10 else a+b)
Buggy python submission (verdict: Runtime Error):
n,k,x,y=map(int,input().split("\n"))
print(x*n if n <= k else (x*k)+(n-k)*y)

Fixed submission:
n=int(input())
k=int(input())
x=int(input())
y=int(input())
a=n*x
b=k*x + y*(n-k)
print(a if k >= n else b )