Borderou de evaluare (job #3140803)
Utilizator | Data | 9 iulie 2023 20:42:42 | |
---|---|---|---|
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 'int32_t main()':
main.cpp:36:26: error: no matching function for call to 'std::vector<std::vector<graf> >::push_back(std::pair<int, int>)'
36 | v[from].push_back(make_pair(cost, to));
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
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: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::vector<graf>; _Alloc = std::allocator<std::vector<graf> >; value_type = std::vector<graf>]'
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 'std::pair<int, int>' to 'const std::vector<std::vector<graf> >::value_type&' {aka 'const std::vector<graf>&'}
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::vector<graf>; _Alloc = std::allocator<std::vector<graf> >; value_type = std::vector<graf>]'
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 'std::pair<int, int>' to 'std::vector<std::vector<graf> >::value_type&&' {aka 'std::vector<graf>&&'}
1293 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
main.cpp:39:7: error: expected unqualified-id before '.' token
39 | pq.push(make_pair(0, 1));
| ^
main.cpp:40:14: error: missing template arguments before '.' token
40 | while(!pq.empty())
| ^
main.cpp:42:21: error: missing template arguments before '.' token
42 | int nod = pq.top().nod, dis = pq.top().dist;
| ^
main.cpp:43:11: error: expected unqualified-id before '.' token
43 | pq.pop();
| ^
main.cpp:48:21: error: 'dis' was not declared in this scope; did you mean 'div'?
48 | dist[nod] = dis;
| ^~~
| div
main.cpp:51:24: error: 'class std::vector<graf>' has no member named 'nod'
51 | if(dist[it.nod] == inf)
| ^~~
main.cpp:53:19: error: expected unqualified-id before '.' token
53 | pq.push(it.dist + dis, it.nod);
| ^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !