potion.cpp:6:21: error: 'vector' was not declared in this scope
6 | map<pair<int, int>, vector<int>> m;
| ^~~~~~
potion.cpp:4:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
3 | #include <algorithm>
+++ |+#include <vector>
4 | using namespace std;
potion.cpp:6:31: error: template argument 2 is invalid
6 | map<pair<int, int>, vector<int>> m;
| ^~
potion.cpp:6:31: error: template argument 4 is invalid
potion.cpp:7:1: error: 'vector' does not name a type
7 | vector<int> adj[100006];
| ^~~~~~
potion.cpp:8:1: error: 'vector' does not name a type
8 | vector<int> h;
| ^~~~~~
potion.cpp: In function 'void init(int, int, int*)':
potion.cpp:11:33: error: 'h' was not declared in this scope
11 | for (int i = 0; i < N; i++) h.push_back(H[i]);
| ^
potion.cpp: In function 'void curseChanges(int, int*, int*)':
potion.cpp:18:19: error: invalid types 'int[<brace-enclosed initializer list>]' for array subscript
18 | m[{ a, b }].push_back(i + 1);
| ^
potion.cpp:19:9: error: 'adj' was not declared in this scope
19 | adj[a].push_back(b);
| ^~~
potion.cpp:22:17: error: request for member 'begin' in 'm', which is of non-class type 'int'
22 | auto it = m.begin();
| ^~~~~
potion.cpp:23:20: error: request for member 'end' in 'm', which is of non-class type 'int'
23 | while (it != m.end()) {
| ^~~
potion.cpp: At global scope:
potion.cpp:30:45: error: ISO C++ forbids declaration of 'operator()' with no type [-fpermissive]
30 | operator() (const int &a, const int &b) const {
| ^~~~~
potion.cpp: In member function 'int cmp::operator()(const int&, const int&) const':
potion.cpp:31:16: error: 'h' was not declared in this scope
31 | return h[a] < h[b];
| ^
potion.cpp: In function 'int question(int, int, int)':
potion.cpp:36:5: error: 'set' was not declared in this scope
36 | set<int, cmp> adjX, adjY;
| ^~~
potion.cpp:4:1: note: 'std::set' is defined in header '<set>'; did you forget to '#include <set>'?
3 | #include <algorithm>
+++ |+#include <set>
4 | using namespace std;
potion.cpp:36:9: error: expected primary-expression before 'int'
36 | set<int, cmp> adjX, adjY;
| ^~~
potion.cpp:37:19: error: 'adj' was not declared in this scope
37 | for (auto &i: adj[x]) {
| ^~~
potion.cpp:41:21: error: request for member 'find' in 'm', which is of non-class type 'int'
41 | auto it = m.find({ a, b });
| ^~~~
potion.cpp:42:21: error: request for member 'end' in 'm', which is of non-class type 'int'
42 | if (it == m.end()) continue;
| ^~~
potion.cpp:44:21: error: 'adjX' was not declared in this scope
44 | if (la % 2) adjX.insert(i);
| ^~~~
potion.cpp:46:19: error: 'adj' was not declared in this scope
46 | for (auto &i: adj[y]) {
| ^~~
potion.cpp:50:21: error: request for member 'find' in 'm', which is of non-class type 'int'
50 | auto it = m.find({ a, b });
| ^~~~
potion.cpp:51:21: error: request for member 'end' in 'm', which is of non-class type 'int'
51 | if (it == m.end()) continue;
| ^~~
potion.cpp:53:21: error: 'adjY' was not declared in this scope
53 | if (la % 2) adjY.insert(i);
| ^~~~
potion.cpp:55:9: error: 'adjX' was not declared in this scope
55 | if (adjX.empty() || adjY.empty()) return 1e9;
| ^~~~
potion.cpp:55:25: error: 'adjY' was not declared in this scope
55 | if (adjX.empty() || adjY.empty()) return 1e9;
| ^~~~
potion.cpp:56:14: error: 'adjX' was not declared in this scope
56 | auto i = adjX.begin();
| ^~~~
potion.cpp:57:14: error: 'adjY' was not declared in this scope
57 | auto j = adjY.begin();
| ^~~~
potion.cpp:60:28: error: 'h' was not declared in this scope
60 | res = min(res, abs(h[*i] - h[*j]));
| ^