Problem | dijkstra |
---|---|
User | JustKitkat |
Submission Time | 2024-12-28 10:13:57 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
dijkstra.cpp: In function ‘int main()’:
dijkstra.cpp:33:17: error: request for member ‘first’ in ‘node’, which is of non-class type ‘int’
33 | int v = node.first;
| ^~~~~
dijkstra.cpp:34:17: error: request for member ‘second’ in ‘node’, which is of non-class type ‘int’
34 | int w = node.second;
| ^~~~~~
dijkstra.cpp:38:27: 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>)’
38 | pq.push({dist[v], end});
| ^
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,