Buggy python submission (verdict: Time Limit Exceeded):
import heapq
 
N,M = map(int,input().split())
Price_List = list(map(lambda x:x*(-1),map(int,input().split())))
heapq.heapify(Price_List)
for i in range(M):
    heapq.heapify(Price_List)
    val = heapq.heappop(Price_List)* -1 // 2 * -1
    heapq.heappush(Price_List,val)
print(-sum(Price_List))

Fixed submission:
import bisect
 
N,M = map(int,input().split())
Price_List = list(map(int,input().split()))
Price_List.sort()
for i in range(M):
    New_Price = Price_List.pop(-1)//2
    Price_List.insert(bisect.bisect(Price_List,New_Price),New_Price)
print(sum(Price_List))

Buggy python submission (verdict: Time Limit Exceeded):
import bisect
 
N,M = map(int,input().split())
Price_List = list(map(int,input().split()))
Price_List.sort()
for i in range(M):
    New_Price = Price_List.pop(-1)//2
    Price_List.insert(bisect.bisect(Price_List,New_Price),New_Price)
print(sum(Price_List))

Fixed submission:
import bisect
 
N,M = map(int,input().split())
Price_List = list(map(int,input().split()))
Price_List.sort()
for i in range(M):
    New_Price = Price_List.pop(-1)//2
    Price_List.insert(bisect.bisect(Price_List,New_Price),New_Price)
print(sum(Price_List))

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

