traffic.cpp: In function 'int dfs2(int, std::vector<std::vector<int> >&, int*, std::vector<int>&)':
traffic.cpp:19:34: error: cannot convert 'std::vector<std::vector<int> >' to 'int'
19 | dp[nodo]+= dfs(conexion, listaAdy, pop, dp);
| ^~~~~~~~
| |
| std::vector<std::vector<int> >
traffic.cpp:6:24: note: initializing argument 2 of 'void dfs(int, int, std::vector<std::vector<int> >&, std::vector<std::vector<int> >&)'
6 | void dfs(int nodo, int padre, vector<vector<int>>& listaAdy, vector<vector<int>>& lista2){
| ~~~~^~~~~
traffic.cpp: In function 'int LocateCentre(int, int*, int*, int*)':
traffic.cpp:35:18: error: conflicting declaration 'long long int SUM'
35 | long long int SUM = dfs2(0, listaAdy2, pp, dp);
| ^~~
traffic.cpp:27:8: note: previous declaration as 'int SUM'
27 | int SUM = pp[0];
| ^~~
traffic.cpp:37:23: error: 'n' was not declared in this scope
37 | for(int i = 0; i < n; ++i){
| ^
traffic.cpp:40:62: error: no matching function for call to 'max(long long int&, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
40 | mas_concurrida = max(mas_concurrida, dp[conexion]); //lo que viene de cada nodo
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
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 traffic.cpp:2:
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
traffic.cpp:40:62: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
40 | mas_concurrida = max(mas_concurrida, dp[conexion]); //lo que viene de cada nodo
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
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 traffic.cpp:2:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
traffic.cpp:40:62: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
40 | mas_concurrida = max(mas_concurrida, dp[conexion]); //lo que viene de cada nodo
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from traffic.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
3480 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: template argument deduction/substitution failed:
traffic.cpp:40:62: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
40 | mas_concurrida = max(mas_concurrida, dp[conexion]); //lo que viene de cada nodo
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from traffic.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: template argument deduction/substitution failed:
traffic.cpp:40:62: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
40 | mas_concurrida = max(mas_concurrida, dp[conexion]); //lo que viene de cada nodo
| ^
traffic.cpp:42:50: error: 'conexion' was not declared in this scope
42 | ans = min(ans, make_pair(mas_concurrida, conexion));
| ^~~~~~~~