Problem | dijkstra |
---|---|
User | boaznumberd5555 |
Submission Time | 2025-05-22 08:41:38 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
dijkstra.cpp:4:1: error: expected ‘,’ or ‘;’ before ‘vector’
4 | vector<pair<int,int>> adj[maxn]; //dist, node
| ^~~~~~
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++){
| ^
dijkstra.cpp:14:3: error: ‘adj’ was not declared in this scope
14 | adj[n1].push_back({n2,w});
| ^~~
dijkstra.cpp:22:15: error: ‘adj’ was not declared in this scope
22 | for(auto i: adj