potion.cpp:1:7: error: 'N' was not declared in this scope
1 | int h[N],pre[N];
| ^
potion.cpp:1:14: error: 'N' was not declared in this scope
1 | int h[N],pre[N];
| ^
potion.cpp:2:1: error: 'unordered_map' does not name a type
2 | unordered_map<int,vector<int> >v[N];
| ^~~~~~~~~~~~~
potion.cpp:3:1: error: 'vector' does not name a type
3 | vector<int>day[N];
| ^~~~~~
potion.cpp: In function 'void curseChanges(int, int*, int*)':
potion.cpp:10:3: error: 'day' was not declared in this scope
10 | day[a].pb(i);
| ^~~
potion.cpp:12:6: error: 'pre' was not declared in this scope
12 | if(pre[a]==0){
| ^~~
potion.cpp:13:4: error: 'v' was not declared in this scope
13 | v[a][i].pb(b);
| ^
potion.cpp:18:14: error: 'v' was not declared in this scope
18 | for(int j:v[a][pre[a]]){
| ^
potion.cpp:25:16: error: 'v' was not declared in this scope
25 | if(flag==0) v[a][i].pb(b);
| ^
potion.cpp:28:6: error: 'pre' was not declared in this scope
28 | if(pre[b]==0){
| ^~~
potion.cpp:29:4: error: 'v' was not declared in this scope
29 | v[b][i].pb(a);
| ^
potion.cpp:34:14: error: 'v' was not declared in this scope
34 | for(int j:v[b][pre[b]]){
| ^
potion.cpp:41:16: error: 'v' was not declared in this scope
41 | if(flag==0) v[b][i].pb(a);
| ^
potion.cpp: In function 'int question(int, int, int)':
potion.cpp:49:21: error: 'day' was not declared in this scope
49 | int id=upper_bound(day[x].begin(),day[x].end(),z)-day[x].begin();
| ^~~
potion.cpp:49:9: error: 'upper_bound' was not declared in this scope
49 | int id=upper_bound(day[x].begin(),day[x].end(),z)-day[x].begin();
| ^~~~~~~~~~~
potion.cpp:62:5: error: 'v' was not declared in this scope
62 | if(v[x][a].size()==0 || v[y][b].size()==0){
| ^
potion.cpp:65:2: error: 'vector' was not declared in this scope
65 | vector<int>xx,yy;
| ^~~~~~
potion.cpp:65:9: error: expected primary-expression before 'int'
65 | vector<int>xx,yy;
| ^~~
potion.cpp:66:12: error: 'v' was not declared in this scope
66 | for(int V:v[y][b]){
| ^
potion.cpp:67:3: error: 'yy' was not declared in this scope; did you mean 'y'?
67 | yy.pb(h[V]);
| ^~
| y
potion.cpp:67:9: error: 'h' was not declared in this scope
67 | yy.pb(h[V]);
| ^
potion.cpp:69:7: error: 'yy' was not declared in this scope; did you mean 'y'?
69 | sort(yy.begin(),yy.end());
| ^~
| y
potion.cpp:69:2: error: 'sort' was not declared in this scope; did you mean 'short'?
69 | sort(yy.begin(),yy.end());
| ^~~~
| short
potion.cpp:70:12: error: 'v' was not declared in this scope
70 | for(int U:v[x][a]){
| ^
potion.cpp:71:42: error: 'h' was not declared in this scope
71 | int id=lower_bound(yy.begin(),yy.end(),h[U])-yy.begin();
| ^
potion.cpp:71:10: error: 'lower_bound' was not declared in this scope
71 | int id=lower_bound(yy.begin(),yy.end(),h[U])-yy.begin();
| ^~~~~~~~~~~
potion.cpp:72:27: error: 'max' was not declared in this scope
72 | ans=min(ans,abs(h[U]-yy[max(0,id-1)]));
| ^~~
potion.cpp:72:15: error: 'abs' was not declared in this scope; did you mean 'ans'?
72 | ans=min(ans,abs(h[U]-yy[max(0,id-1)]));
| ^~~
| ans
potion.cpp:72:7: error: 'min' was not declared in this scope
72 | ans=min(ans,abs(h[U]-yy[max(0,id-1)]));
| ^~~