Problem | dijkstra |
---|---|
User | anigoenk14 |
Submission Time | 2023-11-10 14:10:54 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
dijkstra.cpp:1:1: error: ‘vector’ does not name a type
1 | vector<pair<int,int> > adjList[10000]; // node, weight
| ^~~~~~
dijkstra.cpp:2:1: error: ‘priority_queue’ does not name a type
2 | priority_queue<pair<int,int>, vector<pair<int,int> >, greater<pair<int,int> > > pq; // distance, node
| ^~~~~~~~~~~~~~
dijkstra.cpp:4:7: error: expected constructor, destructor, or type conversion before ‘(’ token
4 | memset(dist, -1, sizeof(dist));
| ^
dijkstra.cpp:5:1: error: ‘pq’ does not name a type
5 | pq.push(make_pair(0, source)); dist[source] = 0;
| ^~
dijkstra.cpp:5:32: error: ‘dist’ does not name a type
5 | pq.push(make_pair(0, source)); dist[source] = 0;
| ^~~~
dijkstra.cpp:6:1: error: expected unqualified-id before ‘while’
6 | while(!pq.empty()){
| ^~~~~