Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Use priority queue to keep track of minimum elements.
Remove the minimum two elements, perform the operation, and insert the resulting number into the priority queue.