警钟长鸣(并查集)
查看原帖
警钟长鸣(并查集)
1204089
Somusomunia楼主2023/12/15 16:15

并查集查询不要为了贪复杂度进行路径压缩!

否则会 WA on 9 and 10

因为回溯的时候无法回溯被压缩的部分

2023/12/15 16:15
加载中...