Problem | dijkstra |
---|---|
User | jamestan |
Submission Time | 2024-04-27 22:28:06 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
dijkstra.cpp: In function ‘int main()’:
dijkstra.cpp:23:17: error: ‘n’ was not declared in this scope
23 | for (int u=1;u<n;u++){
| ^
dijkstra.cpp:24:12: error: ‘class std::priority_queue<std::pair<long long int, long long int>, std::vector<std::pair<long long int, long long int> >, std::greater<std::pair<long long int, long long int> > >’ has no member named ‘insert’
24 | pq.insert(arr[u],u});
| ^~~~~~
dijkstra.cpp:24:27: error: expected ‘)’ before ‘}’ token
24 | pq.insert(arr[u],u});
| ~ ^
| )
dijkstra.cpp:24:28: error: expected primary-expression before ‘)’ token
24 | pq.insert(arr[u],u});
| ^
dijkstra.cpp: At global scope:
dijkstra.cpp:26:5: error: expected unqualified-id before ‘while’
26 | while (!pq.empty()) {