Borderou de evaluare (job #2805762)

Utilizator Maria23Dutu Maria Maria23 Data 21 noiembrie 2021 21:49:03
Problema Parcurgere DFS - componente conexe Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In member function 'void Graf::adaugaMuchieCuCost(const int&, const int&, const int&)': main.cpp:112:26: error: 'make_tuple' was not declared in this scope 112 | muchiiCost.push_back(make_tuple(cost, nod1, nod2)); | ^~~~~~~~~~ main.cpp:8:1: note: 'std::make_tuple' is defined in header '<tuple>'; did you forget to '#include <tuple>'? 7 | #include <numeric> +++ |+#include <tuple> 8 | #include <limits> main.cpp: In member function 'void Graf::dfs(const int&, std::vector<bool>&)': main.cpp:116:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 116 | for (int i = 0; i < listaAd[nod].size(); i++){ | ~~^~~~~~~~~~~~~~~~~~~~~ main.cpp: In member function 'std::vector<int> Graf::bfs(const int&)': main.cpp:146:28: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 146 | for (int i = 0; i < listaAd[nod].size(); i ++){ | ~~^~~~~~~~~~~~~~~~~~~~~ main.cpp: In member function 'void Graf::dfsSortTop(const int&, std::stack<int>&, std::vector<bool>&)': main.cpp:172:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 172 | for (int i = 0; i < listaAd[nod].size(); i++){ | ~~^~~~~~~~~~~~~~~~~~~~~ main.cpp: In member function 'void Graf::dfsCompBiconexe(int, int, std::vector<int>&, std::vector<int>&, std::stack<int>&, std::vector<bool>&, std::vector<std::vector<int> >&)': main.cpp:200:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 200 | for (int i = 0; i < listaAd[nod].size(); i++){ | ~~^~~~~~~~~~~~~~~~~~~~~ main.cpp: In member function 'void Graf::dfsCompTareConexe(int, int&, std::vector<int>&, std::vector<int>&, std::stack<int>&, std::vector<bool>&, std::vector<bool>&, std::vector<std::vector<int> >&)': main.cpp:250:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 250 | for (int i = 0; i < listaAd[nod].size(); i++) { | ~~^~~~~~~~~~~~~~~~~~~~~ main.cpp: In member function 'int Graf::Apm(std::vector<std::pair<int, int> >&)': main.cpp:381:37: error: no matching function for call to 'get<1>(__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type&)' 381 | int x = get<1>(muchiiCost[i]); | ^ In file included from /usr/include/c++/10/algorithm:60, from main.cpp:4: /usr/include/c++/10/utility:223:5: note: candidate: 'template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(std::pair<_Tp1, _Tp2>&)' 223 | get(std::pair<_Tp1, _Tp2>& __in) noexcept | ^~~ /usr/include/c++/10/utility:223:5: note: template argument deduction/substitution failed: main.cpp:381:37: note: '__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type' {aka 'std::tuple<int, int, int>'} is not derived from 'std::pair<_Tp1, _Tp2>' 381 | int x = get<1>(muchiiCost[i]); | ^ In file included from /usr/include/c++/10/algorithm:60, from main.cpp:4: /usr/include/c++/10/utility:228:5: note: candidate: 'template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&& std::get(std::pair<_Tp1, _Tp2>&&)' 228 | get(std::pair<_Tp1, _Tp2>&& __in) noexcept | ^~~ /usr/include/c++/10/utility:228:5: note: template argument deduction/substitution failed: main.cpp:381:37: note: '__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type' {aka 'std::tuple<int, int, int>'} is not derived from 'std::pair<_Tp1, _Tp2>' 381 | int x = get<1>(muchiiCost[i]); | ^ Non zero exit status: 1

Ceva nu functioneaza?