比方说要维护距离根节点的深度,那么怎么做?
是 dep[poi]=dep[fa[poi]]+边权 吗?
dep[poi]=dep[fa[poi]]+边权
然后 bdfs 了一下发现还要在合并的时候还要维护子树大小
怎么做TAT