riteme.github.io icon indicating copy to clipboard operation
riteme.github.io copied to clipboard

最近公共祖先(LCA) - riteme.site

Open riteme opened this issue 8 years ago • 7 comments

https://riteme.github.io/blog/2016-2-1/lca.html

riteme avatar Jun 20 '17 11:06 riteme

哇!前排膜一个,谢谢大佬的讲解Orz

ghost avatar Nov 29 '17 04:11 ghost

$2 ^ 2 = (10)_2$

这句话有问题吧,不应该是

$2 ^ 2 = (100)_2$

eqvpkbz avatar Sep 07 '19 02:09 eqvpkbz

@eqvpkbz 多谢指出,已经修改。

riteme avatar Sep 10 '19 06:09 riteme

最后一张图可能有点问题: distance=6 f[u,1],f[v,1]都应该改成f[u,0],f[v,0]

gitusercake avatar Nov 17 '22 02:11 gitusercake

@gitusercake

应该没有画错。原意是跳到LCA下面的一个点,所以距离是5

riteme avatar Nov 17 '22 08:11 riteme

请问 LCA(x, y) = LCA(y, x) = ancestor[x] 这一句是否应该改成 LCA(x, y) = LCA(y, x) = ancestor[find(x)],实际测试无法通过

ghost avatar Jan 10 '23 05:01 ghost

@VecTest

你说的对。错的挺明显的 QAQ

现在已经修正了

riteme avatar Jan 11 '23 12:01 riteme