Borderou de evaluare (job #2714758)

Utilizator marius004scarlat marius marius004 Data 2 martie 2021 14:37:45
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 function 'int main()': main.cpp:48:34: error: no matching function for call to 'std::vector<std::tuple<int, int, int> >::push_back(<brace-enclosed initializer list>)' edges.push_back({x, y, c}); ^ In file included from /usr/include/c++/6/vector:64:0, from main.cpp:2: /usr/include/c++/6/bits/stl_vector.h:914:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >; std::vector<_Tp, _Alloc>::value_type = std::tuple<int, int, int>] push_back(const value_type& __x) ^~~~~~~~~ /usr/include/c++/6/bits/stl_vector.h:914:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::tuple<int, int, int>&}' /usr/include/c++/6/bits/stl_vector.h:932:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >; std::vector<_Tp, _Alloc>::value_type = std::tuple<int, int, int>] push_back(value_type&& __x) ^~~~~~~~~ /usr/include/c++/6/bits/stl_vector.h:932:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::tuple<int, int, int> >::value_type&& {aka std::tuple<int, int, int>&&}' main.cpp: In lambda function: main.cpp:52:24: error: no matching function for call to 'get(const std::tuple<int, int, int>&)' return get<2>(a) < get<2>(b); ^ In file included from /usr/include/c++/6/algorithm:60:0, from main.cpp:3: /usr/include/c++/6/utility:202: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>&) get(std::pair<_Tp1, _Tp2>& __in) noexcept ^~~ /usr/include/c++/6/utility:202:5: note: template argument deduction/substitution failed: main.cpp:52:24: note: types 'std::pair<_Tp1, _Tp2>' and 'const std::tuple<int, int, int>' have incompatible cv-qualifiers return get<2>(a) < get<2>(b); ^ In file included from /usr/include/c++/6/algorithm:60:0, from main.cpp:3: /usr/include/c++/6/utility:207: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>&&) get(std::pair<_Tp1, _Tp2>&& __in) noexcept ^~~ /usr/include/c++/6/utility:207:5: note: template argument deduction/substitution failed: main.cpp:52:24: note: types 'std::pair<_Tp1, _Tp2>' and 'const std::tuple<int, int, int>' have incompatible cv-qualifiers return get<2>(a) < get<2>(b); ^ In file included from /usr/include/c++/6/algorithm:60:0, from main.cpp:3: /usr/include/c++/6/utility:212:5: note: candidate: template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr const typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(const std::pair<_Tp1, _Tp2>&) get(const std::pair<_Tp1, _Tp2>& __in) noexcept ^~~ /usr/include/c++/6/utility:212:5: note: template argument deduction/substitution failed: main.cpp:52:24: note: 'const std::tuple<int, int, int>' is not derived from 'const std::pair<_Tp1, _Tp2>' return get<2>(a) < get<2>(b); ^ In file included from /usr/include/c++/6/algorithm:60:0, from main.cpp:3: /usr/include/c++/6/utility:221:5: note: candidate: template<class _Tp, class _Up> constexpr _Tp& std::get(std::pair<_T1, _T2>&) get(pair<_Tp, _Up>& __p) noexcept ^~~ Non zero exit status: 1

Ceva nu functioneaza?