keys.cpp:6:1: error: 'set' does not name a type
6 | set<int> k[300300];
| ^~~
keys.cpp:7:1: error: 'set' does not name a type
7 | set<pair<int, int>> s[300300];
| ^~~
keys.cpp: In function 'bool merge(int, int)':
keys.cpp:24:26: error: 'k' was not declared in this scope; did you mean 'kv'?
24 | for(const auto &kv : k[y]) {
| ^
| kv
keys.cpp:26:23: error: 's' was not declared in this scope
26 | auto it = s[x].lower_bound({kv, 0});
| ^
keys.cpp:33:33: error: 's' was not declared in this scope
33 | for(const auto &[col, to] : s[y]) {
| ^
keys.cpp:34:12: error: 'k' was not declared in this scope
34 | if(k[x].count(col)) {
| ^
keys.cpp: In function 'std::vector<int> find_reachable(std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
keys.cpp:47:9: error: 's' was not declared in this scope
47 | s[u[i]].insert({c[i], v[i]});
| ^
keys.cpp:51:5: error: 'queue' was not declared in this scope
51 | queue<int> q;
| ^~~~~
keys.cpp:2:1: note: 'std::queue' is defined in header '<queue>'; did you forget to '#include <queue>'?
1 | #include "keys.h"
+++ |+#include <queue>
2 | using namespace std;
keys.cpp:51:11: error: expected primary-expression before 'int'
51 | queue<int> q;
| ^~~
keys.cpp:53:9: error: 'q' was not declared in this scope
53 | q.push(i), p[i] = i, p2[i] = i, sz[i] = 1, nxt[i] = -1;
| ^
keys.cpp:54:9: error: 'k' was not declared in this scope
54 | k[i].insert(r[i]);
| ^
keys.cpp:55:19: error: 's' was not declared in this scope
55 | auto it = s[i].lower_bound({r[i], 0});
| ^
keys.cpp:61:12: error: 'q' was not declared in this scope
61 | while(!q.empty()) {
| ^