正文
增加 3 行删除 3 行
46 行未改动4748495051525354555657583 行未改动62636465666768697012 行未改动46 行未改动signed main(){ios::sync_with_stdio(0);cin.tie(0);// freopen("app.in","r",stdin);// freopen("app.out","w",stdout);cin >> n;int u,v;for(int i = 1; i < n; i++){3 行未改动dfs(1,0);dfs(maxIdx,0);cout << dep[maxIdx]-1 << endl;return 0;}```::::12 行未改动46 行未改动4748495051525354555657583 行未改动62636465666768697012 行未改动46 行未改动signed main(){ios::sync_with_stdio(0);cin.tie(0);// freopen("app.in","r",stdin);// freopen("app.out","w",stdout);cin >> n;int u,v;for(int i = 1; i < n; i++){3 行未改动dfs(1,0);dfs(maxIdx,0);cout << dep[maxIdx]-1 << endl;return 0;}```::::12 行未改动