parks.cpp: In function 'void dfs(int)':
parks.cpp:13:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
13 | for(int i=0;i<adj[v].size();i++)
| ~^~~~~~~~~~~~~~
parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:29:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<std::pair<int, int>, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
29 | for(i=1;i<V.size();i++)
| ~^~~~~~~~~
parks.cpp:41:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<std::pair<int, int>, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
41 | for(i=1;i<V.size();i++)
| ~^~~~~~~~~
parks.cpp:52:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
52 | for(i=0;i<v.size();i++)
| ~^~~~~~~~~
parks.cpp:61:21: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
61 | if(_u.size()!=n-1)return 0;
| ~~~~~~~~~^~~~~
parks.cpp:64:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
64 | for(i=0;i<_u.size();i++)
| ~^~~~~~~~~~
parks.cpp:83:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
83 | for(i=0;i<edge.size();i++)par[Find(edge[i].first)]=Find(edge[i].second);
| ~^~~~~~~~~~~~
parks.cpp:85:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
85 | for(i=0;i<edge.size();i++)chk2[Find(edge[i].first)]++;
| ~^~~~~~~~~~~~
parks.cpp:86:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
86 | for(i=0;i<edge.size();i++)
| ~^~~~~~~~~~~~
parks.cpp:101:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
101 | for(i=0;i<_a.size();i++)
| ~^~~~~~~~~~
parks.cpp:107:9: error: 'build' was not declared in this scope
107 | build(_u, _v, _a, _b);
| ^~~~~
parks.cpp:21:15: warning: unused variable 'j' [-Wunused-variable]
21 | int n, i, j, k, a, b;
| ^
parks.cpp:21:18: warning: unused variable 'k' [-Wunused-variable]
21 | int n, i, j, k, a, b;
| ^
parks.cpp:21:21: warning: unused variable 'a' [-Wunused-variable]
21 | int n, i, j, k, a, b;
| ^
parks.cpp:21:24: warning: unused variable 'b' [-Wunused-variable]
21 | int n, i, j, k, a, b;
| ^