2020-2021:teams:looking_up_at_the_starry_sky:shenzhonghai:dsu_on_tree
MAIN
主要依据轻重链思想,暴力统计轻儿子对当前节点答案贡献,先递归解决轻儿子并消除影响,再递归重儿子并保留影响用于此节点统计答案。
全局时间复杂度 $O(n\log n)$
2020-2021/teams/looking_up_at_the_starry_sky/shenzhonghai/dsu_on_tree.txt · 最后更改: 2020/09/23 16:03 由 x342333349