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

#include <stdio.h>
int main(){
  int n,A[200000],j,max=-9999999999,min;

  scanf("%d",&n);
  for(i=0;i<n;i++)
    scanf("%d",A[i]);

  min=A[0];

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


Compiler output:
main.c: In function 'main':
main.c:3:25: warning: overflow in conversion from 'long int' to 'int' changes value from '-9999999999' to '-1410065407' [-Woverflow]
    3 |   int n,A[200000],j,max=-9999999999,min;
      |                         ^
main.c:6:7: error: 'i' undeclared (first use in this function)
    6 |   for(i=0;i<n;i++)
      |       ^
main.c:6:7: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:19:10: error: expected declaration specifiers or '...' before string constant
   19 |   printf("%d\n",max);
      |          ^~~~~~
main.c:19:17: error: unknown type name 'max'
   19 |   printf("%d\n",max);
      |                 ^~~
main.c:20:3: error: expected identifier or '(' before 'return'
   20 |   return 0;
      |   ^~~~~~
main.c:21:1: error: expected identifier or '(' before '}' token
   21 | }
      | ^
Language: C

#include <stdio.h>
int main(){
  int n,i,A[200000],j,max=-9999999999,min;

  scanf("%d",&n);
  for(i=0;i<n;i++)
    scanf("%d",A[i]);

  min=A[0];

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


Compiler output:
main.c: In function 'main':
main.c:3:27: warning: overflow in conversion from 'long int' to 'int' changes value from '-9999999999' to '-1410065407' [-Woverflow]
    3 |   int n,i,A[200000],j,max=-9999999999,min;
      |                           ^
main.c: At top level:
main.c:19:10: error: expected declaration specifiers or '...' before string constant
   19 |   printf("%d\n",max);
      |          ^~~~~~
main.c:19:17: error: unknown type name 'max'
   19 |   printf("%d\n",max);
      |                 ^~~
main.c:20:3: error: expected identifier or '(' before 'return'
   20 |   return 0;
      |   ^~~~~~
main.c:21:1: error: expected identifier or '(' before '}' token
   21 | }
      | ^
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define MAX 200000

int main (){
int R[MAX],n,i;
int maxv=-2000000000;
int minv;
scanf("%d",&n);
for(i=0;i<n;i++)scanf("%d",&R[i]);
minv=R[0];

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

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


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

#include<stdio.h>

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


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

#include <stdio.h>

int main()
{
   int n;
   int r[200000];
   int max = 0;
   int min = 10 * 10;

    scanf(“%d¥n”, &n);
   
   for(i = 0; i < n; i++){
      scanf(“%d¥n”, &r[i]);

      if(r[i] > max){
         max = r[i];
      } if(r[i] < min){
         min = r[i];
      }
   }

   printf(“%d¥n”, max-min);

   return 0;
}
      


Compiler output:
main.c: In function 'main':
main.c:10:11: error: stray '\342' in program
   10 |     scanf(<U+201C>%d<U+00A5>n<U+201D>, &n);
      |           ^~~~~~~~
main.c:10:12: error: expected expression before '%' token
   10 |     scanf(“%d¥n”, &n);
      |            ^
main.c:10:14: error: stray '\302' in program
   10 |     scanf(<U+201C>%d<U+00A5>n<U+201D>, &n);
      |                     ^~~~~~~~
main.c:10:16: error: stray '\342' in program
   10 |     scanf(<U+201C>%d<U+00A5>n<U+201D>, &n);
      |                              ^~~~~~~~
main.c:12:8: error: 'i' undeclared (first use in this function)
   12 |    for(i = 0; i < n; i++){
      |        ^
main.c:12:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:13: error: stray '\342' in program
   13 |       scanf(<U+201C>%d<U+00A5>n<U+201D>, &r[i]);
      |             ^~~~~~~~
main.c:13:14: error: expected expression before '%' token
   13 |       scanf(“%d¥n”, &r[i]);
      |              ^
main.c:13:16: error: stray '\302' in program
   13 |       scanf(<U+201C>%d<U+00A5>n<U+201D>, &r[i]);
      |                       ^~~~~~~~
main.c:13:18: error: stray '\342' in program
   13 |       scanf(<U+201C>%d<U+00A5>n<U+201D>, &r[i]);
      |                                ^~~~~~~~
main.c:22:11: error: stray '\342' in program
   22 |    printf(<U+201C>%d<U+00A5>n<U+201D>, max-min);
      |           ^~~~~~~~
main.c:22:12: error: expected expression before '%' token
   22 |    printf(“%d¥n”, max-min);
      |            ^
main.c:22:14: error: stray '\302' in program
   22 |    printf(<U+201C>%d<U+00A5>n<U+201D>, max-min);
      |                     ^~~~~~~~
main.c:22:16: error: stray '\342' in program
   22 |    printf(<U+201C>%d<U+00A5>n<U+201D>, max-min);
      |                              ^~~~~~~~
Language: C

#include<iostream>
#include<algorithm> //min,max

static const int MAX = 200000;
//static 存在し続ける
//const 値を書き換えない

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 = 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:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

//cで提出　事故る
#include<iostream>
#include<algorithm> //min,max
usint namespace std; //cin cout
static const int MAX = 200000;

//static 存在し続ける
//const 値を書き換えない

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 = 0;i < n; i++ ) {
        maxv = max(maxv, R[i] - minv);
        minv = min(minv, R[i]);
    }
    
    cout << maxv << endl; 
    
    return 0;
}


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

