/in/foo.cc: In function 'int main()':
/in/foo.cc:37:14: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
if(i==(1<<j+1))++j;
~^~
/in/foo.cc:41:66: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
for(j=1;j<=n-(1<<i)+1;++j)f[i][j]=s[f[i-1][j]]>s[f[i-1][j+(1<<i-1)]]?f[i-1][j]:f[i-1][j+(1<<i-1)];
~^~
/in/foo.cc:41:96: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
for(j=1;j<=n-(1<<i)+1;++j)f[i][j]=s[f[i-1][j]]>s[f[i-1][j+(1<<i-1)]]?f[i-1][j]:f[i-1][j+(1<<i-1)];
~^~