比较裸的树套树,对于区间K值bz上有一道裸题,详见题解http://www.cnblogs.com/BLADEVIL/p/3455336.html(其实题解也不是很详细) //By BLADEVIL type rec =record left, right, root :longint; end; var n, m :longint; a :..] of longint; t :..] of rec; b_left, b_right, b_key :..] of longint; b_size…
#include<cstdio> #include<ctime> #include<cstdlib> #include<iostream> #define M 3000009 using namespace std; struct shu { int l,r,sum1,zhi,dui,sum2; }a[M]; int n,root[M],size,ans,b[M],m; void you(int &a1) { int t=a[a1].l; a[a1]…