Borderou de evaluare (job #2925575)

Utilizator T_george_TGeorge Teodorescu T_george_T Data 15 octombrie 2022 18:41:30
Problema Padure Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:27:32: error: no matching function for call to 'std::deque<std::tuple<int, int, int> >::push_front(<brace-enclosed initializer list>)' 27 | dq.push_front({p1-1,c1-1,0}); | ^ In file included from /usr/include/c++/10/deque:67, from main.cpp:3: /usr/include/c++/10/bits/stl_deque.h:1456:7: note: candidate: 'void std::deque<_Tp, _Alloc>::push_front(const value_type&) [with _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >; std::deque<_Tp, _Alloc>::value_type = std::tuple<int, int, int>]' 1456 | push_front(const value_type& __x) | ^~~~~~~~~~ /usr/include/c++/10/bits/stl_deque.h:1456:36: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const std::tuple<int, int, int>&'} 1456 | push_front(const value_type& __x) | ~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/stl_deque.h:1471:7: note: candidate: 'void std::deque<_Tp, _Alloc>::push_front(std::deque<_Tp, _Alloc>::value_type&&) [with _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >; std::deque<_Tp, _Alloc>::value_type = std::tuple<int, int, int>]' 1471 | push_front(value_type&& __x) | ^~~~~~~~~~ /usr/include/c++/10/bits/stl_deque.h:1471:31: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::deque<std::tuple<int, int, int> >::value_type&&' {aka 'std::tuple<int, int, int>&&'} 1471 | push_front(value_type&& __x) | ~~~~~~~~~~~~~^~~ main.cpp:29:15: error: 'get' was not declared in this scope; did you mean 'getw'? 29 | int x=get<0>(dq.front()),y=get<1>(dq.front()),cost=get<2>(dq.front()); | ^~~ | getw main.cpp:31:12: error: 'cost' was not declared in this scope 31 | if(cost>=dist[x][y]) | ^~~~ main.cpp:31:26: error: 'y' was not declared in this scope 31 | if(cost>=dist[x][y]) | ^ main.cpp:33:17: error: 'y' was not declared in this scope 33 | dist[x][y]=cost; | ^ main.cpp:33:20: error: 'cost' was not declared in this scope 33 | dist[x][y]=cost; | ^~~~ main.cpp:40:30: error: 'make_tuple' was not declared in this scope 40 | dq.push_back(make_tuple(x1,y1,dist[x][y]+1)); | ^~~~~~~~~~ main.cpp:4:1: note: 'std::make_tuple' is defined in header '<tuple>'; did you forget to '#include <tuple>'? 3 | #include <deque> +++ |+#include <tuple> 4 | using namespace std; main.cpp:42:31: error: 'make_tuple' was not declared in this scope 42 | dq.push_front(make_tuple(x1,y1,dist[x][y])); | ^~~~~~~~~~ main.cpp:42:31: note: 'std::make_tuple' is defined in header '<tuple>'; did you forget to '#include <tuple>'? main.cpp:38:15: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else] 38 | if(dist[x]) | ^ In file included from /usr/include/c++/10/deque:67, from main.cpp:3: Non zero exit status: 1

Ceva nu functioneaza?