题解 | #排序#
排序
https://www.nowcoder.com/practice/508f66c6c93d4191ab25151066cb50ef
import heapq def px(nums:list):#堆排序 ans=[] while nums: heapq.heapify(nums) ans.append(nums[0]) del(nums[0]) return ans n=int(input()) nums=list(map(int,input().split(' '))) ans=px(nums) print(' '.join(map(str,ans)))