以前还真没用到过
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
using namespace std;
int main()
{
int arr[] = {2,3,4,5,8,2,9};
std::priority_queue<int> data(arr,arr+7);
std::cout<<"count:"<<data.size()<<std::endl;
while(!data.empty())
{
std::cout<<data.top()<<" ";
data.pop();
}
return 0;
}