
STL
文章平均质量分 83
安静de想着网名
300字以内
展开
-
c++ STL 容器——联合容器
STL提供了四种联合容器 set,multiset,map,multimap;set and multiset在头文件map and multimap在头文件 模板函数都一样的http://www.cnblogs.com/jinmingyi/p/6798359.htmlset/map中迭代器不能++或--,因为不是连续的序列,是树。set:在set中,值就是关键字,集合中不会有多个相原创 2017-08-10 19:43:35 · 303 阅读 · 0 评论 -
c++ STL 容器——序列
STL中11个容器类型分别是deque,list,queue,priority_queue,stack,vector,map,multimap,set,multiset,bieset(在比特级处理数据的容器,不讨论) 一些基本的容器特征表达式 返回值说明复杂度XX:iterator对应迭代器指针编译时间X u 创建一个名为u的空容器固定X u(a)原创 2017-08-10 19:43:30 · 274 阅读 · 0 评论 -
STL例题
丑数 UVA-136Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, … shows the first 11 ugly numbers. By convention, 1 is included. Write a原创 2017-08-26 18:54:39 · 416 阅读 · 0 评论 -
acm 模板
卢卡斯定理 主席树 Sunday AC自动机 链式前向星#include<string.h>#define MAX 10000struct node{ int to,nex,wei;}edge[MAX*2+5];int head[MAX+5],cnt;void add(int u,int v,int w)//添加一个单向边u->v 权为w {...原创 2017-08-11 17:47:51 · 340 阅读 · 0 评论 -
c++ STL之栈和队列
栈stack-先入后出FILO栈可以理解为一个坑,先掉坑里的被压在下面,等上面的走了才能出来 头文件 入栈 push(某东西);栈顶元素出栈 pop();是否为空 empty(); 空返回1 非空返回0大小 size(); 返回元素个数查看栈顶原创 2017-08-11 18:39:35 · 386 阅读 · 0 评论 -
STL——set
set原创 2017-08-13 12:44:40 · 207 阅读 · 0 评论 -
Origami【栈】
字节跳动冬令营网络赛Chiaki has a very big sheet of paper. This sheet has a form of rectangle with dimensions 1 x n and numbers from 1 to n was written on each small 1 x 1 grid. Chiaki would like to fold the pa...原创 2018-12-01 18:28:58 · 315 阅读 · 0 评论