Replies: 11 comments 1 reply
-
本页面的运用部分,下属的小标题编号有错误 |
Beta Was this translation helpful? Give feedback.
-
"有带按秩合并的并查集中" 的"有带"是不是多余的? |
Beta Was this translation helpful? Give feedback.
-
小错误,代码上边的那个是标粗,不是标红 |
Beta Was this translation helpful? Give feedback.
-
请问代码第三步回溯的时候是不是有问题? 会把check重新清空 |
Beta Was this translation helpful? Give feedback.
-
“为什么不合并第一步和第三步呢?因为 cnt 数组不能重复使用,否则空间会太大”。即使空间不是问题也不能保留非重儿子对 cnt 的影响啊,不然另非重儿子的答案计算有错 |
Beta Was this translation helpful? Give feedback.
-
是这样的,算法始终保证由fa到一个节点的时候cnt数组是空的 |
Beta Was this translation helpful? Give feedback.
-
数颜色例题加个链接吧https://www.luogu.com.cn/problem/U41492 |
Beta Was this translation helpful? Give feedback.
-
按秩合并是按树高合并吧,我们一般写的是按大小合并。 |
Beta Was this translation helpful? Give feedback.
-
示例代码中 另外,调用时使用 |
Beta Was this translation helpful? Give feedback.
-
U41492 树上数颜色 算法看起来像 树上莫队(不带修改) 的简化版(“左”区间固定值) |
Beta Was this translation helpful? Give feedback.
-
https://oi-wiki.org/misc/dsu-on-tree/
Beta Was this translation helpful? Give feedback.
All reactions