摘要: #include <iostream> using namespace std; const int N=100005; struct node{ int l,r; //左右儿子 int val; //树的权值 int rnd; //堆的随机值 int size; //子树大小 }tr[N]; in 阅读全文