foo.cpp:1:1: error: 'include' does not name a type
include<iostream> include<cstdio>
^
foo.cpp: In function 'int main()':
foo.cpp:5:13: error: 'n' was not declared in this scope
scanf("%d",&n);
^
foo.cpp:5:14: error: 'scanf' was not declared in this scope
scanf("%d",&n);
^
foo.cpp:7:13: error: 'h' was not declared in this scope
scanf("%d",&h[i]);
^
foo.cpp:8:1: error: 'f' was not declared in this scope
f[1]=h[1];left[1]=1;len=1;
^
foo.cpp:8:6: error: 'h' was not declared in this scope
f[1]=h[1];left[1]=1;len=1;
^
foo.cpp:8:11: error: 'left' was not declared in this scope
f[1]=h[1];left[1]=1;len=1;
^
foo.cpp:8:21: error: 'len' was not declared in this scope
f[1]=h[1];left[1]=1;len=1;
^
foo.cpp:11:5: error: 't' was not declared in this scope
for(t=0,l=1,r=len,mid=(l+r)>>1;l<=r;mid=(l+r)>>1)
^
foo.cpp:11:9: error: 'l' was not declared in this scope
for(t=0,l=1,r=len,mid=(l+r)>>1;l<=r;mid=(l+r)>>1)
^
foo.cpp:11:13: error: 'r' was not declared in this scope
for(t=0,l=1,r=len,mid=(l+r)>>1;l<=r;mid=(l+r)>>1)
^
foo.cpp:11:19: error: 'mid' was not declared in this scope
for(t=0,l=1,r=len,mid=(l+r)>>1;l<=r;mid=(l+r)>>1)
^
foo.cpp:16:11: error: 'right' was not declared in this scope
f[1]=h[n];right[n]=1;len=1;
^
foo.cpp:19:5: error: 't' was not declared in this scope
for(t=0,l=1,r=len,mid=(l+r)>>1;l<=r;mid=(l+r)>>1)
^
foo.cpp:19:9: error: 'l' was not declared in this scope
for(t=0,l=1,r=len,mid=(l+r)>>1;l<=r;mid=(l+r)>>1)
^
foo.cpp:19:13: error: 'r' was not declared in this scope
for(t=0,l=1,r=len,mid=(l+r)>>1;l<=r;mid=(l+r)>>1)
^
foo.cpp:19:19: error: 'mid' was not declared in this scope
for(t=0,l=1,r=len,mid=(l+r)>>1;l<=r;mid=(l+r)>>1)
^
foo.cpp:25:1: error: 'ans' was not declared in this scope
ans=std::max(ans,left[i-1]+right[i]);
^
foo.cpp:25:5: error: 'max' is not a member of 'std'
ans=std::max(ans,left[i-1]+right[i]);
^
foo.cpp:26:17: error: 'ans' was not declared in this scope
printf("%d\n",n-ans);
^
foo.cpp:26:20: error: 'printf' was not declared in this scope
printf("%d\n",n-ans);
^