摘要: code: #include<bits/stdc++.h>//xfl using namespace std; const int N = 2e5+10; int h[N],ne[N],to[N],siz[N]; int n,num,minn=N; void add(int a,int b){ne[ 阅读全文
posted @ 2020-12-29 16:57 纸上的彩虹 阅读(82) 评论(0) 推荐(0)
摘要: code: #include<bits/stdc++.h>//xfl using namespace std; const int N = 2e4+5; const int maxx = 0x3f3f3f3f; int f[N],o[N],to[N],d[N],n,m,k,v[N]; void fo 阅读全文
posted @ 2020-12-29 16:33 纸上的彩虹 阅读(43) 评论(0) 推荐(0)
摘要: code: #include<bits/stdc++.h> using namespace std; const int N = 2e5+5; int h[N],ne[N],to[N],d[N],num,x,y,n,m; queue<int>q; void add(int u,int v) { ne 阅读全文
posted @ 2020-12-29 16:17 纸上的彩虹 阅读(45) 评论(0) 推荐(0)
摘要: code: #include<bits/stdc++.h>//xfl using namespace std; const int N = 100007; typedef unsigned long long ull; ull mis[N],sum[N]; string s; int n,m,l1, 阅读全文
posted @ 2020-12-27 17:02 纸上的彩虹 阅读(61) 评论(0) 推荐(0)
摘要: code: 1.set或map #include<bits/stdc++.h>//xfl using namespace std; map<int,bool>a; int main() { int n; cin>>n; for(int i=1;i<=n;++i) { int x;char c; ci 阅读全文
posted @ 2020-12-27 16:49 纸上的彩虹 阅读(48) 评论(0) 推荐(0)
摘要: code: #include<bits/stdc++.h> using namespace std; const int N=1000010; int a[N],b[N],k,n,x; int read() { int f=1,ans=0;char c=getchar(); while(c>'9'| 阅读全文
posted @ 2020-12-25 16:20 纸上的彩虹 阅读(66) 评论(0) 推荐(0)
摘要: code: #include<bits/stdc++.h> using namespace std; int a[100010],top; int main() { int n; cin>>n; a[0]=-1; for(int i=1;i<=n;i++) { int x; scanf("%d",& 阅读全文
posted @ 2020-12-25 16:13 纸上的彩虹 阅读(59) 评论(0) 推荐(0)
摘要: 手写code: #include<bits/stdc++.h> #define rint register int using namespace std; int a[100005],n,q; inline int read() { int f=1,ans=0;char c=getchar(); 阅读全文
posted @ 2020-12-18 17:08 纸上的彩虹 阅读(77) 评论(0) 推荐(0)
摘要: 定义i为头指针,j为尾指针,i从a数组开头走到尾是单调的,j同理。 code: #include<bits/stdc++.h>//这是xfl的代码 using namespace std; const int N = 1e5+5; int n,m,x,a[N],b[N]; int read() { 阅读全文
posted @ 2020-12-18 16:40 纸上的彩虹 阅读(52) 评论(0) 推荐(0)
摘要: code: #include<bits/stdc++.h>//xfl using namespace std; const int N = 1e5+5; struct Biao{int v,nxt,pre;}b[N]; int l,r,cnt=1,n,k,x; void add(int k,int 阅读全文
posted @ 2020-12-18 16:28 纸上的彩虹 阅读(66) 评论(0) 推荐(0)