new_home.cpp:2:9: error: #include expects "FILENAME" or <FILENAME>
#include#include <bits/stdc++.h>
^
new_home.cpp:10:9: error: 'pair' does not name a type
typedef pair<int,int> pii;
^~~~
new_home.cpp:15:1: error: 'vector' does not name a type
vector<int> fst_,sec_,vec[MAX];
^~~~~~
new_home.cpp:16:1: error: 'vector' does not name a type
vector<pii> fst,sec,increasing,decreasing;
^~~~~~
new_home.cpp:20:10: error: 'pii' was not declared in this scope
bool cmp(pii X,pii Y)
^~~
new_home.cpp:20:16: error: 'pii' was not declared in this scope
bool cmp(pii X,pii Y)
^~~
new_home.cpp:20:21: error: expression list treated as compound expression in initializer [-fpermissive]
bool cmp(pii X,pii Y)
^
new_home.cpp: In function 'int main()':
new_home.cpp:27:2: error: 'ios_base' has not been declared
ios_base::sync_with_stdio(false);
^~~~~~~~
new_home.cpp:33:2: error: 'cin' was not declared in this scope
cin>>N>>K>>Q;
^~~
new_home.cpp:33:2: note: suggested alternative: 'main'
cin>>N>>K>>Q;
^~~
main
new_home.cpp:37:3: error: 'vec' was not declared in this scope
vec[Y].pb(X);
^~~
new_home.cpp:41:6: error: 'vec' was not declared in this scope
if(vec[A].empty())
^~~
new_home.cpp:44:5: error: 'cout' was not declared in this scope
cout<<-1<<"\n";
^~~~
new_home.cpp:47:8: error: 'vec' was not declared in this scope
sort(vec[A].begin(),vec[A].end());
^~~
new_home.cpp:47:3: error: 'sort' was not declared in this scope
sort(vec[A].begin(),vec[A].end());
^~~~
new_home.cpp:47:3: note: suggested alternative: 'short'
sort(vec[A].begin(),vec[A].end());
^~~~
short
new_home.cpp:49:4: error: 'increasing' was not declared in this scope
increasing.pb(mp(vec[A][B-1],(vec[A][B-1]+vec[A][B])/2));
^~~~~~~~~~
new_home.cpp:6:13: error: 'make_pair' was not declared in this scope
#define mp make_pair
^
new_home.cpp:49:18: note: in expansion of macro 'mp'
increasing.pb(mp(vec[A][B-1],(vec[A][B-1]+vec[A][B])/2));
^~
new_home.cpp:51:4: error: 'decreasing' was not declared in this scope
decreasing.pb(mp(vec[A][B+1],(vec[A][B+1]+vec[A][B]+1)/2));
^~~~~~~~~~
new_home.cpp:6:13: error: 'make_pair' was not declared in this scope
#define mp make_pair
^
new_home.cpp:51:18: note: in expansion of macro 'mp'
decreasing.pb(mp(vec[A][B+1],(vec[A][B+1]+vec[A][B]+1)/2));
^~
new_home.cpp:52:3: error: 'increasing' was not declared in this scope
increasing.pb(mp(vec[A].back(),INF));
^~~~~~~~~~
new_home.cpp:6:13: error: 'make_pair' was not declared in this scope
#define mp make_pair
^
new_home.cpp:52:17: note: in expansion of macro 'mp'
increasing.pb(mp(vec[A].back(),INF));
^~
new_home.cpp:53:3: error: 'decreasing' was not declared in this scope
decreasing.pb(mp(*vec[A].begin(),0));
^~~~~~~~~~
new_home.cpp:54:9: error: 'max' was not declared in this scope
Begin=max(Begin,*vec[A].begin());
^~~
new_home.cpp:54:9: note: suggested alternative: 'main'
Begin=max(Begin,*vec[A].begin());
^~~
main
new_home.cpp:55:7: error: 'min' was not declared in this scope
End=min(End,vec[A].back());
^~~
new_home.cpp:55:7: note: suggested alternative: 'main'
End=min(End,vec[A].back());
^~~
main
new_home.cpp:57:7: error: 'increasing' was not declared in this scope
sort(increasing.begin(),increasing.end());
^~~~~~~~~~
new_home.cpp:57:2: error: 'sort' was not declared in this scope
sort(increasing.begin(),increasing.end());
^~~~
new_home.cpp:57:2: note: suggested alternative: 'short'
sort(increasing.begin(),increasing.end());
^~~~
short
new_home.cpp:58:7: error: 'decreasing' was not declared in this scope
sort(decreasing.begin(),decreasing.end());
^~~~~~~~~~
new_home.cpp:61:5: error: 'max' was not declared in this scope
l=max(pre+1,increasing[A].first);
^~~
new_home.cpp:61:5: note: suggested alternative: 'main'
l=max(pre+1,increasing[A].first);
^~~
main
new_home.cpp:65:3: error: 'fst' was not declared in this scope
fst.pb(mp(l,r));
^~~
new_home.cpp:6:13: error: 'make_pair' was not declared in this scope
#define mp make_pair
^
new_home.cpp:65:10: note: in expansion of macro 'mp'
fst.pb(mp(l,r));
^~
new_home.cpp:66:3: error: 'fst_' was not declared in this scope
fst_.pb(increasing[A].first);
^~~~
new_home.cpp:72:5: error: 'min' was not declared in this scope
l=min(pre-1,decreasing[A].first);
^~~
new_home.cpp:72:5: note: suggested alternative: 'main'
l=min(pre-1,decreasing[A].first);
^~~
main
new_home.cpp:76:3: error: 'sec' was not declared in this scope
sec.pb(mp(r,l));
^~~
new_home.cpp:6:13: error: 'make_pair' was not declared in this scope
#define mp make_pair
^
new_home.cpp:76:10: note: in expansion of macro 'mp'
sec.pb(mp(r,l));
^~
new_home.cpp:77:3: error: 'sec_' was not declared in this scope
sec_.pb(decreasing[A].first);
^~~~
new_home.cpp:80:10: error: 'sec' was not declared in this scope
reverse(sec.begin(),sec.end());
^~~
new_home.cpp:80:2: error: 'reverse' was not declared in this scope
reverse(sec.begin(),sec.end());
^~~~~~~
new_home.cpp:81:10: error: 'sec_' was not declared in this scope
reverse(sec_.begin(),sec_.end());
^~~~
new_home.cpp:100:18: error: 'fst' was not declared in this scope
int low=0,high=fst.size()-1,mid;
^~~
new_home.cpp:103:4: error: 'mid' was not declared in this scope
mid=(low+high)/2;
^~~
new_home.cpp:103:4: note: suggested alternative: 'main'
mid=(low+high)/2;
^~~
main
new_home.cpp:106:23: error: 'fst_' was not declared in this scope
res=max(res,abs(X-fst_[mid]));
^~~~
new_home.cpp:106:17: error: 'abs' was not declared in this scope
res=max(res,abs(X-fst_[mid]));
^~~
new_home.cpp:106:9: error: 'max' was not declared in this scope
res=max(res,abs(X-fst_[mid]));
^~~
new_home.cpp:106:9: note: suggested alternative: 'main'
res=max(res,abs(X-fst_[mid]));
^~~
main
new_home.cpp:117:4: error: 'mid' was not declared in this scope
mid=(low+high)/2;
^~~
new_home.cpp:117:4: note: suggested alternative: 'main'
mid=(low+high)/2;
^~~
main
new_home.cpp:120:17: error: 'abs' was not declared in this scope
res=max(res,abs(sec_[mid]-X));
^~~
new_home.cpp:120:9: error: 'max' was not declared in this scope
res=max(res,abs(sec_[mid]-X));
^~~
new_home.cpp:120:9: note: suggested alternative: 'main'
res=max(res,abs(sec_[mid]-X));
^~~
main
new_home.cpp:128:3: error: 'cout' was not declared in this scope
cout<<res<<"\n";
^~~~