摘要:
1.long longVC中不能用,codeblocks中 可以#include#includeusing namespace std;int main(){ long long a; scanf("%lld",&a); printf("%lld",a); return 0;}2.__int64VC... 阅读全文
posted @ 2014-08-03 23:34
gongpixin
阅读(409)
评论(0)
推荐(0)
摘要:
思路:哈夫曼树,用优先队列,简单#include#include#includeusing namespace std;int main(){ priority_queue,greater > q;//从小到大 的优先队列 int n; scanf("%d",&n); int l; while(n-... 阅读全文
posted @ 2014-08-03 23:17
gongpixin
阅读(159)
评论(0)
推荐(0)
摘要:
思路:用优先队列 priority_queue,简单两种方式改变队列 的优先级 (默认的是从大到小)#include#include#includeusing namespace std;struct node{ char name[100]; int para; int pri;... 阅读全文
posted @ 2014-08-03 12:00
gongpixin
阅读(194)
评论(0)
推荐(0)
摘要:
关于priority_queue1,关于STL中的priority_queue:确定用top()查看顶部元素时,该元素是具有最高优先级的一个元素. 调用pop()删除之后,将促使下一个元素进入该位置.2,如同stack和queue,priority_queue是一个基于基本序列容器进行构建的适配器,... 阅读全文
posted @ 2014-08-03 10:59
gongpixin
阅读(271)
评论(0)
推荐(0)
浙公网安备 33010602011771号