Replies: 9 comments 1 reply
-
点分树 |
Beta Was this translation helpful? Give feedback.
-
3806洛谷RE? |
Beta Was this translation helpful? Give feedback.
-
我交了一个pr修复了,就是因为如果路径太大的话会数组越界 |
Beta Was this translation helpful? Give feedback.
-
例题:点分治1 |
Beta Was this translation helpful? Give feedback.
-
我感觉这里的点分治的核心其实就是树的重心,如果了解了树的重心的做法其实就知道怎么做了,不如归类到“树的重心”那一篇? |
Beta Was this translation helpful? Give feedback.
-
有个被外国人叫作 |
Beta Was this translation helpful? Give feedback.
-
例题1参考代码的第68行是不是多余的? |
Beta Was this translation helpful? Give feedback.
-
不需要计算两次 calcsiz。虽然说第二次 calcsiz 是为了算出重心的父节点连通块的大小,但实际上在求重心的时候,可以额外记录重心的父节点,这样后面遍历重心邻居时,可以特判邻居是父节点的情况,用 sum-sz[rt] 就可以算出父节点连通块的大小了。 |
Beta Was this translation helpful? Give feedback.
-
对于点分治过程中计算 dis 时为什么单轮复杂度不会达到 |
Beta Was this translation helpful? Give feedback.
-
https://oi-wiki.org/graph/tree-divide/
Beta Was this translation helpful? Give feedback.
All reactions