Problem | dijkstra |
---|---|
User | TheRaptor |
Submission Time | 2024-11-21 21:00:25 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
dijkstra.cpp: In function ‘int main()’:
dijkstra.cpp:6:2: error: ‘source_node’ was not declared in this scope
6 | source_node=1;
| ^~~~~~~~~~~
dijkstra.cpp:21:26: error: no matching function for call to ‘std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::push(<brace-enclosed initializer list>)’
21 | pq.push({0, source_node});
| ^
In file included from /usr/include/c++/9/queue:64,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from dijkstra.cpp:1:
/usr/include/c++/9/bits/stl_queue.h:627:7: note: candidate: ‘void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >; std::priority_queue&l