随笔分类 -  $STL$

STL容器
摘要:前置芝士 :string 的 基本用法 cpp include define rep(i,j,n) for(register int i=j;i=n;i ) define low(x) x&( x) using namespace std ; typedef long long LL ; const 阅读全文
posted @ 2019-04-13 12:53 Isaunoya 阅读(101) 评论(0) 推荐(0) 编辑
摘要:此题用桶肯定行不通 所以果断选择用$MAP$ 不过看标签貌似是$hash$ 反正我用桶做的 ~~~ include define Abs(x) x?x: x define Max(a,b) a b?a:b define Min(a,b) a=n;i ) using namespace std; ty 阅读全文
posted @ 2019-03-26 23:00 Isaunoya 阅读(109) 评论(0) 推荐(0) 编辑
摘要:lower_bound( )和upper_bound( )都是利用二分查找的方法在一个排好序的数组中进行查找的。 在从小到大的排序数组中, lower_bound( begin,end,num):从数组的begin位置到end-1位置二分查找第一个大于或等于num的数字,找到返回该数字的地址,不存在 阅读全文
posted @ 2019-02-03 11:59 Isaunoya 阅读(191) 评论(0) 推荐(0) 编辑
摘要:string 应该是 最常用是STL容器了吧 阅读全文
posted @ 2019-01-31 17:58 Isaunoya 阅读(125) 评论(0) 推荐(0) 编辑
摘要:#include #include #include #include using namespace std; typedef long long ll; queue q; inline ll read () { ll x=0,f=1; char ch=getchar(); while(!isdigit(ch)) { if(ch=='-') f... 阅读全文
posted @ 2019-01-31 12:06 Isaunoya 阅读(180) 评论(0) 推荐(0) 编辑
摘要:#include #include #include #include using namespace std; typedef long long ll; deque d; inline ll read () { ll x=0,f=1; char ch=getchar(); while(!isdigit(ch)) { if(ch=='-') f... 阅读全文
posted @ 2019-01-31 12:05 Isaunoya 阅读(110) 评论(0) 推荐(0) 编辑
摘要:#include #include #include #include using namespace std; typedef long long ll; priority_queue , greater >q; //greater 从小到大排序 //less 从大到小排序 inline ll read () { ll x=0,f=1; char ch=getchar... 阅读全文
posted @ 2019-01-31 12:04 Isaunoya 阅读(115) 评论(0) 推荐(0) 编辑
摘要:例题 #include <bits/stdc++.h> #define rep(i,j,n) for(register int i=j;i<=n;i++) #define Rep(i,j,n) for(register int i=j;i>=n;i--) #define low(x) x&(-x) 阅读全文
posted @ 2019-01-31 11:24 Isaunoya 阅读(179) 评论(0) 推荐(0) 编辑
摘要:muliset就不提了 muliset 是set的“升级版” ; 定义方法 阅读全文
posted @ 2019-01-31 11:22 Isaunoya 阅读(128) 评论(0) 推荐(0) 编辑
摘要:例题 阅读全文
posted @ 2019-01-31 11:22 Isaunoya 阅读(189) 评论(0) 推荐(0) 编辑
摘要:#include <list> #include <iostream> #include <cstdio> #include <cctype> using namespace std; typedef long long ll; list < ll > l; inline ll read () { 阅读全文
posted @ 2019-01-31 11:21 Isaunoya 阅读(69) 评论(0) 推荐(0) 编辑

TOP