Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
a=list(map(int,input().split()))

for i in range(m):
  a.sort(reverse=True)
  a[0]=int((a[0]/2)//1)
  
print(sum(a))


Fixed submission:
import heapq as hq
n,m=map(int,input().split())
a=[-int(x) for x in input().split()]
hq.heapify(a)
for i in range(m):
    x=hq.heappop(a)
    x=-x//2
    hq.heappush(a,-x)
 
print(sum(a)*-1)

Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
a=list(map(int,input().split()))

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


Fixed submission:
import heapq as hq
n,m=map(int,input().split())
a=[-int(x) for x in input().split()]
hq.heapify(a)
for i in range(m):
    x=hq.heappop(a)
    x=-x//2
    hq.heappush(a,-x)
 
print(sum(a)*-1)

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):
  a[a.index(max(a))]=math.floor(max(a)/2)
     
print(sum(a))


Fixed submission:
import heapq as hq
n,m=map(int,input().split())
a=[-int(x) for x in input().split()]
hq.heapify(a)
for i in range(m):
    x=hq.heappop(a)
    x=-x//2
    hq.heappush(a,-x)
 
print(sum(a)*-1)

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):
  a=sorted(a,reverse=True)
  a[0]=math.floor(a[0]/2)
     
print(sum(a))


Fixed submission:
import heapq as hq
n,m=map(int,input().split())
a=[-int(x) for x in input().split()]
hq.heapify(a)
for i in range(m):
    x=hq.heappop(a)
    x=-x//2
    hq.heappush(a,-x)
 
print(sum(a)*-1)

Buggy python submission (verdict: Time Limit Exceeded):
import math
n,m=map(int,input().split())
a=list(map(int,input().split()))
ans=0

for i in range(m):
    a=sorted(a,reverse=True)
    a[0]=math.floor(a[0]/2)
     
for j in range(n):
    ans+=a[j]
    
print(ans)


Fixed submission:
import heapq as hq
n,m=map(int,input().split())
a=[-int(x) for x in input().split()]
hq.heapify(a)
for i in range(m):
    x=hq.heappop(a)
    x=-x//2
    hq.heappush(a,-x)
 
print(sum(a)*-1)

Buggy python submission (verdict: Runtime Error):
import math
n,m=int(input().split())
a=list(map(int,inpit().split()))
ans=0

for i in range(m):
  a=sorted(a,reverse=True)
  a[0]=math.floor(a[0]/2)
     
for j in range(n):
  ans+=a[j]
    
print(ans)


Fixed submission:
import heapq as hq
n,m=map(int,input().split())
a=[-int(x) for x in input().split()]
hq.heapify(a)
for i in range(m):
    x=hq.heappop(a)
    x=-x//2
    hq.heappush(a,-x)
 
print(sum(a)*-1)

Buggy python submission (verdict: Runtime Error):
import math
n,m=map(int(input().split()))
a=list(map(int,inpit().split()))
ans=0

for i in range(m):
  a=sorted(a,reverse=True)
  a[0]=math.floor(a[0]/2)
     
for j in range(n):
  ans+=a[j]
    
print(ans)

Fixed submission:
import heapq as hq
n,m=map(int,input().split())
a=[-int(x) for x in input().split()]
hq.heapify(a)
for i in range(m):
    x=hq.heappop(a)
    x=-x//2
    hq.heappush(a,-x)
 
print(sum(a)*-1)

Buggy python submission (verdict: Runtime Error):
import math
n,m=map(int(input().split()))
a=list(map(int,inpit().split()))
ans=0

for i in range(m):
    a=sorted(a,reverse=True)
    a[0]=math.floor(a[0]/2)
     
for j in range(n):
    ans+=a[j]
    
print(ans)

Fixed submission:
import heapq as hq
n,m=map(int,input().split())
a=[-int(x) for x in input().split()]
hq.heapify(a)
for i in range(m):
    x=hq.heappop(a)
    x=-x//2
    hq.heappush(a,-x)
 
print(sum(a)*-1)