heap为堆(列表)
heapq.heapify(heap) :调整heap,使得其满足最小堆
heapq.heappop(heap) :从最小堆中弹出最小的元素
heapq.heappush(heap,item):向最小堆中压入新的元素item
heapq.heappop(heap):将heap的最小值pop出heap,heap为空时报IndexError错误
heapq.heappushpop(heap,item):pop出heap中最小的元素,推入item
heapq.heapreplace(heap,item):pop出最小值,推入item,heap的size不变