摘要:
P3368 【模板】树状数组 2 #include<bits/stdc++.h> using namespace std; const int N=5e5+10; int a[N]; int c[N<<2]; int n,m; int lowbit(int x){ return x&-x; } vo 阅读全文
摘要:
P3374 【模板】树状数组 1 #include<bits/stdc++.h> using namespace std; const int N=5e5+10; int n,m; int a[N]; int c[N<<2]; int lowbit(int x){ return x&-x; } vo 阅读全文
摘要:
P3367 【模板】并查集 #include<bits/stdc++.h> using namespace std; const int N=1e4+10; int a[N]; int n,m; int fa[N]; int find(int x){ if(fa[x]==x){ return x; 阅读全文
摘要:
P3372 【模板】线段树 1 #include<bits/stdc++.h> using namespace std; typedef long long ll; const ll N=1e5+10; ll a[N]; struct Node{ ll it; ll l; ll r; ll data 阅读全文