Dynamic Ranking 思路: 可持久化树状数组: 代码: #include <bits/stdc++.h> using namespace std; #define maxn 10005 #define maxtot maxn*600 struct QueryType { int l,r,k; ]; }; struct QueryType qu[maxn]; ],root[maxn]; ],numl,posr[],numr,lc[maxtot]; int rc[maxtot],dis…