1.优先队列 在库#include<queue>中有模板类priority_queue<>
2.堆有函数在库<algorithm>中,有make_heap(begin,end)、push_heap(begin,end)、pop_heap(begin,end)、sort_heap(begin,end)函数
如int x[11]={87,35,56,48,59,84,42,11,26,66};
make_heap(x,x+10);
1.优先队列 在库#include<queue>中有模板类priority_queue<>
2.堆有函数在库<algorithm>中,有make_heap(begin,end)、push_heap(begin,end)、pop_heap(begin,end)、sort_heap(begin,end)函数
如int x[11]={87,35,56,48,59,84,42,11,26,66};
make_heap(x,x+10);