优先队列priority_queue用法 1 //升序队列,小顶堆 2 priority_queue <int,vector<int>,greater<int> > q; 3 //降序队列,大顶堆 4 priority_queue <int,vector<int>,less<int> >q; 5 //默认大顶堆排序 6 priority_queue<pair<int ,int> >q;