#include <functional> #include <queue> class Solution { private: priority_queue<int,vector<int>,less<int>> max; //大顶堆 priority_queue<int,vector<int>,greater<int>> min; //小顶堆 //此处容易出错,大顶堆是降序,应选less,小顶堆是升序,选greater public: void Insert(int...