criyle/codenet-compile-errors huggingface dataset:
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(){
    int n,i,j;
    int max = INT_MIN;
    int Rt[INT_MAX];
    
    scanf("%d",&n);
    
    for(i=0;i<n;i++) scanf("%d",&Rt[i]);
    
    for(i=0;i<n;i++){
        for(j=i+1;j<n;j++){
            if(Rt[j]-Rt[i] > max) max = Rt[j]-Rt[i];
        }
    }
    
    printf("%d",max);
}


Compiler output:
main.c: In function 'main':
main.c:6:15: error: 'INT_MIN' undeclared (first use in this function)
    6 |     int max = INT_MIN;
      |               ^~~~~~~
main.c:3:1: note: 'INT_MIN' is defined in header '<limits.h>'; this is probably fixable by adding '#include <limits.h>'
    2 | #include<stdlib.h>
  +++ |+#include <limits.h>
    3 | 
main.c:6:15: note: each undeclared identifier is reported only once for each function it appears in
    6 |     int max = INT_MIN;
      |               ^~~~~~~
main.c:7:12: error: 'INT_MAX' undeclared (first use in this function)
    7 |     int Rt[INT_MAX];
      |            ^~~~~~~
main.c:7:12: note: 'INT_MAX' is defined in header '<limits.h>'; this is probably fixable by adding '#include <limits.h>'
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(){
    int n,i,j;
    int max = –2147483648;
    int Rt[2147483647];
    
    scanf("%d",&n);
    
    for(i=0;i<n;i++) scanf("%d",&Rt[i]);
    
    for(i=0;i<n;i++){
        for(j=i+1;j<n;j++){
            if(Rt[j]-Rt[i] > max) max = Rt[j]-Rt[i];
        }
    }
    
    printf("%d",max);
}


Compiler output:
main.c: In function 'main':
main.c:6:15: error: stray '\342' in program
    6 |     int max = <U+2013>2147483648;
      |               ^~~~~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(){
    int n,i,j;
    int max = –2147483647;
    int Rt[2147483647];
    
    scanf("%d",&n);
    
    for(i=0;i<n;i++) scanf("%d",&Rt[i]);
    
    for(i=0;i<n;i++){
        for(j=i+1;j<n;j++){
            if(Rt[j]-Rt[i] > max) max = Rt[j]-Rt[i];
        }
    }
    
    printf("%d",max);
}


Compiler output:
main.c: In function 'main':
main.c:6:15: error: stray '\342' in program
    6 |     int max = <U+2013>2147483647;
      |               ^~~~~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(){
    int n,i,j;
    int max = –214748364;
    int Rt[2147483647];
    
    scanf("%d",&n);
    
    for(i=0;i<n;i++) scanf("%d",&Rt[i]);
    
    for(i=0;i<n;i++){
        for(j=i+1;j<n;j++){
            if(Rt[j]-Rt[i] > max) max = Rt[j]-Rt[i];
        }
    }
    
    printf("%d",max);
}


Compiler output:
main.c: In function 'main':
main.c:6:15: error: stray '\342' in program
    6 |     int max = <U+2013>214748364;
      |               ^~~~~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(){
    int n,i,j;
    int max = –21474;
    int Rt[2147483647];
    
    scanf("%d",&n);
    
    for(i=0;i<n;i++) scanf("%d",&Rt[i]);
    
    for(i=0;i<n;i++){
        for(j=i+1;j<n;j++){
            if(Rt[j]-Rt[i] > max) max = Rt[j]-Rt[i];
        }
    }
    
    printf("%d",max);
}


Compiler output:
main.c: In function 'main':
main.c:6:15: error: stray '\342' in program
    6 |     int max = <U+2013>21474;
      |               ^~~~~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(){
    int n,i,j;
    int max = –2;
    int Rt[2147483647];
    
    scanf("%d",&n);
    
    for(i=0;i<n;i++) scanf("%d",&Rt[i]);
    
    for(i=0;i<n;i++){
        for(j=i+1;j<n;j++){
            if(Rt[j]-Rt[i] > max) max = Rt[j]-Rt[i];
        }
    }
    
    printf("%d",max);
}


Compiler output:
main.c: In function 'main':
main.c:6:15: error: stray '\342' in program
    6 |     int max = <U+2013>2;
      |               ^~~~~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(){
    int n,i,j;
    int max=–2;
    int Rt[2147483647];
    
    scanf("%d",&n);
    
    for(i=0;i<n;i++) scanf("%d",&Rt[i]);
    
    for(i=0;i<n;i++){
        for(j=i+1;j<n;j++){
            if(Rt[j]-Rt[i] > max) max = Rt[j]-Rt[i];
        }
    }
    
    printf("%d",max);
}


Compiler output:
main.c: In function 'main':
main.c:6:13: error: stray '\342' in program
    6 |     int max=<U+2013>2;
      |             ^~~~~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>


int main(){
    int n,i,min;
    int maxv = -2147483648;
    int Rt[200000];
    scanf("%d",&n);
    for(i=0;i<n;i++) scanf("%d",&Rt[i]);
    
    min = Rt[0];
    
    for(i=1;i<n;i++){
        maxv = max(maxv,Rt[i]-minv);
        minv = min(minv,R[i]);
    }
    printf("%d\n",maxv);
}


Compiler output:
main.c: In function 'main':
main.c:15:16: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
   15 |         maxv = max(maxv,Rt[i]-minv);
      |                ^~~
main.c:15:31: error: 'minv' undeclared (first use in this function); did you mean 'min'?
   15 |         maxv = max(maxv,Rt[i]-minv);
      |                               ^~~~
      |                               min
main.c:15:31: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:25: error: 'R' undeclared (first use in this function); did you mean 'Rt'?
   16 |         minv = min(minv,R[i]);
      |                         ^
      |                         Rt
main.c:16:16: error: called object 'min' is not a function or function pointer
   16 |         minv = min(minv,R[i]);
      |                ^~~
main.c:6:13: note: declared here
    6 |     int n,i,min;
      |             ^~~
Language: C

#include<stdio.h>
#include<stdlib.h>


int main(){
    int n,i,minv;
    int maxv = -2147483648;
    int Rt[200000];
    scanf("%d",&n);
    for(i=0;i<n;i++) scanf("%d",&Rt[i]);
    
    min = Rt[0];
    
    for(i=1;i<n;i++){
        maxv = max(maxv,Rt[i]-minv);
        minv = min(minv,R[i]);
    }
    printf("%d\n",maxv);
}


