Borderou de evaluare (job #3200513)
Utilizator | Data | 4 februarie 2024 21:31:03 | |
---|---|---|---|
Problema | Algoritmul lui Dijkstra | 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:33:20: error: no matching function for call to 'std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >::insert(<brace-enclosed initializer list>)'
33 | a[x].insert({y, c});
| ~~~~~~~~~~~^~~~~~~~
In file included from /usr/include/c++/12.2.1/vector:64,
from /usr/include/c++/12.2.1/functional:62,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:71,
from main.cpp:1:
/usr/include/c++/12.2.1/bits/stl_vector.h:1477:9: note: candidate: 'template<class _InputIterator, class> constexpr std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(const_iterator, _InputIterator, _InputIterator) [with <template-parameter-2-2> = _InputIterator; _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >]'
1477 | insert(const_iterator __position, _InputIterator __first,
| ^~~~~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1477:9: note: template argument deduction/substitution failed:
main.cpp:33:20: note: candidate expects 3 arguments, 1 provided
33 | a[x].insert({y, c});
| ~~~~~~~~~~~^~~~~~~~
In file included from /usr/include/c++/12.2.1/vector:70:
/usr/include/c++/12.2.1/bits/vector.tcc:133:5: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(const_iterator, const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; iterator = std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >::iterator; const_iterator = std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >::const_iterator; value_type = std::pair<int, int>]'
133 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/12.2.1/bits/vector.tcc:133:5: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/12.2.1/bits/stl_vector.h:1388:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(const_iterator, value_type&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; iterator = std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >::iterator; const_iterator = std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >::const_iterator; value_type = std::pair<int, int>]'
1388 | insert(const_iterator __position, value_type&& __x)
| ^~~~~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1388:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/12.2.1/bits/stl_vector.h:1406:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(const_iterator, std::initializer_list<_Tp>) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; iterator = std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >::iterator; const_iterator = std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >::const_iterator]'
1406 | insert(const_iterator __position, initializer_list<value_type> __l)
| ^~~~~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1406:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/12.2.1/bits/stl_vector.h:1432:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(const_iterator, size_type, const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; iterator = std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >::iterator; const_iterator = std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >::const_iterator; size_type = long unsigned int; value_type = std::pair<int, int>]'
1432 | insert(const_iterator __position, size_type __n, const value_type& __x)
| ^~~~~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1432:7: note: candidate expects 3 arguments, 1 provided
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !