![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
STL
QQQQQHY
Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway.
—Tanenbaum, Andrew S. (1989).
展开
-
1063 合并果子 优先队列
优先队列原创 2016-09-13 10:42:28 · 210 阅读 · 0 评论 -
STL-Map
Map原创 2016-08-24 16:22:18 · 201 阅读 · 0 评论 -
树状数组
includeincludeusing namespace std;int c[100010],n,m;int query(int k){ int ans=0; for(int i=k;i>0;i-=i&(-i)) ans+=c[i]; return ans; } void up(int k,int v){ for(int i=k;i<=n原创 2016-09-24 17:11:03 · 142 阅读 · 0 评论 -
set 的使用
set可以插入很多值,去掉重复元素,并可以查找#include<iostream>#include<cstdio>#include<string>#include<set>using namespace std;int main(){ set<string> st; st.clear(); //清空 string nm[]={"abc","david","lucy"原创 2016-09-21 16:53:14 · 187 阅读 · 0 评论 -
STL——Vector Test
一個很典型使用vector的STL程式:原创 2016-10-17 09:34:59 · 489 阅读 · 0 评论 -
STL—stable_partition
#include<algorithm>#include<iostream>using namespace std;int f(char c){ return c>'c'; } int main(){ string s="abcdeedcba"; char c=*(stable_partition(s.begin(),s.end(),f)-1); cout<<s<<原创 2016-10-28 16:24:29 · 249 阅读 · 0 评论 -
STL—transform
#include<algorithm>#include<iostream>#include<cctype>//toupperusing namespace std;//transform(数据起始,结束,写入目标的起始,执行的操作)//遍历一个容器里面元素 然后执行一个操作int f(char c){ return c+1; } int main(){ string s原创 2016-10-28 16:43:42 · 214 阅读 · 0 评论 -
STL标准库中的算法函数
STL标准库中的算法函数转载 2016-10-29 16:36:23 · 206 阅读 · 0 评论