Language: C++

c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}

Compiler output:
a.cc:1:1: error: ISO C++ forbids declaration of 'c' with no type [-fpermissive]
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}
      | ^
a.cc:1:30: error: 'A' does not name a type
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}
      |                              ^
a.cc:1:41: error: expected constructor, destructor, or type conversion before ';' token
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}
      |                                         ^
a.cc:1:44: error: expected constructor, destructor, or type conversion before ';' token
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}
      |                                            ^
a.cc:1:60: error: expected constructor, destructor, or type conversion before ';' token
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}
      |                                                            ^
a.cc:1:63: error: expected constructor, destructor, or type conversion before ';' token
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}
      |                                                               ^
a.cc:1:64: error: ISO C++ forbids declaration of 'b' with no type [-fpermissive]
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}
      |                                                                ^
a.cc: In function 'int b(int*)':
a.cc:1:77: error: 'h' was not declared in this scope
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}
      |                                                                             ^
a.cc:1:92: error: 'm' was not declared in this scope
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}
      |                                                                                            ^
a.cc:1:94: error: 'B' was not declared in this scope
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}
      |                                                                                              ^
a.cc:1:127: warning: no return statement in function returning non-void [-Wreturn-type]
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}
      |                                                                                                                               ^
a.cc: At global scope:
a.cc:1:128: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}
      |                                                                                                                                ^~~~
a.cc: In function 'int main()':
a.cc:1:152: error: 'A' was not declared in this scope
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}
      |                                                                                                                                                        ^
a.cc:1:141: error: 'scanf' was not declared in this scope
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}
      |                                                                                                                                             ^~~~~
a.cc:1:167: error: 'A' was not declared in this scope
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}
      |                                                                                                                                                                       ^
a.cc:1:161: error: 'qsort' was not declared in this scope
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}
      |                                                                                                                                                                 ^~~~~
a.cc:1:181: error: 'B' was not declared in this scope
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}
      |                                                                                                                                                                                     ^
a.cc:1:193: error: 'C' was not declared in this scope
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}
      |                                                                                                                                                                                                 ^
a.cc:1:229: error: 'h' was not declared in this scope
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}
      |                                                                                                                                                                                                                                     ^
a.cc:1:252: error: 'printf' was not declared in this scope
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}
      |                                                                                                                                                                                                                                                            ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | c(int*l,int*r){return *l-*r;}A[3<<17];*B;*C;long y,n,i,j;*m;*h;b(int*l){for(h=l+n+1;h-l>1;*m>B[j]-(l<B)?h=m:(l=m))m=l+(h-l)/2;}main(){for(;~scanf("%d",A+i++););qsort(A+1,n=*A,4,c);B=A+n;qsort(C=B+n+1,n,4,c);for(;j++<n;y+=i*(C+n-h))b(A),i=h-A-1,b(C-1);printf("%ld\n",y);}