Borderou de evaluare (job #2971411)

Utilizator vlad79xVlad79X vlad79x Data 27 ianuarie 2023 11:12:19
Problema Domino Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void dfs(int)': main.cpp:13:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::tuple<int, int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare] 13 | for(int i=0;i<g[nod].size();i++){ | ~^~~~~~~~~~~~~~ main.cpp:15:3: error: 'tie' was not declared in this scope 15 | tie(next, id, side) = g[nod][i]; | ^~~ main.cpp:3:1: note: 'std::tie' is defined in header '<tuple>'; did you forget to '#include <tuple>'? 2 | #include <vector> +++ |+#include <tuple> 3 | main.cpp:18:32: error: no matching function for call to 'swap(__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type&, __gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type&)' 18 | swap(g[nod][i],g[nod].back()); | ^ In file included 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/istream:38, from /usr/include/c++/10/fstream:38, from main.cpp:1: /usr/include/c++/10/bits/move.h:189:5: note: candidate: 'template<class _Tp> std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&)' 189 | swap(_Tp& __a, _Tp& __b) | ^~~~ /usr/include/c++/10/bits/move.h:189:5: note: template argument deduction/substitution failed: 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/istream:38, from /usr/include/c++/10/fstream:38, from main.cpp:1: /usr/include/c++/10/type_traits: In substitution of 'template<bool _Cond, class _Tp> using __enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]': /usr/include/c++/10/type_traits:2195:11: required by substitution of 'template<class ... _Cond> using _Require = std::__enable_if_t<std::__and_< <template-parameter-1-1> >::value> [with _Cond = {std::__not_<std::__is_tuple_like<std::tuple<int, int, int> > >, std::is_move_constructible<std::tuple<int, int, int> >, std::is_move_assignable<std::tuple<int, int, int> >}]' /usr/include/c++/10/bits/move.h:189:5: required by substitution of 'template<class _Tp> std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = std::tuple<int, int, int>]' main.cpp:18:32: required from here /usr/include/c++/10/type_traits:2192:11: error: no type named 'type' in 'struct std::enable_if<false, void>' 2192 | using __enable_if_t = typename enable_if<_Cond, _Tp>::type; | ^~~~~~~~~~~~~ In file included 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/istream:38, from /usr/include/c++/10/fstream:38, from main.cpp:1: /usr/include/c++/10/bits/move.h:213:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> std::__enable_if_t<std::__is_swappable<_Tp>::value> std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm])' 213 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) | ^~~~ /usr/include/c++/10/bits/move.h:213:5: note: template argument deduction/substitution failed: main.cpp:18:32: note: mismatched types '_Tp [_Nm]' and '__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type' {aka 'std::tuple<int, int, int>'} 18 | swap(g[nod][i],g[nod].back()); Non zero exit status: 1

Ceva nu functioneaza?