摘要: code: #include<bits/stdc++.h>//xfl using namespace std; const int N = 1e5+5; struct Biao{int v,nxt;}b[N]; int h,cnt,n,k,x; void addhead(int x){b[++cnt 阅读全文
posted @ 2020-12-18 15:59 纸上的彩虹 阅读(72) 评论(0) 推荐(0)
摘要: 题目: 双指针+桶优化 code: #include<bits/stdc++.h> using namespace std; const int N=1e5+5; int tong[N],a[N],n; int read() { int f=1,ans=0;char c=getchar(); whi 阅读全文
posted @ 2020-12-18 15:05 纸上的彩虹 阅读(172) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h> using namespace std; const int N = 200000; int a[N],b[N],c[N],s[N]; int n,m; int main() { scanf("%d%d",&n,&m); for(int i=1;i<= 阅读全文
posted @ 2020-12-15 17:07 纸上的彩虹 阅读(71) 评论(0) 推荐(0)
摘要: AcWing.2816判断子序列 用双指针 code: #include<bits/stdc++.h> using namespace std; const int N = 1e5+5; int n,m,a[N],b[N]; int read() { int f=1,ans=0;char c=get 阅读全文
posted @ 2020-12-13 15:58 纸上的彩虹 阅读(81) 评论(0) 推荐(0)