```1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 ``` ```#include using namespace std; #define pb push_back #define ll long long #define maxn 100005 #define fr(i,j,k) for(int i=j;ig[4005]; vectors[4005]; int sz[4005]; int f[4005]; int mx[4005]; int lb[4005]; int n; int dfs(int now,int pre){ vectorv; for(auto i:g[now]){ if(i!=pre&&lb[i]==lb[now]){ v.pb(dfs(i,now)); } } sort(v.rbegin(),v.rend()); ll ret = 73; for(auto i:v){ ret *= 6171; ret += i; ret %= mod; } return ret; } void dfs3(int x){ for(auto i:g[x]){ if(~lb[i])continue; lb[i] = lb[x]; dfs3(i); } } bool check(int x){ setst; f(n+1){ lb[i] = -1; } lb[x] = 0; int cnt = 0; for(auto i:g[x]){ cnt++; lb[i] = cnt; dfs3(i); } f1(n){ if(lb[i]==1){ st.insert(dfs(i,0)); } } setal; f1(n){ if(lb[i]==1||lb[i]==0||al.count(lb[i]))continue; int ret = dfs(i,0); al.insert(lb[i]); if(!st.count(ret))return 0; } return 1; } int dfs1(int now,int pre){ int cnt = 1; for(auto i:g[now]){ if(i == pre)continue; s[now].pb(dfs1(i,now)); } for(auto i:s[now]){ cnt += i; } s[now].pb(n-cnt); sort(s[now].begin(),s[now].end()); return cnt; } int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cin >> n; f(n-1){ int add1,add2; cin >> add1 >> add2; g[add1].pb(add2); g[add2].pb(add1); } dfs1(1,0); int ans = -1; f1(n){ if(s[i].size()>1&&s[i][0]==s[i].back()){ if(check(i)){ ans = max((int)g[i].size(),ans); } } } cout << ans << endl; } ```
 ```1 2 3 4 5 6 ``` ```Line 23: error: bits/stdc++.h: No such file or directory cc1plus: warnings being treated as errors Line 13: warning: converting to 'int' from 'double' In function 'int dfs(int, int)': Line 23: error: a function-definition is not allowed here before ':' token compilation terminated due to -Wfatal-errors. ```