题目: 小G有一棵大树 树可以以任意一个结点作为根 memset可以为结构体赋初值 f[i]表示将i点删掉后最大连通块的大小 tot[i]表示以i为根的子树大小 f[i]=max(n-tot[i],max(tot[k]) k是i的儿子include<bits/stdc++.h> using namespace std;int const N=1e3+7;int n,cnt;int head[N];struct node{ int a,next,len;}edge[N<<1];void add(int x,int y,int len){ edge[++cnt].a =y...