Compiler output:
main.c: In function 'main':
main.c:12:5: error: 'min' undeclared (first use in this function); did you mean 'minv'?
   12 |     min = Rt[0];
      |     ^~~
      |     minv
main.c:12:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:16: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
   15 |         maxv = max(maxv,Rt[i]-minv);
      |                ^~~
main.c:16:16: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
   16 |         minv = min(minv,R[i]);
      |                ^~~
      |                main
main.c:16:25: error: 'R' undeclared (first use in this function); did you mean 'Rt'?
   16 |         minv = min(minv,R[i]);
      |                         ^
      |                         Rt
Language: C

#include<stdio.h>
#include<stdlib.h>


int main(){
    int n,i,minv;
    int maxv = -2147483648;
    int Rt[200000];
    scanf("%d",&n);
    for(i=0;i<n;i++) scanf("%d",&Rt[i]);
    
    minv = Rt[0];
    
    for(i=1;i<n;i++){
        maxv = max(maxv,Rt[i]-minv);
        minv = min(minv,R[i]);
    }
    printf("%d\n",maxv);
}


Compiler output:
main.c: In function 'main':
main.c:15:16: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
   15 |         maxv = max(maxv,Rt[i]-minv);
      |                ^~~
main.c:16:16: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
   16 |         minv = min(minv,R[i]);
      |                ^~~
      |                main
main.c:16:25: error: 'R' undeclared (first use in this function); did you mean 'Rt'?
   16 |         minv = min(minv,R[i]);
      |                         ^
      |                         Rt
main.c:16:25: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<stdlib.h>


int main(){
    int n,i,minv;
    int maxv = -2147483648;
    int Rt[200000];
    scanf("%d",&n);
    for(i=0;i<n;i++) scanf("%d",&Rt[i]);
    
    minv = Rt[0];
    
    for(i=1;i<n;i++){
        maxv = max(maxv,Rt[i]-minv);
        minv = min(minv,Rt[i]);
    }
    printf("%d\n",maxv);
}


Compiler output:
main.c: In function 'main':
main.c:15:16: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
   15 |         maxv = max(maxv,Rt[i]-minv);
      |                ^~~
main.c:16:16: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
   16 |         minv = min(minv,Rt[i]);
      |                ^~~
      |                main
Language: C

#include<stdio.h>
#include<math.h>


int main(){
    int n,i,minv;
    int maxv = -2147483648;
    int Rt[200000];
    scanf("%d",&n);
    for(i=0;i<n;i++) scanf("%d",&Rt[i]);
    
    minv = Rt[0];
    
    for(i=1;i<n;i++){
        maxv = max(maxv,Rt[i]-minv);
        minv = min(minv,Rt[i]);
    }
    printf("%d\n",maxv);
}


Compiler output:
main.c: In function 'main':
main.c:15:16: error: implicit declaration of function 'max'; did you mean 'fmax'? [-Wimplicit-function-declaration]
   15 |         maxv = max(maxv,Rt[i]-minv);
      |                ^~~
      |                fmax
main.c:16:16: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
   16 |         minv = min(minv,Rt[i]);
      |                ^~~
      |                main
Language: C

