摘要:
数颜色 点击查看代码 #include<bits/stdc++.h> using namespace std; #define N 300005 #define mid ((l+r)>>1) int n,m,a[N]; int root[N],tot;//根节点,开点个数 int ls[N*25], 阅读全文
摘要:
逆序对 点击查看代码 #include<bits/stdc++.h> using namespace std; #define ls u<<1 #define rs u<<1|1 #define mid ((l+r)>>1) #define LL long long const int N=5000 阅读全文
摘要:
打印机 点击查看代码 #include<bits/stdc++.h> using namespace std; #define mid ((l+r)>>1) const int N=100005; int tot,cnt,root[N]; int ls[N*20],rs[N*20],sum[N*20 阅读全文
摘要:
https://www.luogu.com.cn/problem/P1438 点击查看代码 #include<bits/stdc++.h> using namespace std; #define LL long long #define ls u<<1 #define rs u<<1|1 #def 阅读全文
摘要:
P3919 点击查看代码 #include<bits/stdc++.h> #define N 1000005 #define mid ((l+r)>>1) using namespace std; int n,m,a[N]; int root[N],tot;//根节点,节点个数 int ls[N*2 阅读全文
摘要:
洛谷P1600 点击查看代码 #include<bits/stdc++.h> #define N 500005 #define mid (l+r)/2 using namespace std; int n,m,w[N],ans[N]; vector<int>g[N]; int fa[N][20],d 阅读全文