随笔分类 - $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
阅读全文
摘要:此题用桶肯定行不通 所以果断选择用$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
阅读全文
摘要:lower_bound( )和upper_bound( )都是利用二分查找的方法在一个排好序的数组中进行查找的。 在从小到大的排序数组中, lower_bound( begin,end,num):从数组的begin位置到end-1位置二分查找第一个大于或等于num的数字,找到返回该数字的地址,不存在
阅读全文
摘要:#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...
阅读全文
摘要:#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...
阅读全文
摘要:#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...
阅读全文
摘要:例题 #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)
阅读全文
摘要:muliset就不提了 muliset 是set的“升级版” ; 定义方法
阅读全文
摘要:#include <list> #include <iostream> #include <cstdio> #include <cctype> using namespace std; typedef long long ll; list < ll > l; inline ll read () {
阅读全文