Problem dijkstra
User zsinfo2010
Submission Time 2023-11-15 09:29:13
Score 0
Max Time N/A
Max Memory N/A

Compile Error

dijkstra.cpp:7:18: error: expected initializer before ‘<’ token
7 | priority_queue pq<pair<int,int>, vector<pair<int,int> >, greater<pair<int,int> > > pq; // distance, node
| ^
dijkstra.cpp:9:7: error: expected constructor, destructor, or type conversion before ‘(’ token
9 | memset(dist, -1, sizeof(dist));
| ^
dijkstra.cpp:10:1: error: ‘pq’ does not name a type
10 | pq.push(make_pair(0, source)); dist[source] = 0;
| ^~
dijkstra.cpp:10:32: error: ‘dist’ does not name a type
10 | pq.push(make_pair(0, source)); dist[source] = 0;
| ^~~~
dijkstra.cpp:11:1: error: expected unqualified-id before ‘while’
11 | while(!pq.empty()){
| ^~~~~