优先队列
文章平均质量分 67
sprite_
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
优先队列的排序写法
1.普通方法: priority_queuequ; 对入队的元素默认按照从大到小排序。 2.自定义优先级: struct cmp{ bool operator()(int x,int y) { return x>y; //从小到大排序。即x小的优先级高。 } }; priority_queue,cmp>qu; 3.对结构体进行重载操作符: struc原创 2015-10-28 21:30:58 · 6317 阅读 · 0 评论 -
hdu5437 Alisha’s Party(优先队列、模拟)
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5437 题目大意:Alisha有k个朋友来他家,每个朋友来是有先后次序的,Alisha会开m次门,每次都是在第t个朋友到了以后,他会邀请p个朋友进家门,原则是邀请所带礼物价值高的朋友先进门,如果两个朋友的礼物价值相同,就叫先到的进门。最后等所有朋友都到了以后,Alisha会把他所有的朋友都叫进原创 2015-09-13 20:21:28 · 794 阅读 · 0 评论 -
2015 Multi-University Training Contest 6
1011 Key Set Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 1476 Accepted Submission(s): 726 Problem Description soda ha原创 2015-08-07 15:31:03 · 674 阅读 · 0 评论 -
Codeforces Gym 100792K King's Rout(优先队列+拓扑排序)
K. King's Rout time limit per test 4 seconds memory limit per test 512 megabytes input standard input output standard output The great rout will be held this evening in原创 2015-10-28 21:02:09 · 1331 阅读 · 0 评论
分享