#include <cstdio>
#include <iostream>
#include <queue> using namespace std; // 默认是最大堆
// int main()
{
priority_queue<int> heap;
heap.push();
heap.push();
heap.push();
heap.push(); while(!heap.empty())
{
cout<<heap.top()<<endl;
heap.pop();
} // 如何实现最小堆?
priority_queue<int,vector<int>,greater<int>> heap2;
heap2.push();
heap2.push();
heap2.push();
heap2.push();
heap2.push(); while(!heap2.empty())
{
cout<<heap2.top()<<endl;
heap2.pop();
}
return ;
}

最新文章

  1. September 29th 2016 Week 40th Thursday
  2. SQL Server 利用批量(batchsize)提交加快数据生成/导入
  3. maven问题-&quot;resolution will not be reattempted until the update interval of MyRepo has elapsed&quot;
  4. 【BZOJ】3319: 黑白树
  5. 9.DataPager
  6. Mac Please try running this command again as root/Administrator.
  7. scala map
  8. iOS 开发之动画篇 - 从 UIView 动画说起
  9. docker核心概念及centos6下安装
  10. Python_csv电子表格
  11. AI数据分析(三)
  12. 9、Docker私有registry
  13. Treiber Stack介绍
  14. 快速可靠网络传输协议 KCP(转)
  15. ADO.net方法
  16. jQuery中通过$.browser来判断浏览器
  17. 牛客OI赛制测试赛1 题解
  18. Mac下常用按键符号⌘(command)、⌥(option)、⇧(shift)、⇪(caps lock)、⌃(control)、↩(return)、⌅(enter)
  19. C语言中赋值表达式的返回值是什么?
  20. 前端基础HTML

热门文章

  1. Dubbo学习系列之十七(微服务Soul网关)
  2. 【搞定面试官】- Synchronized如何实现同步?锁优化?(1)
  3. 用例建模Use Case Modeling——传感器智能分析引擎
  4. Mongodb 3.2.8: 集群环境搭建
  5. Android View的绘制机制前世今生---前世
  6. 1282 - Leading and Trailing 求n^k的前三位和后三位。
  7. MySQL热机双备之双主同步复制配置
  8. 进阶之路 | 奇妙的Drawable之旅
  9. vscode+php+xdebug Time-out connecting to client (Waited: 200 ms)
  10. opencv —— convexHull 寻找并绘制凸包