0_0_39389365_2671.cpp: In function 'void dfs(int, int, bool)':
0_0_39389365_2671.cpp:11:40: error: 'd1' was not declared in this scope
11 | v!=fa&&(!o?(dfs(v,u,o),d1[v]+w>d1[u]?(d2[u]=d1[u],d1[u]=d1[v]+w):d1[v]+w>d2[u]&&(d2[u]=d1[v]+w)):(d3[v]=max(d3[u]+w,(d1[u]!=d1[v]+w?d1[u]:d2[u])+w),dfs(v,u,o),1));
| ^~
0_0_39389365_2671.cpp:11:55: error: 'd2' was not declared in this scope
11 | v!=fa&&(!o?(dfs(v,u,o),d1[v]+w>d1[u]?(d2[u]=d1[u],d1[u]=d1[v]+w):d1[v]+w>d2[u]&&(d2[u]=d1[v]+w)):(d3[v]=max(d3[u]+w,(d1[u]!=d1[v]+w?d1[u]:d2[u])+w),dfs(v,u,o),1));
| ^~
0_0_39389365_2671.cpp:11:115: error: 'd3' was not declared in this scope
11 | v!=fa&&(!o?(dfs(v,u,o),d1[v]+w>d1[u]?(d2[u]=d1[u],d1[u]=d1[v]+w):d1[v]+w>d2[u]&&(d2[u]=d1[v]+w)):(d3[v]=max(d3[u]+w,(d1[u]!=d1[v]+w?d1[u]:d2[u])+w),dfs(v,u,o),1));
| ^~
0_0_39389365_2671.cpp: In function 'int work()':
0_0_39389365_2671.cpp:15:17: error: 'd1' was not declared in this scope
15 | d1[i]=d2[i]=d3[i]=0;
| ^~
0_0_39389365_2671.cpp:15:23: error: 'd2' was not declared in this scope
15 | d1[i]=d2[i]=d3[i]=0;
| ^~
0_0_39389365_2671.cpp:15:29: error: 'd3' was not declared in this scope
15 | d1[i]=d2[i]=d3[i]=0;
| ^~
0_0_39389365_2671.cpp:21:33: error: 'd1' was not declared in this scope; did you mean 'd'?
21 | d=max(d,d1[i]+d2[i]);
| ^~
| d
0_0_39389365_2671.cpp:21:39: error: 'd2' was not declared in this scope; did you mean 'd'?
21 | d=max(d,d1[i]+d2[i]);
| ^~
| d
0_0_39389365_2671.cpp:22:35: error: 'd3' was not declared in this scope; did you mean 'd'?
22 | max(d1[i],d3[i])<r&&(r=max(d1[i],d2[i]),x=i);
| ^~
| d
|