Borderou de evaluare (job #3341777)
| Utilizator | Data | 20 februarie 2026 21:42:19 | |
|---|---|---|---|
| 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:44:13: error: no matching function for call to 'std::vector<std::vector<std::pair<int, int> > >::resize(int, int)'
44 | a.resize(n+1,2);
| ~~~~~~~~^~~~~~~
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:1008:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::resize(size_type) [with _Tp = std::vector<std::pair<int, int> >; _Alloc = std::allocator<std::vector<std::pair<int, int> > >; size_type = long unsigned int]'
1008 | resize(size_type __new_size)
| ^~~~~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1008:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/12.2.1/bits/stl_vector.h:1029:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::resize(size_type, const value_type&) [with _Tp = std::vector<std::pair<int, int> >; _Alloc = std::allocator<std::vector<std::pair<int, int> > >; size_type = long unsigned int; value_type = std::vector<std::pair<int, int> >]'
1029 | resize(size_type __new_size, const value_type& __x)
| ^~~~~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1029:54: note: no known conversion for argument 2 from 'int' to 'const std::vector<std::vector<std::pair<int, int> > >::value_type&' {aka 'const std::vector<std::pair<int, int> >&'}
1029 | resize(size_type __new_size, const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
