Borderou de evaluare (job #3246819)
Utilizator | Data | 4 octombrie 2024 16:02:54 | |
---|---|---|---|
Problema | Arbore partial de cost minim | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void read()':
main.cpp:47:24: error: no matching function for call to 'std::vector<std::tuple<int, int, int> >::push_back(<brace-enclosed initializer list>)'
47 | edges.push_back({z, x, y});
| ~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/12.2.1/vector:64,
from main.cpp:4:
/usr/include/c++/12.2.1/bits/stl_vector.h:1276:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >; value_type = std::tuple<int, int, int>]'
1276 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1276:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::vector<std::tuple<int, int, int> >::value_type&' {aka 'const std::tuple<int, int, int>&'}
1276 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1293:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >; value_type = std::tuple<int, int, int>]'
1293 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1293:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::tuple<int, int, int> >::value_type&&' {aka 'std::tuple<int, int, int>&&'}
1293 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
main.cpp: In function 'void solve()':
main.cpp:53:5: error: 'sort' was not declared in this scope; did you mean 'short'?
53 | sort(edges.begin(), edges.end());
| ^~~~
| short
main.cpp:56:26: error: no matching function for call to 'get<0>(const std::tuple<int, int, int>&)'
56 | int cost = get<0>(edge), v1 = get<1>(edge), v2 = get<2>(edge);
| ~~~~~~^~~~~~
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:2:
/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:56:26: note: types 'std::pair<_Tp1, _Tp2>' and 'const std::tuple<int, int, int>' have incompatible cv-qualifiers
56 | int cost = get<0>(edge), v1 = get<1>(edge), v2 = get<2>(edge);
| ~~~~~~^~~~~~
/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:56:26: note: types 'std::pair<_Tp1, _Tp2>' and 'const std::tuple<int, int, int>' have incompatible cv-qualifiers
56 | int cost = get<0>(edge), v1 = get<1>(edge), v2 = get<2>(edge);
| ~~~~~~^~~~~~
/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
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !