Problem dijkstra
User boaznumberd5555
Submission Time 2025-05-22 08:42:10
Score 0
Max Time N/A
Max Memory N/A

Compile Error

dijkstra.cpp:6:1: error: expected initializer before ‘priority_queue’
6 | priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>> pq; //dist,node
| ^~~~~~~~~~~~~~
dijkstra.cpp: In function ‘int main()’:
dijkstra.cpp:10:2: error: ‘dist’ was not declared in this scope
10 | dist[1] = 0;
| ^~~~
dijkstra.cpp:11:2: error: ‘pq’ was not declared in this scope
11 | pq.push({0,1});
| ^~
dijkstra.cpp:12:19: error: ‘n’ was not declared in this scope
12 | for(int i = 0; i<n; i++){
| ^