Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
s = str(s)
list_ans.append("KIHBR")
list_ans.append("AKIHBR")
list_ans.append("KIHABR")
list_ans.append("KIHBAR")
list_ans.append("KIHBRA")
list_ans.append("AKIHABR")
list_ans.append("AKIHBAR")
list_ans.append("AKIHBRA")
list_ans.append("KIHABAR")
list_ans.append("KIHABRA")
list_ans.append("KIHBARA")
list_ans.append("AKIHABAR")
list_ans.append("AKIHABRA")
list_ans.append("AKIHBARA")
list_ans.append("KIHABARA")
list_ans.append("AKIHABARA")
if s in list_ans:
    print("YES")
else:
    print("NO")

Fixed submission:

s = str(input())
list_ans = []
list_ans.append("KIHBR")
list_ans.append("AKIHBR")
list_ans.append("KIHABR")
list_ans.append("KIHBAR")
list_ans.append("KIHBRA")
list_ans.append("AKIHABR")
list_ans.append("AKIHBAR")
list_ans.append("AKIHBRA")
list_ans.append("KIHABAR")
list_ans.append("KIHABRA")
list_ans.append("KIHBARA")
list_ans.append("AKIHABAR")
list_ans.append("AKIHABRA")
list_ans.append("AKIHBARA")
list_ans.append("KIHABARA")
list_ans.append("AKIHABARA")
if s in list_ans:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
def binarySearch(list_a, key):
    left = 0
    right = len(list_a)
    while left < right:
        mid = (left + right) // 2
        if key < list_a[mid]:
            right = mid
        else:
            left = mid+1
    else:
        return left


n = int(input())
list_a = list(map(int, input().split()))
list_b = list(map(int, input().split()))
list_c = list(map(int, input().split()))
list_a.sort()
list_b.sort()
list_c.sort()
count = 0
for c in list_c:
    for b in list_b[:binarySearch(list_b, c-0.5)]:
        count += binarySearch(list_a, b-0.5)
print(count)

Fixed submission:
n = int(input())
list_a = list(map(int, input().split()))
list_b = list(map(int, input().split()))
list_c = list(map(int, input().split()))
list_a.sort()
list_b.sort()
list_c.sort()
list_a.append(10**10)
list_b.append(10**10)
list_c.append(10**10)

list_memo = []
i = 0
j = 0
k = 0
start = 0
list_ans = []
a_count = 0
while k < n:
    if list_c[k] == min(list_a[i], list_b[j], list_c[k]):
        list_memo.append(0)
        list_memo[-1] = sum(list_memo[start:-1])
        list_ans.append(list_memo[-1])
        start = len(list_memo) - 1
        k += 1
    elif list_b[j] == min(list_a[i], list_b[j], list_c[k]):
        list_memo.append(a_count)
        j += 1
    else:
        list_memo.append(0)
        a_count += 1
        i += 1
print(sum(list_ans))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
list_a = list(map(int, input().split()))
list_b = list(map(int, input().split()))
list_c = list(map(int, input().split()))
count = 0
for c in list_c:
    for b in [b for b in list_b if b < c]:
        count += len([a for a in list_a if a < b])
print(count)


Fixed submission:
n = int(input())
list_a = list(map(int, input().split()))
list_b = list(map(int, input().split()))
list_c = list(map(int, input().split()))
list_a.sort()
list_b.sort()
list_c.sort()
list_a.append(10**10)
list_b.append(10**10)
list_c.append(10**10)

list_memo = []
i = 0
j = 0
k = 0
start = 0
list_ans = []
a_count = 0
while k < n:
    if list_c[k] == min(list_a[i], list_b[j], list_c[k]):
        list_memo.append(0)
        list_memo[-1] = sum(list_memo[start:-1])
        list_ans.append(list_memo[-1])
        start = len(list_memo) - 1
        k += 1
    elif list_b[j] == min(list_a[i], list_b[j], list_c[k]):
        list_memo.append(a_count)
        j += 1
    else:
        list_memo.append(0)
        a_count += 1
        i += 1
print(sum(list_ans))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = input().split()

for i in range(0,n):
	l[i] = int(l[i])

counting = 0
list_i = []
set_l = set(l)
max_counting = 0
for i in set_l:
	counting = 0
	for j in range(n):
		if (l[j] == i or l[j] == i-1 or l[j] == i+1):
			counting += 1		
	if max_counting < counting:
		max_counting = counting
			 
print(max_counting)

