potion.cpp:2:1: error: 'vector' does not name a type
2 | vector<int> h;
| ^~~~~~
potion.cpp: In member function 'bool cmp::operator()(const int&, const int&)':
potion.cpp:5:16: error: 'h' was not declared in this scope
5 | return h[a]<h[b];
| ^
potion.cpp: At global scope:
potion.cpp:8:1: error: 'vector' does not name a type
8 | vector<map<int,set<int,cmp>>> s;
| ^~~~~~
potion.cpp: In function 'void init(int, int, int*)':
potion.cpp:11:5: error: 'h' was not declared in this scope
11 | h.resize(n);
| ^
potion.cpp:12:5: error: 's' was not declared in this scope
12 | s.resize(n);
| ^
potion.cpp:16:5: error: 'set' was not declared in this scope
16 | set<int,cmp> a1;
| ^~~
potion.cpp:16:9: error: expected primary-expression before 'int'
16 | set<int,cmp> a1;
| ^~~
potion.cpp:18:17: error: 'a1' was not declared in this scope
18 | s[i][0]=a1;
| ^~
potion.cpp: In function 'void curseChanges(int, int*, int*)':
potion.cpp:26:9: error: 'set' was not declared in this scope
26 | set<int,cmp> a1=(--s[a].end())->second;
| ^~~
potion.cpp:26:13: error: expected primary-expression before 'int'
26 | set<int,cmp> a1=(--s[a].end())->second;
| ^~~
potion.cpp:27:13: error: expected primary-expression before 'int'
27 | set<int,cmp> b1=(--s[b].end())->second;
| ^~~
potion.cpp:28:12: error: 'a1' was not declared in this scope; did you mean 'a'?
28 | if(a1.find(b)==a1.end()){
| ^~
| a
potion.cpp:30:13: error: 'b1' was not declared in this scope; did you mean 'b'?
30 | b1.insert(a);
| ^~
| b
potion.cpp:34:13: error: 'b1' was not declared in this scope; did you mean 'b'?
34 | b1.erase(a);
| ^~
| b
potion.cpp:36:9: error: 's' was not declared in this scope
36 | s[a][i]=a1;
| ^
potion.cpp:36:17: error: 'a1' was not declared in this scope; did you mean 'a'?
36 | s[a][i]=a1;
| ^~
| a
potion.cpp:37:17: error: 'b1' was not declared in this scope; did you mean 'b'?
37 | s[b][i]=b1;
| ^~
| b
potion.cpp:40:20: error: 's' was not declared in this scope
40 | for(auto j:s[i]){
| ^
potion.cpp:41:13: error: 'cout' was not declared in this scope
41 | cout<<i<<' '<<j.first<<':';
| ^~~~
potion.cpp:45:19: error: 'endl' was not declared in this scope
45 | cout<<endl;
| ^~~~
potion.cpp: In function 'int question(int, int, int)':
potion.cpp:51:5: error: 'set' was not declared in this scope
51 | set<int,cmp> s1;
| ^~~
potion.cpp:51:9: error: expected primary-expression before 'int'
51 | set<int,cmp> s1;
| ^~~
potion.cpp:52:9: error: expected primary-expression before 'int'
52 | set<int,cmp> a=(--s[x].upper_bound(v))->second;
| ^~~
potion.cpp:53:9: error: expected primary-expression before 'int'
53 | set<int,cmp> b=(--s[y].upper_bound(v))->second;
| ^~~
potion.cpp:54:13: error: 'a' was not declared in this scope
54 | auto it=a.begin();
| ^
potion.cpp:55:14: error: 'b' was not declared in this scope
55 | auto it1=b.begin();
| ^
potion.cpp:58:9: error: 'cout' was not declared in this scope
58 | cout<<*it<<' '<<*it1<<endl;
| ^~~~
potion.cpp:58:31: error: 'endl' was not declared in this scope
58 | cout<<*it<<' '<<*it1<<endl;
| ^~~~
potion.cpp:59:25: error: 'h' was not declared in this scope
59 | ans=min(ans,abs(h[*it]-h[*it1]));
| ^
potion.cpp:59:21: error: 'abs' was not declared in this scope; did you mean 'ans'?
59 | ans=min(ans,abs(h[*it]-h[*it1]));
| ^~~
| ans
potion.cpp:59:13: error: 'min' was not declared in this scope
59 | ans=min(ans,abs(h[*it]-h[*it1]));
| ^~~