HDOJ1026: Use the priority queue to complete the task as well
HDOJ1026: Make the code more readable