N,M = map(int,input().split())
Price_List = list(map(int,input().split()))
Price_List.sort()
for i in range(M):
    New_Price = Price_List.pop(-1)
    Price_List.insert(bisect.bisect(Price_List,New_Price//2),New_Price//2)
print(sum(Price_List))


Fixed submission:
import bisect
 
N,M = map(int,input().split())
Price_List = list(map(int,input().split()))
Price_List.sort()
for i in range(M):
    New_Price = Price_List.pop(-1)//2
    Price_List.insert(bisect.bisect(Price_List,New_Price),New_Price)
print(sum(Price_List))

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

def ceil_number(n):
    return math.floor(n)

N,M = map(int,input().split())
Price_List = sorted(list(map(int,input().split())))
for i in range(M):
    New_Price = Price_List.pop(-1)
    Price_List.insert(bisect.bisect(Price_List,New_Price//2),New_Price//2)
print(sum(Price_List))


Fixed submission:
import bisect
 
N,M = map(int,input().split())
Price_List = list(map(int,input().split()))
Price_List.sort()
for i in range(M):
    New_Price = Price_List.pop(-1)//2
    Price_List.insert(bisect.bisect(Price_List,New_Price),New_Price)
print(sum(Price_List))

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

N,M = map(int,input().split())
Price_List = list(map(lambda x:x*(-1),map(int,input().split())))
heapq.heapify(Price_List)
for i in range(M):
    heapq.heapify(Price_List)
    val = heapq.heappop(Price_List)* -1 // 2 * -1
    heapq.heappush(Price_List,val)
print(-sum(Price_List))

Fixed submission:
import bisect
 
N,M = map(int,input().split())
Price_List = list(map(int,input().split()))
Price_List.sort()
for i in range(M):
    New_Price = Price_List.pop(-1)//2
    Price_List.insert(bisect.bisect(Price_List,New_Price),New_Price)
print(sum(Price_List))

Buggy python submission (verdict: Runtime Error):
import math
import heapq

N,M = map(int,input().split())
Price_List = list(map(lambda x:x*(-1),map(int,input().split())))
heapq.heapify(Price_List)
for i in range(M):
    heapq.heapify(Price_List)
    val = heapq.heappop(Price_List)* -1 // 2 * -1
    heapq.heappush(Price_List,val)
    print(Price_List)
print(-sum(Price_List))

Fixed submission:
import bisect
 
N,M = map(int,input().split())
Price_List = list(map(int,input().split()))
Price_List.sort()
for i in range(M):
    New_Price = Price_List.pop(-1)//2
    Price_List.insert(bisect.bisect(Price_List,New_Price),New_Price)
print(sum(Price_List))

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

N,M = map(int,input().split())
Price_List = list(map(lambda x:x*(-1),map(int,input().split())))
heapq.heapify(Price_List)
for i in range(M):
    heapq.heapify(Price_List)
    val = heapq.heappop(Price_List)/2
    heapq.heappush(Price_List,val)
print(sum(map(lambda x:math.floor(x*(-1)),Price_List)))

Fixed submission:
import bisect
 
N,M = map(int,input().split())
Price_List = list(map(int,input().split()))
Price_List.sort()
for i in range(M):
    New_Price = Price_List.pop(-1)//2
    Price_List.insert(bisect.bisect(Price_List,New_Price),New_Price)
print(sum(Price_List))

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

def ceil_number(n):
    return math.floor(n)

N,M = map(int,input().split())
Price_List = sorted(list(map(int,input().split())))
for i in range(M):
    New_Price =  Price_List[-1]/2
    Price_List.pop(-1)
    Price_List.insert(bisect.bisect(Price_List,New_Price),New_Price)
print(sum(map(ceil_number,Price_List)))

Fixed submission:
import bisect
 
N,M = map(int,input().split())
Price_List = list(map(int,input().split()))
Price_List.sort()
for i in range(M):
    New_Price = Price_List.pop(-1)//2
    Price_List.insert(bisect.bisect(Price_List,New_Price),New_Price)
print(sum(Price_List))

Buggy python submission (verdict: Time Limit Exceeded):
import math
import bisect
N,M = map(int,input().split())
Price_List = sorted(list(map(int,input().split())))
for i in range(M):
    New_Price =  Price_List[-1]/2
    Price_List.pop(-1)
    Price_List.insert(bisect.bisect(Price_List,New_Price),New_Price)
print(sum(map(lambda x:math.floor(x),Price_List)))

Fixed submission:
import bisect
 
N,M = map(int,input().split())
Price_List = list(map(int,input().split()))
Price_List.sort()
for i in range(M):
    New_Price = Price_List.pop(-1)//2
    Price_List.insert(bisect.bisect(Price_List,New_Price),New_Price)
print(sum(Price_List))

Buggy python submission (verdict: Time Limit Exceeded):
import math
N,M = map(int,input().split())
Price_List = sorted(list(map(int,input().split())))
for i in range(M):
    Price_List[-1] = Price_List[-1]/2
    Price_List = sorted(Price_List)
print(sum(map(lambda x:math.floor(x),Price_List)))

Fixed submission:
import bisect
 
N,M = map(int,input().split())
Price_List = list(map(int,input().split()))
Price_List.sort()
for i in range(M):
    New_Price = Price_List.pop(-1)//2
    Price_List.insert(bisect.bisect(Price_List,New_Price),New_Price)
print(sum(Price_List))

Buggy python submission (verdict: Time Limit Exceeded):
import math
N,M = map(int,input().split())
Price_List = list(map(int,input().split()))
for i in range(M):
    Price_List[Price_List.index(max(Price_List))] = Price_List[Price_List.index(max(Price_List))]/2
print(sum(map(lambda x:math.floor(x),Price_List)))


Fixed submission:
import bisect
 
N,M = map(int,input().split())
Price_List = list(map(int,input().split()))
Price_List.sort()
for i in range(M):
    New_Price = Price_List.pop(-1)//2
    Price_List.insert(bisect.bisect(Price_List,New_Price),New_Price)
print(sum(Price_List))

Buggy python submission (verdict: Time Limit Exceeded):
import math
N,M = map(int,input().split())
Price_List = list(map(int,input().split()))
for i in range(M):
    Price_List[Price_List.index(max(Price_List))] = Price_List[Price_List.index(max(Price_List))]/2
print(sum(map(lambda x:math.floor(x),Price_List)))

Fixed submission:
import bisect
 
N,M = map(int,input().split())
Price_List = list(map(int,input().split()))
Price_List.sort()
for i in range(M):
    New_Price = Price_List.pop(-1)//2
    Price_List.insert(bisect.bisect(Price_List,New_Price),New_Price)
print(sum(Price_List))