摘要:
1 #include<iostream> 2 #include<string> 3 #include<iomanip> 4 #include<algorithm> 5 using namespace std; 6 7 #define MAXN 9999 8 #define MAXSIZE 10 9 #define DLEN 4 10 11 class BigNum 12 { 13 private: 14 int a[500]; //可以控制大数的位数 15 int len; //大数长度 16 public: 17 ... 阅读全文
posted @ 2013-03-23 20:05
PegasusWang
阅读(10203)
评论(2)
推荐(2)
摘要:
最近做的ural的题目总是各种错,看了解题报告都是自己没学过的玩意,有点受打击,不过ural的题目质量还是挺好的,多被虐虐有益健康。这一题要是用数组直接超内存,用优先级队列做,刚接触这个,学习一下优先级队列。c++stl头文件声明<queue>, <queue>包括queue和priority_queue, priority_queue就是优先级队列。默认使用vector容器实现。优先级队列容器总是把优先级最高的元素放在队列最前方来保持队列的有序性。假如一次push 1,2,3,4,5,6,则优先级队列中存储的是6,5,4,3,2,1。priority_queue支持的 阅读全文
posted @ 2013-03-23 19:52
PegasusWang
阅读(822)
评论(0)
推荐(0)
浙公网安备 33010602011771号