摘要: 树的重心 性质:一个点是重心,等价于,以这个点为根,它的每个子树的大小,都不会超过整个树大小的一半(充要条件) 性质及其证明 POJ3107 模板 这题卡vector 注意判断数组越界 void dfs(int i,int fa){ siz[i]=1; int tmp=0; for(int j=he 阅读全文
posted @ 2024-08-20 21:15 wertyuio1 阅读(78) 评论(0) 推荐(0)