Village.cpp: In function 'void dfs(int, int)':
Village.cpp:10:5: error: 'x' was not declared in this scope
10 | sz[x] = 1;
| ^
Village.cpp: In function 'void findroot(int, int)':
Village.cpp:29:9: error: 'i' was not declared in this scope
29 | if(sz[i] > (n >> 1)){
| ^
Village.cpp:32:16: error: 'x' was not declared in this scope
32 | findroot(v, x);
| ^
Village.cpp: In function 'void encode(int, int)':
Village.cpp:39:19: error: 'x' was not declared in this scope
39 | for(auto v : adj[x]){
| ^
Village.cpp: In function 'int main()':
Village.cpp:48:14: error: request for member 'begin' in 'posmin', which is of non-class type 'll [100005]' {aka 'long long int [100005]'}
48 | iota(posmin.begin(), posmin.end(), 0);
| ^~~~~
Village.cpp:48:30: error: request for member 'end' in 'posmin', which is of non-class type 'll [100005]' {aka 'long long int [100005]'}
48 | iota(posmin.begin(), posmin.end(), 0);
| ^~~
Village.cpp:49:14: error: request for member 'begin' in 'posmax', which is of non-class type 'll [100005]' {aka 'long long int [100005]'}
49 | iota(posmax.begin(), posmax.end(), 0);
| ^~~~~
Village.cpp:49:30: error: request for member 'end' in 'posmax', which is of non-class type 'll [100005]' {aka 'long long int [100005]'}
49 | iota(posmax.begin(), posmax.end(), 0);
| ^~~