会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
小白QIU
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
3
4
5
6
7
8
下一页
2021年9月27日
单调栈
摘要: #include <iostream>using namespace std;const int N=10010;int stk[N],tt;int n,x;int main(){cin>>n;while(n--){cin>>x;while(tt&&stk[tt]>=x) tt--;if(tt) c
阅读全文
posted @ 2021-09-27 20:56 小白QIU
阅读(27)
评论(0)
推荐(0)
2021年9月3日
lowbit(x):返回x的最后一位一
摘要: x&-x=x&(-x+1) 例题 .二进制中1的个数 #include <iostream>using namespace std; int lowbit(int x) { return x&-x; } int main() {int n;cin>>n;while(n--){int m;cin>>m
阅读全文
posted @ 2021-09-03 20:36 小白QIU
阅读(56)
评论(1)
推荐(0)
2021年5月25日
二维差分模板
摘要: #include <iostream>#include <stdio.h>using namespace std;const int N=10010;int n,m,q;int a[N][N],b[N][N];void insert(int x1,int y1,int x2,int y2,int c
阅读全文
posted @ 2021-05-25 21:34 小白QIU
阅读(81)
评论(0)
推荐(0)
2021年5月16日
差分模板
摘要: #include <iostream>#include <stdio.h>#include <string>using namespace std;const int N=10010;int n,m;int a[N],b[N];void insert(int l,int r,int c){ b[l]
阅读全文
posted @ 2021-05-16 10:51 小白QIU
阅读(70)
评论(0)
推荐(0)
2021年5月14日
除法模板
摘要: #include <iostream>#include <stdio.h>#include <vector>#include <string>#include <algorithm>using namespace std;vector<int> div(vector<int> &A,int b,in
阅读全文
posted @ 2021-05-14 22:19 小白QIU
阅读(39)
评论(0)
推荐(0)
2021年5月13日
二维前缀和模板
摘要: #include <iostream>#include <stdio.h>#include <string>using namespace std;const int N=10010;int n,m,q;int a[N][N],s[N][N];int main(){ scanf("%d%d%d",&
阅读全文
posted @ 2021-05-13 21:49 小白QIU
阅读(61)
评论(0)
推荐(0)
2021年5月12日
乘法模板
摘要: #include <iostream>#include <stdio.h>#include <string>#include <vector>using namespace std;vector<int> mul(vector<int>&A,int b){ vector<int> C; int t=
阅读全文
posted @ 2021-05-12 11:06 小白QIU
阅读(39)
评论(0)
推荐(0)
2021年5月10日
向量容器(vector)
摘要: 向量容器(vector)是一种顺序容器,是一块连续分配的内存,支持随机访问,从数据安排的角度来看,和数组及其相似,数组与vector的区别在于:数组是静态分配空间的大小,一旦分配,就不可以再改变了,例如,int a[6];而vector是动态分配内存,随机元素不断插入,它会按照自身的一套机制不断扩充
阅读全文
posted @ 2021-05-10 20:42 小白QIU
阅读(560)
评论(0)
推荐(0)
减法模板
摘要: #include <iostream>#include <vector>#include <stdio.h> using namespace std;bool cmp(vector<int> &A,vector<int> &B){ if(A.size()!=B.size()) return A.si
阅读全文
posted @ 2021-05-10 20:09 小白QIU
阅读(57)
评论(0)
推荐(0)
2021年5月8日
加法模板
摘要: #include <iostream>#include <vector>#include <stdio.h>#include <string>using namespace std;const int N=1e6+10;vector<int> add(vector<int> &A,vector<in
阅读全文
posted @ 2021-05-08 22:35 小白QIU
阅读(60)
评论(0)
推荐(0)
上一页
1
···
3
4
5
6
7
8
下一页
公告