Borderou de evaluare (job #3301997)
Utilizator | Data | 1 iulie 2025 23:50:42 | |
---|---|---|---|
Problema | Ciclu hamiltonian 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:24:19: error: 'std::tuple<int, int, int> <structured bindings>' has incomplete type
24 | for (auto [cost, msk, last] : beam) {
| ^~~~~~~~~~~~~~~~~
main.cpp:33:26: warning: comparison of integer expressions of different signedness: 'std::vector<std::tuple<int, int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
33 | if (nbeam.size() > bw) {
| ~~~~~~~~~~~~~^~~~
In file included from /usr/include/c++/12.2.1/vector:64,
from main.cpp:1:
/usr/include/c++/12.2.1/bits/stl_vector.h: In instantiation of 'constexpr std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >; size_type = long unsigned int]':
main.cpp:33:23: required from here
/usr/include/c++/12.2.1/bits/stl_vector.h:988:50: error: invalid use of incomplete type 'class std::tuple<int, int, int>'
988 | { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); }
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12.2.1/bits/stl_algobase.h:64,
from /usr/include/c++/12.2.1/vector:60:
/usr/include/c++/12.2.1/bits/stl_pair.h:90:11: note: declaration of 'class std::tuple<int, int, int>'
90 | class tuple;
| ^~~~~
main.cpp:40:15: error: 'std::tuple<int, int, int> <structured bindings>' has incomplete type
40 | for (auto [cost, msk, last] : beam) {
| ^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12.2.1/bits/stl_pair.h:60:
/usr/include/c++/12.2.1/type_traits: In substitution of 'template<class _Tp, class ... _Args> using __is_nothrow_constructible_impl = std::__bool_constant<__is_nothrow_constructible(_Tp)> [with _Tp = std::tuple<int, int, int>; _Args = {int, int, int}]':
/usr/include/c++/12.2.1/type_traits:1047:12: required from 'struct std::is_nothrow_constructible<std::tuple<int, int, int>, int, int, int>'
/usr/include/c++/12.2.1/bits/alloc_traits.h:513:57: required from 'static constexpr void std::allocator_traits<std::allocator<_Up> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = std::tuple<int, int, int>; _Args = {int, int, int}; _Tp = std::tuple<int, int, int>; allocator_type = std::allocator<std::tuple<int, int, int> >]'
/usr/include/c++/12.2.1/bits/vector.tcc:117:30: required from 'constexpr std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {int, int, int}; _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >; reference = std::tuple<int, int, int>&]'
main.cpp:20:22: required from here
/usr/include/c++/12.2.1/type_traits:1042:25: error: invalid use of incomplete type 'class std::tuple<int, int, int>'
1042 | = __bool_constant<__is_nothrow_constructible(_Tp, _Args...)>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_pair.h:90:11: note: declaration of 'class std::tuple<int, int, int>'
90 | class tuple;
| ^~~~~
/usr/include/c++/12.2.1/type_traits: In instantiation of 'struct std::is_nothrow_constructible<std::tuple<int, int, int>, int, int, int>':
/usr/include/c++/12.2.1/bits/alloc_traits.h:513:57: required from 'static constexpr void std::allocator_traits<std::allocator<_Up> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = std::tuple<int, int, int>; _Args = {int, int, int}; _Tp = std::tuple<int, int, int>; allocator_type = std::allocator<std::tuple<int, int, int> >]'
/usr/include/c++/12.2.1/bits/vector.tcc:117:30: required from 'constexpr std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {int, int, int}; _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >; reference = std::tuple<int, int, int>&]'
main.cpp:20:22: required from here
/usr/include/c++/12.2.1/type_traits:1050:52: error: static assertion failed: template argument must be a complete class or an unbounded array
1050 | static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12.2.1/type_traits:1050:52: note: 'std::__is_complete_or_unbounded<__type_identity<tuple<int, int, int> > >((std::__type_identity<std::tuple<int, int, int> >(), std::__type_identity<std::tuple<int, int, int> >()))' evaluates to false
In file included from /usr/include/c++/12.2.1/ext/alloc_traits.h:34,
from /usr/include/c++/12.2.1/bits/stl_uninitialized.h:64,
from /usr/include/c++/12.2.1/vector:63:
/usr/include/c++/12.2.1/bits/alloc_traits.h: In instantiation of 'static constexpr void std::allocator_traits<std::allocator<_Up> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = std::tuple<int, int, int>; _Args = {int, int, int}; _Tp = std::tuple<int, int, int>; allocator_type = std::allocator<std::tuple<int, int, int> >]':
/usr/include/c++/12.2.1/bits/vector.tcc:117:30: required from 'constexpr std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {int, int, int}; _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >; reference = std::tuple<int, int, int>&]'
main.cpp:20:22: required from here
/usr/include/c++/12.2.1/bits/alloc_traits.h:513:64: error: 'value' is not a member of 'std::is_nothrow_constructible<std::tuple<int, int, int>, int, int, int>'
513 | noexcept(std::is_nothrow_constructible<_Up, _Args...>::value)
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !