#include<bits/stdc++.h> using namespace std; const int maxn = 1e6+5; int n,m; int e,begin[maxn],next[maxn],to[maxn],val[maxn]; struct segment_tree{ int l,r,sum,mark; }tree[maxn<<2]; int son[maxn],id[maxn],father[maxn],cnt,deep[maxn],size[maxn]…
卸载:把子树清空: 安装:把自己到$1$的链改为$1$ #include<cstdio> #include<iostream> #include<cstring> #define R register int #define ls (tr<<1) #define rs (tr<<1|1) using namespace std; inline int g() { R ret=,fix=; register :fix; +(ch^); while(…