foo.cpp: In function 'void read(int&)':
foo.cpp:10:52: error: 'getchar' was not declared in this scope
void read (int &x){int s=1,w=0;char ch;ch=getchar ();while(ch<'0' || ch>'9') {ch=getchar ();if(ch=='-') s=-1;}while(ch>='0' && ch<='9') {w=w*10+(ch^'0');ch=getchar ();}x=w*s;}
^
foo.cpp: In function 'void init()':
foo.cpp:27:15: error: 'abs' was not declared in this scope
if (abs (b-a)>1) Lineed=0;
^
foo.cpp: In function 'int _50_algo::calc(int, int)':
foo.cpp:188:11: warning: unused variable 'now' [-Wunused-variable]
int mid,now=-(1<<29),lb,rb,i,lca;
^
foo.cpp: In function 'void _50_algo::work50()':
foo.cpp:277:21: error: 'printf' was not declared in this scope
printf ("%d\n",ans);
^