road.cpp: In function 'int main()':
road.cpp:27:34: error: use of 'auto' in lambda parameter declaration only available with '-std=c++14' or '-std=gnu++14'
27 | auto dfs = [&](int u, int p, auto&& dfs) -> void {
| ^~~~
road.cpp: In lambda function:
road.cpp:35:26: error: expression cannot be used as a function
35 | dfs(v, u, dfs);
| ^
road.cpp: In function 'int main()':
road.cpp:44:19: error: no match for call to '(main()::<lambda(int, int, int&&)>) (int, int, main()::<lambda(int, int, int&&)>&)'
44 | dfs(0, -1, dfs);
| ^
road.cpp:27:16: note: candidate: 'main()::<lambda(int, int, int&&)>'
27 | auto dfs = [&](int u, int p, auto&& dfs) -> void {
| ^
road.cpp:27:16: note: no known conversion for argument 3 from 'main()::<lambda(int, int, int&&)>' to 'int&&'
road.cpp:48:21: error: use of 'auto' in lambda parameter declaration only available with '-std=c++14' or '-std=gnu++14'
48 | auto&& dfs2) -> void {
| ^~~~
road.cpp: In lambda function:
road.cpp:60:50: error: wrong number of template arguments (0, should be 1)
60 | sort(paths.begin(), paths.end(), greater<>());
| ^
In file included from /usr/include/c++/10/string:48,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from road.cpp:10:
/usr/include/c++/10/bits/stl_function.h:371:12: note: provided for 'template<class _Tp> struct std::greater'
371 | struct greater : public binary_function<_Tp, _Tp, bool>
| ^~~~~~~
road.cpp:68:23: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
68 | for (auto [k, v] : paths) {
| ^
road.cpp:78:15: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
78 | for (auto [k, v] : paths) {
| ^
road.cpp:88:15: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
88 | for (auto [k, v] : paths) {
| ^
road.cpp:106:19: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
106 | for (auto [k, v] : paths) {
| ^
road.cpp:122:78: error: expression cannot be used as a function
122 | (path_count[v] == count1) ? dfs2(v, u, longest2, count2, dfs2) :
| ^
road.cpp:123:91: error: expression cannot be used as a function
123 | dfs2(v, u, longest1, count1 - path_count[v], dfs2);
| ^
road.cpp:125:50: error: expression cannot be used as a function
125 | dfs2(v, u, longest1, count1, dfs2);
| ^
road.cpp: In function 'int main()':
road.cpp:128:30: error: no match for call to '(main()::<lambda(int, int, ll, ll, int&&)>) (int, int, int, int, main()::<lambda(int, int, ll, ll, int&&)>&)'
128 | }; dfs2(0, -1, 0, 1, dfs2);
| ^
road.cpp:47:17: note: candidate: 'main()::<lambda(int, int, ll, ll, int&&)>'
47 | auto dfs2 = [&](int u, int p, ll parDist, ll parCnt,
| ^
road.cpp:47:17: note: no known conversion for argument 5 from 'main()::<lambda(int, int, ll, ll, int&&)>' to 'int&&'