![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
优先队列
余人未至
这个作者很懒,什么都没留下…
展开
-
(优先队列)poj2431Expedition
Description A group of cows grabbed a truck and ventured on an expedition deep into the jungle. Being rather poor drivers, the cows unfortunately managed to run over a rock and puncture the truck's原创 2016-11-19 19:07:18 · 217 阅读 · 0 评论 -
优先队列
头文件: #include 按照由大到小排序的队列 priority_queue que; 按照由小到大排序的队列 加上头文件vector priority_queue, greater > que;以由大到小为例: 最大的元素,即top元素,pque.top();删除元素 pque.pop();插入元素 队列长度 pque.size(); 判断是否为空 qu原创 2016-11-19 19:36:14 · 155 阅读 · 0 评论 -
(贪心(也可用优先队列))poj3253Fence Repair
Description Farmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,000) planks of wood, each having some integer len原创 2016-10-23 15:53:53 · 239 阅读 · 1 评论