![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM_优先队列
thatTime
这个作者很懒,什么都没留下…
展开
-
优先队列
poj 3253 #include #include using namespace std; priority_queue, greater > q; int n, t; int main() { while(scanf("%d", &n) == 1) { while(!q.empty()) q.pop(); for(int i=1; i<=n;原创 2014-01-21 10:56:42 · 656 阅读 · 0 评论 -
hdu 1242
在使用优先队列时, 不仅可按元素的大小为优先级,在使用结构体时,可通过运算符重载 在其他的博客看到一句话,优先队列是队列和排序的结合,很精辟 本题因为经过守卫和道路时所花的时间不一样,故不能用简单的队列求解,可使用优先队列,到达该点时间少的先出队列 #include #include #include using namespace std; struct node { int x原创 2014-01-22 19:27:28 · 640 阅读 · 0 评论