用priority_queue+double linked list,每一次把堆頂部的元素刪除後更新建結串列 (記得開long long)
程式碼連結: https://hackmd.io/@s8X9EDE7Q-GYSYC0NLPo6g/BkQfRQhmee