//cで提出　事故る
#include<iostream>
#include<algorithm> //min,max
using namespace std; //cin cout
static const int MAX = 200000;

//static 存在し続ける
//const 値を書き換えない

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++ ) { //i=1からじゃないとmaxv=0入ってしまう
        maxv = max(maxv, R[i] - minv);
        minv = min(minv, R[i]);
    }
    
    cout << maxv << endl; 
    
    return 0;
}


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

                                                                                                                                                        buffers
  1 #include <stdio.h>
  2 /* Maximam Profit */
  3 int main(void)
  4 {
  5   int n, i, max_dif, min;
  6   int z[200000];
  7
  8   scanf("%d", &n); /*整数の個数を入力*/
  9   for (i=0; i<n; i++){
 10     scanf("%d", &z[i]); /*整数を入力*/
 11   }
 12
 13   min = z[0]; /*最小値の初期設定*/
 14   max_dif = -1000000000; /*最大値の初期設定*/
 15   for (i=1; i<n; i++){
 16     if (z[i] - min > max_dif)
 17       max_dif = z[i] - min;
 18     if (z[i] < min)
 19       min = z[i];
 20   }
 21    printf("%d", max_dif);
 22
 23    return 0;
 24 }



Compiler output:
main.c:1:152: error: stray '\356' in program
    1 |                                                                                                                                                        <U+E0B2><U+E0B2> buffers
      |                                                                                                                                                        ^~~~~~~~
main.c:1:153: error: stray '\356' in program
    1 |                                                                                                                                                        <U+E0B2><U+E0B2> buffers
      |                                                                                                                                                                ^~~~~~~~
main.c:2:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant
    2 |   1 #include <stdio.h>
      |   ^
main.c:2:5: error: stray '#' in program
    2 |   1 #include <stdio.h>
      |     ^
Language: C

  1 #include <stdio.h>
  2 /* Maximam Profit */
  3 int main(void)
  4 {
  5   int n, i, max_dif, min;
  6   int z[200000];
  7
  8   scanf("%d", &n); /*整数の個数を入力*/
  9   for (i=0; i<n; i++){
 10     scanf("%d", &z[i]); /*整数を入力*/
 11   }
 12
 13   min = z[0]; /*最小値の初期設定*/
 14   max_dif = -1000000000; /*最大値の初期設定*/
 15   for (i=1; i<n; i++){
 16     if (z[i] - min > max_dif)
 17       max_dif = z[i] - min;
 18     if (z[i] < min)
 19       min = z[i];
 20   }
 21    printf("%d", max_dif);
 22
 23    return 0;
 24 }



Compiler output:
main.c:1:3: error: expected identifier or '(' before numeric constant
    1 |   1 #include <stdio.h>
      |   ^
main.c:1:5: error: stray '#' in program
    1 |   1 #include <stdio.h>
      |     ^
Language: C

#include<stdio.h>

int main(void) {

   int Rt[200000], Ri, Rj, i, j, l, n;
   int max = Rt[1] - Rt[01]

   scanf("%d", &n);

   for (i = 1; i <= n - 2; i++) {
     for (j = 2; j <= n - 1; j++) {
        l = Rt[j] - Rt[i];
          if (l > max) {
          max = l;
          }
     }
   }
     

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

   return 0;
}



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

#include<stdio.h>

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

    scanf("%d", &n);

    for(i = 0; i < n; i++){

        scanf("%d", &r[i]);

    }

    min = r[0];
    max = r[1] - r[0];

    for(i = 1; i < n-1; i++){

    if(max < r[i] - min)

        max = r[i] - min;

    if(min > r[i])

        min = r[i];
    }
    printf("%d\n",max);s

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:29:24: error: 's' undeclared (first use in this function)
   29 |     printf("%d\n",max);s
      |                        ^
main.c:29:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:29:25: error: expected ';' before 'return'
   29 |     printf("%d\n",max);s
      |                         ^
      |                         ;
   30 | 
   31 |     return 0;
      |     ~~~~~~
Language: C

#include<stdio.h>

int main(void) {

   int Rt[200000], Ri, Rj, i, j, l, n;
   int max = Rt[1] - Rt[01]

   scanf("%d", &n);

   for (i = 1; i <= n - 2; i++) {
     scanf("%d", &Rt[i]);
     for (j = 2; j <= n - 1; j++) {
        l = Rt[j] - Rt[i];
          if (l > max) {
          max = l;
          }
     }
   }
     

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

   return 0;
}



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

#include<stdio.h>

int main() {

   int Rt[200000], i, j, l, n;
   int max = Rt[1] - Rt[0]

   scanf("%d", &n);

   for (i = 1; i <= n - 2; i++) {
     scanf("%d", &Rt[i]);
     for (j = 2; j <= n - 1; j++) {
        l = Rt[j] - Rt[i];
          if (l > max) {
          max = l;
          }
     }
   }
     

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

   return 0;
}



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

