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

while True:
  inp=input()
  a= set(inp)
  if(a==""):
    break
  elif(len(a)==1):
      print("No")
  else:
      print("Yes")
 

Fixed submission:
#! /usr/bin/env python3

s=set(input())
print("Yes") if len(s)==2 else print("No")

Buggy python submission (verdict: Runtime Error):


while True:
  inp=raw_input()
  a= set(inp)
  if(a==""):
    break
  elif(len(a)==1):
      print("No")
  else:
      print("Yes")
 

Fixed submission:
#! /usr/bin/env python3

s=set(input())
print("Yes") if len(s)==2 else print("No")

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

T = 0
F = 2
C = 4

s = input()
q = int(input())

cnt = 0

front = ""
back = ""

for i in range(q):
    query = input()

    if query[T] == "1":
        cnt += 1
        continue

    # モード通常
    if cnt % 2 == 0:
        if query[F] == "1":
            front =  query[C] + front
        else:
            back = query[C] + back

    # モード反転
    else:
        if query[F] == "1":
            back = query[C] + back
        else:
            front =  query[C] + front


# print(cnt)
# print(front)
# print(s)
# print(back)

moji = front+s+back

if cnt % 2 == 0:
    # print(s)
    pass
else:
    moji = moji[::-1]
    # print(s[::-1])

# front = front[::-1]

# print(front,s,back)

print(moji)


Fixed submission:
s = input()

a = False
for i in range(len(s)):
    if s[i] == "A":
        a = True
        break

b = False
for i in range(len(s)):
    if s[i] == "B":
        b = True
        break

if a and b:
    print("Yes")
else:
    print("No")

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

    a = False
    for i in range(len(s)):
        if s[i] == "A":
            a = True
            break

    b = False
    for i in range(len(s)):
        if s[i] == "B":
            b = True
            break

    print(a and b)

Fixed submission:
s = input()

a = False
for i in range(len(s)):
    if s[i] == "A":
        a = True
        break

b = False
for i in range(len(s)):
    if s[i] == "B":
        b = True
        break

if a and b:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
def q1(s):
    #reverse
    return s[::-1]
def q2(s,f,char):
    if int(f) == 1:
        s = char + s
    else:
        s= s + char
    return s


s = input()
q = int(input())
for i in range(q):
    query = input().split()
    if len(query)==1:
        s=q1(s)
    else:
        s=q2(s,query[1],query[2])
print(s)

Fixed submission:
s=input()
if s == 'AAA' or s == 'BBB':
    ans = 'No'
else:
    ans = 'Yes'
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n,a,b=map(int,input().split())

count=1
ans = 0
while (a+b)*count<=n:
    ans +=a
    count+=1
    # print(count)
r = n - (a+b)*(count-1)
# print(r)
if not r == 0:
    ans += min([a,r])
print(ans)

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

q = int(n/(a+b))
r = n - (a+b)*(q)
ans = q*a
ans += min([a,r])
print(ans)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())

eightper = 0.08
tenper = 0.1
ans = -1
for i in range(1,100*(1+tenper)+1):
    if int(i*eightper)==a:
        if int(i*tenper)==b:
            ans=i
            break
print(ans)

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

eightper = 0.08
tenper = 0.1
ans = -1
for i in range(1,1000+1):
    if int(i*eightper)==a:
        if int(i*tenper)==b:
            ans=i
            break
print(ans)
Buggy python submission (verdict: Runtime Error):
N,M=input().split()
N,M=int(N),int(M)

guess = [] #答えの候補を保管
for i in range(N):
    guess.append(-1)
exits=True #答えが存在するか
ans=-1

for i in range(M):
    s,c=input().split()
    #桁数sを直感に一致させるために-1
    s,c=int(s)-1,int(c)
    if guess[s]==-1 or guess[s]>c:
        guess[s]=c

if guess[0]==0 or guess[0]==-1 or M==0:
    exits=False 

if exits:
    ans=0
    for i in range(N):
        ans+= guess[i]*(10**(N-i-1)) if not guess[i]==-1 else 0
	#1桁の場合はcがそのまま答え
    if N==1:
        ans=c

print(ans)

Fixed submission:
N = int(input())
if N%2 ==1:
    N += 1
print(int(N/2))

Buggy python submission (verdict: Runtime Error):
N,M=input().split()
N,M=int(N),int(M)

