会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
N1nEmAn
首页
新随笔
管理
2025年8月1日
并查集
摘要: 并查集 用一个索引代表父节点,如果根一样就是一个集合。查找的时候使用路径压缩提升效率。 #include <iostream> #include <cstring> #include <algorithm> #include <vector> using namespace std; int P[1
阅读全文
posted @ 2025-08-01 20:13 .N1nEmAn
阅读(13)
评论(0)
推荐(0)
公告