highway.cpp: In function 'void initdfs(int, int)':
highway.cpp:21:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
21 | for(auto [v,edge] : g[u])
| ^
highway.cpp: In function 'int onpath(int, int)':
highway.cpp:36:18: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
36 | for(auto [v,edge]:g[u])
| ^
highway.cpp:44:18: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
44 | for(auto [v,edge]:g[u])
| ^
highway.cpp: In function 'void markdfs(int, bool)':
highway.cpp:59:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
59 | for(auto [v,edge]:g[u])
| ^
highway.cpp: In function 'void leavesdfs(int)':
highway.cpp:67:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
67 | for(auto [v,edge]:g[u])
| ^
highway.cpp:73:15: error: expected ')' before 'g'
73 | if(u!=root g[u].size()==1)leaves.push_back(u);
| ~ ^~
| )
highway.cpp: In function 'void solve(int, int, int)':
highway.cpp:117:5: error: reference to 'ends' is ambiguous
117 | ends.push_back(rec(0,leaves.size()-1,cnt));
| ^~~~
In file included from /usr/include/c++/10/iostream:39,
from highway.cpp:2:
/usr/include/c++/10/ostream:693:5: note: candidates are: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::ends(std::basic_ostream<_CharT, _Traits>&)'
693 | ends(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
highway.cpp:17:12: note: 'std::vector<int> ends'
17 | vector<int>ends;
| ^~~~
highway.cpp: In function 'void find_pair(int, std::vector<int>, std::vector<int>, int, int)':
highway.cpp:164: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]
164 | for(int i=0;i<g[root].size();i++)
| ~^~~~~~~~~~~~~~~
highway.cpp:170: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]
170 | for(int i=0;i<g[root].size();i++)
| ~^~~~~~~~~~~~~~~
highway.cpp:177:9: error: reference to 'ends' is ambiguous
177 | ends.push_back(root);
| ^~~~
In file included from /usr/include/c++/10/iostream:39,
from highway.cpp:2:
/usr/include/c++/10/ostream:693:5: note: candidates are: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::ends(std::basic_ostream<_CharT, _Traits>&)'
693 | ends(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
highway.cpp:17:12: note: 'std::vector<int> ends'
17 | vector<int>ends;
| ^~~~
highway.cpp:185:12: error: reference to 'ends' is ambiguous
185 | answer(ends[0],ends[1]);
| ^~~~
In file included from /usr/include/c++/10/iostream:39,
from highway.cpp:2:
/usr/include/c++/10/ostream:693:5: note: candidates are: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::ends(std::basic_ostream<_CharT, _Traits>&)'
693 | ends(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
highway.cpp:17:12: note: 'std::vector<int> ends'
17 | vector<int>ends;
| ^~~~
highway.cpp:185:20: error: reference to 'ends' is ambiguous
185 | answer(ends[0],ends[1]);
| ^~~~
In file included from /usr/include/c++/10/iostream:39,
from highway.cpp:2:
/usr/include/c++/10/ostream:693:5: note: candidates are: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::ends(std::basic_ostream<_CharT, _Traits>&)'
693 | ends(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
highway.cpp:17:12: note: 'std::vector<int> ends'
17 | vector<int>ends;
| ^~~~