Borderou de evaluare (job #3301998)

Utilizator retrogradLucian Bicsi retrograd Data 1 iulie 2025 23:51: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> it' has incomplete type 24 | for (auto it : beam) { | ^~ main.cpp:25:34: error: 'tie' was not declared in this scope 25 | int cost, msk, last; tie(cost, msk, last) = it; | ^~~ main.cpp:5:1: note: 'std::tie' is defined in header '<tuple>'; did you forget to '#include <tuple>'? 4 | #include <cassert> +++ |+#include <tuple> 5 | main.cpp:34: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] 34 | 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:34: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:41:15: error: 'std::tuple<int, int, int> it' has incomplete type 41 | for (auto it : beam) { | ^~ main.cpp:42:30: error: 'tie' was not declared in this scope 42 | int cost, msk, last; tie(cost, msk, last) = it; | ^~~ main.cpp:42:30: note: 'std::tie' is defined in header '<tuple>'; did you forget to '#include <tuple>'? 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 Non zero exit status: 1

Ceva nu functioneaza?