Borderou de evaluare (job #2957249)
Utilizator | Data | 22 decembrie 2022 07:32:59 | |
---|---|---|---|
Problema | Catun | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'std::vector<int> Solve(const Graph&, const std::vector<int>&)':
main.cpp:34:21: error: 'make_tuple' was not declared in this scope
34 | heap.insert(make_tuple(dists[fort], fort, fort));
| ^~~~~~~~~~
main.cpp:11:1: note: 'std::make_tuple' is defined in header '<tuple>'; did you forget to '#include <tuple>'?
10 | #include <set>
+++ |+#include <tuple>
11 |
main.cpp:38:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
38 | auto [cost, node, fort_id] = *heap.begin();
| ^
main.cpp:38:14: error: 'std::tuple<int, int, int> <structured bindings>' has incomplete type
38 | auto [cost, node, fort_id] = *heap.begin();
| ^~~~~~~~~~~~~~~~~~~~~
main.cpp:45:26: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
45 | for (const auto &[next, cost]: graph[node]) {
| ^
main.cpp:50:29: error: 'make_tuple' was not declared in this scope
50 | heap.insert(make_tuple(dists[next], next, fort_id));
| ^~~~~~~~~~
main.cpp:50:29: note: 'std::make_tuple' is defined in header '<tuple>'; did you forget to '#include <tuple>'?
main.cpp:53:29: error: 'make_tuple' was not declared in this scope
53 | heap.insert(make_tuple(dists[next], next, fort_id));
| ^~~~~~~~~~
main.cpp:53:29: note: 'std::make_tuple' is defined in header '<tuple>'; did you forget to '#include <tuple>'?
In file included from /usr/include/c++/10/bits/stl_list.h:64,
from /usr/include/c++/10/list:63,
from main.cpp:2:
/usr/include/c++/10/ext/aligned_buffer.h: In instantiation of 'struct __gnu_cxx::__aligned_membuf<std::tuple<int, int, int> >':
/usr/include/c++/10/bits/stl_tree.h:231:41: required from 'struct std::_Rb_tree_node<std::tuple<int, int, int> >'
/usr/include/c++/10/bits/stl_tree.h:359:17: required from 'const _Tp& std::_Rb_tree_const_iterator<_Tp>::operator*() const [with _Tp = std::tuple<int, int, int>; std::_Rb_tree_const_iterator<_Tp>::reference = const std::tuple<int, int, int>&]'
main.cpp:38:50: required from here
/usr/include/c++/10/ext/aligned_buffer.h:56:65: error: invalid application of 'sizeof' to incomplete type 'std::tuple<int, int, int>'
56 | alignas(__alignof__(_Tp2::_M_t)) unsigned char _M_storage[sizeof(_Tp)];
| ^~~~~~~~~~~
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:
/usr/include/c++/10/type_traits: In instantiation of 'struct std::is_nothrow_destructible<std::tuple<int, int, int> >':
/usr/include/c++/10/bits/alloc_traits.h:528:41: required from 'static void std::allocator_traits<std::allocator<_CharT> >::destroy(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*) [with _Up = std::tuple<int, int, int>; _Tp = std::_Rb_tree_node<std::tuple<int, int, int> >; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<std::_Rb_tree_node<std::tuple<int, int, int> > >]'
/usr/include/c++/10/bits/stl_tree.h:646:24: required from 'void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_destroy_node(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type) [with _Key = std::tuple<int, int, int>; _Val = std::tuple<int, int, int>; _KeyOfValue = std::_Identity<std::tuple<int, int, int> >; _Compare = std::less<std::tuple<int, int, int> >; _Alloc = std::allocator<std::tuple<int, int, int> >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<std::tuple<int, int, int> >*]'
/usr/include/c++/10/bits/stl_tree.h:654:2: required from 'void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_drop_node(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type) [with _Key = std::tuple<int, int, int>; _Val = std::tuple<int, int, int>; _KeyOfValue = std::_Identity<std::tuple<int, int, int> >; _Compare = std::less<std::tuple<int, int, int> >; _Alloc = std::allocator<std::tuple<int, int, int> >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<std::tuple<int, int, int> >*]'
/usr/include/c++/10/bits/stl_tree.h:1921:4: required from 'void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_erase(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type) [with _Key = std::tuple<int, int, int>; _Val = std::tuple<int, int, int>; _KeyOfValue = std::_Identity<std::tuple<int, int, int> >; _Compare = std::less<std::tuple<int, int, int> >; _Alloc = std::allocator<std::tuple<int, int, int> >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<std::tuple<int, int, int> >*]'
/usr/include/c++/10/bits/stl_tree.h:991:9: required from 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::~_Rb_tree() [with _Key = std::tuple<int, int, int>; _Val = std::tuple<int, int, int>; _KeyOfValue = std::_Identity<std::tuple<int, int, int> >; _Compare = std::less<std::tuple<int, int, int> >; _Alloc = std::allocator<std::tuple<int, int, int> >]'
/usr/include/c++/10/bits/stl_multiset.h:164:7: required from here
/usr/include/c++/10/type_traits:895:52: error: static assertion failed: template argument must be a complete class or an unbounded array
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !