Main.cpp: In function 'void dfs(int)':
Main.cpp:12:9: error: 'u' was not declared in this scope
12 | vis[u]=1;
| ^
Main.cpp: In function 'int lca(int, int)':
Main.cpp:33:9: warning: statement has no effect [-Wunused-value]
33 | for(k;k>=0;--k)
| ^
Main.cpp: In function 'int main()':
Main.cpp:76:28: error: 'findset' was not declared in this scope
76 | int k = mx[findset(v)];
| ^~~~~~~
Main.cpp:77:39: error: 'dis' was not declared in this scope; did you mean 'dfs'?
77 | dp[i]=max(dp[i],dp[k]+dis(k,i));
| ^~~
| dfs
Main.cpp:78:17: error: 'unite' was not declared in this scope
78 | unite(v,i);
| ^~~~~