poj2895】的更多相关文章

题解: splay,维护当前第k大 并查集维护当前集合 合并x,y时,del(num[x]),del(num[y]),insert(num[x]+num[y]) 代码: #include<cstdio> #include<cmath> #include<algorithm> #include<cstring> using namespace std; ; ],fa[N],data[N],root,n,m,x,y,num[N]; void rot(int x)…