Fixed submission:
n = int(input())
l = input().split()

for i in range(0,n):
	l[i] = int(l[i])

dict_i = {}
for i in range(-1,100001):
	dict_i[i] = 0
	
for j in range(n):
	dict_i[l[j]] += 1
	dict_i[l[j] + 1] += 1
	dict_i[l[j] - 1] += 1
print(max(dict_i.values()))

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

for i in range(0,n):
	l[i] = int(l[i])

counting = 0
list_i = []
set_l = set(l)
for i in set_l:
	counting = 0
	for j in range(n):
		if (l[j] == i or l[j] == i-1 or l[j] == i+1):
			counting += 1		
	list_i.append(counting)
			 
print(max(list_i))

Fixed submission:
n = int(input())
l = input().split()

for i in range(0,n):
	l[i] = int(l[i])

dict_i = {}
for i in range(-1,100001):
	dict_i[i] = 0
	
for j in range(n):
	dict_i[l[j]] += 1
	dict_i[l[j] + 1] += 1
	dict_i[l[j] - 1] += 1
print(max(dict_i.values()))

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

for i in range(0,n):
	l[i] = int(l[i])

counting = 0
list_i = []
for i in range(0,100000):
	counting = 0
	for j in range(n):
		if (l[j] == i or l[j] == i-1 or l[j] == i+1):
			counting += 1		
	list_i.append(counting)
			 
print(max(list_i))

Fixed submission:
n = int(input())
l = input().split()

for i in range(0,n):
	l[i] = int(l[i])

dict_i = {}
for i in range(-1,100001):
	dict_i[i] = 0
	
for j in range(n):
	dict_i[l[j]] += 1
	dict_i[l[j] + 1] += 1
	dict_i[l[j] - 1] += 1
print(max(dict_i.values()))

Buggy python submission (verdict: Runtime Error):
a = input()
l = a.split()
n = int(l[0])
l.pop(0)

for i in range(n):
	l[i] = int(l[i])

counting = 0
list_i = []
for i in range(100000):
	counting = 0
	for j in range(n):
		if (l[j] == i or l[j] == i-1 or l[j] == i+1):
			counting += 1		
	list_i.append(counting)
			
print(max(list_i))

Fixed submission:
n = int(input())
l = input().split()

for i in range(0,n):
	l[i] = int(l[i])

dict_i = {}
for i in range(-1,100001):
	dict_i[i] = 0
	
for j in range(n):
	dict_i[l[j]] += 1
	dict_i[l[j] + 1] += 1
	dict_i[l[j] - 1] += 1
print(max(dict_i.values()))

Buggy python submission (verdict: Runtime Error):
a = input()
l = a.split()
n = int(l[0])
l.pop(0)

for i in range(n):
	l[i] = int(l[i])

counting = 0
list_i = []
for i in range(100000):
	counting = 0
	for j in range(n):
		if (l[j] == i or l[j] == i-1 or l[j] == i+1):
			counting += 1		
	list_i.append(counting)
			
print(max(list_i))

Fixed submission:
n = int(input())
l = input().split()

for i in range(0,n):
	l[i] = int(l[i])

dict_i = {}
for i in range(-1,100001):
	dict_i[i] = 0
	
for j in range(n):
	dict_i[l[j]] += 1
	dict_i[l[j] + 1] += 1
	dict_i[l[j] - 1] += 1
print(max(dict_i.values()))
Buggy python submission (verdict: Runtime Error):
q,h,s,d = map(int, input().split())
n = int(input())
q_perf = q / 0.25
h_perf = h / 0.5
s_perf = s
d_perf = d / 2
list_amo = [0.25,0.5,1.0,2.0]
list_price = [q,h,s,d]
list_perf = [q_perf,h_perf,s_perf,d_perf]
cost = 0
ind4 = list_perf.index(min(list_perf))
ind3 = list_perf.index(min(list_perf[0:3]))
ind2 = list_perf.index(min(list_perf[0:2]))
ind1 = list_perf.index(min(list_perf[0:1]))

