Problem car
User user123
Submission Time 2023-07-03 22:20:43
Score 0
Max Time N/A
Max Memory N/A

Compile Error

car.cpp: In function ‘void dijkstra()’:
car.cpp:17:5: error: ‘d’ was not declared in this scope
17 | d[0] = 0;
| ^
car.cpp:18:25: error: ‘n’ was not declared in this scope
18 | for (int i = 1; i < n; i++) d[i] = INF;
| ^
car.cpp:26:29: error: ‘s’ was not declared in this scope
26 | for (int i = 0; i < s[cur.y].size(); i++) {
| ^
car.cpp:32:17: error: ‘vis’ was not declared in this scope
32 | if (vis[nx.y].find(cur.y) != vis[nx.y].end()) continue;
| ^~~
car.cpp:33:48: error: no matching function for call to ‘std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::push(<brace-enclosed initializer list>)’
33 | pq.push({max(d[cur.y], nx.x), nx.y});
|