Borderou de evaluare (job #2802249)

Utilizator Maria23Dutu Maria Maria23 Data 17 noiembrie 2021 20:44:31
Problema Arbore partial de cost minim Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In member function 'void Graf::adaugaMuchie(const int&, const int&, const int&)': main.cpp:30:26: error: 'make_tuple' was not declared in this scope 30 | muchiiCost.push_back(make_tuple(cost, nod1, nod2)); | ^~~~~~~~~~ main.cpp:4:1: note: 'std::make_tuple' is defined in header '<tuple>'; did you forget to '#include <tuple>'? 3 | #include <vector> +++ |+#include <tuple> 4 | main.cpp: In member function 'void Graf::afisareApm()': main.cpp:62:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare] 62 | for(int i = 0; i < sol.size(); i ++){ | ~~^~~~~~~~~~~~ main.cpp: In member function 'int Graf::Apm(std::vector<std::pair<int, int> >&)': main.cpp:74:5: error: 'sort' was not declared in this scope; did you mean 'qsort'? 74 | sort(muchiiCost.begin(), muchiiCost.end()); | ^~~~ | qsort main.cpp:77:17: error: 'get' was not declared in this scope; did you mean 'getw'? 77 | int x = get<1>(muchiiCost[i]); | ^~~ | getw main.cpp:83:73: error: no matching function for call to 'std::vector<std::pair<int, int> >::push_back(<brace-enclosed initializer list>)' 83 | sol.push_back({get<1>(muchiiCost[i]), get<2>(muchiiCost[i])}); | ^ In file included from /usr/include/c++/10/vector:67, from main.cpp:3: /usr/include/c++/10/bits/stl_vector.h:1187:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]' 1187 | push_back(const value_type& __x) | ^~~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:1187:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const std::pair<int, int>&'} 1187 | push_back(const value_type& __x) | ~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/stl_vector.h:1203:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]' 1203 | push_back(value_type&& __x) | ^~~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:1203:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::pair<int, int> >::value_type&&' {aka 'std::pair<int, int>&&'} 1203 | push_back(value_type&& __x) | ~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/stl_vector.h: In instantiation of 'std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >]': /usr/include/c++/10/bits/stl_vector.h:487:7: required from here /usr/include/c++/10/bits/stl_vector.h:336:35: error: invalid use of incomplete type 'class std::tuple<int, int, int>' 336 | _M_impl._M_end_of_storage - _M_impl._M_start); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/bits/move.h:57, from /usr/include/c++/10/bits/nested_exception.h:40, from /usr/include/c++/10/exception:148, from /usr/include/c++/10/ios:39, from /usr/include/c++/10/ostream:38, from /usr/include/c++/10/iostream:39, from main.cpp:1: Non zero exit status: 1

Ceva nu functioneaza?