Borderou de evaluare (job #3254764)

Utilizator TonyyAntonie Danoiu Tonyy Data 8 noiembrie 2024 18:40:42
Problema Car Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int dijkstra(int, int)': main.cpp:43:19: error: no matching function for call to 'std::priority_queue<std::tuple<int, int, int, int>, std::vector<std::tuple<int, int, int, int> >, std::greater<std::tuple<int, int, int, int> > >::push(<brace-enclosed initializer list>)' 43 | q.push({0, new_x, new_y, d}); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/12.2.1/queue:64, from main.cpp:4: /usr/include/c++/12.2.1/bits/stl_queue.h:738:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::tuple<int, int, int, int>; _Sequence = std::vector<std::tuple<int, int, int, int> >; _Compare = std::greater<std::tuple<int, int, int, int> >; value_type = std::tuple<int, int, int, int>]' 738 | push(const value_type& __x) | ^~~~ /usr/include/c++/12.2.1/bits/stl_queue.h:738:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::priority_queue<std::tuple<int, int, int, int>, std::vector<std::tuple<int, int, int, int> >, std::greater<std::tuple<int, int, int, int> > >::value_type&' {aka 'const std::tuple<int, int, int, int>&'} 738 | push(const value_type& __x) | ~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/12.2.1/bits/stl_queue.h:746:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(value_type&&) [with _Tp = std::tuple<int, int, int, int>; _Sequence = std::vector<std::tuple<int, int, int, int> >; _Compare = std::greater<std::tuple<int, int, int, int> >; value_type = std::tuple<int, int, int, int>]' 746 | push(value_type&& __x) | ^~~~ /usr/include/c++/12.2.1/bits/stl_queue.h:746:25: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::priority_queue<std::tuple<int, int, int, int>, std::vector<std::tuple<int, int, int, int> >, std::greater<std::tuple<int, int, int, int> > >::value_type&&' {aka 'std::tuple<int, int, int, int>&&'} 746 | push(value_type&& __x) | ~~~~~~~~~~~~~^~~ main.cpp:48:19: error: no matching function for call to 'get<1>(const __gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int, int> >, std::tuple<int, int, int, int> >::value_type&)' 48 | x = get<1>(q.top()); | ~~~~~~^~~~~~~~~ In file included from /usr/include/c++/12.2.1/bits/stl_algobase.h:64, from /usr/include/c++/12.2.1/string:50, from /usr/include/c++/12.2.1/bits/locale_classes.h:40, from /usr/include/c++/12.2.1/bits/ios_base.h:41, from /usr/include/c++/12.2.1/ios:42, from /usr/include/c++/12.2.1/istream:38, from /usr/include/c++/12.2.1/fstream:38, from main.cpp:1: /usr/include/c++/12.2.1/bits/stl_pair.h:855: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(pair<_Tp1, _Tp2>&)' 855 | get(pair<_Tp1, _Tp2>& __in) noexcept | ^~~ /usr/include/c++/12.2.1/bits/stl_pair.h:855:5: note: template argument deduction/substitution failed: main.cpp:48:19: note: types 'std::pair<_Tp1, _Tp2>' and 'const __gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int, int> >, std::tuple<int, int, int, int> >::value_type' {aka 'const std::tuple<int, int, int, int>'} have incompatible cv-qualifiers 48 | x = get<1>(q.top()); | ~~~~~~^~~~~~~~~ /usr/include/c++/12.2.1/bits/stl_pair.h:860: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(pair<_Tp1, _Tp2>&&)' 860 | get(pair<_Tp1, _Tp2>&& __in) noexcept | ^~~ /usr/include/c++/12.2.1/bits/stl_pair.h:860:5: note: template argument deduction/substitution failed: main.cpp:48:19: note: types 'std::pair<_Tp1, _Tp2>' and 'const __gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int, int> >, std::tuple<int, int, int, int> >::value_type' {aka 'const std::tuple<int, int, int, int>'} have incompatible cv-qualifiers 48 | x = get<1>(q.top()); | ~~~~~~^~~~~~~~~ /usr/include/c++/12.2.1/bits/stl_pair.h:865: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 pair<_Tp1, _Tp2>&)' 865 | get(const pair<_Tp1, _Tp2>& __in) noexcept | ^~~ /usr/include/c++/12.2.1/bits/stl_pair.h:865:5: note: template argument deduction/substitution failed: main.cpp:48:19: note: 'const __gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int, int> >, std::tuple<int, int, int, int> >::value_type' {aka 'const std::tuple<int, int, int, int>'} is not derived from 'const std::pair<_Tp1, _Tp2>' 48 | x = get<1>(q.top()); | ~~~~~~^~~~~~~~~ Non zero exit status: 1

Ceva nu functioneaza?