potion.cpp:7:1: error: 'vector' does not name a type
7 | vector<int> h;
| ^~~~~~
potion.cpp: In member function 'bool cmp::operator()(const int&, const int&)':
potion.cpp:10:16: error: 'h' was not declared in this scope
10 | return h[a]<h[b];
| ^
potion.cpp: At global scope:
potion.cpp:13:1: error: 'vector' does not name a type
13 | vector<map<int,set<int,cmp>>> s;
| ^~~~~~
potion.cpp: In function 'void init(int, int, int*)':
potion.cpp:16:5: error: 'h' was not declared in this scope
16 | h.resize(n);
| ^
potion.cpp:17:5: error: 's' was not declared in this scope
17 | s.resize(n);
| ^
potion.cpp:21:5: error: 'set' was not declared in this scope
21 | set<int,cmp> a1;
| ^~~
potion.cpp:21:9: error: expected primary-expression before 'int'
21 | set<int,cmp> a1;
| ^~~
potion.cpp:23:17: error: 'a1' was not declared in this scope
23 | s[i][0]=a1;
| ^~
potion.cpp: In function 'void curseChanges(int, int*, int*)':
potion.cpp:31:9: error: 'set' was not declared in this scope
31 | set<int,cmp> a1=(--s[a].end())->second;
| ^~~
potion.cpp:31:13: error: expected primary-expression before 'int'
31 | set<int,cmp> a1=(--s[a].end())->second;
| ^~~
potion.cpp:32:13: error: expected primary-expression before 'int'
32 | set<int,cmp> b1=(--s[b].end())->second;
| ^~~
potion.cpp:33:12: error: 'a1' was not declared in this scope; did you mean 'a'?
33 | if(a1.find(b)==a1.end()){
| ^~
| a
potion.cpp:35:13: error: 'b1' was not declared in this scope; did you mean 'b'?
35 | b1.insert(a);
| ^~
| b
potion.cpp:39:13: error: 'b1' was not declared in this scope; did you mean 'b'?
39 | b1.erase(a);
| ^~
| b
potion.cpp:41:9: error: 's' was not declared in this scope
41 | s[a][i]=a1;
| ^
potion.cpp:41:17: error: 'a1' was not declared in this scope; did you mean 'a'?
41 | s[a][i]=a1;
| ^~
| a
potion.cpp:42:17: error: 'b1' was not declared in this scope; did you mean 'b'?
42 | s[b][i]=b1;
| ^~
| b
potion.cpp:45:20: error: 's' was not declared in this scope
45 | for(auto j:s[i]){
| ^
potion.cpp:46:13: error: 'cout' was not declared in this scope
46 | cout<<i<<' '<<j.first<<':';
| ^~~~
potion.cpp:50:19: error: 'endl' was not declared in this scope
50 | cout<<endl;
| ^~~~
potion.cpp: In function 'int question(int, int, int)':
potion.cpp:56:5: error: 'set' was not declared in this scope
56 | set<int,cmp> s1;
| ^~~
potion.cpp:56:9: error: expected primary-expression before 'int'
56 | set<int,cmp> s1;
| ^~~
potion.cpp:57:9: error: expected primary-expression before 'int'
57 | set<int,cmp> a=(--s[x].upper_bound(v))->second;
| ^~~
potion.cpp:58:9: error: expected primary-expression before 'int'
58 | set<int,cmp> b=(--s[y].upper_bound(v))->second;
| ^~~
potion.cpp:59:13: error: 'a' was not declared in this scope
59 | auto it=a.begin();
| ^
potion.cpp:60:14: error: 'b' was not declared in this scope
60 | auto it1=b.begin();
| ^
potion.cpp:63:9: error: 'cout' was not declared in this scope
63 | cout<<*it<<' '<<*it1<<endl;
| ^~~~
potion.cpp:63:31: error: 'endl' was not declared in this scope
63 | cout<<*it<<' '<<*it1<<endl;
| ^~~~
potion.cpp:64:25: error: 'h' was not declared in this scope
64 | ans=min(ans,abs(h[*it]-h[*it1]));
| ^
potion.cpp:64:21: error: 'abs' was not declared in this scope; did you mean 'ans'?
64 | ans=min(ans,abs(h[*it]-h[*it1]));
| ^~~
| ans
potion.cpp:64:13: error: 'min' was not declared in this scope
64 | ans=min(ans,abs(h[*it]-h[*it1]));
| ^~~