Problem | dijkstra |
---|---|
User | boaznumberd5555 |
Submission Time | 2025-01-09 01:32:46 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
dijkstra.cpp: In function ‘int main()’:
dijkstra.cpp:14:21: error: ‘struct std::pair<int, int>’ has no member named ‘push_back’
14 | adjlist[n2].push_back({n1,w});
| ^~~~~~~~~
dijkstra.cpp:15:21: error: ‘struct std::pair<int, int>’ has no member named ‘push_back’
15 | adjlist[n1].push_back({n2,w});
| ^~~~~~~~~
dijkstra.cpp:18:53: error: expression cannot be used as a function
18 | int d = pq.top().first, p = pq.top().second(); //dist, parent node (p)
| ^
dijkstra.cpp:20:29: error: ‘node’ was not declared in this scope
20 | for(auto i: adjlist[node]){
| ^~~~
dijkstra.cpp:24:49: 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&g