Buggy python submission (verdict: Time Limit Exceeded):
import heapq
import math
n,m = map(int,input().split())
lst = [int(x) * (-1) for x in input().split()]
heapq.heapify(lst)
for use_cnt in range(m):
    num = heapq.heappop(lst) * -1
    nxt_num = math.floor(num / 2)
    heapq.heappush(lst,nxt_num * -1)
    if sum(lst) == 0:
        break
print(sum(lst) * (-1))

Fixed submission:
import heapq
import math
n,m = map(int,input().split())
lst = [int(x) * (-1) for x in input().split()]
heapq.heapify(lst)
for use_cnt in range(m):
    num = heapq.heappop(lst) * -1
    nxt_num = math.floor(num / 2)
    heapq.heappush(lst,nxt_num * -1)
print(sum(lst) * (-1))

Buggy python submission (verdict: Time Limit Exceeded):
import heapq
import math
n,m = map(int,input().split())
lst = [int(x) * (-1) for x in input().split()]
heapq.heapify(lst)
for i in range(m):
    num = heapq.heappop(lst) * (-1)
    nxt_num = math.floor(num / 2)
    heapq.heappush(lst,nxt_num * -1)
    if sum(lst) == 0:
        break
print(sum(lst) * (-1))

Fixed submission:
import heapq
import math
n,m = map(int,input().split())
lst = [int(x) * (-1) for x in input().split()]
heapq.heapify(lst)
for use_cnt in range(m):
    num = heapq.heappop(lst) * -1
    nxt_num = math.floor(num / 2)
    heapq.heappush(lst,nxt_num * -1)
print(sum(lst) * (-1))

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

n,m = map(int,input().split())
lst = list(map(int,input().split()))
lst = list(map(lambda x:x*(-1),lst))
heapq.heapify(lst)
for i in range(m):
    num = heapq.heappop(lst) * (-1)
    nxt_num = math.floor(num / 2)
    heapq.heappush(lst,nxt_num * -1)
    if sum(lst) == 0:
        break
print(sum(lst) * (-1))

Fixed submission:
import heapq
import math
n,m = map(int,input().split())
lst = [int(x) * (-1) for x in input().split()]
heapq.heapify(lst)
for use_cnt in range(m):
    num = heapq.heappop(lst) * -1
    nxt_num = math.floor(num / 2)
    heapq.heappush(lst,nxt_num * -1)
print(sum(lst) * (-1))

Buggy python submission (verdict: Time Limit Exceeded):
import heapq
import math
n,m = map(int,input().split())
lst = list(map(int,input().split()))
lst = list(map(lambda x:x*(-1),lst))
heapq.heapify(lst)
for i in range(m):
    num = heapq.heappop(lst)
    num = math.ceil(num / 2)
    heapq.heappush(lst,num)
    if sum(lst) == 0:
        break
print(sum(lst) * (-1))

Fixed submission:
import heapq
import math
n,m = map(int,input().split())
lst = [int(x) * (-1) for x in input().split()]
heapq.heapify(lst)
for use_cnt in range(m):
    num = heapq.heappop(lst) * -1
    nxt_num = math.floor(num / 2)
    heapq.heappush(lst,nxt_num * -1)
print(sum(lst) * (-1))

Buggy python submission (verdict: Time Limit Exceeded):
import heapq
import math
n,m = map(int,input().split())
lst = list(map(int,input().split()))
lst = list(map(lambda x:x*(-1),lst))
heapq.heapify(lst)
for i in range(m):
    num = heapq.heappop(lst)
    num = math.ceil(num / 2)
    heapq.heappush(lst,num)
    if sum(lst) == 0:
        break
print(sum(lst) * (-1))

Fixed submission:
import heapq
import math
n,m = map(int,input().split())
lst = [int(x) * (-1) for x in input().split()]
heapq.heapify(lst)
for use_cnt in range(m):
    num = heapq.heappop(lst) * -1
    nxt_num = math.floor(num / 2)
    heapq.heappush(lst,nxt_num * -1)
print(sum(lst) * (-1))

Buggy python submission (verdict: Time Limit Exceeded):
import bisect 
n,m = map(int,input().split())
lst = sorted(list(map(int,input().split())))
for i in range(m):
    num = lst[-1] // 2
    pos = bisect.bisect_left(lst,num)
    lst = lst[:pos] + [num] + lst[pos:-1]
    if sum(lst) == 0:
        break
print(sum(lst))

Fixed submission:
import heapq
import math
n,m = map(int,input().split())
lst = [int(x) * (-1) for x in input().split()]
heapq.heapify(lst)
for use_cnt in range(m):
    num = heapq.heappop(lst) * -1
    nxt_num = math.floor(num / 2)
    heapq.heappush(lst,nxt_num * -1)
print(sum(lst) * (-1))

Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
lst = sorted(list(map(int,input().split())))
for i in range(m):
    lst[-1] //= 2
    lst.sort()
    if sum(lst) == 0:
        break
print(sum(lst))

Fixed submission:
import heapq
import math
n,m = map(int,input().split())
lst = [int(x) * (-1) for x in input().split()]
heapq.heapify(lst)
for use_cnt in range(m):
    num = heapq.heappop(lst) * -1
    nxt_num = math.floor(num / 2)
    heapq.heappush(lst,nxt_num * -1)
print(sum(lst) * (-1))