#include<stdio.h>

int main() {

   int Rt[200000], i, j, l, n;
   int max = Rt[1] - Rt[0]

   scanf("%d", &n);

   for (i = 1; i <= n; i++) {
     scanf("%d", &Rt[i]);
     for (j = i + 1; j <= n; j++) {
        l = Rt[j] - Rt[i];
          if (l > max) {
          max = l;
          }
     }
   }
     

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

   return 0;
}



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

#include <stdio.h>

int main () {

    int n, max, min, i, x, s, t;
    int a[200000]

    scanf("%d", &n);

    max = 0; min = 0;

    for (i = 0; i < n; i++) {
        scanf("%d", &x);
        a[i] = x;
    }

    for (i = 0; i < n; i++) {
        if (max < a[i]) {
            max = a[i];
            s = i;
        } else if (min > a[i]) {
            min = a[i];
            t = i;
        }
    }

    if (s >= t) {
        printf("%d", max - min);
    else {
        printf("%d", min - max);
    }

    return 0;

}


Compiler output:
main.c: In function 'main':
main.c:8:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    8 |     scanf("%d", &n);
      |     ^~~~~
main.c:14:9: error: 'a' undeclared (first use in this function)
   14 |         a[i] = x;
      |         ^
main.c:14:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:29:5: error: expected '}' before 'else'
   29 |     else {
      |     ^~~~
Language: C

#include <stdio.h>

int main () {

    int n, max, min, i, x, s, t;
    int a[200000];

    scanf("%d", &n);

    max = 0; min = 0;

    for (i = 0; i < n; i++) {
        scanf("%d", &x);
        a[i] = x;
    }

    for (i = 0; i < n; i++) {
        if (max < a[i]) {
            max = a[i];
            s = i;
        } else if (min > a[i]) {
            min = a[i];
            t = i;
        }
    }

    if (s >= t) {
        printf("%d\n", max - min);
    else {
        printf("%d\n", min - max);
    }

    return 0;

}


Compiler output:
main.c: In function 'main':
main.c:29:5: error: expected '}' before 'else'
   29 |     else {
      |     ^~~~
Language: C

#include<stdio.h>

int main(void){
int a[200000],max,min;
for(k=0;k<n;k++){
scanf("%d",&a[k]);
}

max=a[1]-a[0];
min= a[1]-a[0];

for(i=0;i<n;i++){
 for(j=;j<n;j++){
 if(max-( a[j]-a[i]))>0
  max= a[j]-a[i];
if(min-( a[j]-a[i]))>0
  mix= a[j]-a[i];
}
}

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



Compiler output:
main.c: In function 'main':
main.c:5:5: error: 'k' undeclared (first use in this function)
    5 | for(k=0;k<n;k++){
      |     ^
main.c:5:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:11: error: 'n' undeclared (first use in this function)
    5 | for(k=0;k<n;k++){
      |           ^
main.c:12:5: error: 'i' undeclared (first use in this function)
   12 | for(i=0;i<n;i++){
      |     ^
main.c:13:6: error: 'j' undeclared (first use in this function)
   13 |  for(j=;j<n;j++){
      |      ^
main.c:13:8: error: expected expression before ';' token
   13 |  for(j=;j<n;j++){
      |        ^
main.c:14:22: error: expected expression before '>' token
   14 |  if(max-( a[j]-a[i]))>0
      |                      ^
main.c:16:21: error: expected expression before '>' token
   16 | if(min-( a[j]-a[i]))>0
      |                     ^
Language: C

#include<stdio.h>

int main(void){
int a[200000],max,min,k,n,i,j;
for(k=0;k<n;k++){
scanf("%d",&a[k]);
}

max=a[1]-a[0];
min= a[1]-a[0];

for(i=0;i<n;i++){
 for(j=;i+1<n;j++){
 if(max-( a[j]-a[i]))>0
  max= a[j]-a[i];
if(min-( a[j]-a[i]))>0
  mix= a[j]-a[i];
}
}

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




Compiler output:
main.c: In function 'main':
main.c:13:8: error: expected expression before ';' token
   13 |  for(j=;i+1<n;j++){
      |        ^
main.c:14:22: error: expected expression before '>' token
   14 |  if(max-( a[j]-a[i]))>0
      |                      ^
main.c:16:21: error: expected expression before '>' token
   16 | if(min-( a[j]-a[i]))>0
      |                     ^
Language: C

#include<stdio.h>

int main(void){
int a[200000],max,min,k,n,i,j;
for(k=0;k<n;k++){
scanf("%d",&a[k]);
}

max=a[1]-a[0];
min= a[1]-a[0];

for(i=0;i<n;i++){
 for(j=;i+1<n;j++){
 if(max-( a[j]-a[i]))>0;
  max= a[j]-a[i];
if(min-( a[j]-a[i]))>0;
  mix= a[j]-a[i];
}
}

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



Compiler output:
main.c: In function 'main':
main.c:13:8: error: expected expression before ';' token
   13 |  for(j=;i+1<n;j++){
      |        ^
main.c:14:22: error: expected expression before '>' token
   14 |  if(max-( a[j]-a[i]))>0;
      |                      ^
main.c:16:21: error: expected expression before '>' token
   16 | if(min-( a[j]-a[i]))>0;
      |                     ^
main.c:17:3: error: 'mix' undeclared (first use in this function); did you mean 'min'?
   17 |   mix= a[j]-a[i];
      |   ^~~
      |   min
main.c:17:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void){
int a[200000],max,min,k,n,i,j;
for(k=0;k<n;k++){
scanf("%d",&a[k]);
}

max=a[1]-a[0];
min= a[1]-a[0];

for(i=0;i<n;i++){
 for(j=;i+1<n;j++){
 if((max-( a[j]-a[i]))>0)
  max= a[j]-a[i];
if((min-( a[j]-a[i]))>0)
  mix= a[j]-a[i];
}
}

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



Compiler output:
main.c: In function 'main':
main.c:13:8: error: expected expression before ';' token
   13 |  for(j=;i+1<n;j++){
      |        ^
main.c:17:3: error: 'mix' undeclared (first use in this function); did you mean 'min'?
   17 |   mix= a[j]-a[i];
      |   ^~~
      |   min
main.c:17:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

#define Num 200000
int main(void){

    int l, n, i, j, max, min;
    int a[Num];

    scanf("%d", &l); 

    for(i = 0; i <= l-1; i++){
        scanf("%d", &n); 
        a[i] = n;
    }

    max = a[1] - a[0];
    if(a[1] > a[0]){
        min = a[0];
    }else{
        min = a[1];
    }

    for (i = 2; i <= l-2; i++) {
        if (a[i] < min){
            min = a[i];
        }else if(max < a[i]-min){
            max = a[i]-min
        }
    }

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

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:27:27: error: expected ';' before '}' token
   27 |             max = a[i]-min
      |                           ^
      |                           ;
   28 |         }
      |         ~
Language: C

#include <stdio.h>
#define N 200000
#define K -2000000000
int main()
{
    int i,j,n,A[N],max=K;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
      scanf("%d",&A[i]);
      for(j=0;j<i;j++)
      {
        k=A[i]-A[j];
        if(k > max)
        max=k;
      }
    }
    printf("%d\n",max);
    return 0;
}



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

vjudge.vjudge.vjudge.vjudge.vjudge.vjudge.vjudge.vjudge.vjudge.vjudge.vjudge.vjudge.v


Compiler output:
main.c:1:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | vjudge.vjudge.vjudge.vjudge.vjudge.vjudge.vjudge.vjudge.vjudge.vjudge.vjudge.vjudge.v
      |       ^
Language: C

#include <stdio.h>
int Rt[200000], max[200000];
int main()
{
	int n, i, a, b, c;
	scanf_s("%d ",&n);


	for (i = 0; i < n; i++)
	{
		scanf_s("%d", &Rt[i]);
	}


	for (i = 0; i < n; i++) // 选定下标为i的数字
	{
		for (int j = i + 1; j < n; j++) // 选定其后面的数与Rt[i]做差
		{
			a = Rt[j] - Rt[i]; // a 为差值
			if (j == i + 1)
				b = a; // 将第一个差值存进b
			else if (b >= a)
				continue;
			else b = a; // b 存储（以Rt[i]为首的）最大差值
		}
		max[i] = b;
	}
	c = max[0];
	for (i = 1; i < n; i++) // 比较各个最大差值，选出最大值
	{
		if (c >= max[i + 1])
			continue; // c 存储差值中的最大值
		else c = max[i + 1];
	}
	printf("%d", c);
	getchar(); 
	getchar();
	return 0;
}


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

#include<stdio.h>
#include<algorithm>
#include<math.h>
#include<iostream>
#include<string.h>
using namespace std;
int a[200010];
int main()
{
    int n;
    while(~scanf("%d",&n))
    {
        for(int i=0;i<n;i++)
            scanf("%d",&a[i]);
        int min1=a[0];
        int max1=-1e8;
        for(int i=1;i<n;i++)
        {
            max1=max(max1,a[i]-min1);
            min1=min(min1,a[i]);
        }
        printf("%d\n",max1);
    }
    return 0;
}
/*
6
5
3
1
3
4
3
3
4
3
2
*/



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

#include<stdio.h>

int main()
{
	int N;
	int A[200000];
	int i, j;
	int max;

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

	max = A[1] - A[0];
	for (i = 0; i < N - 1; i++) {
		for (j = 1; j < N; j++) {
			tmp = A[j] - A[i];
			max = tmp >= max ? tmp : max;
		}
	}

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

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:18:25: error: 'tmp' undeclared (first use in this function)
   18 |                         tmp = A[j] - A[i];
      |                         ^~~
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()
{
	int N;
	int A[200000];
	int i, j;
	int tmp, max, min;

	scanf_s("%d", &N);
	for (i = 0; i < N; i++) {
		scanf_s("%d", &A[i]);
	}

	max = A[1] - A[0];
	min = A[0];
	for (i = 1; i < N; i++) {
		tmp = A[i] - min;
		max = tmp > max ? tmp : max;
		min = min < A[i] ? min : A[i];
	}

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

	return 0;
}


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

#include<stdio.h>
 
int main(){
 
int a,b,max=-2000000000,min;
 
scanf("%d",&a);
 
int r[200000];
 
int i;

for(i=0;i<a;i++)scanf("%d",&r[i]);
 
min=r[0];
 

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

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

#include<iostream>
using namespace std;

int main(){
    int n,R[200000],x;
    
    cin >> n;
    for ( int i = 0; i < n; i++ ) cin >>R[i];
    for ( int i = 0; i < n; i++ ){
        for ( int j = i; j < n; j++ ){
            if(x<R[j]-R[i])x = R[j]-R[i];
        }
    }
    cout << x << endl;
    
    return 0;
}

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

import java.util.Scanner;
class Main{
    public static void main(String[]arge){
        Scanner sc=new Scanner(System.in);
        
        int n=sc.nextInt(); 
        int[] R = new int[n];
                
        for(int i=0; i<n; i++){
            R[i]=sc.nextInt();
            } 
        int answer=R[1]-R[0];
        for(int i=1; i<n; i++){
            int min=1000000000;
            for(int j=0; j<i; j++){
                if(R[j]<min){
                    min=R[j];
                }
            }
            if(answer<R[i] - min)
                answer=R[i]-min;
        }
        System.out.println(answer);
    }
}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.Scanner;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.Scanner;
      |            ^
main.c:2:1: error: unknown type name 'class'
    2 | class Main{
      | ^~~~~
main.c:2:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    2 | class Main{
      |           ^
Language: C

#include<iostream>
using namespace std;

int main(){
    int n;
    cin >> n;
    int R[n];
    for ( int i = 0;i < n ;i++)cin >> R[i];
    int min = R[0];
    int a = R[1]-R[0];
    for ( int i = 1;i < n ;i++){
        if(min > R[i]) min = R[i];
        if(min < R[i] && a <= R[i]-min) a = R[i]-min;
    }
    cout << a <<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<iostream>
using namespace std;

int main(){
    int n;
    cin >> n;
    int R[n];
    for ( int i = 0;i < n ;i++)cin >> R[i];
    int min = R[0];
    int a = R[1]-R[0];
    for ( int i = 1;i < n ;i++){
        if(min > R[i]){ min = R[i];
        }else if(min <= R[i] && a <= R[i]-min) a = R[i]-min;
    }
    cout << a <<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<iostream>
using namespace std;

int main(){
    int n,min,ans;
    cin >> n;
    int R[n];
    for ( int i = 0; i < n; i++)cin >> R[i];
    min  = R[0];
    ans = R[1] - R[0];
    for ( int i = 1; i < n; i++){
        if ( min > R[i]){
            min = R[i];
        }else if ( ans < R[i] - min ){
            ans = R[i] - min;
        }
    }
    
    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()
{
    long long int r[200001]={0}, i, j, n, max=-1000000000, c, prev=1000000001;
    scanf("%lld", &n);
    for(i = 0; i < n; i++){
        scanf("%lld", &r[i]);
    }
    for(i = 0; i < n; i++){
        while(i < n){
            if(prev <= r[i]){
                i++;
            } else {
                break;
            }
        }
        for(j = i + 1; j < n; j++){
            c = r[j] - r[i];
            if(c > max){
                max = c;
            }
            prev = i;
        }
    }
    printf("%lld\n", max);
 

Compiler output:
main.c: In function 'main':
main.c:25:5: error: expected declaration or statement at end of input
   25 |     printf("%lld\n", max);
      |     ^~~~~~
Language: C

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

int max(int,int);

int main()
{
    int n,i;
    scanf("%d",&n);
    int R[200001];
    for(i=0;i<=n;i++)
        {
            scanf("%d",&R[i]);
        }
    int S,B;
    printf("%d",max(R,n));
    
}


int max(int array[],int n)
{
    int start,target;
    int champion=-1000000000,challenger=-1000000000;
    for(start=0;start<=n-2;start++)
        {
            for(target=start+1;target<=n-1;target++)
                {
                    challenger=array[target]-array[start];
                    if(challenge>champion) champion=challenge;
                }
        }
    return champion;
}

Compiler output:
main.c: In function 'main':
main.c:16:21: error: passing argument 1 of 'max' makes integer from pointer without a cast [-Wint-conversion]
   16 |     printf("%d",max(R,n));
      |                     ^
      |                     |
      |                     int *
main.c:4:9: note: expected 'int' but argument is of type 'int *'
    4 | int max(int,int);
      |         ^~~
main.c: At top level:
main.c:21:5: error: conflicting types for 'max'; have 'int(int *, int)'
   21 | int max(int array[],int n)
      |     ^~~
main.c:4:5: note: previous declaration of 'max' with type 'int(int,  int)'
    4 | int max(int,int);
      |     ^~~
main.c: In function 'max':
main.c:30:24: error: 'challenge' undeclared (first use in this function); did you mean 'challenger'?
   30 |                     if(challenge>champion) champion=challenge;
      |                        ^~~~~~~~~
      |                        challenger
main.c:30:24: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

main() {

  int i;
  int n;       //データ数
  int *r;      //データ配列用ポインタ
  int maxv, minv; //最大利益

  scanf("%d", &n);
  
  r = (int *)malloc(sizeof(int) * n);

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

  maxv = r[1] - r[0];
  minv = r[0];

  for( i=0; i<n-1; i++) {
    if(maxv < r[j]-minv) {
      maxv = r[j] - minv;
    }
    if(minv > r[j]) {
      minv = r[j];
    }
  }

  free(r);

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

  return 0;

}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main() {
      | ^~~~
main.c: In function 'main':
main.c:23:17: error: 'j' undeclared (first use in this function)
   23 |     if(maxv < r[j]-minv) {
      |                 ^
main.c:23:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

#define INIT_LOOP 0
#define SECOND_ELEMENT 1
#define ELEMENT_MAX_INIT -2147483648
#define EXIT_SUCCESS 0

int main( void )
{
	unsigned short usW_Delement_cnt;
	unsigned short usW_Dloop_cnt;
	unsigned long ulW_Delement;
	unsigned long ulW_Delement_first;
	unsigned long ulW_Delement_min;
	signed long ulW_Delement_max = ELEMENT_MAX_INIT;
	
	scanf("%d", &usW_Delement_cnt );									/*????´??????°?????°??????*/
	for( usW_Dloop_cnt = INIT_LOOP; usW_Dloop_cnt < usW_Delement_cnt; usW_Dloop_cnt++){
		scanf("%ld", &ulW_Delement);
		if( usW_Dloop_cnt == INIT_LOOP ){
			ulW_Delement_first = ulW_Delement;
		}
		else{
			/*else???????????????????????§?????\*/
		}

		ulW_Dcalc = ulW_Delement - ulW_Delement_min;
		if( usW_Dloop_cnt == SECOND_ELEMENT ){
			ulW_Delement_max = ulW_Delement - ulW_Delement_first;
		}
		else if( ulW_Delement_max < ulW_Dcalc ){
			ulW_Delement_max = ulW_Dcalc;
		}
		else{
			/*else?????????????????????????????\*/
		}

		if( usW_Dloop_cnt == INIT_LOOP ){
			ulW_Delement_min = ulW_Delement;
		}
		else if( ulW_Delement_min > ulW_Delement ){
			ulW_Delement_min = ulW_Delement;
		}
		else{
			/*else?????????????????????????????\*/
		}

	}
	printf("%ld\n", ulW_Delement_max);
	return EXIT_SUCCESS;
}

Compiler output:
main.c: In function 'main':
main.c:27:17: error: 'ulW_Dcalc' undeclared (first use in this function)
   27 |                 ulW_Dcalc = ulW_Delement - ulW_Delement_min;
      |                 ^~~~~~~~~
main.c:27:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#define BUF_SIZE 100
#define LONG_MIN -2147483646
#define LONG_MAX 2147483647
int main(void)
{
  char buf[100];
  long input, maxv = LONG_MIN, min = LONG_MAX;

  while(fgets(buf, BUF_SIZE, stdin) != NULL){
    if(buf[0] == '\n') break;
    sscanf(buf, "%ld", &input);

    if(input < min){
      min = input;
    }

    diff = input - min;
    if(maxv < diff){
      maxv = diff;
    }
  }

  printf("%ld\n", diff);

  return 0;
}

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

#include <stdio.h>
#define BUF_SIZE 100
#define LONG_MIN -2147483646
#define LONG_MAX 2147483647

int main(void)
{
  char buf[100];
  long input, maxv = LONG_MIN, min = LONG_MAX;
  long linum;
  long diff = 0;

  linum = fgets(buf, BUF_SIZE, stdin);

  while(input_line){
    fgets(buf, BUF_SIZE, stdin);
    sscanf(buf, "%ld", &input);

    diff = input - min;
    if(maxv < diff){
      maxv = diff;
    }

    if(input < min){
      min = input;
    }
    linum--;
  }

  printf("%ld\n", maxv);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:9: error: assignment to 'long int' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   13 |   linum = fgets(buf, BUF_SIZE, stdin);
      |         ^
main.c:15:9: error: 'input_line' undeclared (first use in this function)
   15 |   while(input_line){
      |         ^~~~~~~~~~
main.c:15: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,m,l,i;
	long slong d=-1000000000;
	scanf("%d%d",&n,&m);
	for(i=1;i<n;i++)
	{
		scanf("%d",&l);
		if(d<l-m)d=l-m;
		if(l<m)m=l;
	}
	printf("%ld\n",d);
}

Compiler output:
main.c: In function 'main':
main.c:5:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'd'
    5 |         long slong d=-1000000000;
      |                    ^
main.c:5:20: error: 'd' undeclared (first use in this function)
main.c:5:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#define N 200000
int main()
{
  int x[N];
  int i,j;
  int max = -10^9

  for(i = 0 ; i < N ; i++){
    scanf("%d", x[i]);
  }

  for(i = 0 ; i < x[0] ; i++){
    for(j = 0 ; j < x[0] ; j++){
      sa = x[j] - x[i];
      if(max < sa){
        max = sa;
      }
    }
  }

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

Compiler output:
main.c: In function 'main':
main.c:9:3: error: expected ',' or ';' before 'for'
    9 |   for(i = 0 ; i < N ; i++){
      |   ^~~
main.c:9:26: error: expected ';' before ')' token
    9 |   for(i = 0 ; i < N ; i++){
      |                          ^
      |                          ;
main.c:9:26: error: expected statement before ')' token
main.c:15:7: error: 'sa' undeclared (first use in this function)
   15 |       sa = x[j] - x[i];
      |       ^~
main.c:15:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#define N 200000
int main()
{
  int x[N];
  int i,j;
  int max = -10^9;

  for(i = 0 ; i < N ; i++){
    scanf("%d", x[i]);
  }

  for(i = 0 ; i < x[0] ; i++){
    for(j = 0 ; j < x[0] ; j++){
      sa = x[j] - x[i];
      if(max < sa){
        max = sa;
      }
    }
  }

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

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

#include<stdio.h>
#define N 200000
int main()
{
  int x[N];
  int i,j;
  int max = -1000000000;

  for(i = 0 ; i < N ; i++){
    scanf("%d", x[i]);
  }

  for(i = 1 ; i < x[0]-1 ; i++){
    for(j = i+1 ; j < x[0] ; j++){
      sa = x[j] - x[i];
      if(max < sa){
        max = sa;
      }
    }
  }

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

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

#include<stdio.h>
#define N 200000
int main()
{
  int x[N];
  int i,j;
  int max = -1000000000;

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

  for(i = 1 ; i < x[0]-1 ; i++){
    for(j = i+1 ; j < x[0] ; j++){
      sa = x[j] - x[i];
      if(max < sa){
        max = sa;
      }
    }
  }

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

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

#include <stdio.h>

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

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

Compiler output:
main.c:27:5: error: expected identifier or '(' before '}' token
   27 |     }
      |     ^
main.c:29:12: error: expected declaration specifiers or '...' before string constant
   29 |     printf("%d\n",maxv);
      |            ^~~~~~
main.c:29:19: error: unknown type name 'maxv'
   29 |     printf("%d\n",maxv);
      |                   ^~~~
main.c:30:5: error: expected identifier or '(' before 'return'
   30 |     return 0;
      |     ^~~~~~
main.c:31:1: error: expected identifier or '(' before '}' token
   31 | }
      | ^
Language: C

#include<stdio.h>
#include<algorithm>
int main() {
	int n, i, j, r[200000], maxv, minv;
	scanf("%d", &n);
	for (i = 0; i < n; i++)scanf("%d", &r[i]);
	maxv = r[1] - r[0];
	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];*/
		maxv = max(maxv, r[j] - minv);
		minv = min(minv, r[j]);
	}
	printf("%d\n", maxv);
	return 0;
}

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

int main()
{
	int n,i;
	char buff[8192];
	int min;
	int wk,delta;

	out_data_num = 0;
	gets(buff);
	sscanf(buff,"%d",&n);

	for (i=0 ; i<n ; i++) {
		gets(buff);
		sscanf(buff,"%d",&(data[i]));

	}

	min = data[0];
	delta= data[1] - data[0];
	for (i=1 ; i<n ; i++) {
		wk = data[i-1];
		if (min > wk) {
			min = wk;
		}
		wk = data[i]-min;
		if (delta < wk) {
			delta = wk;
		}
	}
			
	printf("%d\n",delta);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:9: error: 'out_data_num' undeclared (first use in this function)
    8 |         out_data_num = 0;
      |         ^~~~~~~~~~~~
main.c:8:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:9: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
    9 |         gets(buff);
      |         ^~~~
main.c:10:9: error: implicit declaration of function 'sscanf' [-Wimplicit-function-declaration]
   10 |         sscanf(buff,"%d",&n);
      |         ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'sscanf'
  +++ |+#include <stdio.h>
    1 | int main()
main.c:10:9: warning: incompatible implicit declaration of built-in function 'sscanf' [-Wbuiltin-declaration-mismatch]
   10 |         sscanf(buff,"%d",&n);
      |         ^~~~~~
main.c:10:9: note: include '<stdio.h>' or provide a declaration of 'sscanf'
main.c:14:36: error: 'data' undeclared (first use in this function)
   14 |                 sscanf(buff,"%d",&(data[i]));
      |                                    ^~~~
main.c:31:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   31 |         printf("%d\n",delta);
      |         ^~~~~~
main.c:31:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:31:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:31:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:11:11: error: subscripted value is neither array nor pointer nor vector
   11 | if(min>max[n]){min=max[n];
      |           ^
main.c:11:23: error: subscripted value is neither array nor pointer nor vector
   11 | if(min>max[n]){min=max[n];
      |                       ^
main.c:12:11: error: subscripted value is neither array nor pointer nor vector
   12 | if(min>max[++r]){
      |           ^
main.c:20:1: error: expected declaration or statement at end of input
   20 | }
      | ^
Language: C

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

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

#include <iostream>
#include <cstring>
#include <algorithm>
#include <limits.h>
#include <cmath>
#include <time.h>
#include <cstdio>
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
/* ここからが本編 */
/*  */
int main(void)
{
  int test = 1;
  int i,j,k,l;
  int n;
  int min = INT_MAX;
  int rep = INT_MIN;
  int a;
  scanf("%d",&n);
  rep(i,n) {
    scanf("%d",&a);
    if(a - min > rep) rep = a - min;
    if(min > a) min = a;
  }
  printf("%d\n",rep);
  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 i, n, minv;
  int R[200000];

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

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

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

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

Compiler output:
main.c:1:2: error: stray '#' in program
    1 | h#include <stdio.h>
      |  ^
main.c:1:1: error: unknown type name 'h'
    1 | h#include <stdio.h>
      | ^
main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | h#include <stdio.h>
      |           ^
Language: C

#include<stdio.h>
#define N 200000
int main(){

  int i,j,R[N],n,maxv,minv;

  scanf("%d",&n);

  for(j=0;j<n;j++) scanf("%d",&R[j]);

  minv = R[0];

  for(j=1;j<n;j++){
    if( maxv < R[j]-minv ) maxv = R[j] - minv;
    else maxv = maxv;
    if( minv < R[j] ) minv = minv;
    if else( minv > R[j]) minv = R[j];
  }

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

Compiler output:
main.c: In function 'main':
main.c:17:8: error: expected '(' before 'else'
   17 |     if else( minv > R[j]) minv = R[j];
      |        ^~~~
      |        (
Language: C

#include<stdio.h>
#define N 200000
int main(){

  int i,j,R[N],n,,minv;

  scanf("%d",&n);

  for(j=0;j<n;j++) scanf("%d",&R[j]);

  minv = R[0];
  maxv =R[1]-R[0];
  for(j=1;j<n;j++){
    if( maxv < R[j]-minv ) maxv = R[j] - minv;
    else maxv = maxv;
    if( minv < R[j] ) minv = minv;
    if else( minv > R[j]) minv = R[j];
  }

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

Compiler output:
main.c: In function 'main':
main.c:5:18: error: expected identifier or '(' before ',' token
    5 |   int i,j,R[N],n,,minv;
      |                  ^
main.c:11:3: error: 'minv' undeclared (first use in this function)
   11 |   minv = R[0];
      |   ^~~~
main.c:11:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:3: error: 'maxv' undeclared (first use in this function)
   12 |   maxv =R[1]-R[0];
      |   ^~~~
main.c:17:8: error: expected '(' before 'else'
   17 |     if else( minv > R[j]) minv = R[j];
      |        ^~~~
      |        (
Language: C

#include<stdio.h>
#define N 200000
int main(){

  int i,j,R[N],n,,minv;

  scanf("%d",&n);

  for(j=0;j<n;j++) scanf("%d",&R[j]);

  minv = R[0];
  maxv =R[1]-R[0];
  for(j=1;j<n;j++){
    if( maxv < R[j]-minv ) maxv = R[j] - minv;
    else maxv = maxv;
    if( minv < R[j] ) minv = minv;
    else minv = R[j];
  }

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

Compiler output:
main.c: In function 'main':
main.c:5:18: error: expected identifier or '(' before ',' token
    5 |   int i,j,R[N],n,,minv;
      |                  ^
main.c:11:3: error: 'minv' undeclared (first use in this function)
   11 |   minv = R[0];
      |   ^~~~
main.c:11:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:3: error: 'maxv' undeclared (first use in this function)
   12 |   maxv =R[1]-R[0];
      |   ^~~~
Language: C

#include <stdio.h>
int main()
{
  int n,j,array[200000],maxv,minv;

  scanf("%d",&n);

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

  maxv=array[1]-array[0];
  minv=array[0];

  for(j=1;j<n;j++)
    {
      if(maxv < array[j]-minv)
	{
	  maxv=array[j]-minv;
	}
      if(minv > array[j])
	{
	  minv=array[j];
	}
    }

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

  return 0;
}

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

#include<stdio.h>

int main()
{
  int j,N,R[200000],maxv,minv;

  scanf("%d",&N);
  for(i=0;i<N;i++){
    scanf("%d",&R[i]);
  }
  minv=R[0];
  
  for(j=1+i;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:8:7: error: 'i' undeclared (first use in this function)
    8 |   for(i=0;i<N;i++){
      |       ^
main.c:8:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#import <stdio.h>

int main(){
  int i,x,diff,maxv,minv;

  scanf("%d",&n); //length
  
  for(i=0;i<n;i++){
    scanf("%d",&x);

    if(i==0){ //first
      minv = x;
      continue;
    }
    
    if(minv>x) minv = x;

    diff = x - minv;
    if(diff>maxv) maxv = diff;
  }

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

  return 0;
}

Compiler output:
main.c:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import <stdio.h>
      |  ^~~~~~
main.c: In function 'main':
main.c:6:15: error: 'n' undeclared (first use in this function)
    6 |   scanf("%d",&n); //length
      |               ^
main.c:6:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main(){

  int i, n, input, max, min;

  scanf("%d", &n);
  scanf("%d", &input);

  max = -1000000000
  min = input;
  for(i = 1; i <= n-1; i++){
    scanf("%d", &input);
    max = fmax(max, input-min);
    min = fmin(min, input);
  }
  printf("%d\n", max);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:20: error: expected ';' before 'min'
   11 |   max = -1000000000
      |                    ^
      |                    ;
   12 |   min = input;
      |   ~~~