宣告priority_queue<int, vector<int>, less<int>> money;
less<int>不打沒關係,預設就是less。用less是讓數字由大到小排
把每個學生的錢存入priority_queue裡。priority_queue.top()就是目前錢剩餘最多的
priority_queue說明:
https://dangerlover9403.pixnet.net/blog/post/197006355-%5B%E6%95%99%E5%AD%B8%5D-priority-queue
本題解答:
https://66lemon66.blogspot.com/2021/01/zerojudge-f631-c.html