Borderou de evaluare (job #3254677)
Utilizator | Data | 8 noiembrie 2024 14:45:42 | |
---|---|---|---|
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:37:24: error: no matching function for call to 'std::vector<std::tuple<int, int, int> >::push_back(<brace-enclosed initializer list>)'
37 | edges.push_back({z, x, y});
| ~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/12.2.1/vector:64,
from main.cpp:3:
/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:49:5: error: 'sort' was not declared in this scope; did you mean 'short'?
49 | sort(edges.begin(), edges.end());
| ^~~~
| short
main.cpp:51:21: error: structured binding refers to incomplete type 'const std::tuple<int, int, int>'
51 | for(const auto& [cost, nodeX, nodeY] : edges) {
| ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12.2.1/string:47,
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_iterator.h: In instantiation of 'constexpr __gnu_cxx::__normal_iterator<_Iterator, _Container>& __gnu_cxx::__normal_iterator<_Iterator, _Container>::operator++() [with _Iterator = std::tuple<int, int, int>*; _Container = std::vector<std::tuple<int, int, int> >]':
main.cpp:51:44: required from here
/usr/include/c++/12.2.1/bits/stl_iterator.h:1107:11: error: cannot increment a pointer to incomplete type 'std::tuple<int, int, int>'
1107 | ++_M_current;
| ^~~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_vector.h: In instantiation of 'constexpr std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >]':
/usr/include/c++/12.2.1/bits/stl_vector.h:526:7: required from here
/usr/include/c++/12.2.1/bits/stl_vector.h:367:49: error: invalid use of incomplete type 'class std::tuple<int, int, int>'
367 | _M_impl._M_end_of_storage - _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/string:50:
/usr/include/c++/12.2.1/bits/stl_pair.h:90:11: note: declaration of 'class std::tuple<int, int, int>'
90 | class tuple;
| ^~~~~
In file included from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
from /usr/include/c++/12.2.1/bits/allocator.h:46,
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !