Qtree4

P4115 Qtree4 题解

P4115 看到单点修改,求全局白色的最远距离,可以使用点分树。 考虑维护这棵点分树,想想树的直径的 dp 求法:\(f_u = \max\{f_v + w(u, v)\}\),答案为 \(\max(f_v+f_{v'})(v,v'\in \{\text{son}_u\})\),\(\{\text{ ......
题解 Qtree4 P4115 Qtree 4115
共1篇  :1/1页 首页上一页1下一页尾页