摘要: 其实还是没怎么懂点分治和点分树,随便写点自己的理解。 点分治1 求两个点的距离公式很明了 $dis(u,v)=d_u+d_v-2\times d_{lca(u,v)}$,其中 $d_x$ 表示根到 $x$ 的距离。距离公式中最不好处理的其实是后面的 $-2\times d_{lca(u,v)}$。 阅读全文
posted @ 2023-03-15 16:43 luo_shen 阅读(31) 评论(0) 推荐(0)