swap.cpp: In function 'void dijkstra(int)':
swap.cpp:15:5: error: 'priority_queue' was not declared in this scope
15 | priority_queue<pair<int, int>> q;
| ^~~~~~~~~~~~~~
swap.cpp:2:1: note: 'std::priority_queue' is defined in header '<queue>'; did you forget to '#include <queue>'?
1 | #include "swap.h"
+++ |+#include <queue>
2 | #include <vector>
swap.cpp:15:33: error: expected primary-expression before '>' token
15 | priority_queue<pair<int, int>> q;
| ^~
swap.cpp:15:36: error: 'q' was not declared in this scope
15 | priority_queue<pair<int, int>> q;
| ^
swap.cpp:24:21: error: no match for 'operator[]' (operand types are 'bool [100005]' and 'std::vector<std::pair<int, int> >')
24 | if (!vis[u]) {
| ^
swap.cpp:25:38: error: 'class std::vector<std::pair<int, int> >' has no member named 'second'
25 | if (max(dist[node],u.second) < dist[u.first]) {
| ^~~~~~
swap.cpp:25:55: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
25 | if (max(dist[node],u.second) < dist[u.first]) {
| ^~~~~
swap.cpp:26:28: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
26 | dist[u.first] = max(dist[node],u.second);
| ^~~~~
swap.cpp:26:54: error: 'class std::vector<std::pair<int, int> >' has no member named 'second'
26 | dist[u.first] = max(dist[node],u.second);
| ^~~~~~
swap.cpp:27:22: error: no match for 'operator[]' (operand types are 'int [100005]' and 'std::vector<std::pair<int, int> >')
27 | p[u] = node;
| ^
swap.cpp:28:37: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
28 | q.push({-dist[u.first], u.first});
| ^~~~~
swap.cpp:28:47: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
28 | q.push({-dist[u.first], u.first});
| ^~~~~
swap.cpp: In function 'void help_dumbdijkstra(int, int)':
swap.cpp:36:21: error: 'dumbdijkstra' was not declared in this scope; did you mean 'dumbdist'?
36 | if (p[s] != -1) dumbdijkstra(p[s], s);
| ^~~~~~~~~~~~
| dumbdist
swap.cpp:38:15: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
38 | if (u.first != p[s] && u.first != nxt) {
| ^~~~~
swap.cpp:38:34: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
38 | if (u.first != p[s] && u.first != nxt) {
| ^~~~~
swap.cpp:39:46: error: 'class std::vector<std::pair<int, int> >' has no member named 'second'
39 | dumbdist[s] = min(max(dist[s], u.second), max(dist[u.first], u.second));
| ^~~~~~
swap.cpp:39:66: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
39 | dumbdist[s] = min(max(dist[s], u.second), max(dist[u.first], u.second));
| ^~~~~
swap.cpp:39:76: error: 'class std::vector<std::pair<int, int> >' has no member named 'second'
39 | dumbdist[s] = min(max(dist[s], u.second), max(dist[u.first], u.second));
| ^~~~~~
swap.cpp: In function 'void init(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
swap.cpp:53:13: error: 'u' was not declared in this scope
53 | adj[u[i]].push_back({v[i], w[i]});
| ^
swap.cpp:53:30: error: 'v' was not declared in this scope
53 | adj[u[i]].push_back({v[i], w[i]});
| ^
swap.cpp:53:36: error: 'w' was not declared in this scope
53 | adj[u[i]].push_back({v[i], w[i]});
| ^