Borderou de evaluare (job #3264984)
Utilizator | Data | 26 decembrie 2024 11:18:38 | |
---|---|---|---|
Problema | Drumuri minime | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:49:31: error: 'cost' was not declared in this scope; did you mean 'cosl'?
49 | graf[x].push_back({y, cost});
| ^~~~
| cosl
main.cpp:49:26: error: no matching function for call to 'std::vector<std::pair<int, double> >::push_back(<brace-enclosed initializer list>)'
49 | graf[x].push_back({y, cost});
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~
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:1276:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, double>; _Alloc = std::allocator<std::pair<int, double> >; value_type = std::pair<int, double>]'
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::pair<int, double> >::value_type&' {aka 'const std::pair<int, double>&'}
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::pair<int, double>; _Alloc = std::allocator<std::pair<int, double> >; value_type = std::pair<int, double>]'
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::pair<int, double> >::value_type&&' {aka 'std::pair<int, double>&&'}
1293 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
main.cpp:50:26: error: no matching function for call to 'std::vector<std::pair<int, double> >::push_back(<brace-enclosed initializer list>)'
50 | graf[y].push_back({x, cost});
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/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::pair<int, double>; _Alloc = std::allocator<std::pair<int, double> >; value_type = std::pair<int, double>]'
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::pair<int, double> >::value_type&' {aka 'const std::pair<int, double>&'}
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::pair<int, double>; _Alloc = std::allocator<std::pair<int, double> >; value_type = std::pair<int, double>]'
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::pair<int, double> >::value_type&&' {aka 'std::pair<int, double>&&'}
1293 | push_back(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 !