guess = [] #答えの候補を保管
for i in range(N):
    guess.append(-1)
exits=True #答えが存在するか
ans=-1

for i in range(M):
    s,c=input().split()
    #桁数sを直感に一致させるために-1
    s,c=int(s)-1,int(c)
    if guess[s]==-1 or guess[s]==c:
        guess[s]=c
    else:
        exits=False

if guess[0]==0 or guess[0]==-1 or M==0:
    exits=False 

if exits:
    ans=0
    for i in range(N):
        ans+= guess[i]*(10**(N-i-1)) if not guess[i]==-1 else 0
	#1桁の場合はcがそのまま答え
    if N==1:
        ans=c

print(ans)

Fixed submission:
N = int(input())
if N%2 ==1:
    N += 1
print(int(N/2))

Buggy python submission (verdict: Runtime Error):
N = int(input())
if N%2 ==1:10

    N +=1
print(int(N/2))

Fixed submission:
N = int(input())
if N%2 ==1:
    N += 1
print(int(N/2))
Buggy python submission (verdict: Runtime Error):
N,M=input().split()
N,M=int(N),int(M)

guess = [] #答えの候補を保管
for i in range(N):
    guess.append(-1)
exits=True #答えが存在するか
ans=-1

for i in range(M):
    s,c=input().split()
    #桁数sを直感に一致させるために-1
    s,c=int(s)-1,int(c)
    if guess[s]==-1 or guess[s]==c:
        guess[s]=c
    else:
        exits=False

#1桁目が0or与えられてないならば答えは存在しない
if guess[0]==0 or guess[0]==-1:
    exits=False 

if exits:
    ans=0
    for i in range(N):
        ans+= guess[i]*(10**(N-i-1)) if not guess[i]==-1 else 0

#1桁の場合はcがそのまま答え
if N==1:
    ans=c

print(ans)

Fixed submission:
N, M = input().split()
N, M = int(N), int(M)

if N == 1 and M == 0:  # 1桁の数字指定なし
    ans = 0
elif N == 1:  # 1桁で数字指定有り:最初のcと同じものがずっと来ればans=c
    s, c = input().split()
    c = int(c)
    ans = c
    for m in range(M-1):
        temp_s, temp_c = input().split()
        if not int(temp_c) == c:
            ans = -1
            break

elif M == 0:  # 2桁以上で数字指定無し:10or100
    ans = 10**(N-1)
else:  # 2桁以上かつ数字指定有り:指定された数字から答えを出す
    # ただし、1桁目についての指定で追加処理
    ans_exist = True  # 矛盾なく答えが存在するか
    guess = []
    for n in range(N):
        guess.append(-1)
        # guess=[-1,-1,-1]
    for m in range(M):
        s, c = input().split()
        s, c = int(s), int(c)

        # すでに別の数字が指定されている時
        if not guess[s-1] == -1 and not guess[s-1] == c:
            ans_exist = False
            break
        # 1桁目に0が指定された時
        elif s == 1 and c == 0:
            ans_exist = False
            break
        else:
            guess[s-1] = c

    # 矛盾なく解が存在するなら指定がある桁を加算
    if ans_exist:
        # 1桁目に指定が無いなら1桁目は1
        ans = 10**(N-1) if guess[0] == -1 else 0
        for n in range(N):
            if not guess[n] == -1:
                ans += guess[n]*(10**(N-1-n))
    else:
        ans = -1

print(ans)
Buggy python submission (verdict: Runtime Error):
word = input().split()

x = 0
i = 0

for i in range(3) :
  if word[i] != word[i+1] : x = x + 1
    
if x == 0 : print("No")

else : print("Yes")

Fixed submission:
word = input()

if word[0:1] == word[1:2] and word[0:1] == word[2:] :
    print("No")
    
else : print("Yes")

Buggy python submission (verdict: Runtime Error):
word = input().split()

x = 0

if word[1] != word[2] :
  x = x+1
  
if word[2] != word[3] :
  x = x+1
  
if word[3] != word[1] :
  x = x+1
  
if x == 0 : print("No")
  
else : print("Yes")

Fixed submission:
word = input()

if word[0:1] == word[1:2] and word[0:1] == word[2:] :
    print("No")
    
