foo.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
include<stdio.h>
^
foo.c: In function 'zhao':
foo.c:6:24: error: 'a' undeclared (first use in this function)
int i=l,j=n,mid,t; mid=a[(l+n)/2]; while(i<=j) { while(a[i]<mid) i++; while(a[j]>mid) j--; if(i<=j) { t=a[i]; #include<stdio.h>
^
foo.c:6:24: note: each undeclared identifier is reported only once for each function it appears in
foo.c:6:111: error: stray '#' in program
int i=l,j=n,mid,t; mid=a[(l+n)/2]; while(i<=j) { while(a[i]<mid) i++; while(a[j]>mid) j--; if(i<=j) { t=a[i]; #include<stdio.h>
^
foo.c:6:112: error: 'include' undeclared (first use in this function)
int i=l,j=n,mid,t; mid=a[(l+n)/2]; while(i<=j) { while(a[i]<mid) i++; while(a[j]>mid) j--; if(i<=j) { t=a[i]; #include<stdio.h>
^
foo.c:6:120: error: 'stdio' undeclared (first use in this function)
int i=l,j=n,mid,t; mid=a[(l+n)/2]; while(i<=j) { while(a[i]<mid) i++; while(a[j]>mid) j--; if(i<=j) { t=a[i]; #include<stdio.h>
^
foo.c:8:1: error: expected expression before 'int'
int a[10010],b[10010];
^
foo.c:35:5: warning: 'main' is normally a non-static function [-Wmain]
int main ()
^
foo.c: In function 'main':
foo.c:38:1: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
scanf("%d",&n);
^
foo.c:38:1: warning: incompatible implicit declaration of built-in function 'scanf' [enabled by default]
foo.c:45:7: error: 'b' undeclared (first use in this function)
{ b[i]=b[i]+jue(j,i);
^
foo.c:54:2: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
printf("%d",p);
^
foo.c:54:2: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
foo.c: In function 'zhao':
foo.c:55:14: error: expected expression before '[' token
return 0; }[i]=a[j]; a[j]=t; i++; j--; } } if(l<j) zhao(l,j); if(i<n) zhao(i,n); }
^
foo.c: In function 'jue':
foo.c:58:14: error: 'a' undeclared (first use in this function)
int sum; sum=a[i]-a[j]; if(sum<0) sum=-sum; return sum; }
^
foo.c: In function 'main':
foo.c:61:16: warning: incompatible implicit declaration of built-in function 'scanf' [enabled by default]
int n,i,x,p,j; scanf("%d",&n); for(i=1;i<=n;i++) scanf("%d %d",&x,&a[i]); zhao(1,n); for(i=1;i<=n;i++) { if(a[i]!=a[i-1]) for(j=1;j<=n;j++) { b[i]=b[i]+jue(j,i); } } p=b[1]; for(i=1;i<=n;i++) { if(a[i]!=a[i-1]) if(p>b[i]) p=b[i]; } printf("%d",p); return 0; }
^
foo.c:61:68: error: 'a' undeclared (first use in this function)
int n,i,x,p,j; scanf("%d",&n); for(i=1;i<=n;i++) scanf("%d %d",&x,&a[i]); zhao(1,n); for(i=1;i<=n;i++) { if(a[i]!=a[i-1]) for(j=1;j<=n;j++) { b[i]=b[i]+jue(j,i); } } p=b[1]; for(i=1;i<=n;i++) { if(a[i]!=a[i-1]) if(p>b[i]) p=b[i]; } printf("%d",p); return 0; }
^
foo.c:61:143: error: 'b' undeclared (first use in this function)
int n,i,x,p,j; scanf("%d",&n); for(i=1;i<=n;i++) scanf("%d %d",&x,&a[i]); zhao(1,n); for(i=1;i<=n;i++) { if(a[i]!=a[i-1]) for(j=1;j<=n;j++) { b[i]=b[i]+jue(j,i); } } p=b[1]; for(i=1;i<=n;i++) { if(a[i]!=a[i-1]) if(p>b[i]) p=b[i]; } printf("%d",p); return 0; }
^
foo.c:61:233: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
int n,i,x,p,j; scanf("%d",&n); for(i=1;i<=n;i++) scanf("%d %d",&x,&a[i]); zhao(1,n); for(i=1;i<=n;i++) { if(a[i]!=a[i-1]) for(j=1;j<=n;j++) { b[i]=b[i]+jue(j,i); } } p=b[1]; for(i=1;i<=n;i++)