
STL
文章平均质量分 54
MistKafka
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
STL: <algorithm>中 sort()
/* * void sort(Randomlt first, Randomlt last) * void sort(Randomlt first, Randomlt last, Compare comp) * sort fist to last by ZiDian sort. * the Compare comp is a help funtion */ #include #in原创 2013-04-03 21:58:43 · 666 阅读 · 0 评论 -
STL: <algorithm>中 next_permutation()生成全排列
认识来源:http://blog.youkuaiyun.com/killua_hzl/article/details/3887429 http://www.slyar.com/blog/stl_next_permutation.html /* * bool next_permutation() * like sort() * * how to use: * http://blog.csdn.原创 2013-04-03 22:03:16 · 717 阅读 · 0 评论 -
c++ 栈stack
#include #include using namespace std; #define MAXN 100 int main() { stack sign; char ch; bool ok = true; while (ch = getchar()) { if (ch == '(') { sign.push(ch); }else if (ch == ')')原创 2013-04-01 23:48:36 · 537 阅读 · 0 评论 -
c++队列 queue
1 #include 2 #include 3 #include 4 using namespace std; 5 6 int main() {原创 2013-04-01 23:14:08 · 640 阅读 · 0 评论 -
STL 优先队列 简明使用
定义: 每次top()出来的, 都是队列中优先级最高的。但, 注意, 队列中个元素的相对位置不变。 头文件: 声明方式: priority_queue Name; 注: type 可以是任意类型, 但是非内置类型需要自己写辅助比较函数(重载不行。)建议用重载 接口:top () push () pop () size() empty() 样例:u原创 2013-07-16 16:24:14 · 925 阅读 · 0 评论