else : print("Yes")
Buggy python submission (verdict: Runtime Error):
a,b=map(int,imput().split())
print(a//b+(1-int(a%b==0)))

Fixed submission:
a,b=map(int,input().split())
print(a//b+(1-int(a%b==0)))
Buggy python submission (verdict: Runtime Error):
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
ans = 0
for i in range(N):
  if V[i] > C[i]:
    ans += V[i]-C[i]
print(ans)

Fixed submission:
a,b,t=map(int,input().split())
i=1
ans=0
while i*a<=t+0.5:
    ans+=b
    i+=1
print(ans)

Buggy python submission (verdict: Runtime Error):
a,b,t = input().split()
int(a)
int(b)
int(t)
print(b*(t//a))

Fixed submission:
a,b,t=map(int,input().split())
i=1
ans=0
while i*a<=t+0.5:
    ans+=b
    i+=1
print(ans)

Buggy python submission (verdict: Runtime Error):
a,b,t = input().split()
int(a)
int(b)
int(c)
print(b*(t//a))

Fixed submission:
a,b,t=map(int,input().split())
i=1
ans=0
while i*a<=t+0.5:
    ans+=b
    i+=1
print(ans)

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
t = int(input())
print(((t+0.5)//a)*b)

Fixed submission:
a,b,t=map(int,input().split())
i=1
ans=0
while i*a<=t+0.5:
    ans+=b
    i+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
ans = 0
max = H[0]
for i in range(N-1):
  if H[i] >= max:
    ans += 1
    max = H[i]
print(ans+1)


Fixed submission:
a,b = map(int, input().split())
if a>b:
  ans = 2*a-1
elif a==b:
  ans = 2*a
else:
  ans = 2*b-1
  
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
ans = 0
max = H[1]
for i in range(N-1):
  if H[i+1] >= max:
    ans += 1
    max = H[i+1]
print(ans+1)

Fixed submission:
a,b = map(int, input().split())
if a>b:
  ans = 2*a-1
elif a==b:
  ans = 2*a
else:
  ans = 2*b-1
  
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
ans = 0
for i in range(N-1):
  if H[i+1]>=H[i] and H[1]<=H[i+1] and H[2]<=H[i+1]:
    ans += 1
print(ans+1)

Fixed submission:
a,b = map(int, input().split())
if a>b:
  ans = 2*a-1
elif a==b:
  ans = 2*a
else:
  ans = 2*b-1
  
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
ans = 0
for i in range(N-1):
  if H[i+1] >= H[i]:
    ans += 1
print(ans+1)

Fixed submission:
a,b = map(int, input().split())
if a>b:
  ans = 2*a-1
elif a==b:
  ans = 2*a
else:
  ans = 2*b-1
  
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
ans = 0
max = H[1]
for i in range(N-1):
  if H[i+1] >= max:
    ans += 1
    max = H[i+1]
print(ans+1)

Fixed submission:
N = int(input())
H = list(map(int, input().split()))
ans = 0
max = H[0]
for i in range(N-1):
  if H[i+1] >= max:
    ans += 1
    max = H[i+1]
print(ans+1)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
dishes = [a,b,c,d,e]
n = []
ans = 0
for i in range(5):
  if dishes[i]%10==0:
    ans += dishes[i]//10
  else:
    ans += dishes[i]//10+1
    n.append(dishes[i]%10)
if len(n)==0:
  print(ans*10)
else:
ans = ans*10-10+min(n)
print(ans)

Fixed submission:
a,b,c,d,e,k = list(int(input()) for _ in range(6))
if e-a <= k:
  print('Yay!')
else:
  print(':(')
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())

if a==b & b==c:
    p5 7 5rint("No")
elif a!=b & b!=c & c!=a:
    print("No")
else:
    print("Yes")


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

if a==b & b==c:
    print("No")
elif a!=b & b!=c & c!=a:
    print("No")
else:
    print("Yes")

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

if a==b & b==c:
    p5 7 5rint("No")
elif a!=b & b!=c & c!=a:
    print("No")
else:
    print("Yes")


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

if a==b & b==c:
    print("No")
elif a!=b & b!=c & c!=a:
    print("No")
else:
    print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
import sys
N = int(input())
list = list(map(int, input().split()))
  
for i in range(N):
  for j in range(N-i-1):
    if list[i] == list[j+i+1]:
      print("NO")
      sys.exit()
print("YES")

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



if ((len(list)) == (len(set(list)))) == True:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Time Limit Exceeded):
import sys
N = int(input())
list = list(map(int, input().split()))
  
for i in range(N):
  for j in range(N):
    if i==j:
      continue
    if list[i] == list[j]:
      print("NO")
      sys.exit()
print("YES")

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



if ((len(list)) == (len(set(list)))) == True:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
A = input(int)
B = input(int)

print(6-A-B)

Fixed submission:
A = int(input())
B = int(input())

print(6-A-B)
Buggy python submission (verdict: Runtime Error):
N = int(input())
S, T = map(str, input().split())
T = str(input())

ST = ''

for i in range(N):
  ST += S[i]
  ST += T[i]

print(ST)

Fixed submission:
N = int(input())
S, T = map(str, input().split())

ST = ''

for i in range(N):
  ST += S[i]
  ST += T[i]

print(ST)

Buggy python submission (verdict: Runtime Error):
N = int(input())
S = str(input())
T = str(input())

ST = ''

for i in range(N):
  ST += S[i]
  ST += T[i]

print(ST)

Fixed submission:
N = int(input())
S, T = map(str, input().split())

ST = ''

for i in range(N):
  ST += S[i]
  ST += T[i]

print(ST)

Buggy python submission (verdict: Runtime Error):
N = int(input())
S = str(input())
T = str(input())

for i in range(N):
	ST[i]   = S[i]
  	ST[i+1] = T[i]


Fixed submission:
N = int(input())
S, T = map(str, input().split())

ST = ''

for i in range(N):
  ST += S[i]
  ST += T[i]

print(ST)

Buggy python submission (verdict: Runtime Error):
N = int(input())
S = str(input())
T = str(input())

for i in range(N)
	ST[i]   = S[i]
  	ST[i+1] = T[i]

Fixed submission:
N = int(input())
S, T = map(str, input().split())

ST = ''

for i in range(N):
  ST += S[i]
  ST += T[i]

print(ST)
Buggy python submission (verdict: Runtime Error):
K=int(input())
X=int(input())
if(X<=K*500):
    print("Yes")
else:
   print("No")

Fixed submission:
k,x=(int(a) for a in input().split())
if(x<=k*500):
    print("Yes")
else:
   print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())

S = list(input())

def independent(S):
    if len(S) == 1:
        return True
    else:
        for i in range(len(S) - 1):
            if S[i] == S[i+1]:
                flag = 0
                break
            else:
                flag = 1
        if flag == 1:
            return True
        else:
            return False
                
i = 0
while independent(S) == False:
    if i == len(S) - 1:
        i = 0
    if S[i] == S[i+1]:
        S.pop(i)
    i += 1

print(len(S))


Fixed submission:
N = int(input())

S = list(input())

                
i = 0
while i != len(S) - 1:
    if S[i] == S[i+1]:
        S.pop(i)
    else:
        i += 1
print(len(S))
Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())

lis = []
count = 0

for _ in range(int(input())):
  lis.append(input())
  
for height in lis:
  if height >= K:
    count += 1
    
print(count)
  

Fixed submission:
N,K = map(int,input().split())

lis = []
count = 0

lis = list(map(int,input().split()))
  
for height in lis:
  if height >= K:
    count += 1
    
print(count)
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
lis = list(map(lambda x: -int(x),input().split()))

import heapq
heapq.heapify(lis)
for _ in range(M):
    tmp = -heapq.heappop(lis)
    tmp //= 2
    heapq.heappush(lis,-tmp)

print(-sum(lis))


Fixed submission:

N = int(input())
lis = []
lis = list(map(int,input().split()))
first = [0]*N

for i in range(N):
    num = lis[i] - 1
    first[num] = i

for i in range(N):
    print(first[i]+1,end=' ')
print()

Buggy python submission (verdict: Runtime Error):
N = int(input())

lis = []

lis = list(map(int,input().split()))

first = []*N

for i in range(N):
  num = lis[i]
  first[num] = i
  
for i in range(N):
  print(for _ in first)

Fixed submission:

N = int(input())
lis = []
lis = list(map(int,input().split()))
first = [0]*N

for i in range(N):
    num = lis[i] - 1
    first[num] = i

for i in range(N):
    print(first[i]+1,end=' ')
print()

Buggy python submission (verdict: Runtime Error):
N = int(input())

lis = []

lis = list(map(int,input().split()))

first = []*N

for i in range(N):
  num = lis[i]
  first[num] = i
  
for i in range(N):
  print(first[i],end=' ')

Fixed submission:

N = int(input())
lis = []
lis = list(map(int,input().split()))
first = [0]*N

for i in range(N):
    num = lis[i] - 1
    first[num] = i

for i in range(N):
    print(first[i]+1,end=' ')
print()

Buggy python submission (verdict: Runtime Error):
N = int(input())

lis = []

lis = list(map(int,input().split()))

first = []*N

for i in range(N):
  num = lis[i] - 1
  first[num] = i + 1
  
for i in range(N):
  print(first[i],end=' ')

Fixed submission:

N = int(input())
lis = []
lis = list(map(int,input().split()))
first = [0]*N

for i in range(N):
    num = lis[i] - 1
    first[num] = i

for i in range(N):
    print(first[i]+1,end=' ')
print()

Buggy python submission (verdict: Runtime Error):
N = int(input())

lis = []

lis = list(map(int,input().split()))

first = []*N

for i in range(N):
  num = lis[i]
  first[num] = i + 1
  
for i in range(N):
  print(first[i],end=' ')

Fixed submission:

N = int(input())
lis = []
lis = list(map(int,input().split()))
first = [0]*N

for i in range(N):
    num = lis[i] - 1
    first[num] = i

for i in range(N):
    print(first[i]+1,end=' ')
print()

Buggy python submission (verdict: Runtime Error):
N = int(input())

lis = []

lis = list(map(int,input().split()))

first = []

for i in range(N):
  num = lis[i]
  first[num] = i + 1
  
for i in range(N):
  print(first[i],end=' ')

Fixed submission:

N = int(input())
lis = []
lis = list(map(int,input().split()))
first = [0]*N

for i in range(N):
    num = lis[i] - 1
    first[num] = i

for i in range(N):
    print(first[i]+1,end=' ')
print()

Buggy python submission (verdict: Runtime Error):
N = int(input())

lis = []

lis = list(map(int,input().split()))

first = []

for i in range(N):
  first[lis[i]] = i + 1
  
for i in range(N):
  print(first[i],end=' ')

Fixed submission:

N = int(input())
lis = []
lis = list(map(int,input().split()))
first = [0]*N

for i in range(N):
    num = lis[i] - 1
    first[num] = i

for i in range(N):
    print(first[i]+1,end=' ')
print()
Buggy python submission (verdict: Runtime Error):
S = input()
lis = list(S)


for i in range(len(lis)):
    if i % 2 == 0:
        if lis[i] == 'R' or lis[i] == 'U' or lis[i] == 'D':
            flag_o = 1
        else:
            flag_o = 0
            break
    if i % 2 != 0:
        if lis[i] == 'L' or lis[i] == 'U' or lis[i] == 'D':
            flag_e = 1
        else:
            flag_e = 0
            break
        
if flag_o == 1 and flag_e == 1:
    print('Yes')
else:
    print('No')


Fixed submission:
S = input()
lis = list(S)
count = 0

for i in range(len(lis)):
    if i % 2 == 0:
        if lis[i] == 'R':
            count += 1
    if i % 2 != 0:
        if lis[i] == 'L':
            count += 1

    if lis[i] == 'U' or lis[i] == 'D':
        count += 1

if count == len(lis):
    print('Yes')
else:
    print('No')

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

for i in range(len(lis)):
    if i % 2 == 0:
        if lis[i] == 'R' or lis[i] == 'U' or lis[i] == 'D':
            flag_o = 1
        else:
            flag_o = 0
            break
    if i % 2 != 0:
        if lis[i] == 'L' or lis[i] == 'U' or lis[i] == 'D':
            flag_e = 1
        else:
            flag_e = 0
            break
        
if flag_o == 1 and flag_e == 1:
    print('Yes')
else:
    print('No')


Fixed submission:
S = input()
lis = list(S)
count = 0

for i in range(len(lis)):
    if i % 2 == 0:
        if lis[i] == 'R':
            count += 1
    if i % 2 != 0:
        if lis[i] == 'L':
            count += 1

    if lis[i] == 'U' or lis[i] == 'D':
        count += 1

if count == len(lis):
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
N,K,Q = map(int,input().split())

lis = []
for _ in range(Q):
    lis.append(int(input()))

point = [K] * N

for i in range(Q):
    num = lis[i]
    point[num-1] += 1

    for j in range(N):
        point[j] -= 1



for i in range(N):
    if point[i] > 0:
        print('Yes')
    else:
        print('No')

Fixed submission:
N,K,Q = map(int,input().split())

lis = []
for _ in range(Q):
    lis.append(int(input()))

point = [K] * N

for i in range(Q):
    num = lis[i]
    point[num-1] += 1

for j in range(N):
    point[j] -= Q



for i in range(N):
    if point[i] > 0:
        print('Yes')
    else:
        print('No')

Buggy python submission (verdict: Runtime Error):
N,K,Q = map(int,input().split())

lis = []
point = []

for i in range(N+1):
    point[i] = K

for x in range(int(input())):
    lis.append(input())

for i in lis:
    for j in range(N+1):
        if i == j :
            point[j] += 1
        else:
            point[i] -= 1

for i in range(N+1):
    if point[i] >= 1:
        print("Yes")
    else:
        print("No")


Fixed submission:
N,K,Q = map(int,input().split())

lis = []
for _ in range(Q):
    lis.append(int(input()))

point = [K] * N

for i in range(Q):
    num = lis[i]
    point[num-1] += 1

for j in range(N):
    point[j] -= Q



for i in range(N):
    if point[i] > 0:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input()split())
lis = list(map(lambda x: -int(x),input().split()))

import heapq
heapq.heapify(lis)
for _ in range(M):
    tmp = -heapq.heappop(lis)
    tmp //= 2
    heapq.heappush(lis,-tmp)

print(-sum(lis))


Fixed submission:
N,M = map(int,input().split())
lis = list(map(lambda x: -int(x),input().split()))

import heapq
heapq.heapify(lis)
for _ in range(M):
    tmp = -heapq.heappop(lis)
    tmp //= 2
    heapq.heappush(lis,-tmp)

print(-sum(lis))

Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())

lis = list(map(int,input().split()))

while M > 0:
    num = lis.index(max(lis))
    lis[num] = int(lis[num] / 2)
    M -= 1

sum = 0

for i in range(len(lis)):
    sum += lis[i]
print(sum)

Fixed submission:
N,M = map(int,input().split())
lis = list(map(lambda x: -int(x),input().split()))

import heapq
heapq.heapify(lis)
for _ in range(M):
    tmp = -heapq.heappop(lis)
    tmp //= 2
    heapq.heappush(lis,-tmp)

print(-sum(lis))
Buggy python submission (verdict: Time Limit Exceeded):
import copy



N = int(input())
A = [int(input()) for i in range(N)]

for i in range(N):
   # B = copy.deepcopy(A)
    tmp = A[i]
    A[i] = 0
    ans = max(A)
    A[i] = tmp
    print(ans)
             


Fixed submission:
N = int(input())
A = [int(input()) for i in range(N)]
B = [ [0] * 2 for i in range(N)]

for i in range(N):
    B[i][0] = A[i]
    B[i][1] = i

B.sort(reverse=True)
for i in range(N):
    if B[0][1] == i:
        print(B[1][0])
    else:
        print(B[0][0])

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



N = int(input())
A = [int(input()) for i in range(N)]

for i in range(N):
   # B = copy.deepcopy(A)
    tmp = A[i]
    a[i] = 0
    ans = max(A)
    a[i] = tmp
    print(ans)
             


Fixed submission:
N = int(input())
A = [int(input()) for i in range(N)]
B = [ [0] * 2 for i in range(N)]

for i in range(N):
    B[i][0] = A[i]
    B[i][1] = i

B.sort(reverse=True)
for i in range(N):
    if B[0][1] == i:
        print(B[1][0])
    else:
        print(B[0][0])

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

N = int(input())
A = [int(input()) for i in range(N)]

for i in range(N):
    B = copy.deepcopy(A)
    B[i] = 0
    ans = max(B)
    print(ans)


Fixed submission:
N = int(input())
A = [int(input()) for i in range(N)]
B = [ [0] * 2 for i in range(N)]

for i in range(N):
    B[i][0] = A[i]
    B[i][1] = i

B.sort(reverse=True)
for i in range(N):
    if B[0][1] == i:
        print(B[1][0])
    else:
        print(B[0][0])
Buggy python submission (verdict: Runtime Error):
(a, b, c)=list(int, input().split())
s=a*b/2
print(s)


Fixed submission:
a,b,c = [int(x) for x in input().split()]
s = int(a * b / 2)
print(s)