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

#include <stdio.h>
int main(void){
  int R[200000]
  int i=0,j=0,len=0,max1=-99999999;
  while(scanf("%d",R[i])==1){
    i++;
  }
  len=i;
    for(i=0;i<len;i++){
      for(j=i;j<len<j++){
        if(max1<(R[j]-R[i])){
          max1=R[j]-R[i];
        }
      }
    }
    printf("%d\n",max1);
  }

Compiler output:
main.c: In function 'main':
main.c:3:16: error: expected ';' before 'int'
    3 |   int R[200000]
      |                ^
      |                ;
    4 |   int i=0,j=0,len=0,max1=-99999999;
      |   ~~~           
main.c:5:20: error: 'R' undeclared (first use in this function)
    5 |   while(scanf("%d",R[i])==1){
      |                    ^
main.c:5:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:24: error: expected ';' before ')' token
   10 |       for(j=i;j<len<j++){
      |                        ^
      |                        ;
Language: C

#include<stdio.h>

int main(){
    int i,a,d[100] ;
    int max = 99999;
    for(i=0;i<=100;i++){
        d[i]=0;
    }
    scanf("%d",&a);
    int num[a-1];
    for(i=0;i<a;i++){
        scanf("%d",&a[i]);
    }
    for(i=0;i<a;i++){
        d[i] = a[i+1]-a[i];
    }
    for(i=0;i<a;i++){
        if(d[i]>d[i+1]){
            max = d[i];
        }
    }
    printf("%d",max);
}

Compiler output:
main.c: In function 'main':
main.c:12:22: error: subscripted value is neither array nor pointer nor vector
   12 |         scanf("%d",&a[i]);
      |                      ^
main.c:15:17: error: subscripted value is neither array nor pointer nor vector
   15 |         d[i] = a[i+1]-a[i];
      |                 ^
main.c:15:24: error: subscripted value is neither array nor pointer nor vector
   15 |         d[i] = a[i+1]-a[i];
      |                        ^
Language: C

#include<stdio.h>

int main(){
    int i,a,d[100] ;
    int max = 99999;
    for(i=0;i<100;i++){
        d[i]=0;
    }
    scanf("%d",&a);
    int num[a-1];
    for(i=0;i<a;i++){
        scanf("%d",&a[i]);
    }
    for(i=0;i<a;i++){
        d[i] = a[i+1]-a[i];
    }
    for(i=0;i<a;i++){
        if(d[i]>d[i+1]){
            max = d[i];
        }
    }
    printf("%d",max);
}

Compiler output:
main.c: In function 'main':
main.c:12:22: error: subscripted value is neither array nor pointer nor vector
   12 |         scanf("%d",&a[i]);
      |                      ^
main.c:15:17: error: subscripted value is neither array nor pointer nor vector
   15 |         d[i] = a[i+1]-a[i];
      |                 ^
main.c:15:24: error: subscripted value is neither array nor pointer nor vector
   15 |         d[i] = a[i+1]-a[i];
      |                        ^
Language: C

#include<stdio.h>
int main(void){
	int n,c;
	int R[];
	while(1){
		scnaf("%d",&R[i]);
		i++;
	}
	
	
	for(j=1; j<=n-1; j++){
		for(i=0; i<=j-1; i++){
			if(int maxv>R[j]-R[i]){
				maxv = R[j]-R[i];	
			}
		}
	}
	printf("%d",maxv);
}

Compiler output:
main.c: In function 'main':
main.c:4:13: error: array size missing in 'R'
    4 |         int R[];
      |             ^
main.c:6:17: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |                 scnaf("%d",&R[i]);
      |                 ^~~~~
      |                 scanf
main.c:6:31: error: 'i' undeclared (first use in this function)
    6 |                 scnaf("%d",&R[i]);
      |                               ^
main.c:6:31: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:13: error: 'j' undeclared (first use in this function)
   11 |         for(j=1; j<=n-1; j++){
      |             ^
main.c:13:28: error: expected expression before 'int'
   13 |                         if(int maxv>R[j]-R[i]){
      |                            ^~~
main.c:14:33: error: 'maxv' undeclared (first use in this function)
   14 |                                 maxv = R[j]-R[i];
      |                                 ^~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:10:21: error: expected expression before '<' token
   10 |       for(j=i;j<len;<j++){
      |                     ^
Language: C

#include<stdio.h>

int main(){
  int n;
  int rt;
  int max = 0;
  int min = 100000;
  int ans = 0
  scanf("%d",&n);

  for(int i =0;i<n; i++){
    scanf("%d", &rt);
    if(max<rt){
      max=rt;
    }
    if(min>rt){
      min = rt;
    }
  }
  ans = max - min;
  printf("%d",ans);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:3: error: expected ',' or ';' before 'scanf'
    9 |   scanf("%d",&n);
      |   ^~~~~
Language: C

#include<stdio.h>
int main(void){
	int n,c;
	int R[10000];
	while((scanf("%d",&n))!=EOF){
		scnaf("%d",&R[i]);
		i++;
	}
	
	
	for(j=1; j<=n-1; j++){
		for(i=0; i<=j-1; i++){
			if(int maxv>R[j]-R[i]){
				maxv = R[j]-R[i];	
			}
		}
	}
	printf("%d",maxv);
}

Compiler output:
main.c: In function 'main':
main.c:6:17: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |                 scnaf("%d",&R[i]);
      |                 ^~~~~
      |                 scanf
main.c:6:31: error: 'i' undeclared (first use in this function)
    6 |                 scnaf("%d",&R[i]);
      |                               ^
main.c:6:31: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:13: error: 'j' undeclared (first use in this function)
   11 |         for(j=1; j<=n-1; j++){
      |             ^
main.c:13:28: error: expected expression before 'int'
   13 |                         if(int maxv>R[j]-R[i]){
      |                            ^~~
main.c:14:33: error: 'maxv' undeclared (first use in this function)
   14 |                                 maxv = R[j]-R[i];
      |                                 ^~~~
Language: C

#include<stdio.h>

int main(){
	long x,y,i,n;
	long R[200000],max,min;

	scanf("%ld",&n);

	max=-1;

	for(i=0;i<n;i++){
		scanf("%ld"&R[i]);
	}

	min = R[0];

	for(i=1;i<n;i++){
		x = R[i] - min;
		if(max<x)max = x;
		if(min>R[i])min = R[i];
	}

	printf("%ld\n",max);
}

Compiler output:
main.c: In function 'main':
main.c:12:28: error: invalid operands to binary & (have 'char *' and 'long int')
   12 |                 scanf("%ld"&R[i]);
      |                       ~~~~~^~~~~
      |                       |      |
      |                       char * long int
Language: C

#include<stdio.h>

int main(void){
    int i = 0;
    int min = 1000000000;
    int max = -1000000000;
    scanf("%d\n", &i);
    while((scanf("%d\n", &i)) != EOF){
        if((i - min) > max) max = i - min;
        if(i < min) min = i;
    }
    printf("%d\n", max);
    return 0;
}  
nomur

Compiler output:
main.c:15:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
   15 | nomur
      | ^~~~~
Language: C

#include<stdio.h>

int main(void){
    int i = 0;
    long min = 1000000000;
    long max = -1000000000;
    scanf("%d\n", &i);
    while((scanf("%d\n", &i)) != EOF){
        if((i - min) > max) max = i - min;
        if(i < min) min = i;
    }
    printf("%d\n", max);
    return 0;
}  
nomur

Compiler output:
main.c:15:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
   15 | nomur
      | ^~~~~
Language: C

#include<stdio.h>

int main(){
	long x,y,i,n;
	long R[200000],max,min;

	scanf("%ld",&n);

	max=-1;

	for(i=0;i<n;i++){
		scanf("%ld"&R[i]);
	}

	min = R[0];

	for(i=1;i<n;i++){
		x = R[i] - min;
		if(max<x)max = x;
		if(min>R[i])min = R[i];
	}

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

Compiler output:
main.c: In function 'main':
main.c:12:28: error: invalid operands to binary & (have 'char *' and 'long int')
   12 |                 scanf("%ld"&R[i]);
      |                       ~~~~~^~~~~
      |                       |      |
      |                       char * long int
Language: C

#include<stdio.h>
int main(void){
	int n,c;
	int R[10000];
	int maxv=0;
	i=0;
	while((scanf("%d",&n))!=EOF){
		scnaf("%d",&R[i]);
		i++;
	}
	
	
	for(int j=1; j<=n-1; j++){
		for(int i=0; i<=j-1; i++){
			if(maxv>R[j]-R[i]){
				maxv = R[j]-R[i];	
			}
		}
	}
	printf("%d",maxv);
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: 'i' undeclared (first use in this function)
    6 |         i=0;
      |         ^
main.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:17: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    8 |                 scnaf("%d",&R[i]);
      |                 ^~~~~
      |                 scanf
Language: C

#include<stdio.h>
int main(void){
	int n,c;
	int R[10000];
	int maxv=0;
	int i=0;
	while((scanf("%d",&n))!=EOF){
		scnaf("%d",&R[i]);
		i++;
	}
	
	
	for(int j=1; j<=n-1; j++){
		for(int i=0; i<=j-1; i++){
			if(maxv>R[j]-R[i]){
				maxv = R[j]-R[i];	
			}
		}
	}
	printf("%d",maxv);
}

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

int main(int argc, char const *argv[]){
	int max=0;
	int a[1000]=0;
	int count=0;
	

	for (int i = 0; i < count; i++){
		scanf("%d\n", &a[i]);
		count++;
	}
	max=a[1]-a[0];
	for (int k = 0; k < count; k++){
		for (int s = 0; s < count; s++){
			if ((a[k]-a[s])>max){
				max=(a[k]-a[s]);
			}else{
			}
		}
	}
	printf("%d\n", max);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:21: error: invalid initializer
    3 |         int a[1000]=0;
      |                     ^
main.c:8:17: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 |                 scanf("%d\n", &a[i]);
      |                 ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(int argc, char const *argv[]){
main.c:8:17: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 |                 scanf("%d\n", &a[i]);
      |                 ^~~~~
main.c:8:17: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:20:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   20 |         printf("%d\n", max);
      |         ^~~~~~
main.c:20:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:20:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:20:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>

int main(void){
	int n,c,X;
	int R[10000];
	int maxv=0;
	int i=0;
	while((scanf("%d",&n))!=EOF){
		scnaf("%d",&X);
		R[i]=X;
		i++;
	}
	
	
	for(int j=1; j<=n-1; j++){
		for(int i=0; i<=j-1; i++){
			if(maxv>R[j]-R[i]){
				maxv = R[j]-R[i];	
			}
		}
	}
	printf("%d",maxv);
}

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

#include<stdio.h>

int main(void){
        int i, k, n;
        int max = -10000;
        int r[10000];

        scanf("%d", n);
        for(i=0; i<n; i++){
                scanf("%d", r[i]);
        }
        for(i=1; i<=n; i++){
                for(k=1; k<i; k++){
                        if(max < input[i] - input[k]){
                                max = input[i] - input[k];
                        }
                }
        }
        printf("%d", max);
        return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:34: error: 'input' undeclared (first use in this function); did you mean 'int'?
   14 |                         if(max < input[i] - input[k]){
      |                                  ^~~~~
      |                                  int
main.c:14:34: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(){
	int max=-1000000000
	int n,i=0,j;
	int R[200000];
	scanf("%d",&n);
	while(i<n){
		scanf("%d",&R[i]);
		i++;
	}
	for(i=0;i<n;i++){
		for(j=i;j<n;j++){
			if((R[j]-R[i])>max) max=R[j]-R[i];
		}
	}
	printf("%d",max);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: expected ',' or ';' before 'int'
    5 |         int n,i=0,j;
      |         ^~~
main.c:7:21: error: 'n' undeclared (first use in this function)
    7 |         scanf("%d",&n);
      |                     ^
main.c:7:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:15: error: 'i' undeclared (first use in this function)
    8 |         while(i<n){
      |               ^
main.c:13:21: error: 'j' undeclared (first use in this function)
   13 |                 for(j=i;j<n;j++){
      |                     ^
Language: C

#include <stdio.h>

#define N 200000

int main(){
  int n, i, j;
  int max = INT_MIN;
  scanf("%d", &n);
  int num[N];
  for(i = 0; i < n; i++) scanf("%d", &num[i]);
  for(i = 0; i <= n - 2; i++){
    for(j = i + 1; j <= n - 1; j++){
      int diff = num[j] - num[i];
      if(diff > max) max = diff;
    }
  }
  printf("%d\n", max);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:13: error: 'INT_MIN' undeclared (first use in this function)
    7 |   int max = INT_MIN;
      |             ^~~~~~~
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:7:13: note: each undeclared identifier is reported only once for each function it appears in
    7 |   int max = INT_MIN;
      |             ^~~~~~~
Language: C

#include <stdio.h>

int main(){
	int max=-1000000000
	int n,i=0,j;
	int R[200000];
	scanf("%d",&n);
	while(i<n){
		scanf("%d",R[i]);
		i++;
	}
	for(i=0;i<n;i++){
		for(j=i;j<n;j++){
			if((R[j]-R[i])>max) max=R[j]-R[i];
		}
	}
	printf("%d",max);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: expected ',' or ';' before 'int'
    5 |         int n,i=0,j;
      |         ^~~
main.c:7:21: error: 'n' undeclared (first use in this function)
    7 |         scanf("%d",&n);
      |                     ^
main.c:7:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:15: error: 'i' undeclared (first use in this function)
    8 |         while(i<n){
      |               ^
main.c:13:21: error: 'j' undeclared (first use in this function)
   13 |                 for(j=i;j<n;j++){
      |                     ^
Language: C

#include<stdio.h>
#define N 200000 

int main(void){
int Rt[N], RMAX = 0, RANS = 0;
int n, s;
int i, j;

scanf("%d",&n);
for(i = 0; i < n; i++){
scanf("%d", &s);
Rt[i] = s;
}	
	RANS = Rt[0]-Rt[1]
for( i = 0; i < n; i++){
	RMAX = Rt[i];
for( j = i + 1; j < n; j++){
if( Rt[j] > RMAX) RMAX = Rt[j];
}
	
	if(RANS < Rt[i] - RMAX)RANS = Rt[i] - RMAX;
}
printf("%d\n", RANS);



return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:27: error: expected ';' before 'for'
   14 |         RANS = Rt[0]-Rt[1]
      |                           ^
      |                           ;
   15 | for( i = 0; i < n; i++){
      | ~~~
Language: C

#include<stdio.h>

int main(void){
	int n,c,X;
	int R[10000];
	int maxv=0;
	int i=0;
	
	while((scanf("%d",&X))!=EOF){
		R[i]=X;
		i++;
	}
	N=i;
	
	for(int j=1; j<=n-1; j++){
		for(int i=0; i<=j-1; i++){
			if(maxv<R[j]-R[i]){
				maxv = R[j]-R[i];	
			}
		}
	}
	printf("%d\n",maxv);
}

Compiler output:
main.c: In function 'main':
main.c:13:9: error: 'N' undeclared (first use in this function)
   13 |         N=i;
      |         ^
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void)
{
  int N;
  scanf("%d",&N);
  int num[N];
  int i;
  for(i=0;i++;i<N){
   scanf("%d", &num[i]);
   i++;
  }
  maxv=-1000000000
  minv=num[0];
  for(i=0;i++;i<N){
   if(maxv<num[j]-minv) maxv=num[j]-minv;
   if(minv>num[j]) minv=num[j];
 }
 return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:13:3: error: 'maxv' undeclared (first use in this function)
   13 |   maxv=-1000000000
      |   ^~~~
main.c:13:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:19: error: expected ';' before 'minv'
   13 |   maxv=-1000000000
      |                   ^
      |                   ;
   14 |   minv=num[0];
      |   ~~~~             
main.c:16:16: error: 'j' undeclared (first use in this function)
   16 |    if(maxv<num[j]-minv) maxv=num[j]-minv;
      |                ^
main.c:16:19: error: 'minv' undeclared (first use in this function)
   16 |    if(maxv<num[j]-minv) maxv=num[j]-minv;
      |                   ^~~~
Language: C

#include <stdio.h>

int main(int argc, char argv[]){
	int n;
	int R,R2;

	scanf("%d",&n);
	int i;
	int m=0;
	scanf("%d",&R);
	scanf("%d",&R2);	
	int min=R, max=R2-R;
	for(i=2;i<n;i++){
		scanf("%d",&R);
		if(min > R)min = R;
		m = R - min;#include <stdio.h>

int main(int argc, char argv[]){
	int n;
	int R,R2;

	scanf("%d",&n);
	int i;
	int m=0;
	scanf("%d",&R);
	int min=R, max=INT_MIN;
	for(i=2;i<n;i++){
		scanf("%d",&R);
		if(min > R)min = R;
		m = R - min;
		if(m > max)max = m;
	}
	printf("%d\n",m);

	return 0;
}
		if(m > max)max = m;
	}
	printf("%d\n",m);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:29: error: stray '#' in program
   16 |                 m = R - min;#include <stdio.h>
      |                             ^
main.c:16:30: error: 'include' undeclared (first use in this function)
   16 |                 m = R - min;#include <stdio.h>
      |                              ^~~~~~~
main.c:16:30: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:39: error: 'stdio' undeclared (first use in this function); did you mean 'stdin'?
   16 |                 m = R - min;#include <stdio.h>
      |                                       ^~~~~
      |                                       stdin
main.c:18:1: error: expected expression before 'int'
   18 | int main(int argc, char argv[]){
      | ^~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:6:3: error: 'j' undeclared (first use in this function)
    6 |   j=0;
      |   ^
main.c:6:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:13:3: error: 'maxv' undeclared (first use in this function)
   13 |   maxv=-1000000000
      |   ^~~~
main.c:13:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:19: error: expected ';' before 'minv'
   13 |   maxv=-1000000000
      |                   ^
      |                   ;
   14 |   minv=num[0];
      |   ~~~~             
main.c:16:19: error: 'minv' undeclared (first use in this function)
   16 |    if(maxv<num[i]-minv) maxv=num[i]-minv;
      |                   ^~~~
Language: C

#include <stdio.h>

int main(int argc, char const *argv[]){
	int max=0;
	int a[1000]=0;

	int n;
	scanf("%d", &n);
	for (int i = 0; i < n; i++){
		scanf("%d", &a[i]);
	}
	max=a[1]-a[0];
	for (int k = 0; k < n; k++){
		for (int s = 0; s < n; s++){
			if ((a[k]-a[s])>max){
				max=(a[k]-a[s]);
			}else{
			}
		}
	}
	printf("%d\n", max);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:21: error: invalid initializer
    5 |         int a[1000]=0;
      |                     ^
Language: C

#include <stdio.h>

int main(){
	int max=0;
	int a[1000]=0;
	int n;
	scanf("%d", &n);
	for (int i = 0; i < n; i++){
		scanf("%d", &a[i]);
	}
	max=a[1]-a[0];
	for (int k = 0; k < n; k++){
		for (int s = 0; s < n; s++){
			if ((a[k]-a[s])>max){
				max=(a[k]-a[s]);
			}else{
			}
		}
	}
	printf("%d\n", max);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:21: error: invalid initializer
    5 |         int a[1000]=0;
      |                     ^
Language: C

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

Compiler output:
main.c:2:1: error: expected identifier or '(' before '?' token
    2 | ??
      | ^
Language: C

#include <stdio.h>
#define N 20000

int main(){
	int max=0;
	int a[N]=0;
	int n;
	scanf("%d", &n);
	for (int i = 0; i < n; i++){
		scanf("%d", &a[i]);
	}
	max=a[1]-a[0];
	for (int k = 0; k < n; k++){
		for (int s = 0; s < k; s++){
			if ((a[k]-a[s])>max){
				max=(a[k]-a[s]);
			}else{
			}
		}
	}
	printf("%d\n", max);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:18: error: invalid initializer
    6 |         int a[N]=0;
      |                  ^
Language: C

include<stdio.h>

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

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

include<stdio.h>
??
int main(void)
{
 int N;
 scanf("%d",&N);
 int num[N];
 int i;
 for(i=0;i++;i<N){
  scanf("%d", &num[i]);
  i++;
 }
 int maxv=-1000000000;
 int minv=num[0];
 for(i=0;i++;i<N){
  if(maxv<num[i]-minv) maxv=num[i]-minv;
  if(minv>num[i]) minv=num[i];
 }
 printf("%d\n",maxv);
 return 0;
}

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

include<stdio.h>

int main(void)
{
??int N;
??scanf("%d",&N);
??int num[N];
??int i;
??for(i=0;i++;i<N){
????scanf("%d", &num[i]);
????i++;
??}
??int maxv=-1000000000;
??int minv=num[0];
??for(i=0;i++;i<N){
????if(maxv<num[i]-minv) maxv=num[i]-minv;
????if(minv>num[i]) minv=num[i];
??}
??printf("%d\n",maxv);
??return 0;
}

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

#include<stdio.h>
#define M 200000

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

Compiler output:
main.c: In function 'main':
main.c:18:25: error: 'x' undeclared (first use in this function)
   18 |                         x=a[i]-a[j;]
      |                         ^
main.c:18:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:35: error: expected ']' before ';' token
   18 |                         x=a[i]-a[j;]
      |                                   ^
      |                                   ]
main.c:18:37: error: expected ';' before 'if'
   18 |                         x=a[i]-a[j;]
      |                                     ^
      |                                     ;
   19 |                         if((x>max){
      |                         ~~           
main.c:26:1: error: expected declaration or statement at end of input
   26 | }
      | ^
Language: C

#include<stdio.h>
int main(void){
    int i,n,max,min,x;
    int a[200000];
    scanf("%d", n);
    for(i=0;i<set;i++) {
        scanf("%d",&a[i]);
    }
 
    for(i=1;i<set;i++){
        if(i==1){
            max = a[1]-a[0];
            min = a[0];
        }
        x = a[i]-min;
        if(x>max)max = x;
        if(a[i]<min)min=a[i];
    }
    printf("%d\n", max);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:15: error: 'set' undeclared (first use in this function)
    6 |     for(i=0;i<set;i++) {
      |               ^~~
main.c:6:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

include<stdio.h>

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

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

#include<stdio.h>
int main(void){
    int i,n,max,min,x;
    int a[200000];
    scanf("%d", n);
    for(i=0;i<set;i++) {
        scanf("%d",&a[i]);
    }
 
    for(i=1;i<n;i++){
        if(i==1){
            max = a[1]-a[0];
            min = a[0];
        }
        x = a[i]-min;
        if(x>max)max = x;
        if(a[i]<min)min=a[i];
    }
    printf("%d\n", max);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:15: error: 'set' undeclared (first use in this function)
    6 |     for(i=0;i<set;i++) {
      |               ^~~
main.c:6:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#define M 200000

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

Compiler output:
main.c: In function 'main':
main.c:18:25: error: 'x' undeclared (first use in this function)
   18 |                         x=a[i]-a[j;]
      |                         ^
main.c:18:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:35: error: expected ']' before ';' token
   18 |                         x=a[i]-a[j;]
      |                                   ^
      |                                   ]
main.c:18:37: error: expected ';' before 'if'
   18 |                         x=a[i]-a[j;]
      |                                     ^
      |                                     ;
   19 |                         if(x>max){
      |                         ~~
Language: C

#include<stdio.h>

int main(void){
	int n,c,X;
	int R[200000];
	int maxv=0;
	int i=0;
	
	while((scanf("%d",&X))!=EOF){
		R[i]=X;
		i++;
	}
	n=i;
	printf("n=%d\n",n);
	
	for(j=1; j<=n-1; j++){
		for(i=0; i<=j-1; i++){
			if(maxv<R[j]-R[i]){
				maxv = R[j]-R[i];
			}
		}
	}
	printf("%d\n",maxv);
}

Compiler output:
main.c: In function 'main':
main.c:16:13: error: 'j' undeclared (first use in this function)
   16 |         for(j=1; j<=n-1; j++){
      |             ^
main.c:16:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#define N 200000 

int main(void){
int Rt[N], RMAX = 0, RANS = 0, R;
int n, s;
int i, j, k = -1;

scanf("%d",&n);
for(i = 0; i < n; i++){
scanf("%d", &s);
Rt[i] = s;
}	
	RANS = Rt[1] - Rt[0];
for( i = 0; i < n-1; i++){
	RMAX = Rt[i + 1];
		if (k < i){
for( j = i + 1; j < n; j++){
	if( Rt[j] > RMAX) {
		RMAX = Rt[j];
		k = j;
}
		}
			else RMAX = Rt[k];
	R = RMAX - Rt[i] ;
	if(RANS < R)RANS = R;
}
printf("%d\n", RANS);



return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:25: error: expected '}' before 'else'
   24 |                         else RMAX = Rt[k];
      |                         ^~~~
Language: C

include<stdio.h>

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

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

#include<stdio.h>
#define M 200000

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

Compiler output:
main.c: In function 'main':
main.c:18:25: error: 'x' undeclared (first use in this function)
   18 |                         x=a[i]-a[j];
      |                         ^
main.c:18:25: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
??
int main(void)
{
??int N;
??scanf("%d",&N);
??int num[N];
??int i;
??for(i=0;i<N;i++){
????scanf("%d", &num[i]);
????i++;
??}
??int maxv=-1000000000;
??int minv=num[0];
??for(i=1;i<N;i++){
????if(maxv<num[i]-minv) maxv=num[i]-minv;
????if(minv>num[i]) minv=num[i];
??}
??printf("%d\n",maxv);
??return 0;
}

Compiler output:
main.c:2:1: error: expected identifier or '(' before '?' token
    2 | ??
      | ^
Language: C

#include <stdio.h>
#define N 20000

int main(){
	int max=0;
	int min;
	int a[N];
	int n;
	scanf("%d", &n);
	for (int i = 0; i < n; i++){
		scanf("%d", &a[i]);
	}
	max=a[1]-a[0];
	min = a[0];
	for (int k = 1; k < n; k++)
	{
		if( max < R[k]-min ) max = R[k] - min;
    else max = max;
    if( min < R[k] ) min = min;
    else min = R[k];
	}

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

Compiler output:
main.c: In function 'main':
main.c:17:27: error: 'R' undeclared (first use in this function)
   17 |                 if( max < R[k]-min ) max = R[k] - min;
      |                           ^
main.c:17:27: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main()
{
	int i,n;
	scanf("%d",&n);
	int max=0,maxi,min=1000000000,mini,a[n];
	int karimin=1000000000;karimax=0;
	
	for(i=0;i<n,i++){
		scanf("%d",&a[i]);
		
		if(max<a[i]){
			maxi=i;
			max=a[i];
		}
		if(min>a[i]){
			mini=i;
			min=a[i];
		}
	}
	
	for(i=0;i<maxi;i++){
		if(karimin>a[i]){
			karimin=a[i];
		}
	}
	
	karimin=max-karimin;
	
	for(i=mini;i<n;i++){
		if(karimax<a[i]){
			karimax=a[i];
		}
	}
	karimax=karimax-min;
	if(karimax>karimin){
		printf("%d",karimax);
	}else{
		printf("%d",karimin);
	}
	
}

Compiler output:
main.c: In function 'main':
main.c:8:32: error: 'karimax' undeclared (first use in this function); did you mean 'karimin'?
    8 |         int karimin=1000000000;karimax=0;
      |                                ^~~~~~~
      |                                karimin
main.c:8:32: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:24: error: expected ';' before ')' token
   10 |         for(i=0;i<n,i++){
      |                        ^
      |                        ;
Language: C

#include<stdio.h>


int main(){
    int i,a,num,d,x[1000] ;
    int maxv = 99999,minv = -999999;
    scanf("%d",&a);
    for(i=0;i<a;i++){
        scanf("%d",&x[i]);
    }
    minv=x[0];
    maxv=x[1]-x[0];
    for(i=0;i<a-1;i++){
        d = x[i]-minv;
        if(maxv < d) maxv = d;
        else maxv =maxv;
        if(minv > x[i]) minv = x[i];
        else minv = minv;
    }
    printf("%d\n",max);
    return 0 ;
}

Compiler output:
main.c: In function 'main':
main.c:20:19: error: 'max' undeclared (first use in this function); did you mean 'maxv'?
   20 |     printf("%d\n",max);
      |                   ^~~
      |                   maxv
main.c:20:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>


int main(){
    int i,a,num,d,x[1000] ;
    int maxv = 0,minv = -999999;
    scanf("%d",&a);
    for(i=0;i<a;i++){
        scanf("%d",&x[i]);
    }
    minv=x[0];
    maxv=x[1]-x[0];
    for(i=1;i<a;i++){
        d = x[i]-minv;
        if(maxv < d) maxv = d;
        else maxv =maxv;
        if(minv > x[i]) minv = x[i];
        else minv = minv;
    }
    printf("%d\n",max);
    return 0 ;
}

Compiler output:
main.c: In function 'main':
main.c:20:19: error: 'max' undeclared (first use in this function); did you mean 'maxv'?
   20 |     printf("%d\n",max);
      |                   ^~~
      |                   maxv
main.c:20:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:15:41: error: expected expression before '<' token
   15 |                                 if(a[i]=<a[i-1]){
      |                                         ^
Language: C

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:9:28: warning: overflow in conversion from 'long int' to 'int' changes value from '10000000000' to '1410065408' [-Woverflow]
    9 |         int a[n],min[n],mi=10000000000;
      |                            ^~~~~~~~~~~
main.c:13:23: warning: comparison between pointer and integer
   13 |                 if(min>a[i]){
      |                       ^
main.c:22:33: error: subscripted value is neither array nor pointer nor vector
   22 |                 if(max<a[i+1]-mi[i]){
      |                                 ^
main.c:23:38: error: subscripted value is neither array nor pointer nor vector
   23 |                         max=a[i+1]-mi[i];
      |                                      ^
Language: C

#include <stdio.h>

int max(int a, int b){
	return a>b?a:b;
}

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

int main(){
	
	int n;
	scanf("%d",&n);
	int i,r,,minv=2000000000,maxv=-1000000000;
	for(i=0;i<n;i++){
		scanf("%d",&r[i]);
		maxv = max(maxv, r-minv);
		minv = min(minv, r);		
    }

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

Compiler output:
main.c: In function 'main':
main.c:15:17: error: expected identifier or '(' before ',' token
   15 |         int i,r,,minv=2000000000,maxv=-1000000000;
      |                 ^
main.c:17:30: error: subscripted value is neither array nor pointer nor vector
   17 |                 scanf("%d",&r[i]);
      |                              ^
main.c:18:17: error: 'maxv' undeclared (first use in this function); did you mean 'max'?
   18 |                 maxv = max(maxv, r-minv);
      |                 ^~~~
      |                 max
main.c:18:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:36: error: 'minv' undeclared (first use in this function); did you mean 'min'?
   18 |                 maxv = max(maxv, r-minv);
      |                                    ^~~~
      |                                    min
Language: C

#include <stdio.h>

int max(int a, int b){
	return a>b?a:b;
}

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

int main(){
	
	int n;
	scanf("%d",&n);
	int i,r,,minv=2000000000,maxv=-1000000000;
	for(i=0;i<n;i++){
		scanf("%d",&r);
		maxv = max(maxv, r-minv);
		minv = min(minv, r);		
    }

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

Compiler output:
main.c: In function 'main':
main.c:15:17: error: expected identifier or '(' before ',' token
   15 |         int i,r,,minv=2000000000,maxv=-1000000000;
      |                 ^
main.c:18:17: error: 'maxv' undeclared (first use in this function); did you mean 'max'?
   18 |                 maxv = max(maxv, r-minv);
      |                 ^~~~
      |                 max
main.c:18:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:36: error: 'minv' undeclared (first use in this function); did you mean 'min'?
   18 |                 maxv = max(maxv, r-minv);
      |                                    ^~~~
      |                                    min
Language: C

#include <stdio.h>

int max(int a, int b){
	return a>b?a:b;
}

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

int main(){
	int i,n;
	scanf("%d",&n);
	int r[n],minv[n],maxv[n],Max=-1000000000;
	for(i=0;i<n;i++){
		scanf("%d",&r[i]);
    }

	min[0]=r[0];
	max[0]=r[n-1];
	for(i=1;i<n-1;i++){
		minv[i] = min(minv[i-1],r[i]);
		maxv[i] = max(max[i-1],r[n-1-i]);
	}
	for(i=0;i<n-1;i++){
		Max = max(Max, max[n-2-i]-min[i]);
	}
	printf("%d\n", Max);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:12: error: subscripted value is neither array nor pointer nor vector
   19 |         min[0]=r[0];
      |            ^
main.c:20:12: error: subscripted value is neither array nor pointer nor vector
   20 |         max[0]=r[n-1];
      |            ^
main.c:23:34: error: subscripted value is neither array nor pointer nor vector
   23 |                 maxv[i] = max(max[i-1],r[n-1-i]);
      |                                  ^
main.c:26:35: error: subscripted value is neither array nor pointer nor vector
   26 |                 Max = max(Max, max[n-2-i]-min[i]);
      |                                   ^
main.c:26:46: error: subscripted value is neither array nor pointer nor vector
   26 |                 Max = max(Max, max[n-2-i]-min[i]);
      |                                              ^
Language: C

#include <stdio.h>

int main(){

    int t; //first line

    scanf("%d",&t);

    int r[t];
    int i = 0;
    int j;
    int p;


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

    i = 0;
    p = r[1] - r[0];
    int minr = r[0];

    for(j=1, j<t, j++){
        
        if(minr > r[j-1]){
            minr = r[j-1];
        }
        
        if(p < (r[j] - minr)){
            p = r[j] - minr;
        }
    }


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

    return 0;

}


Compiler output:
main.c: In function 'main':
main.c:24:22: error: expected ';' before ')' token
   24 |     for(j=1, j<t, j++){
      |                      ^
      |                      ;
main.c:24:22: error: expected expression before ')' token
Language: C

include <stdio.h>
#define inf 200000
int max(int a,int b){
  return (a<b?b:a);
}
int min(int a,int b){
  return (a<b?a:b);
}

int main(){
int n;
int minv;
int maxv;
scanf("%d¥n",&n);
int r[inf];
for(int j;j<n;j++){
  scanf("%d\n",&r[j]);
}
maxv=-20000000;
minv = r[0];
for (int j = 0;j< n;j++) {
  maxv=max(r[j]-minv,maxv);
  minv=min(r[j],minv);

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



Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
main.c: In function 'main':
main.c:14:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   14 | scanf("%d¥n",&n);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include <stdio.h>
main.c:14:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   14 | scanf("%d¥n",&n);
      | ^~~~~
main.c:14:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:22:8: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
   22 |   maxv=max(r[j]-minv,maxv);
      |        ^~~
main.c:26:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   26 | printf("%d\n",maxv );
      | ^~~~~~
main.c:26:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:26:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:26:1: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>
#include <math.h>
#include <unistd.h>
int main(){
int n;
int r[200000];
int i,j;
int temp;
scanf("%d",&n);
for(i=0;i<n;i++){
	scanf("%d",&r[i]);
}
temp=r[1]-r[0];

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



Compiler output:
main.c: In function 'main':
main.c:28:9: error: expected declaration or statement at end of input
   28 |         return 0;
      |         ^~~~~~
Language: C

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

}


Compiler output:
main.c: In function 'main':
main.c:10:11: error: expected ')' before ';' token
   10 | while(j>=0;&&r[i]>t;){
      |      ~    ^
      |           )
main.c:16:8: error: expected expression before '}' token
   16 | if(i>0)}
      |        ^
Language: C

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

}


Compiler output:
main.c: In function 'main':
main.c:10:11: error: expected ')' before ';' token
   10 | while(j>=0;&&r[i]>t;){
      |      ~    ^
      |           )
main.c:16:8: error: expected expression before '}' token
   16 | if(i>0)}
      |        ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define N 13
#define pi M_PI

int main(){
    int n;
    scanf("%d",&n);
    int a[200000];
    int max,kari;
    kari=0;
    scanf("%d%d",a[0]a[1]);
    max=a[1]-a[0];
    if(a[0]>a[1]) kari=a[1];
    int aa;
    for(int i=2;i<n;i++){
        scanf("%d",&aa);
        if(max<aa-min){
            max = aa-min;
        }
        if(aa<min){
            min = aa;
        }
    }
    printf("%d\n",max);
   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:22: error: expected ')' before 'a'
   13 |     scanf("%d%d",a[0]a[1]);
      |          ~           ^
      |                      )
main.c:19:19: error: 'min' undeclared (first use in this function); did you mean 'main'?
   19 |         if(max<aa-min){
      |                   ^~~
      |                   main
main.c:19:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void)
{
	int i, j, R[200000], n, max, min, d;

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

	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:15:30: error: 'm' undeclared (first use in this function)
   15 |                 if (max < d) m = d;
      |                              ^
main.c:15:30: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void)
{
	int i, j, R[200000], n, max, min, d;

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

	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:18:24: error: 'm' undeclared (first use in this function)
   18 |         printf("%d\n", m);
      |                        ^
main.c:18:24: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void)
{
	int i, j, R, n, max, min, d;

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

	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:12:28: error: subscripted value is neither array nor pointer nor vector
   12 |                 if (min > R[i]) min = R;
      |                            ^
Language: C

#include <stdio.h>
int main(void){
    int n,i,t,samll,dif,mv,flag=0;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d",&t);
        if(i==0) small = t;
        if(i>flag) dif = t-small;
        if(small>t)
        {
            small = t;
            flag = i;
        }
        if(i==1) mv = dif;
        if(i>1)
        {
            if(mv<dif) mv = dif;
        }
    }
    printf("%d\n",mv);
}


Compiler output:
main.c: In function 'main':
main.c:8:18: error: 'small' undeclared (first use in this function); did you mean 'samll'?
    8 |         if(i==0) small = t;
      |                  ^~~~~
      |                  samll
main.c:8:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int mian(){
    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 'mian':
main.c:5:15: error: 'INT_MIN' undeclared (first use in this function)
    5 |     int max = INT_MIN;
      |               ^~~~~~~
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:5:15: note: each undeclared identifier is reported only once for each function it appears in
    5 |     int max = INT_MIN;
      |               ^~~~~~~
main.c:6:12: error: 'INT_MAX' undeclared (first use in this function)
    6 |     int Rt[INT_MAX];
      |            ^~~~~~~
main.c:6:12: note: 'INT_MAX' is defined in header '<limits.h>'; this is probably fixable by adding '#include <limits.h>'
Language: C

#include<stdio.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:5:15: error: 'INT_MIN' undeclared (first use in this function)
    5 |     int max = INT_MIN;
      |               ^~~~~~~
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:5:15: note: each undeclared identifier is reported only once for each function it appears in
    5 |     int max = INT_MIN;
      |               ^~~~~~~
main.c:6:12: error: 'INT_MAX' undeclared (first use in this function)
    6 |     int Rt[INT_MAX];
      |            ^~~~~~~
main.c:6:12: note: 'INT_MAX' is defined in header '<limits.h>'; this is probably fixable by adding '#include <limits.h>'