Borderou de evaluare (job #3175489)
Utilizator | Data | 25 noiembrie 2023 21:23:39 | |
---|---|---|---|
Problema | Apm2 | Status | done |
Runda | Arhiva Monthly | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void kruskal(std::vector<int>&, std::vector<int>&, std::vector<std::tuple<int, int, int> >&, std::vector<std::tuple<int, int, int> >&)':
main.cpp:39:28: error: no matching function for call to 'get<1>(__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type&)'
39 | int nod1 = get <1> (edges[i]), nod2 = get <2> (edges[i]), cost = get <0> (edges[i]);
| ~~~~~~~~^~~~~~~~~~
In file included from /usr/include/c++/12.2.1/bits/stl_algobase.h:64,
from /usr/include/c++/12.2.1/string:50,
from /usr/include/c++/12.2.1/bits/locale_classes.h:40,
from /usr/include/c++/12.2.1/bits/ios_base.h:41,
from /usr/include/c++/12.2.1/ios:42,
from /usr/include/c++/12.2.1/ostream:38,
from /usr/include/c++/12.2.1/iostream:39,
from main.cpp:1:
/usr/include/c++/12.2.1/bits/stl_pair.h:855:5: note: candidate: 'template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(pair<_Tp1, _Tp2>&)'
855 | get(pair<_Tp1, _Tp2>& __in) noexcept
| ^~~
/usr/include/c++/12.2.1/bits/stl_pair.h:855:5: note: template argument deduction/substitution failed:
main.cpp:39:28: note: '__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type' {aka 'std::tuple<int, int, int>'} is not derived from 'std::pair<_Tp1, _Tp2>'
39 | int nod1 = get <1> (edges[i]), nod2 = get <2> (edges[i]), cost = get <0> (edges[i]);
| ~~~~~~~~^~~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_pair.h:860:5: note: candidate: 'template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&& std::get(pair<_Tp1, _Tp2>&&)'
860 | get(pair<_Tp1, _Tp2>&& __in) noexcept
| ^~~
/usr/include/c++/12.2.1/bits/stl_pair.h:860:5: note: template argument deduction/substitution failed:
main.cpp:39:28: note: '__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type' {aka 'std::tuple<int, int, int>'} is not derived from 'std::pair<_Tp1, _Tp2>'
39 | int nod1 = get <1> (edges[i]), nod2 = get <2> (edges[i]), cost = get <0> (edges[i]);
| ~~~~~~~~^~~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_pair.h:865:5: note: candidate: 'template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr const typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(const pair<_Tp1, _Tp2>&)'
865 | get(const pair<_Tp1, _Tp2>& __in) noexcept
| ^~~
/usr/include/c++/12.2.1/bits/stl_pair.h:865:5: note: template argument deduction/substitution failed:
main.cpp:39:28: note: '__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type' {aka 'std::tuple<int, int, int>'} is not derived from 'const std::pair<_Tp1, _Tp2>'
39 | int nod1 = get <1> (edges[i]), nod2 = get <2> (edges[i]), cost = get <0> (edges[i]);
| ~~~~~~~~^~~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_pair.h:870:5: note: candidate: 'template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr const typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&& std::get(const pair<_Tp1, _Tp2>&&)'
870 | get(const pair<_Tp1, _Tp2>&& __in) noexcept
| ^~~
/usr/include/c++/12.2.1/bits/stl_pair.h:870:5: note: template argument deduction/substitution failed:
main.cpp:39:28: note: '__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type' {aka 'std::tuple<int, int, int>'} is not derived from 'const std::pair<_Tp1, _Tp2>'
39 | int nod1 = get <1> (edges[i]), nod2 = get <2> (edges[i]), cost = get <0> (edges[i]);
| ~~~~~~~~^~~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_pair.h:879:5: note: candidate: 'template<class _Tp, class _Up> constexpr _Tp& std::get(pair<_T1, _T2>&)'
879 | get(pair<_Tp, _Up>& __p) noexcept
| ^~~
/usr/include/c++/12.2.1/bits/stl_pair.h:879:5: note: template argument deduction/substitution failed:
main.cpp:39:28: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Up> constexpr _Tp& std::get(pair<_T1, _T2>&)'
39 | int nod1 = get <1> (edges[i]), nod2 = get <2> (edges[i]), cost = get <0> (edges[i]);
| ~~~~~~~~^~~~~~~~~~
main.cpp:39:28: note: expected a type, got '1'
/usr/include/c++/12.2.1/bits/stl_pair.h:884:5: note: candidate: 'template<class _Tp, class _Up> constexpr const _Tp& std::get(const pair<_T1, _T2>&)'
884 | get(const pair<_Tp, _Up>& __p) noexcept
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !