You are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a new data structure that would be able to return quickly k-th order statistics in the array segment. Th…
主席树基本操作:静态区间第k大 #include<bits/stdc++.h> using namespace std; typedef long long LL; ,MAXN=2e5+,SIZE=MAXN*; int N,M,K; int tmp[MAXN],A[MAXN],rt[MAXN],order[MAXN]; int sz,lson[SIZE],rson[SIZE],sum[SIZE]; int init(int l,int r){ int cur=++sz; if(l<r){…