while n >= 2:
    cost += int((n//int(list_amo[ind4])) *  int(list_price[ind4]))
    n -= (n//list_amo[ind4]) * list_amo[ind4]

while n >= 1:
    cost += int((n//int(list_amo[ind3])) *  int(list_price[ind3]))
    n -= (n//list_amo[ind3]) * list_amo[ind3]
while n >= 0.5:
    cost += int((n//list_amo[ind2]) *  list_price[ind2])
    n -= (n//list_amo[ind2]) * list_amo[ind2]

while n >= 0.25:
    cost += int((n//list_amo[ind1]) *  list_price[ind1])
    n -= (n//list_amo[ind1]) * list_amo[ind1]

print(int(cost))


Fixed submission:
q,h,s,d = map(int, input().split())
n = int(input())
q_perf = q / 0.25
h_perf = h / 0.5
s_perf = s
d_perf = d / 2
list_amo = [0.25,0.5,1,2]
list_price = [q,h,s,d]
list_perf = [q_perf,h_perf,s_perf,d_perf]
cost = 0
ind4 = list_perf.index(min(list_perf))
ind3 = list_perf.index(min(list_perf[0:3]))
ind2 = list_perf.index(min(list_perf[0:2]))
ind1 = list_perf.index(min(list_perf[0:1]))

while n >= 2:
    cost += int((n//list_amo[ind4]) *  int(list_price[ind4]))
    n -= (n//list_amo[ind4]) * list_amo[ind4]
while n >= 1:
    cost += int((n//list_amo[ind3]) *  int(list_price[ind3]))
    n -= (n//list_amo[ind3]) * list_amo[ind3]
while n >= 0.5:
    cost += int((n//list_amo[ind2]) *  list_price[ind2])
    n -= (n//list_amo[ind2]) * list_amo[ind2]

while n >= 0.25:
    cost += int((n//list_amo[ind1]) *  list_price[ind1])
    n -= (n//list_amo[ind1]) * list_amo[ind1]

print(int(cost))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
list_a = list(map(int, input().split()))
list_b = []
for i in range(0,n):
    list_b.append(list_a[i])
    list_b = list_b[::-1]
for i in range(0,n):
    list_b[i] = str(list_b[i])
print(" ".join(list_b))


Fixed submission:
n = int(input())
list_a = list(map(int, input().split()))
list_b = [0]*n
for i in range(0,n):
    if n % 2 == 1:
        if i % 2 == 0:
            list_b[(n-1)//2 - i//2] = list_a[i]
        else:
            list_b[(n-1)//2 + (i+1)//2] = list_a[i]
    else:
        if i % 2 == 1:
            list_b[n//2 - (i+1)//2] = list_a[i]
        else:
            list_b[n//2 + i//2] = list_a[i]

for i in range(0,n):
    list_b[i] = str(list_b[i])
print(" ".join(list_b))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
list_a = []
for i in range(0,n):
    list_a.append(int(input()))
def search(number):
    for i in range(0,n):
        if list_a[i] == number:
            return i + 1
number = 2
count = 0
while True:
    number = search(number)
    count += 1
    if number == 1:
        print(count)
        break
    if count > n:
        print(-1)
        break


Fixed submission:
n = int(input())
list_a = []
for i in range(0,n):
    list_a.append(int(input()))
number = 0
count = 0
while True:
    number = list_a[number] - 1        
    count += 1
    if number == 1:
        print(count)
        break
    if count > n:
        print(-1)
        break

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
list_a = []
for i in range(0,n):
    list_a.append(int(input()))
def search(number):
    for i in range(0,n):
        if list_a[i] == number:
            return list_a.index(number) + 1
number = 2
count = 0
while True:
    number = search(number)
    count += 1
    if number == 1:
        print(count)
        break
    if count > n:
        print(-1)
        break


Fixed submission:
n = int(input())
list_a = []
for i in range(0,n):
    list_a.append(int(input()))
number = 0
count = 0
while True:
    number = list_a[number] - 1        
    count += 1
    if number == 1:
        print(count)
        break
    if count > n:
        print(-1)
        break
Buggy python submission (verdict: Runtime Error):
phase = 0
if list_a != list_b:
    for i in range(0, n-m):
        for j in range(0, n-m):
            for k in range(0,m):
                if list_a[i+k][j:j+m] == list_b[k]:
                    if k != m-1:
                        continue
                    else:
                        pass
                else:
                    break
                phase = 1
                print("Yes")
                break
            if phase == 1:
                break
        if phase == 1:
            break
    else:
        print("No")
else:
    print("Yes")


Fixed submission:
n,m = map(int, input().split())
list_a = []
list_b = []
count = 0
while count < n:
    list_a.append(list(str(input())))
    count += 1
count = 0
while count < m:
    list_b.append(list(str(input())))
    count += 1
#print(list_a)
#print(list_b)[
phase = 0
if list_a != list_b:
    for i in range(0, n-m):
        for j in range(0, n-m):
            for k in range(0,m):
                if list_a[i+k][j:j+m] == list_b[k]:
                    if k != m-1:
                        continue
                    else:
                        pass
                else:
                    break
                phase = 1
                print("Yes")
                break
            if phase == 1:
                break
        if phase == 1:
            break
    else:
        print("No")
else:
    print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
list_ab = []
n = int(input())
for i in range(n):
    list_ab.append(list(map(int, input().split())))

j = n - 1
count = 0
while j >= 0:
    if list_ab[j][0] % list_ab[j][1] == 0:
        j -= 1
    else:
        ad = list_ab[j][1] * (list_ab[j][0] // list_ab[j][1] + 1) - list_ab[j][0]
        count += ad
        for i in range(j+1):
            list_ab[i][0] += ad
        j -= 1
print(count)


Fixed submission:
list_ab = []
n = int(input())
for i in range(n):
    list_ab.append(list(map(int, input().split())))

j = n - 1
ad = 0
while j >= 0:
    list_ab[j][0] += ad
    if list_ab[j][0] % list_ab[j][1] == 0:
        j -= 1
    else:
        ad += list_ab[j][1] * (list_ab[j][0] // list_ab[j][1] + 1) - list_ab[j][0]
        j -= 1
print(ad)
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int, input())
if max(a,b,c) == (a+b+c -max(a,b,c)):
  print("Yes")
else:
  print("No")

Fixed submission:
a,b,c = map(int, input().split())
if max(a,b,c) == (a+b+c -max(a,b,c)):
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
t = input()

list_t = list(t)

for i in range(len(list_t)):
    if list_t[i] == '?':
        if i > 0:
            if list_t[i - 1] == 'P':
                list_t[i] = 'D'
            else:
                list_t[i] = 'D'
        if i < len(list_t) + 1:
            if list_t[i + 1] == 'D':
                list_t[i] = 'P'

print(''.join(list_t))

Fixed submission:
t = input()

list_t = list(t)

n = len(list_t)

for i in range(n):
    if n == 1:
        list_t[i] = 'D'
        break
    if list_t[i] == '?':
        if i > 0 and i < n - 1:
            if list_t[i - 1] == 'P' and list_t[i + 1] == 'P':
                list_t[i] = 'D'
            if list_t[i - 1] == 'P' and list_t[i + 1] == 'D':
                list_t[i] = 'D'
            if list_t[i - 1] == 'P' and list_t[i + 1] == '?':
                list_t[i] = 'D'
            if list_t[i - 1] == 'D' and list_t[i + 1] == 'P':
                list_t[i] = 'D'
            if list_t[i - 1] == 'D' and list_t[i + 1] == 'D':
                list_t[i] = 'P'
            if list_t[i - 1] == 'D' and list_t[i + 1] == '?':
                list_t[i] = 'P'
        elif i > 0:
            if list_t[i - 1] == 'P':
                list_t[i] = 'D'
            if list_t[i - 1] == 'D':
                list_t[i] = 'D'
        elif i < n - 1:
            if list_t[i + 1] == 'P':
                list_t[i] = 'D'
            if list_t[i + 1] == 'D':
                list_t[i] = 'P'
            if list_t[i + 1] == '?':
                list_t[i] = 'D'


print(''.join(list_t))

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

list_t = list(t)

for i in range(len(list_t)):
    if list_t[i] == '?':
        if i > 0:
            if list_t[i - 1] == 'P':
                list_t[i] = 'D'
            else:
                list_t[i] = 'D'
        if i < len(list_t):
            if list_t[i + 1] == 'D':
                list_t[i] = 'P'

print(''.join(list_t))

Fixed submission:
t = input()

list_t = list(t)

n = len(list_t)

for i in range(n):
    if n == 1:
        list_t[i] = 'D'
        break
    if list_t[i] == '?':
        if i > 0 and i < n - 1:
            if list_t[i - 1] == 'P' and list_t[i + 1] == 'P':
                list_t[i] = 'D'
            if list_t[i - 1] == 'P' and list_t[i + 1] == 'D':
                list_t[i] = 'D'
            if list_t[i - 1] == 'P' and list_t[i + 1] == '?':
                list_t[i] = 'D'
            if list_t[i - 1] == 'D' and list_t[i + 1] == 'P':
                list_t[i] = 'D'
            if list_t[i - 1] == 'D' and list_t[i + 1] == 'D':
                list_t[i] = 'P'
            if list_t[i - 1] == 'D' and list_t[i + 1] == '?':
                list_t[i] = 'P'
        elif i > 0:
            if list_t[i - 1] == 'P':
                list_t[i] = 'D'
            if list_t[i - 1] == 'D':
                list_t[i] = 'D'
        elif i < n - 1:
            if list_t[i + 1] == 'P':
                list_t[i] = 'D'
            if list_t[i + 1] == 'D':
                list_t[i] = 'P'
            if list_t[i + 1] == '?':
                list_t[i] = 'D'


print(''.join(list_t))
Buggy python submission (verdict: Time Limit Exceeded):
n, a, b = map(int, input().split(' '))

count = 0
ret = 0
while(count < n):
    if count + a >= n:
        ret += n - count
        break
    if count + a + b >= n:
        ret += a
        break
    count += a + b
    ret += a
print(ret)

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

ret = n // (a + b) * a
ret += a if (n % (a + b) >= a) else n % (a + b)
print(ret)
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
q = int(input())

#qs = []
for i in range(q):
    x = input()
    if x[0] == '1':
        #qs.append(x)
        s = s[::-1]
    else:
        #qs.append(x.split(' '))
        xx = x.split(' ')
        if xx[1] == '1':
            s = xx[2] + s
        else:
            s = s + xx[2]
print(s)

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

#qs = []
hanten = 0
mae = ''
ushiro = ''
for i in range(q):
    x = input()
    if x[0] == '1':
        #qs.append(x)
        hanten += 1
    else:
        xx = x.split(' ')
        #qs.append(x.split(' '))
        if xx[1] == '1':
            if hanten % 2 == 0:
                mae = xx[2] + mae
            else:
                ushiro = ushiro + xx[2]
        else:
            if hanten % 2 == 0:
                ushiro = ushiro + xx[2]
            else:
                mae = xx[2] + mae           

if hanten % 2 == 0:
    s = mae + s + ushiro
else:
    s = ushiro[::-1] + s[::-1] + mae[::-1]

print(s)
Buggy python submission (verdict: Runtime Error):
h a = map(int, input().split(' '))
if h % a == 0:
    print(h // a)
else:
    print(h // a + 1)

Fixed submission:
h, a = map(int, input().split(' '))
if h % a == 0:
    print(h // a)
else:
    print(h // a + 1)
Buggy python submission (verdict: Runtime Error):
h = input()
w = input()
n = input()

l = max(h, w)
print(n // l)

Fixed submission:
import math

h = int(input())
w = int(input())
n = int(input())

l = max(h, w)
print(math.ceil(n / l))
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split(' '))

pena = [0 for i in range(n)]
acc = [0 for i in range(n)]

for i in range(m):
    pp, ss = input().split(' ')
    p = int(pp) - 1

    if acc[p] == 0:
        if ss == 'WA':
            pena[p] += 1
        else:
            acc[p] = 1

for i in range(m):
    pena[i] = pena[i] * acc[i]

print(sum(acc), sum(pena))

Fixed submission:
n, m = map(int, input().split(' '))

pena = [0 for i in range(n)]
acc = [0 for i in range(n)]

for i in range(m):
    pp, ss = input().split(' ')
    p = int(pp) - 1

    if acc[p] == 0:
        if ss == 'WA':
            pena[p] += 1
        else:
            acc[p] = 1

for i in range(n):
    pena[i] = pena[i] * acc[i]

print(sum(acc), sum(pena))
Buggy python submission (verdict: Runtime Error):
import math
from heapq import heappush, heappop

n, m = map(int, input().split(' '))

a = list(map(int, input().split(' ')))

h = []

for i in a:
    heappush(h, -i)

for i in range(m):
    v = heappop(h)
    heappush(h, -(-v // 2))
    print(h)

print(-sum(h))

Fixed submission:
import math
from heapq import heappush, heappop

n, m = map(int, input().split(' '))

a = list(map(int, input().split(' ')))

h = []

for i in a:
    heappush(h, -i)

for i in range(m):
    v = heappop(h)
    heappush(h, -(-v // 2))

print(-sum(h))

Buggy python submission (verdict: Time Limit Exceeded):
import math

n, m = map(int, input().split(' '))

a = list(map(int, input().split(' ')))

for i in range(m):
    idx = a.index(max(a))
    a[idx] = a[idx] // 2
print(sum(a))

Fixed submission:
import math
from heapq import heappush, heappop

n, m = map(int, input().split(' '))

a = list(map(int, input().split(' ')))

h = []

for i in a:
    heappush(h, -i)

for i in range(m):
    v = heappop(h)
    heappush(h, -(-v // 2))

print(-sum(h))

Buggy python submission (verdict: Time Limit Exceeded):
import math

n, m = map(int, input().split(' '))

a = list(map(int, input().split(' ')))

for i in range(m):
    idx = a.index(max(a))
    a[idx] = a[idx] / 2

b = sum([math.floor(i) for i in a])
print(b)

Fixed submission:
import math
from heapq import heappush, heappop

n, m = map(int, input().split(' '))

a = list(map(int, input().split(' ')))

h = []

for i in a:
    heappush(h, -i)

for i in range(m):
    v = heappop(h)
    heappush(h, -(-v // 2))

print(-sum(h))
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input())

if k != 1:
    print(n-k)
else:
    print('0')

Fixed submission:
n, k = map(int, input().split(' '))

if k != 1:
    print(n-k)
else:
    print('0')
Buggy python submission (verdict: Runtime Error):
import collections

n = int(input())

x = []
y = []
for i in range(n):
    xx, yy = map(int, input().split())
    x.append(xx)
    y.append(yy)

vec = []
vec_set = []

for i in range(n):
    vec2 = []
    for j in range(n):
        vec2.append((x[i] - x[j], y[i] - y[j]))
        vec_set.append((x[i] - x[j], y[i] - y[j]))
    vec.append(vec2)

cc = collections.Counter(vec_set)

v_l = []
for key,value in cc.items():
    if key != (0,0):
        v_l.append(value)
print(n - max(v_l))

Fixed submission:
import collections

n = int(input())

x = []
y = []
for i in range(n):
    xx, yy = map(int, input().split())
    x.append(xx)
    y.append(yy)

vec = []
vec_set = []

for i in range(n):
    vec2 = []
    for j in range(n):
        vec2.append((x[i] - x[j], y[i] - y[j]))
        vec_set.append((x[i] - x[j], y[i] - y[j]))
    vec.append(vec2)

cc = collections.Counter(vec_set)

v_l = []
for key,value in cc.items():
    if key != (0,0):
        v_l.append(value)
if len(v_l) != 0:
    print(n - max(v_l))
else:
    print(1)
Buggy python submission (verdict: Runtime Error):
n = int(input())
polys = []
for i in range(n):
        polys.append(int(input()))

if sum(polys) - max(polys) > max(polys):
        print('Yes')
else:
        print('No')

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

if sum(polys) - max(polys) > max(polys):
        print('Yes')
else:
        print('No')
Buggy python submission (verdict: Runtime Error):
n=int(input())
if n==1:print("Hello word")
a=int(input())
b=int(input())
if n==2 :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):
input_lines = str(input())
input_lines2 = str(input())

n = int(input_lines)
aAry = input_lines2.split(' ')
aAry = map(int,aAry)
aAry = sorted(aAry)
#print(aAry)

answer1 = 0L
for i in range(n):
    answer1 += int(aAry[(-i-1)*2])

answer2 = 0L
for i in range(n):
    answer2 += int(aAry[-i-3])

if answer1 >= answer2:
    answer = answer1
else:
    answer = answer2
print(answer)

Fixed submission:
input_lines = str(input())
input_lines2 = str(input())

n = int(input_lines)
aAry = input_lines2.split(' ')
aAry = map(int,aAry)
aAry = sorted(aAry)
#print(aAry)

answer1 = 0
for i in range(n):
    answer1 += int(aAry[(-i-1)*2])
'''
answer2 = 0
for i in range(n):
    answer2 += int(aAry[-i-3])

if answer1 >= answer2:
    answer = answer1
else:
    answer = answer2
'''
print(answer1)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 整数の入力
a, b = map(int,input().split())
c = (a*b)%2
if c = 0:
    print("Even")
else:
    print("Odd")

Fixed submission:
a,b = map(int, input().split())
c = a*b
if c % 2 ==0:
    print("Even")
else:
    print("Odd")
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
 
cnt = 0
while True:
  check = sum([n % 2 for n in A])
  if check == 0:
    A = [n/2 for n in A]
    cnt += 1
  else:
    break
    
print(cnt)

Fixed submission:
numbers = list(input())
count = 0
for s in numbers:
    a = int(s)
    if a == 1:
        count +=1
print(count)