会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
枯坐SE
管理
2024年3月6日
[AcWing]846. 树的重心 原创
摘要: 算法标签 dfs,树形DP 题目简叙 思路 每次寻找删除节点之后的剩余联通块最大节点 代码 #include<iostream> #include<cstring> using namespace std; const int N=1e5+10; int h[N],e[2*N],ne[2*N],id
阅读全文
posted @ 2024-03-06 00:24 俺叫西西弗斯
阅读(0)
评论(0)
推荐(0)