Problem dijkstra
User asbx
Submission Time 2023-11-15 09:47:53
Score 0
Max Time N/A
Max Memory N/A

Compile Error

dijkstra.cpp: In function ‘int main()’:
dijkstra.cpp:13:19: error: ‘class std::vector<std::pair<long long int, long long int> >’ has no member named ‘first’
13 | cin>> adjList[i].first >>adjList[i].second>>dist[i];
| ^~~~~
dijkstra.cpp:13:38: error: ‘class std::vector<std::pair<long long int, long long int> >’ has no member named ‘second’
13 | cin>> adjList[i].first >>adjList[i].second>>dist[i];
| ^~~~~~
dijkstra.cpp:16:22: error: ‘source’ was not declared in this scope
16 | pq.push(make_pair(0, source)); dist[source] = 0;
| ^~~~~~