/in/foo.cc: In function 'int main()':
/in/foo.cc:16:10: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
j=1<<d-1;
~^~
/in/foo.cc:22:29: warning: right operand of comma operator has no effect [-Wunused-value]
d=(int)log2(r[i]-l[i]+1),j<<d;
~^~~
/in/foo.cc:6:30: warning: unused variable 'MAX' [-Wunused-variable]
register int n,m,i,d,endd,j,MAX,k;
^~~
/in/foo.cc:6:34: warning: unused variable 'k' [-Wunused-variable]
register int n,m,i,d,endd,j,MAX,k;
^
/in/foo.cc:23:44: warning: 'j' may be used uninitialized in this function [-Wmaybe-uninitialized]
cout<<max(premax[l[i]][d],premax[min(r[i]-j+1,l[i])][d])<<"\n";
~~~~^~