#include<stdio.h>
#define MAX 200000;
int main(void){
int n,i,j,R[MAX];
	scanf("&n",n);
	int rieki,keisan;

for(i=0;i<n;i++){
	for(j=0;j<n;j++){
keisan=R[j]-R[i];
		rieki=keisan;
if(R[j-1]-R[i]>rieki){
rieki=R[j-1]-R[i];	
}
		
}
}
printf("%d\n" ,rieki);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:2:19: error: expected ']' before ';' token
    2 | #define MAX 200000;
      |                   ^
main.c:4:13: note: in expansion of macro 'MAX'
    4 | int n,i,j,R[MAX];
      |             ^~~
main.c:10:8: error: 'R' undeclared (first use in this function)
   10 | keisan=R[j]-R[i];
      |        ^
main.c:10:8: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
void swap(int* a,int* b);
int main(void){
	int a[100000],m,tmp,i,j;
	scanf("%d",&m);
	for(i=0;i<m,i++){
		scanf("%d",&a[i]);
	}
	for(i=0;i<m;i++){
		for(j=0;j<m-1;j++){
			if(a[j]>a[j+1])swap(&a[j],&a[j+1]);
		}
	}
	printf("%d\n",a[m-1]-a[0]);
	return 0;
}
void swap(int* a,int* b){
	int tmp;
	tmp=*a;
	*a=*b;
	*b=tmp;
}


Compiler output:
main.c: In function 'main':
main.c:6:24: error: expected ';' before ')' token
    6 |         for(i=0;i<m,i++){
      |                        ^
      |                        ;
Language: C

#include<stdio.h>
#define MAX 200000;
int main(void){
int n,i,j,R[MAX];
	scanf("&n",n);
	int rieki,keisan;
for(i=0;i<n;i++){
	scanf("&R[]",R[i]);
}
for(i=0;i<n;i++){
	for(j=0;j<n;j++){
keisan=R[j]-R[i];
		rieki=keisan;
if(R[j-1]-R[i]>rieki){
rieki=R[j-1]-R[i];	
}
		
}
}
printf("%d\n" ,rieki);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:2:19: error: expected ']' before ';' token
    2 | #define MAX 200000;
      |                   ^
main.c:4:13: note: in expansion of macro 'MAX'
    4 | int n,i,j,R[MAX];
      |             ^~~
main.c:8:22: error: 'R' undeclared (first use in this function)
    8 |         scanf("&R[]",R[i]);
      |                      ^
main.c:8:22: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<iostream>
#include<algorithm>
using namespace std;
static const int MAX = 200000;

int main(){
int R[MAX],n;

cin >> n;
for(int i = 0;i < n;i++) cin >> R[i];

int maxv = -2000000000;
int minv R[0];

for(int i = 1;i < n;i++){
maxv = max(maxv,R[i] - minv);
minv = min(minv,R[i]);
}
cout << maxv << endl;

return 0;
}


Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
void max(int a,int b);
int main(void){
	int a[200000],m,i,j,tmp;
	scanf("%d",&m);
	for(i=0;i<m;i++){
		scanf("%d",&a[i]);
	}
	maxv=-20000000;
	minv=a[0];
	
	for(i=1;i<m-1;i++){
		for(j=i;j<m;j++){
			maxv=max(a[i],a[j]);
		}
	}
	printf("%d\n",maxv);
	return 0;
}
void max(int a,int b){
	return a>b?a:b;
}



Compiler output:
main.c: In function 'main':
main.c:9:9: error: 'maxv' undeclared (first use in this function); did you mean 'max'?
    9 |         maxv=-20000000;
      |         ^~~~
      |         max
main.c:9:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:9: error: 'minv' undeclared (first use in this function)
   10 |         minv=a[0];
      |         ^~~~
main.c: In function 'max':
main.c:21:21: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   21 |         return a>b?a:b;
      |                ~~~~~^~
main.c:20:6: note: declared here
   20 | void max(int a,int b){
      |      ^~~
Language: C

#include<stdio.h>
int max(int a,int b);
int main(void){
	int a[200000],m,i,j,tmp;
	scanf("%d",&m);
	for(i=0;i<m;i++){
		scanf("%d",&a[i]);
	}
	maxv=-20000000;
	minv=a[0];
	
	for(i=1;i<m-1;i++){
		for(j=i;j<m;j++){
			maxv=max(a[i],a[j]);
		}
	}
	printf("%d\n",maxv);
	return 0;
}
int max(int a,int b){
	return a>b?a:b;
}




Compiler output:
main.c: In function 'main':
main.c:9:9: error: 'maxv' undeclared (first use in this function); did you mean 'max'?
    9 |         maxv=-20000000;
      |         ^~~~
      |         max
main.c:9:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:9: error: 'minv' undeclared (first use in this function)
   10 |         minv=a[0];
      |         ^~~~
Language: C

#include<stdio.h>
int max(int a,int b);
int main(void){
	int a[200000],m,i,j,maxv;
	scanf("%d",&m);
	for(i=0;i<m;i++){
		scanf("%d",&a[i]);
	}
	maxv=-20000000;
	minv=a[0];
	
	for(i=0;i<m-1;i++){
		for(j=i;j<m;j++){
			maxv=max(a[i],a[j]);
		}
	}
	printf("%d\n",maxv);
	return 0;
}
int max(int a,int b){
	return a>b?a:b;
}



Compiler output:
main.c: In function 'main':
main.c:10:9: error: 'minv' undeclared (first use in this function)
   10 |         minv=a[0];
      |         ^~~~
main.c:10:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

// 16D8104007J Kanehiro Maho 兼弘真帆 2018年4月23日

#include<stdio.h>
int main(void){
  int n,i,j,max,min;
  scanf("%d",&n);
  int r[n];
  for(i=0;i<n;i++){
    scanf("%d",&r[i]);
  }
  max=r[1]-r[0];
  min=r[0];
  for(i=1;i<n;i++){
    ans=r[i]-min;
    if(max<ans){
      max=ans;
    }
    if(r[i]<min){
      min=r[i];
    }
  }

  printf("%d\n",max);
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:14:5: error: 'ans' undeclared (first use in this function)
   14 |     ans=r[i]-min;
      |     ^~~
main.c:14:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#incl#include<stdio.h>
int max(int a,int b);
int min(int a,int b);
int main(void){
	int a[2000000],m,i,maxv;
	scanf("%d",&m);
	for(i=0;i<m;i++){
		scanf("%d",&a[i]);
	}
	maxv=-200000000;
	int minv=a[0];
	for(i=0;i<m;i++){
		maxv=max(maxv,a[i]-minv);
		minv=min(minv,a[i]);
	}
	printf("%d\n",maxv);
	return 0;
}
int max(int a,int b){
	return a>b?a:b;
}

int min(int a,int b){
	return a<b?a:b;
}




Compiler output:
main.c:1:2: error: invalid preprocessing directive #incl; did you mean #include?
    1 | #incl#include<stdio.h>
      |  ^~~~
      |  include
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |         scanf("%d",&m);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #incl#include<stdio.h>
main.c:6:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |         scanf("%d",&m);
      |         ^~~~~
main.c:6:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:16:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   16 |         printf("%d\n",maxv);
      |         ^~~~~~
main.c:16:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:16:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:16:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<iostream>
#include<algorithm>
using namespace std;
static const int MAX = 2000000;

int main(){
 int R[MAX],n;
 
 cin >> n;
 for(int i = 0; i < n; i++)cin >> R[i];

 int maxv = -2000000000;
 int minv = R[0];
 
for(int = i ; i < n; i++){
 maxv =max(maxv,R[i]-minv);
 minv = min(minv,R[i]);
}

cout << maxv << endl;

return 0;
}


Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#define MAX 200000
int main(void){
	int R[MAX],n;
	int i = 0,j = 0;
	
	scanf("%d",&n);
	for(i = 0;i < n;i++){
		scanf("%d",&[i]);
	}
	
	int maxv = -200000;
	int minv = R[0];
	
	for(j = 0;j < n;j++){
		if(maxv < R[j]-minv){
			maxv = R[j]-minv;
		}
		if(minv>R[j]){
			minv = R[j];
		}
	}
	printf("%d\n",maxv);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:29: error: expected expression before '[' token
    9 |                 scanf("%d",&[i]);
      |                             ^
Language: C

#include<stdio.h>
#define MAX 200000
int main(void){
	int R[MAX],n;
	int i,j;
	
	scanf("%d",&n);
	for(i = 0;i < n;i++){
		scanf("%d",&[i]);
	}
	
	int maxv = -200000;
	int minv = R[0];
	
	for(j = 0;j < n;j++){
		if(maxv < R[j]-minv){
			maxv = R[j]-minv;
		}
		if(minv>R[j]){
			minv = R[j];
		}
	}
	printf("%d\n",maxv);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:29: error: expected expression before '[' token
    9 |                 scanf("%d",&[i]);
      |                             ^
Language: C

#include<stdio.h>
#define MAX 200000
int main(void){
	int R[MAX],n;
	int i,j;
	
	scanf("%d",&n);
	for(i = 0;i < n;i++){
		scanf("%d",&[i]);
	}
	
	int maxv = -200000;
	int minv = R[0];
	
	for(j = 0;j < n;j++){
		if(maxv < (R[j]-minv)){
			maxv = R[j]-minv;
		}
		if(minv>R[j]){
			minv = R[j];
		}
	}
	printf("%d\n",maxv);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:29: error: expected expression before '[' token
    9 |                 scanf("%d",&[i]);
      |                             ^
Language: C

#include <iostream>
#include <algorithm>
using namespace std;
static const int MAX = 200000;
int main(void){
    int R[MAX], n;
    
    cin >> n;
    for(int i=0; i<n; i++) cin >> R[i];
    
    int maxv = -200000000;
    int minv = R[0];
    
    for(int i=0; i<n; i++){
        maxv = max(maxv, R[i]-minv);
        minv = min(minv, R[i]);
    }
    
    cout << maxv << endl;
    
    return 0;
}



Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include <iostream>
#include <algorithm>
using namespace std;
static const int MAX = 200000;
int main(void){
    int R[MAX], n;
    
    cin >> n;
    for(int i=0; i<n; i++) cin >> R[i];
    
    int maxv = -20000000;
    int minv = R[0];
    
    for(int i=0; i<n; i++){
        maxv = max(maxv, R[i]-minv);
        minv = min(minv, R[i]);
    }
    
    cout << maxv << endl;
    
    return 0;
}



Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include <iostream>
#include <algorithm>
using namespace std;
static const int MAX = 200000;
int main(void){
    int R[MAX], n;
    
    cin >> n;
    for(int i=0; i<n; i++) cin >> R[i];
    
    int maxv = -2000000;
    int minv = R[0];
    
    for(int i=0; i<n; i++){
        maxv = max(maxv, R[i]-minv);
        minv = min(minv, R[i]);
    }
    
    cout << maxv << endl;
    
    return 0;
}



Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include <cstdio>
#include <iostream>
using namespace std;
int main(){
    long n;
    long r[200000];
    
    scanf(" %ld", &n);
    for(long i=0; i<n; ++i) scanf(" %ld", &r[i]);
    
    long maxv=-2000000000;
    long minv=r[0];
    for(long i=1; i<n; ++i){
        maxv=max(maxv, r[i]-minv);
        minv=min(minv, r[i]);   
    }
   
    printf("%ld\n", maxv);
}


Compiler output:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
Language: C

#include <cstdio>
#include <iostream>
using namespace std;
int main(){
    long n;
    long r[200000];
    scanf(" %ld", &n);
    for(long i=0; i<n; ++i) scanf(" %ld", &r[i]);
    long maxv=-2000000000;
    long minv=r[0];
    for(long i=1; i<n; ++i){
        maxv=max(maxv, r[i]-minv);
        minv=min(minv, r[i]);   
    }
    printf("%ld\n", maxv);
}


Compiler output:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
int main(){
  int n,i;
  int a[2000000];
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
  }
  m=a[0];
  r=a[1]-m; 
  if(r<0) m=m[1];
  for(i=2;i<n;i++){
    if(a[i]-m>r) r=a[i]-m;
    if(m>a[i]) m=a[i];
  }
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:9:3: error: 'm' undeclared (first use in this function)
    9 |   m=a[0];
      |   ^
main.c:9:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:3: error: 'r' undeclared (first use in this function)
   10 |   r=a[1]-m;
      |   ^
Language: C

#include<stdio.h>
int main(){
  int m,n,i,r;
  int a[2000000];
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
  }
  m=a[0];
  r=a[1]-m; 
  if(r<0) m=m[1];
  for(i=2;i<n;i++){
    if(a[i]-m>r) r=a[i]-m;
    if(m>a[i]) m=a[i];
  }
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:11:14: error: subscripted value is neither array nor pointer nor vector
   11 |   if(r<0) m=m[1];
      |              ^
Language: C

#include<stdio.h>
#include<stdlib.h>
int main(){
	int i, j, x,y;
	int n, *Rt;
	
	scanf("%d",&n);
	Rt = (int *)malloc(sizeof(int) * n);Í
	for(i=0; i<n; i++){
		scanf("%d",&Rt[i]);
	}
	
	x = Rt[1] - Rt[0];
	
	for(j=1; j<n; j++){
		for(i=j-1; i>=0; i--){
			y=Rt[j] - Rt[i]
			if(x<y){
				x = Rt[j] - Rt[i];
			}
		}
	}
	
	printf("%d\n",x);
	
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:45: error: '\U000000cd' undeclared (first use in this function)
    8 |         Rt = (int *)malloc(sizeof(int) * n);Í
      |                                             ^
main.c:8:45: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:46: error: expected ';' before 'for'
    8 |         Rt = (int *)malloc(sizeof(int) * n);Í
      |                                              ^
      |                                              ;
    9 |         for(i=0; i<n; i++){
      |         ~~~                                   
main.c:17:40: error: expected ';' before 'if'
   17 |                         y=Rt[j] - Rt[i]
      |                                        ^
      |                                        ;
   18 |                         if(x<y){
      |                         ~~
Language: C

#include"stdio.h"
#include"stdlib.h"
int main()
{
    int n;
    int p*;
    int i,j;
    int max;
    scanf("%d",&n);
    p=(int*)malloc(sizeof(int)*n);
    scanf("%d","&p[0]");
    scanf("%d","&p[1]");
    max=p[1]-p[0];
    for(i=2;i<n;i++)
    {
        scanf("%d",&p[i])
        if(p[i]>p[i-1])
        {
            for(j=i-1;j>=0;j--)
            {
                if(p[i]-p[j]>max)max=p[i]-p[j];
            }
        }
    }
    printf("%d\n",max);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    6 |     int p*;
      |          ^
main.c:6:11: error: expected expression before ';' token
    6 |     int p*;
      |           ^
main.c:10:5: error: 'p' undeclared (first use in this function)
   10 |     p=(int*)malloc(sizeof(int)*n);
      |     ^
main.c:10:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:26: error: expected ';' before 'if'
   16 |         scanf("%d",&p[i])
      |                          ^
      |                          ;
   17 |         if(p[i]>p[i-1])
      |         ~~
Language: C

#include"stdio.h"
#include"stdlib.h"
int main()
{
    int n;
    int p;
    int i,j;
    int max;
    int min;
    int nextmin;
    scanf("%d",&n);
    scanf("%d",&min);
    scanf("%d",&p);
    max=p-min;
    if(min>p)min=p;
    for(i=2;i<n;i++)
    {
        scanf("%d",&p);
        if(min>p)
        {
            nextmin=p;
        }
        if(max<p-min)max=p-min;
        
        min=mextmin;
    }
    printf("%d",max);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:25:13: error: 'mextmin' undeclared (first use in this function); did you mean 'nextmin'?
   25 |         min=mextmin;
      |             ^~~~~~~
      |             nextmin
main.c:25:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(){
   int i = 0;
   int j = 0;
   int data;
   int min = 0;
   int max = 0;
   int num = 0;
   int count = 0;

   while(1){
      scanf("%d",&num);
      if(num >= 2 && num <= 200000){
        break;
      }
   }

   for(i = 0 ; i < num-1 ; i++){
      while(1){
      scanf("%d",&data);
      if(data >= 2 && data <= 1000000000){
        break;
      }
      }
    }


for(i = 0 ; i < num ; i++){
  while(1){
  scanf("%d",&data);
  if(data >= 2 && data <= 1000000000){
    break;
  }
  if(min > data){
    min = data;
  }
  else if(min < data){
    break;
  }
  count++;
}

 for(j = count + 1; j < num ; j++){
   if(max < data){
     max = data;
   }
 }
 printf("%d\n",max - min);
 return 0;
}



Compiler output:
main.c: In function 'main':
main.c:51:1: error: expected declaration or statement at end of input
   51 | }
      | ^
Language: C

#include<stdio.h>

int main(){
   int i = 0;
   int j = 0;
   int data;
   int min = 0;
   int max = 0;
   int num = 0;
   int count = 0;

   while(1){
      scanf("%d",&num);
      if(num >= 2 && num <= 200000){
        break;
      }
   }

for(i = 0 ; i < num ; i++){
  while(1){
  scanf("%d",&data);
  if(data >= 2 && data <= 1000000000){
    break;
  }
  if(min > data){
    min = data;
  }
  else if(min < data){
    break;
  }
  count++;
}

 for(j = count + 1; j < num ; j++){
   if(max < data){
     max = data;
   }
 }
 printf("%d\n",max - min);
 return 0;
}



Compiler output:
main.c: In function 'main':
main.c:41:1: error: expected declaration or statement at end of input
   41 | }
      | ^
Language: C

#include <stdio.h>
#define X 100000

int main() {
	int n, r[X], i, j, max=-2000000000, min;
	scanf("%d", &n);
	scanf("%d", &r[0]);
	min = r[0];
	for (i = 1; i < n; i++) {
		scanf_s("%d", &r[i]);
		if (min>r[i-1]) {
			min = r[i-1];
		}
		if (max<(r[i]-min)) {
			max = r[i] - min;
		}
	}
	printf("%d\n", max);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   10 |                 scanf_s("%d", &r[i]);
      |                 ^~~~~~~
      |                 scanf
Language: C

#include <stdio.h>

int main(){
  int n,r[200000],max,i=0,j;

  scanf("%d",&n);
  while(n<2||n>200000)  scanf("%d",&n);

  while(i<n){
    scanf("%d",&r[i]);
    i++
  }

  max=r[1]-r[0];
  for(j=1;j<n;j++){
    for(i=0;i<j;i++){
      if((r[j]-r[i])>max) max=r[j]-r[i];
    }
  }
  printf("%d\n",max);

  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:11:8: error: expected ';' before '}' token
   11 |     i++
      |        ^
      |        ;
   12 |   }
      |   ~
Language: C

#include<stdio.h>
int main()
{
  int n, rt[200000], i, j, ri = 0, rj = 0, sum = 0;
  scanf("%d", &n);
  for(i = 0; i < n; i++)
    {
      scanf("%d", &rt[i]);
    }
  for(i = 0; i < n-1; i++)
    {
      ri = rt[i];
      for(j = i+1;j < n; j++)
	{
	  if(rt[j] > rj)
	    {
	      rj = rt[j];
	    }
	}
      if(i == 0)
	{
	  sum = rj - ri;
	}
      else((rj - ri) > sum)
	    {
	      sum = rj - ri;
	    }
      rj = 0;
      ri = 0;
    }
  printf("%d\n", sum);
}



Compiler output:
main.c: In function 'main':
main.c:24:28: error: expected ';' before '{' token
   24 |       else((rj - ri) > sum)
      |                            ^
      |                            ;
   25 |             {
      |             ~
Language: C

#include<stdio.h>
int main()
{
  int n, rt[200000], i, j, ri = 0, rj = 0, sum = 0;
  scanf("%d", &n);
  for(i = 0; i < n; i++)
    {
      scanf("%d", &rt[i]);
    }
  for(i = 0; i < n-1; i++)
    {
      ri = rt[i];
      for(j = i+1;j < n; j++)
	{
	  if(rt[j] > rj)
	    {
	      rj = rt[j];
	    }
	}
      if(i == 0)
	{
	  sum = rj - ri;
	}
      else((rj - ri) > sum))
	    {
	      sum = rj - ri;
	    }
      rj = 0;
      ri = 0;
    }
  printf("%d\n", sum);
}



Compiler output:
main.c: In function 'main':
main.c:24:28: error: expected ';' before ')' token
   24 |       else((rj - ri) > sum))
      |                            ^
      |                            ;
main.c:24:28: error: expected statement before ')' token
Language: C

#include<stdio.h>
int main()
{
  int n, rt[200000], i, j, ri = 0, rj = 0, sum = 0;
  scanf("%d", &n);
  for(i = 0; i < n; i++)
    {
      scanf("%d", &rt[i]);
    }
  for(i = 0; i < n-1; i++)
    {
      ri = rt[i];
      for(j = i+1;j < n; j++)
	{
	  if(rt[j] > rj)
	    {
	      rj = rt[j];
	    }
	}
      if(i == 0)
	{
	  sum = rj - ri;
	}
      else
	{
	  ((rj - ri) > sum)
	    {
	      sum = rj - ri;
	    }
	  rj = 0;
	  ri = 0;
	}
    }
  printf("%d\n", sum);
}



Compiler output:
main.c: In function 'main':
main.c:26:28: error: expected ';' before '{' token
   26 |           ((rj - ri) > sum)
      |                            ^
      |                            ;
   27 |             {
      |             ~
Language: C

#include<stdio.h>
int main()
{
  int n, rt[200000], i, j, ri = 0, sum = 0;
  scanf("%d", &n);
  for(i = 0; i < n; i++)
    {
      scanf("%d", &rt[i]);
    }
  ri = rt[0];
  sum = rt[1] - ri;
  for(i = 1; i < n; i++)
    {
      if(sum < rt[i] - ri) sum = ri[i] -ri;
      if(ri > rt[i]) ri = rt[i];
    }
  printf("%d\n", sum);
}



Compiler output:
main.c: In function 'main':
main.c:14:36: error: subscripted value is neither array nor pointer nor vector
   14 |       if(sum < rt[i] - ri) sum = ri[i] -ri;
      |                                    ^
Language: C

#include<stdio.h>

#define TMIN 2
#define TMAX 200000
#define nMIN 1
#define nMAX 1000000


int main(){
int n[nMAX],Time,i,max=0,sub;

scanf("%d",&Time);
if(TMIN<=Time&&Time<=TMAX){
for(i=0;i<Time;i++){
scanf("%d",&n[i]);
if(nMINE<=n[i]&&n[i]<=nMAX)
}
max=n[i-1];
sub=n[i-1]-n[i-2];
for(i=Time-2;i>=0;i--){

if(max<n[i]&&i!=0){
max=n[i];
}
if(sub<max-n[i]&&n[i]!=max){
sub=max-n[i];
}
}
}
 else return 0;

printf("%d\n",sub);
return 0;
}



Compiler output:
main.c: In function 'main':
main.c:16:4: error: 'nMINE' undeclared (first use in this function); did you mean 'nMIN'?
   16 | if(nMINE<=n[i]&&n[i]<=nMAX)
      |    ^~~~~
      |    nMIN
main.c:16:4: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:1: error: expected expression before '}' token
   17 | }
      | ^
Language: C

#include<stdio.h>

#define TMIN 2
#define TMAX 200000
#define nMIN 1
#define nMAX 1000000


int main(){
int n[nMAX],Time,i,max=0,sub;

scanf("%d",&Time);
if(TMIN<=Time&&Time<=TMAX){
for(i=0;i<Time;i++){
scanf("%d",&n[i]);
if(nMINE<=n[i]&&n[i]<=nMAX)exit(1);
}
max=n[i-1];
sub=n[i-1]-n[i-2];
for(i=Time-2;i>=0;i--){

if(max<n[i]&&i!=0){
max=n[i];
}
if(sub<max-n[i]&&n[i]!=max){
sub=max-n[i];
}
}
}
 else exit(1);

printf("%d\n",sub);
return 0;
}



Compiler output:
main.c: In function 'main':
main.c:16:4: error: 'nMINE' undeclared (first use in this function); did you mean 'nMIN'?
   16 | if(nMINE<=n[i]&&n[i]<=nMAX)exit(1);
      |    ^~~~~
      |    nMIN
main.c:16:4: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:28: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
   16 | if(nMINE<=n[i]&&n[i]<=nMAX)exit(1);
      |                            ^~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
    1 | #include<stdio.h>
  +++ |+#include <stdlib.h>
    2 | 
main.c:16:28: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   16 | if(nMINE<=n[i]&&n[i]<=nMAX)exit(1);
      |                            ^~~~
main.c:16:28: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:30:7: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   30 |  else exit(1);
      |       ^~~~
main.c:30:7: note: include '<stdlib.h>' or provide a declaration of 'exit'
Language: C

#include<stdio.h>

#define TMIN 2
#define TMAX 200000
#define nMIN 1
#define nMAX 1000000


int main(){
int n[nMAX],Time,i,max=0,sub;

scanf("%d",&Time);
if(TMIN<=Time&&Time<=TMAX){
for(i=0;i<Time;i++){
scanf("%d",&n[i]);
if(nMINE>=n[i]||n[i]>=nMAX)exit(1);
}
max=n[i-1];
sub=n[i-1]-n[i-2];
for(i=Time-2;i>=0;i--){

if(max<n[i]&&i!=0){
max=n[i];
}
if(sub<max-n[i]&&n[i]!=max){
sub=max-n[i];
}
}
}
 else exit(1);

printf("%d\n",sub);
return 0;
}



Compiler output:
main.c: In function 'main':
main.c:16:4: error: 'nMINE' undeclared (first use in this function); did you mean 'nMIN'?
   16 | if(nMINE>=n[i]||n[i]>=nMAX)exit(1);
      |    ^~~~~
      |    nMIN
main.c:16:4: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:28: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
   16 | if(nMINE>=n[i]||n[i]>=nMAX)exit(1);
      |                            ^~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
    1 | #include<stdio.h>
  +++ |+#include <stdlib.h>
    2 | 
main.c:16:28: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   16 | if(nMINE>=n[i]||n[i]>=nMAX)exit(1);
      |                            ^~~~
main.c:16:28: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:30:7: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   30 |  else exit(1);
      |       ^~~~
main.c:30:7: note: include '<stdlib.h>' or provide a declaration of 'exit'
Language: C

#include<stdio.h>

#define TMIN 2
#define TMAX 200000
#define nMIN 1
#define nMAX 1000000000


int main(){
int n[nMAX],Time,i,max=0,sub;

scanf("%d",&Time);
if(TMIN<=Time&&Time<=TMAX){
for(i=0;i<Time;i++){
scanf("%d",&n[i]);
if(nMINE>n[i]||n[i]>nMAX)exit(1);
}
max=n[i-1];
sub=n[i-1]-n[i-2];
for(i=Time-2;i>=0;i--){

if(max<n[i]&&i!=0){
max=n[i];
}
if(sub<max-n[i]&&n[i]!=max){
sub=max-n[i];
}
}
}
 else exit(1);

printf("%d\n",sub);
return 0;
}



Compiler output:
main.c: In function 'main':
main.c:16:4: error: 'nMINE' undeclared (first use in this function); did you mean 'nMIN'?
   16 | if(nMINE>n[i]||n[i]>nMAX)exit(1);
      |    ^~~~~
      |    nMIN
main.c:16:4: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:26: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
   16 | if(nMINE>n[i]||n[i]>nMAX)exit(1);
      |                          ^~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
    1 | #include<stdio.h>
  +++ |+#include <stdlib.h>
    2 | 
main.c:16:26: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   16 | if(nMINE>n[i]||n[i]>nMAX)exit(1);
      |                          ^~~~
main.c:16:26: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:30:7: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   30 |  else exit(1);
      |       ^~~~
main.c:30:7: note: include '<stdlib.h>' or provide a declaration of 'exit'
Language: C

#include<stdio.h>

#define nMIN 2
#define nMAX 200000
#define RtMIN 1
#define RtMAX 1000000000


int main(){
int n[nMAX],Time,i,max=0,sub;

scanf("%d",&Time);
if(TMIN<=Time&&Time<=TMAX){
for(i=0;i<Time;i++){
scanf("%d",&n[i]);
//if(nMIN>n[i]||n[i]>nMAX)exit(1);
}
max=n[i-1];
sub=n[i-1]-n[i-2];
for(i=Time-2;i>=0;i--){

if(max<n[i]&&i!=0){
max=n[i];
}
if(sub<max-n[i]&&n[i]!=max){
sub=max-n[i];
}
}
}
 else exit(1);

printf("%d\n",sub);
return 0;
}



Compiler output:
main.c: In function 'main':
main.c:13:4: error: 'TMIN' undeclared (first use in this function); did you mean 'nMIN'?
   13 | if(TMIN<=Time&&Time<=TMAX){
      |    ^~~~
      |    nMIN
main.c:13:4: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:22: error: 'TMAX' undeclared (first use in this function); did you mean 'nMAX'?
   13 | if(TMIN<=Time&&Time<=TMAX){
      |                      ^~~~
      |                      nMAX
main.c:30:7: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
   30 |  else exit(1);
      |       ^~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
    1 | #include<stdio.h>
  +++ |+#include <stdlib.h>
    2 | 
main.c:30:7: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   30 |  else exit(1);
      |       ^~~~
main.c:30:7: note: include '<stdlib.h>' or provide a declaration of 'exit'
Language: C

#include<stdio.h>
#include<stdlib.h>
int main() {
  int i,j,a[200000],max=0;

  scanf("%d",&n);
if(n<2 || 2000000<n) exit(0);

for(i=0;i<n;i++) {
	scanf("%d",&a[i]);
	if(a[i]<1 || 1000000000<a[I]) exit(0);
}
max=a[1]-a[0];
for(i=0;i<n;i++) {
	for(j=1;j<n;j++) {
		if(a[j]-a[i]>max) 
		max=a[j]-a[i];
	}
}

printf("%d",max);
return 0;
}




Compiler output:
main.c: In function 'main':
main.c:6:15: error: 'n' undeclared (first use in this function)
    6 |   scanf("%d",&n);
      |               ^
main.c:6:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:35: error: 'I' undeclared (first use in this function)
   11 |         if(a[i]<1 || 1000000000<a[I]) exit(0);
      |                                   ^
Language: C

#include <iostream>
#include<bits/stdc++.h>
using namespace std;
int a[1000000], n;
int main()
{
    cin >> n;
    for(int i = 0; i < n; i++) cin >> a[i];
    int ans = INT_MIN, m = a[0];
    for(int i = 1; i < n; i++) ans = max(ans, a[i] - m), m = min(m, a[i]) ;
    if(ans < 0) ans = -1;
    cout << ans << endl;
    return 0;
}



Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>

int main(){
  int A[2000000],i,n,maxv,minv;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&A[i]);
  }
  maxv=A[1]-A[0]
  minv=A[0];
  for(i=1;i<n;i++){
    if(maxv<A[i]-minv)
      maxv=A[i]-minv;
    if(minv>A[i])minv=A[i];
  }
  printf("%d\n",maxv);
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:9:17: error: expected ';' before 'minv'
    9 |   maxv=A[1]-A[0]
      |                 ^
      |                 ;
   10 |   minv=A[0];
      |   ~~~~
Language: C

#include <stdio.h>

int main(void) {
  int n,i,j,r[200001],max = -999999999,min = 999999999;
  scanf(" %d",&n);
  for(i = 0; i < n; i++)scanf(" %d",&r[i]);

  for(i = 0; i < n - 1; i++){
    if(min > r[i])min = r[i];
    if(max < r[i])max = r[i];
    if(max - min > dif)dif = max - min;
  }
  printf("%d\n",max);
}


Compiler output:
main.c: In function 'main':
main.c:11:20: error: 'dif' undeclared (first use in this function)
   11 |     if(max - min > dif)dif = max - min;
      |                    ^~~
main.c:11:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C

include <stdio.h>
#define N 200005


int main(void){
  int n,r[N],i,j,d,c,max,min;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&r[i]);
  }
  max=1;
  min=1000000000;
  d=r[1]-r[0];
  for(i=1;i<n;i++){
    if(r[i]>max){
      max=r[i];
      for(j=0;j<i;j++){
	if(r[j]<min){
	  min=r[j];
	}
      }
      c=max-min;
      if(c>d){
	d=c;
      }
      max=1;
      min=1000000000;
    }
  }
  printf("%d\n",d);
  return 0;
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: C

#include <stdio.h>

main(){
  int count;
  int i,j;
  int R[20;
  int max;

  scanf("%d",&count);
   if(count<2)return 0;

  for(i=0;i<count;i++){
    scanf("%d",&R[i]);
  }

  max=R[1]-R[0];

  for(i=1;i<count;i++){
    for(j=2;j<count;j++){
      if(j<i)continue;
      else if(max<R[j]-R[i])max=R[j]-R[i];
    }
  }

  printf("%d\n",max);
  return 0;

}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:6:11: error: expected ']' before ';' token
    6 |   int R[20;
      |           ^
      |           ]
main.c:28:1: error: expected declaration or statement at end of input
   28 | }
      | ^
Language: C

#include<iostream>

using namespace std;

#define NMAX 200000

int main(){

	int N;
	long long R[NMAX];
	long long max[NMAX];
	long long ans;

	cin>>N;

	for(int i=0;i<N;i++){
		cin>>R[i];
	}

	max[N-1]=-1;
	max[N-2]=R[N-1];
	for(int i=N-3;i>=0;i--){
		if(max[i+1]<R[i+1]) max[i]=R[i+1];
		else max[i]=max[i+1];
	}

	ans=max[0]-R[0];
	for(int i=1;i<N;i++){
		if(ans<max[i]-R[i]) ans=max[i]-R[i];
	}

	cout<<ans<<endl;

    return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>

int main(){
	int i,j,n,Max=0;
	int A[200001];
	
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d",&A[i]);
	}	
		for(i=n;i>1;i--){
			for(j=i-1;j>0;j--){
			if(A[i]>A[j]){
				if(Max<A[i]-A[j]){
			Max=A[i]-A[j}
			}
		}	
			printf("%d\n",Max);
			return 0;
		}
		
			

Compiler output:
main.c: In function 'main':
main.c:15:37: error: expected ']' before '}' token
   15 |                         Max=A[i]-A[j}
      |                                     ^
      |                                     ]
main.c:15:37: error: expected ';' before '}' token
   15 |                         Max=A[i]-A[j}
      |                                     ^
      |                                     ;
main.c:20:17: error: expected declaration or statement at end of input
   20 |                 }
      |                 ^
Language: C

#include<stdio.h>

int main(){
	int i,j,n,Max=0;
	int A[200001];
	
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d",&A[i]);
	}	
		for(i=n;i>1;i--){
			for(j=i-1;j>0;j--){
			if(A[i]>A[j]){
				if(Max<A[i]-A[j]){
			Max=A[i]-A[j};
			}
		}	
			printf("%d\n",Max);
			return 0;
		}
		
			

Compiler output:
main.c: In function 'main':
main.c:15:37: error: expected ']' before '}' token
   15 |                         Max=A[i]-A[j};
      |                                     ^
      |                                     ]
main.c:15:37: error: expected ';' before '}' token
   15 |                         Max=A[i]-A[j};
      |                                     ^
      |                                     ;
main.c:20:17: error: expected declaration or statement at end of input
   20 |                 }
      |                 ^
Language: C

#include<stdio.h>

int main(){
	int i,j,n,Max=0;
	int A[200001];
	
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d",&A[i]);
	}	
		for(i=n;i>1;i--){
			for(j=i-1;j>0;j--){
			if(A[i]>A[j]){
				if(Max<A[i]-A[j]){
			Max=A[i]-A[j];
			}
		}	
			printf("%d\n",Max);
			return 0;
		}
		
			

Compiler output:
main.c: In function 'main':
main.c:20:17: error: expected declaration or statement at end of input
   20 |                 }
      |                 ^
main.c:20:17: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>

int main(){
	int i,j,n,Max=0;
	int A[200001];
	
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d",&A[i]);
	}	
		for(i=n;i>1;i--){
			for(j=i-1;j>0;j--){
			if(A[i]>A[j]){
				if(Max<A[i]-A[j]){
			Max=A[i]-A[j];}
			}
		}	
			printf("%d\n",Max);
			return 0;
		}
		
			

Compiler output:
main.c: In function 'main':
main.c:20:17: error: expected declaration or statement at end of input
   20 |                 }
      |                 ^
Language: C


		#include<stdio.h>

int main(){
	int i,j,n,Max,min;
	int A[200001];
	
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d",&A[i]);
	}	
	mini=A[1];
	Max=A[2]-A[1];
		for(i=n;i>2;i--){
			for(j=i;j>1;j--){
if(mini<A[i]){ mini=A[i];			
if(A[i]>A[j-1]){
				if(Max<A[i]-A[j-1]){
			Max=A[i]-A[j-1];}}
			}
		}}	
			printf("%d\n",Max);
			return 0;
		}

Compiler output:
main.c: In function 'main':
main.c:12:9: error: 'mini' undeclared (first use in this function); did you mean 'min'?
   12 |         mini=A[1];
      |         ^~~~
      |         min
main.c:12:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C


		#include<stdio.h>

int main(){
	int i,j,n,Max,min;
	int A[200001];
	
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d",&A[i]);
	}	
	mini=A[1];
	Max=A[2]-A[1];
		for(i=n;i>2;i--){
			for(j=i;j>1;j--){
if(min<A[i]){ 
mini=A[i];			
if(A[i]>A[j-1]){
if(Max<A[i]-A[j-1]){
Max=A[i]-A[j-1];}}
		}
		}}	
			printf("%d\n",Max);
			return 0;
		}

Compiler output:
main.c: In function 'main':
main.c:12:9: error: 'mini' undeclared (first use in this function); did you mean 'min'?
   12 |         mini=A[1];
      |         ^~~~
      |         min
main.c:12:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C


		#include<stdio.h>

int main(){
	int i,j,n,Max,min;
	int A[200001];
	
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d",&A[i]);
	}	
	min=A[1];
	Max=A[2]-A[1];
		for(i=n;i>2;i--){
			for(j=i;j>1;j--){
if(min<A[i]){ 
mini=A[i];			
if(A[i]>A[j-1]){
if(Max<A[i]-A[j-1]){
Max=A[i]-A[j-1];}}
		}
		}}	
			printf("%d\n",Max);
			return 0;
		}

Compiler output:
main.c: In function 'main':
main.c:17:1: error: 'mini' undeclared (first use in this function); did you mean 'min'?
   17 | mini=A[i];
      | ^~~~
      | min
main.c:17:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void) {
	int i, n, val, tmin, trange;
	
	scanf("%d\n", &n);
	scanf("%d\n", &tmin);
	for(i=1,trange=INT_MIN;i<size;i++) {
		scanf("%d\n", &val);
		if(tmin > val) {
			tmin = val;
		} else if(trange < val-tmin) {
			trange = val - tmin;
		}
	}

	printf("%d\n", trange);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:24: error: 'INT_MIN' undeclared (first use in this function)
    8 |         for(i=1,trange=INT_MIN;i<size;i++) {
      |                        ^~~~~~~
main.c:2:1: note: 'INT_MIN' is defined in header '<limits.h>'; this is probably fixable by adding '#include <limits.h>'
    1 | #include <stdio.h>
  +++ |+#include <limits.h>
    2 | 
main.c:8:24: note: each undeclared identifier is reported only once for each function it appears in
    8 |         for(i=1,trange=INT_MIN;i<size;i++) {
      |                        ^~~~~~~
main.c:8:34: error: 'size' undeclared (first use in this function); did you mean 'size_t'?
    8 |         for(i=1,trange=INT_MIN;i<size;i++) {
      |                                  ^~~~
      |                                  size_t