Albert_Wei @ 2023-06-08 17:05:05
请问为什么是判断
depth[top[u]] < depth[top[v]]
而不是
depth[u] < depth[v]
呢?
by reveal @ 2023-06-08 17:09:27
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
3 10
显然
by yizhiming @ 2023-06-08 17:10:28
@Albert_Wei 因为这个操作是防止
by Albert_Wei @ 2023-06-08 17:10:51
@reveal thx,那请问
depth[top[u]] < depth[top[v]]
怎么证明是正确的?
by Albert_Wei @ 2023-06-08 17:12:59
@yizhiming thx,此贴结