题目链接 Solution 主席树水题,连差分的部分都不需要用到. 直接用主席树的结构去存一下就好了. Code #include<bits/stdc++.h> #define mid (l+r)/2 using namespace std; const int maxn=2000008; int T[maxn],tot,n,m; int ch[maxn*10][2]; int a[maxn],id[maxn]; int w[maxn*10],num; int read() { char ch…
Dynamic Rankings Time Limit: 10000MS Memory Limit: 32768KB 64bit IO Format: %lld & %llu Submit Status Description The Company Dynamic Rankings has developed a new kind of computer that is no longer satisfied with the query like to simply find the…