Replies: 18 comments 2 replies
-
完整代码第81行是不是错了呀。。函数名应该是querymax吧 |
Beta Was this translation helpful? Give feedback.
-
请问剖分一次时间复杂度是多少 |
Beta Was this translation helpful? Give feedback.
-
“剖分一次”难道不是指剖分过程吗?是 O(n) 的。 |
Beta Was this translation helpful? Give feedback.
-
dfs1, 第8行if内忘记更新u.hson.size |
Beta Was this translation helpful? Give feedback.
-
u.hson 是一个节点。可以理解成: struct Node
{
int size;
Node* hson;
}; 然后 u.hson.size 就是 |
Beta Was this translation helpful? Give feedback.
-
好的xp 和我的习惯不一样get错了 |
Beta Was this translation helpful? Give feedback.
-
dfs1的代码有问题,如果dep[1] = 0的话,那么就会导致在遍历其邻点时(以2号点为例),遍历2号点的所有出边,然后找到dep=0的1号点,将1号点的dep更新为2 |
Beta Was this translation helpful? Give feedback.
-
子树维护可以讲清楚一点吗?没看出来和树链剖分的关系。 我明白了。整个树链剖分只使用了一棵线段树。 |
Beta Was this translation helpful? Give feedback.
-
建议加入带有换根操作的重链剖分 |
Beta Was this translation helpful? Give feedback.
-
例如 LOJ上的树链剖分模板题 |
Beta Was this translation helpful? Give feedback.
-
重边的定义是不是错了? 如果一个子树 x 的儿子 y 的大小超过了 x 的大小的二分之一,那么 y 是重儿子( (重边的定义如本文现在的样子“定义 重子节点 表示其子节点中子树最大的子结点。”,不影响重链剖分的时间复杂度。) |
Beta Was this translation helpful? Give feedback.
-
+2 润色建议
|
Beta Was this translation helpful? Give feedback.
-
能不能加一条“权值在边上的树链剖分”的条目? |
Beta Was this translation helpful? Give feedback.
-
dfs1中预处理第4行的for循环内有错误,少了个 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
感觉错误有点多。。。 |
Beta Was this translation helpful? Give feedback.
-
能不能把 CF1009F 讲的详细一点呢?qwq |
Beta Was this translation helpful? Give feedback.
-
攻略(长链剖分优化贪心)的链接放错了。 |
Beta Was this translation helpful? Give feedback.
-
https://oi-wiki.org/graph/heavy-light-decomposition/
Beta Was this translation helpful? Give feedback.
All reactions