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

import java.util.*;
                  
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        int[] R = new int[t];
        int i, j, a, bnf;
        R[0] = sc.nextInt();
        R[1] = sc.nextInt();
        bnf = R[1] - R[0];
                  
        for(i=2; i<t; i++){
            R[i] = sc.nextInt();
            if(R[i]>R[i-1]){
                continue;
            }else{
                if(bnf<0){
                    a = R[i] - R[i-1];
                    if(bnf<a) bnf = a;
                }else{
                    max = R[i-1];
                    a = max - min;
                    if(bnf < a) bnf = a;
                    if(min>R[i]) R[i] = min;
                }
            }
        }
                   
        System.out.println(bnf);
    }
}

Compiler output:
Main.java:22: error: cannot find symbol
                    max = R[i-1];
                    ^
  symbol:   variable max
  location: class Main
Main.java:23: error: cannot find symbol
                    a = max - min;
                        ^
  symbol:   variable max
  location: class Main
Main.java:23: error: cannot find symbol
                    a = max - min;
                              ^
  symbol:   variable min
  location: class Main
Main.java:25: error: cannot find symbol
                    if(min>R[i]) R[i] = min;
                       ^
  symbol:   variable min
  location: class Main
Main.java:25: error: cannot find symbol
                    if(min>R[i]) R[i] = min;
                                        ^
  symbol:   variable min
  location: class Main
5 errors
Language: Java

import java.util.*;
                  
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        int[] R = new int[t];
        int i, min, bnf;
        for(i=0; i<t; i++) R[i] = sc.nextInt();
        min = R[0];
        bnf = Integer.MIN_VALUE;
        for(i=1; i<t; i++){
            bnf = Math.max(max, R[i]-min);
            min = Math.min(min, R[i]);
        }
                   
        System.out.println(bnf);
    }
}

Compiler output:
Main.java:13: error: cannot find symbol
            bnf = Math.max(max, R[i]-min);
                           ^
  symbol:   variable max
  location: class Main
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.Math;

/*Question
/FX????????§????????°?????????????????¨????????????????????¨??§????????????????????????????????¨?????§????????????
/????????°????????????100???????????? 1000???????????????????????????????????? 1?????? 108???????????£??????????£??????¨???(108??? ??? 100???) ?? 1000?????? =
8000??????????????????????????¨?????§????????????
/???????????¨????????????????????? t?????????????????? Rt (t=0,1,2,,,n???1)?????\?????¨??????????????????????????§??????????????? Rj???Ri (????????????j>i??¨??????) ????????§???????±??????????????????????
*/

/*Input
/?????????????????´??° n?????????????????????????¶???? n ????????´??° Rt (t=0,1,2,,,n???1) ????????????????????????????????? 
*/

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
		//????????¨
		int k;
		/*??\???
		/??????????´???°?????\???????¬??????°????????\???
		*/
		int n = Integer.parseInt(sc.readLine());
		long[] r = new long[n];
		for(int i = 0;i < n;i++){
			r[i] = Long.parseLong(sc.readLine());
		}
		/*??°??????fxariganetokasu???????????????
		/??????????????£??????????????§??????
		*/
		k = fxariganetokasu(r);
		System.out.println(k);
	}

	/*Prime????????????
	/??????????????????????´???°???????????????????????????????????????
	/????????????????????????????????????????????¨??????????????????????¨??????????s???s????????§???????????°??£??\
	/@return long
	*/

	public static int fxariganetokasu(long[] r) {
		//????????¨?????¨??????????????\???????????????????????????????????\????????????????????????int???????°??????§??????????????????????????????
		long s = r[r.length-1] - r[r.length-2];
		for (int i = r.length - 1;i > 1;i--) {
			for (int j = i - 1;j >= 0;j--)
				s = Math.max(s,r[i] - r[j]);
		}
		return s;
	}
}

Compiler output:
Main.java:49: error: incompatible types: possible lossy conversion from long to int
		return s;
		       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.Math;

/*Question
/FX????????§????????°?????????????????¨????????????????????¨??§????????????????????????????????¨?????§????????????
/????????°????????????100???????????? 1000???????????????????????????????????? 1?????? 108???????????£??????????£??????¨???(108??? ??? 100???) ?? 1000?????? =
8000??????????????????????????¨?????§????????????
/???????????¨????????????????????? t?????????????????? Rt (t=0,1,2,,,n???1)?????\?????¨??????????????????????????§??????????????? Rj???Ri (????????????j>i??¨??????) ????????§???????±??????????????????????
*/

/*Input
/?????????????????´??° n?????????????????????????¶???? n ????????´??° Rt (t=0,1,2,,,n???1) ????????????????????????????????? 
*/

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
		//????????¨
		int k;
		/*??\???
		/??????????´???°?????\???????¬??????°????????\???
		*/
		int n = Integer.parseInt(sc.readLine());
		long[] r = new long[n];
		for(int i = 0;i < n;i++){
			r[i] = Long.parseLong(sc.readLine());
		}
		/*??°??????fxariganetokasu???????????????
		/??????????????£??????????????§??????
		*/
		k = fxariganetokasu(r);
		System.out.println(k);
	}

	/*Prime????????????
	/??????????????????????´???°???????????????????????????????????????
	/????????????????????????????????????????????¨??????????????????????¨??????????s???s????????§???????????°??£??\
	/@return long
	*/

	public static long fxariganetokasu(long[] r) {
		//????????¨?????¨??????????????\???????????????????????????????????\????????????????????????int???????°??????§??????????????????????????????
		long s = r[r.length-1] - r[r.length-2];
		for (int i = r.length - 1;i > 1;i--) {
			for (int j = i - 1;j >= 0;j--)
				s = Math.max(s,r[i] - r[j]);
		}
		return s;
	}
}

Compiler output:
Main.java:32: error: incompatible types: possible lossy conversion from long to int
		k = fxariganetokasu(r);
		                   ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
	public static void  main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int buy,ben;
		ben = Integer.MIN_VALUE;
		
		int[] R  = new int[n];
		for(int i = 0 ; i < n ; i++ )
		{
			R[i] = sc.nextInt();
		}
		for(int i = 0 ; i < n-1 ; i++ )
		{
			buy = R[i];
			for(int j = i+1 ; j < n ; j++ )
			{
				if( R[j] - R[i] > ben ) ben = R[j]-R[i] ; 
			}
		
		}
		System.out.println(ben);
		
	}
}

Compiler output:
Main.java:11: error: incompatible types: possible lossy conversion from long to int
		int[] R  = new int[n];
		                   ^
1 error
Language: Java

class Main {
	public static void main(String[] args) {
		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 maxv = r[1] - r[0];
		int minv = r[0];
		
		for (int j = 2; j < n; j++) {
			maxv = Math.max(maxv, r[j] - minv);
			minv = Math.min(minv, r[j]);
		}
		
		System.out.println(maxv);
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

public class Main {
    public static void main(String[] args) {
        int n;
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        int [] a =new int[n];
        for(int i=0;i<n;i++){
            a[i] = in.nextInt();
        }
        int maxV=a[1]-a[0];
        for(int i=0;i<n;i++){
            for(int j=i+1;j<n;j++){
                int temp = a[j]-a[i];
                if(temp>maxV){
                    maxV=temp;
                }
            }
        }
        System.out.println(maxV);
    }
}

Compiler output:
Main.java:4: error: cannot find symbol
        Scanner in = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
        Scanner in = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class MaximumProfit {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int minRate = Integer.MAX_VALUE;
        int maxProfit = Integer.MIN_VALUE;
        for (int i = 0 ; i < n; i++) {
            int r = in.nextInt();
            if(r < minRate) minRate = r;
            maxProfit = (maxProfit > r - minRate)? maxProfit : r - minRate;
        }
        System.out.print(maxProfit);
    }
}

Compiler output:
Main.java:3: error: class MaximumProfit is public, should be declared in a file named MaximumProfit.java
public class MaximumProfit {
       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

class Main{
	public static void main(String[] args)throws Exception{
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int[] numbers = new int[n];
		for(int i = 0; i < n; i++){
			numbers[i] = scanner.nextInt();
		}

		Arrays.sort(numbers);

		System.out.println(numbers[n-1] - numbers[0]);
	}
}

Compiler output:
Main.java:16: error: cannot find symbol
		Arrays.sort(numbers);
		^
  symbol:   variable Arrays
  location: class Main
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.Arrays;

class Main{
	public static void main(String[] args)throws Exception{
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int[] numbers = new int[n];
		for(int i = 0; i < n; i++){
		    numbers[i] = scanner.nextInt();
		}
		int min = numbers[0];
		int max = -999999999999;
		for(int i = 1; i < n; i++){
			if(numbers[i] - min > max){
				max = numbers[i] - min;
			}
			if(numbers[i] < min){
				min = numbers[i];
			}
		}
		System.out.println(max);
	}
}

Compiler output:
Main.java:17: error: integer number too large
		int max = -999999999999;
		           ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.Arrays;

class Main{
	public static void main(String[] args)throws Exception{
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int[] numbers = new int[n];
		for(int i = 0; i < n; i++){
		    numbers[i] = scanner.nextInt();
		}
		int min = numbers[0];
		long max = -999999999999;
		for(int i = 1; i < n; i++){
			if(numbers[i] - min > max){
				max = numbers[i] - min;
			}
			if(numbers[i] < min){
				min = numbers[i];
			}
		}
		System.out.println(max);
	}
}

Compiler output:
Main.java:17: error: integer number too large
		long max = -999999999999;
		            ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.Arrays;

class Main{
	public static void main(String[] args)throws Exception{
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int[] numbers = new int[n];
		for(int i = 0; i < n; i++){
		    numbers[i] = scanner.nextInt();
		}
		int min = numbers[0];
		Long max = -999999999999;
		for(int i = 1; i < n; i++){
			if(numbers[i] - min > max){
				max = numbers[i] - min;
			}
			if(numbers[i] < min){
				min = numbers[i];
			}
		}
		System.out.println(max);
	}
}

Compiler output:
Main.java:17: error: integer number too large
		Long max = -999999999999;
		            ^
1 error
Language: Java

import java.util.List;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public Main {

	public static void main(String[] args) {

		Input stdIn = new Input();
		int n = stdIn.getValue();
		List<Integer> r = stdIn.getValueLines(n);

		int maxv = r.get(1) - r.get(0);
		;
		int minv = r.get(0);

		//		System.out.println(n);
		//		System.out.println(r);

		for (int i = 0; i < n-1; i++) {
			if (maxv < r.get(i + 1) - minv) {
				maxv = r.get(i + 1) - minv;
			}
			if (minv > r.get(i + 1)) {
				minv = r.get(i + 1);
			}
//			System.out.println("j[" + (i + 1) + "]:" + r.get(i + 1) + " i[" + i + "]:" + r.get(i) + " maxv: " + maxv
//					+ "minv:" + minv);
		}
		System.out.println(maxv);

		stdIn.close();
}
class Input {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	public int getValue() {
		int n = 0;
		try {
			n = Integer.parseInt(br.readLine());
		} catch (IOException e) {
			e.printStackTrace();
		}
		return n;
	}

	public List<Integer> getValueLines(int n) {
		List<Integer> values = new ArrayList<>();
		for(int i = 0; i < n; i++) {
			values.add(getValue());
		}
		return values;
	}

	public List<Integer> getLine() {
		try {
			String[] s = br.readLine().trim().split(" ");
			List<Integer> ary = new ArrayList<>();
			for (int i = 0; i < s.length; i++) {
				ary.add(Integer.parseInt(s[i]));
			}
			return ary;
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	}

	public void close() {
		try {
			br.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}

Compiler output:
Main.java:8: error: class, interface, enum, or record expected
public Main {
       ^
Main.java:10: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args) {
	              ^
  (use --enable-preview to enable unnamed classes)
2 errors
Language: Java

import java.util.*;

public class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        long min = 10000000000;
        long ret = -10000000000;

        for (int i = 0; i<n; i++){
            long r = sc.nextInt();
            if (r - min > ret) ret = r - min;
            if (r < min) min = r;
        }
        System.out.println(ret);
    }
}

Compiler output:
Main.java:8: error: integer number too large
        long min = 10000000000;
                   ^
Main.java:9: error: integer number too large
        long ret = -10000000000;
                    ^
2 errors
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int[] array = new int[num];
        for(int i = 0; i < num; i++){
            array[i] = sc.nextInt();
        }
        int max = array[1] - array[0];
        for(int i = 1; i < num; i++){
            for(int j = 0; j < i; j++){
                int dif = array[i] - array[j];
                if(max < dif){
                    max = dif;
                }
            }
        }
        int max = -2000000000;
        int min = array[0];
        for(int i = 1; i < num; i++){
            if(max < array[i] - min){
                max = array[i] - min;
            }
            if(min > array[i]){
                min = array[i];
            }
        }
        System.out.println(max);
    }
}


Compiler output:
Main.java:20: error: variable max is already defined in method main(String[])
        int max = -2000000000;
            ^
1 error
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int min = sc.nextInt();
        int ans = Integer.MIN_VALUE;
        
        for (int i = 0; i < n - 1; i++) {
            int input = sc.nextInt();
            ans = Math.max(input - min, ans);
            min = Math.min(input, min);
        }
        System.out.println(ans);
}


Compiler output:
Main.java:18: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		int n = scanner.nextInt();
		
		int max = 1 - Math.pow(10, 9);
		int ri = scanner.nextInt();
		for (int i = 1; i < n; i++) {
			int rj = scanner.nextInt();
			max = Math.max(max, rj - ri);
			ri = Math.min(ri, rj); 
		}
		
		scanner.close();
		
		System.out.print(max);
	}
} 



Compiler output:
Main.java:9: error: incompatible types: possible lossy conversion from double to int
		int max = 1 - Math.pow(10, 9);
		            ^
1 error
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){
		
		Scanner sc= new Scanner (System.in);
		int n=Integer.parseInt(sc.nextLine());
		int num;
		int ori=200001;
		int big=1;
		int answer;
		for(int i=0;i<n;i++){
			num = Integer.parseInt(sc.nextLine());
			if(ori>num){
				ori=num;
			}
			if(answer==null){
				answer=num-ori;
			}else if(answer<num-ori){
				answer=num-ori;
			}
		}
		System.out.println(answer);
	}
}


Compiler output:
Main.java:17: error: bad operand types for binary operator '=='
			if(answer==null){
			         ^
  first type:  int
  second type: <null>
1 error
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){
		
		Scanner sc= new Scanner (System.in);
		int n=Integer.parseInt(sc.nextLine());
		int num;
		int ori=200001;
		int big=1;
		int answer;
		for(int i=0;i<n;i++){
			num = Integer.parseInt(sc.nextLine());
			if(ori>num){
				ori=num;
			}
			if(i==0){
				answer=num-ori;
			}else if(answer<num-ori){
				answer=num-ori;
			}
		}
		System.out.println(answer);
	}
}


Compiler output:
Main.java:19: error: variable answer might not have been initialized
			}else if(answer<num-ori){
			         ^
Main.java:23: error: variable answer might not have been initialized
		System.out.println(answer);
		                   ^
2 errors
Language: Java

package alds;

import java.util.Scanner;

public class MaximunProfit{
	public static void main(String[] args){
		
		Scanner sc= new Scanner (System.in);
		int n=Integer.parseInt(sc.nextLine());
		int num;
		int ori=2000000001;
		int answer=-2000000000;
		for(int i=0;i<n;i++){
			num = Integer.parseInt(sc.nextLine());
			if(i>0 && answer<num-ori){
				answer=num-ori;
			}
			if(ori>num){
				ori=num;
			}
		}
		System.out.println(answer);
	}
}


Compiler output:
Main.java:5: error: class MaximunProfit is public, should be declared in a file named MaximunProfit.java
public class MaximunProfit{
       ^
1 error
Language: Java

#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];
    long max,kari;
    kari=0;
    for(int i=0;i<n;i++){
        scanf("%d",&a[i]);
        if(kari<a[i]){
            kari=a[i];
        }
    }
    max=-200000;
    for(int i=0;i<n-1;i++){
        if(max>kari-a[i]) break;
        for(int j=i+1;j<n;j++){
            long tmp = a[j]-a[i];
            if(max<tmp){
                max=tmp;
            }
        }
    }
    printf("%d\n",max);
   return 0;
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include<stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<stdio.h>
        ^
Main.java:2: error: illegal character: '#'
#include<stdlib.h>
^
Main.java:3: error: illegal character: '#'
#include<math.h>
^
Main.java:4: error: illegal character: '#'
#define N 13
^
Main.java:5: error: illegal character: '#'
#define pi M_PI
^
Main.java:9: error: class, interface, enum, or record expected
    scanf("%d",&n);
    ^
Main.java:10: error: class, interface, enum, or record expected
    int a[200000];
    ^
Main.java:11: error: class, interface, enum, or record expected
    long max,kari;
    ^
Main.java:12: error: class, interface, enum, or record expected
    kari=0;
    ^
Main.java:13: error: class, interface, enum, or record expected
    for(int i=0;i<n;i++){
    ^
Main.java:13: error: class, interface, enum, or record expected
    for(int i=0;i<n;i++){
                ^
Main.java:13: error: class, interface, enum, or record expected
    for(int i=0;i<n;i++){
                    ^
Main.java:15: error: class, interface, enum, or record expected
        if(kari<a[i]){
        ^
Main.java:17: error: class, interface, enum, or record expected
        }
        ^
Main.java:20: error: class, interface, enum, or record expected
    for(int i=0;i<n-1;i++){
    ^
Main.java:20: error: class, interface, enum, or record expected
    for(int i=0;i<n-1;i++){
                ^
Main.java:20: error: class, interface, enum, or record expected
    for(int i=0;i<n-1;i++){
                      ^
Main.java:22: error: class, interface, enum, or record expected
        for(int j=i+1;j<n;j++){
        ^
Main.java:22: error: class, interface, enum, or record expected
        for(int j=i+1;j<n;j++){
                      ^
Main.java:22: error: class, interface, enum, or record expected
        for(int j=i+1;j<n;j++){
                          ^
Main.java:24: error: class, interface, enum, or record expected
            if(max<tmp){
            ^
Main.java:26: error: class, interface, enum, or record expected
            }
            ^
Main.java:30: error: class, interface, enum, or record expected
   return 0;
   ^
Main.java:31: error: class, interface, enum, or record expected
}
^
25 errors
Language: Java

package chap02;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class ALDS1_1 {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine()); // 整数の個数
		int minNum = Integer.parseInt(br.readLine()); // 最小値
		int maxNum = -1000000000; // 差額の最大値
		for (int i = 1; i < n; i++) {
			int r = Integer.parseInt(br.readLine());
			maxNum = Math.max(maxNum, r - minNum);
			minNum = Math.min(minNum, r);
		}
		System.out.println(maxNum);

	}

}


Compiler output:
Main.java:7: error: class ALDS1_1 is public, should be declared in a file named ALDS1_1.java
public class ALDS1_1 {
       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class ALDS1_1 {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine()); // 整数の個数
		int minNum = Integer.parseInt(br.readLine()); // 最小値
		int maxNum = -1000000000; // 差額の最大値
		for (int i = 1; i < n; i++) {
			int r = Integer.parseInt(br.readLine());
			maxNum = Math.max(maxNum, r - minNum);
			minNum = Math.min(minNum, r);
		}
		System.out.println(maxNum);

	}

}


Compiler output:
Main.java:5: error: class ALDS1_1 is public, should be declared in a file named ALDS1_1.java
public class ALDS1_1 {
       ^
1 error
Language: Java

import java.util.Scanner;

public class a{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int num[]=new int[n];
        for(int i=0;i<n;i++){
            num[i]=sc.nextInt();
        }
        for(int i=0;i<n;i++){
            num[i]=sc.nextInt();
        }
    }
}


Compiler output:
Main.java:3: error: class a is public, should be declared in a file named a.java
public class a{
       ^
1 error
Language: Java

import java.util.Scanner;

public class test{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int num[]=new int[n];
        for(int i=0;i<n;i++){
            num[i]=sc.nextInt();
        }
        for(int i=0;i<n;i++){
            num[i]=sc.nextInt();
        }
    }
}


Compiler output:
Main.java:3: error: class test is public, should be declared in a file named test.java
public class test{
       ^
1 error
Language: Java

import java.util.Scanner;

public class 00_sample_00{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int num[]=new int[n];
        for(int i=0;i<n;i++){
            num[i]=sc.nextInt();
        }
        for(int i=0;i<n;i++){
            num[i]=sc.nextInt();
        }
    }
}


Compiler output:
Main.java:3: error: illegal underscore
public class 00_sample_00{
               ^
1 error
Language: Java

import java.util.Scanner;

public class main{
    public static void Main(String[] args){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int num[]=new int[n];
        for(int i=0;i<n;i++){
            num[i]=sc.nextInt();
        }
        for(int i=0;i<n;i++){
            num[i]=sc.nextInt();
        }
    }
}


Compiler output:
Main.java:3: error: class main is public, should be declared in a file named main.java
public class main{
       ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int num[]=new Int[n];
        
    }
}


Compiler output:
Main.java:7: error: cannot find symbol
        int num[]=new Int[n];
                      ^
  symbol:   class Int
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int max=-1000000000,res;
        int n=sc.nextInt();
        int num[]=new int[n];
        for(int i=0;i<n;i++){
            num[i]=sc.nextInt();
        }
        for(int i=0;i<n;i++){
            for(int j=i;j>=0;j--){
                res=num[j]-num[i];
                if(res>max){
                    max=res;
                }
            }
        }
        System.out.println(res);
    }
}


Compiler output:
Main.java:20: error: variable res might not have been initialized
        System.out.println(res);
                           ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int max=-1000000000,res,min;
        int n=sc.nextInt();
        int num[]=new int[n];
        for(int i=0;i<n;i++){
            num[i]=sc.nextInt();
        }
        min=num[0];
        for(int i=1;i<n;i++){
            if(min>num[i]){
                num[i]=min;
            }
            res=min[i]-min[j];
            if(res>max){
                max=res;
            }
        }
        System.out.println(max);
    }
}


Compiler output:
Main.java:17: error: array required, but int found
            res=min[i]-min[j];
                   ^
Main.java:17: error: cannot find symbol
            res=min[i]-min[j];
                           ^
  symbol:   variable j
  location: class Main
Main.java:17: error: array required, but int found
            res=min[i]-min[j];
                          ^
3 errors
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int max=-1000000000,res,min,num;
        int n=sc.nextInt();
        for(int i=1;i<n;i++){
            num=sc.nextInt();
            if(i==0){
                min=num;
            }else{
                res=num-min;
                if(res>max){
                    max=res;
                }
                if(min>num){
                    min=num;
                }
            }
        }
        System.out.println(max);
    }
}


Compiler output:
Main.java:13: error: variable min might not have been initialized
                res=num-min;
                        ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int max=-1000000000,res,min,num;
        int n=sc.nextInt();
        for(int i=0;i<n;i++){
            num=sc.nextInt();
            if(i==0){
                min=num;
            }else{
                res=num-min;
                if(res>max){
                    max=res;
                }
                if(min>num){
                    min=num;
                }
            }
        }
        System.out.println(max);
    }
}


Compiler output:
Main.java:13: error: variable min might not have been initialized
                res=num-min;
                        ^
1 error
Language: Java

import java.util.Scanner;
public class Profit{
	public static void main(String[] args){
		Scanner s=new Scanner(System.in);
		int n=s.nextInt();
		int a[]=new int[n];
		for(int i=0;i<n;i++){
			a[i]=s.nextInt();
		}
		int max=a[1]-a[0];
		for(int j=2;j<n;j++){
			for(int i=0;i<j;i++){
				if(max<a[j]-a[i]) max=a[j]-a[i];
			}
		}
		System.out.println(max);
	}
}


Compiler output:
Main.java:2: error: class Profit is public, should be declared in a file named Profit.java
public class Profit{
       ^
1 error
Language: Java

import java.util.Scanner;
public class Profit{
	public static void main(String[] args){
		Scanner s=new Scanner(System.in);
		int n=s.nextInt();
		int a[]=new int[n];
		for(int i=0;i<n;i++){
			a[i]=s.nextInt();
		}
		int max=a[1]-a[0];
		int min=a[0];
		for(int j=2;j<n;j++){
			min=Math.min(min,a[j-1]);
			int sub;
			sub=a[j]-min;
			if(sub>max) max=sub;
		}
		System.out.println(max);
	}
}


Compiler output:
Main.java:2: error: class Profit is public, should be declared in a file named Profit.java
public class Profit{
       ^
1 error
Language: Java

import java.util.ArrayList;
import java.util.Scanner;
public class main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int maxv = -2000000000;
		ArrayList<Integer> numbers = new ArrayList<Integer>();
		for(int i =0;i<N;i++){
			numbers.add(sc.nextInt());
		}
		int minv = numbers.get(0);
		for(int i =1;i<=N;i++){
			maxv = Math.max(maxv, maxv-numbers.get(i));
			minv = Math.min(minv, numbers.get(i));
		}
		System.out.println(maxv);

	}

}



Compiler output:
Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
       ^
1 error
Language: Java

import java.util.ArrayList;
import java.util.Scanner;
public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int maxv = -2000000000;
		ArrayList<Integer> numbers = new ArrayList<Integer>();
		for(int i =0;i<N;i++){
			numbers.add(sc.nextInt());
		}
		int minv = numbers.get(0);
		for(int i =1;i<=N;i++){
			maxv = Math.max(maxv, numbers.get(i)-numbers.get(i-1);
			minv = Math.min(minv, numbers.get(i-1));
		}
		System.out.println(maxv);

	}

}



Compiler output:
Main.java:15: error: ')' or ',' expected
			maxv = Math.max(maxv, numbers.get(i)-numbers.get(i-1);
			                                                     ^
1 error
Language: Java

// This file is a "Hello, world!" in Java language by OpenJDK for wandbox.

import java.util.*;
publc class Main
{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int i;//循環変数
        int max1=0;//本来の最大値
        int maxIndex= 0;//本来の最大値のインデックス
        int min1=0;//本来の最小値
        int minIndex=0;//本来の最小値のインデックス
        int max2=0;//min1のインデックスよりも前のインデックスにある最大値
        int min2=0;//max1のインデックスよりも後のインデックスにある最小値
        int[] money = new int[n];
        for (i = 0; i < n; i++) {
            money[i] = sc.nextInt();
        }
         max1 = money[0];
            min1 = money[0];
        for (i = 0; i < n; i++) {
           
            if (money[i] >= max1) {
                max1 = money[i];
                maxIndex = i;
            }
            if (money[i] < min1){
                min1 = money[i];
                minIndex = i;
            }
        }
        
    
 min2 = money[maxIndex];
        for (i = maxIndex; i >= 0; i --) {
           
            if (money[i] < min2) {
                min2 = money[i];
            }
        }
        
                    max2 = money[minIndex];
        for (i = minIndex; i < n; i++) {

            if (money[i] > max2) {
                max2 = money[i];
            }
        }

        int ans1 = max1 - min2;
        int ans2 = max2 - min1;

        if (ans1 > ans2) {
            System.out.println(ans1);
        } else {
          System.out.println(ans2);
        }








    }

}

// OpenJDK reference:
//   http://openjdk.java.net/

// Java language references:
//   http://docs.oracle.com/javase



Compiler output:
Main.java:4: error: class, interface, enum, or record expected
publc class Main
^
1 error
Language: Java

public class Main {

	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int t = sc.nextInt();
		int[] R = inpNum(t);

		int mp = maxProfit(R);
		System.out.println(mp);
		sc.close();
	}

	private static int maxProfit(int[] R) {
		int max_p = R[1] - R[0];
		int min_p = R[0];
			for(int j = 1; j < R.length; j++) {
					max_p = Math.max(max_p, R[j] - min_p);
					min_p = Math.min(min_p, R[j]);
			}
		return max_p;
	}

	private static int[] inpNum(int n) {
		int[] nums = new int[n];

		for (int i = 0; i < n; i++) {
			nums[i] = sc.nextInt();
		}
		return nums;
	}
}


Compiler output:
Main.java:3: error: cannot find symbol
	static Scanner sc = new Scanner(System.in);
	       ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
	static Scanner sc = new Scanner(System.in);
	                        ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner scanner = new Scanner(System.in);
		
		int n = Integer.parseInt(scanner.nextLine());
		
		ArrayList<Integer> num = new ArrayList<Integer>();
		for(int i = 0;i < n;i++){
			num.add(Integer.parseInt(scanner.nextLine()););
		}
		
		scanner.close();
		
		int max = Integer.MIN();
		int num1,num2;
		int max_tmp = Integer.MIN();
		
		for(int i = 0;i < n;i++){
			num1 = num.get(i);
			for(int j = i+1;j < n;j++){
				num2 = num.get(j);
				if(num2 - num1 > max_tmp){
					max_tmp = num2 - num1;
				}
			}
			if(max_tmp > max){
				max = max_tmp;
			}
		}
		System.out.println(max);
		
	}
}


Compiler output:
Main.java:19: error: ')' or ',' expected
			num.add(Integer.parseInt(scanner.nextLine()););
			                                            ^
Main.java:19: error: illegal start of expression
			num.add(Integer.parseInt(scanner.nextLine()););
			                                             ^
2 errors
Language: Java

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner scanner = new Scanner(System.in);
		
		int n = Integer.parseInt(scanner.nextLine());
		
		ArrayList<Integer> num = new ArrayList<Integer>();
		for(int i = 0;i < n;i++){
			num.add(Integer.parseInt(scanner.nextLine()););
		}
		
		scanner.close();
		
		int max = Integer.MIN_VALUE;
		int num1,num2;
		int max_tmp = Integer.MIN_VALUE;
		
		for(int i = 0;i < n;i++){
			num1 = num.get(i);
			for(int j = i+1;j < n;j++){
				num2 = num.get(j);
				if(num2 - num1 > max_tmp){
					max_tmp = num2 - num1;
				}
			}
			if(max_tmp > max){
				max = max_tmp;
			}
		}
		System.out.println(max);
		
	}
}


Compiler output:
Main.java:19: error: ')' or ',' expected
			num.add(Integer.parseInt(scanner.nextLine()););
			                                            ^
Main.java:19: error: illegal start of expression
			num.add(Integer.parseInt(scanner.nextLine()););
			                                             ^
2 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

  public static void main(String[] args) throws IOException {
    
    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt(br.readLine());
      int minv = Integer.parseInt(br.readLine());
      int n1   = Integer.parseInt(br.readLine());
      int maxv = n1- minv;
      if ( n1 < minv ) minv = n1;

      for( int i=2,r; i<n; i++) {
        r = Integer.parseInt(br.readLine());
        if ( r-minv > maxv ) maxv = mv;
        if ( r < minv ) minv = r; 
      }

      System.out.println(maxv);
    }
  }
}


Compiler output:
Main.java:19: error: cannot find symbol
        if ( r-minv > maxv ) maxv = mv;
                                    ^
  symbol:   variable mv
  location: class Main
1 error
Language: Java

n = input()
n = int(n)
maxv = -20000000
list = []

i = 1
while(i<n):
	x = input()
	x = int(x)
	list = list.append(x)
	i = i + 1

minv = list[0]
i = 1
while(i<n):
	maxv = max(maxv, list[i]-minv)
	minv = min(minv, list[i])
	i = i + 1

print(maxv)


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
n = input()
^
1 error
Language: Java

n = input()
n = int(n)
list = []

i = 0
while(i<n):
	x = input()
	x = int(x)
	list[i] = x
	i = i + 1

maxv = -20000000
minv = list[0]
i = 1
while(i<n):
	if(maxv >= list[i]-minv):
		maxv = maxv
	else:
		maxv = list[i]-minv
	
	if(minv <= list[i]):
		minv = minv
	else:
		minv = list[i]
	i = i + 1

	print(maxv)


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
n = input()
^
1 error
Language: Java

n = input()
n = int(n)
list = []

i = 0
while(i<n):
	x = input()
	x = int(x)
	list.append(x)
	i = i + 1

maxv = -20000000
minv = list[0]
i = 1
while(i<n):
        maxv = max(maxv, list[i]-minv)
        minv = min(minv, list[i])
        i = i + 1
	
print(maxv)



Compiler output:
Main.java:1: error: class, interface, enum, or record expected
n = input()
^
1 error
Language: Java

n = input()
n = int(n)
list = []

i = 0
while(i<n):
	x = input()
	x = int(x)
	list.append(x)
	i = i + 1

maxv = -2000000000
minv = list[0]
i = 1
while(i<n):
        maxv = max(maxv, list[i]-minv)
        minv = min(minv, list[i])
        i = i + 1
	
print(maxv)



Compiler output:
Main.java:1: error: class, interface, enum, or record expected
n = input()
^
1 error
Language: Java

import java.util.Scanner;

public class ProfitProblem {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int i, n = scanner.nextInt();
        int min = scanner.nextInt();
        int max = Integer.MIN_VALUE;
        for(i = 1; i < n; ++i){
            int input = scanner.nextInt();
            max = Math.max(max, input - min);
            min = Math.min(min, input);
        }
        System.out.println(max);
        scanner.close();
    }
}


Compiler output:
Main.java:3: error: class ProfitProblem is public, should be declared in a file named ProfitProblem.java
public class ProfitProblem {
       ^
1 error
Language: Java

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


Compiler output:
Main.java:1: error: illegal character: '#'
#include<stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<stdio.h>
        ^
Main.java:5: error: class, interface, enum, or record expected
  scanf("%d",&n);
  ^
Main.java:6: error: class, interface, enum, or record expected
  int a[n];
  ^
Main.java:7: error: class, interface, enum, or record expected
  for(i=0;i<n;i++){
  ^
Main.java:7: error: class, interface, enum, or record expected
  for(i=0;i<n;i++){
          ^
Main.java:7: error: class, interface, enum, or record expected
  for(i=0;i<n;i++){
              ^
Main.java:9: error: class, interface, enum, or record expected
  }
  ^
Main.java:10: error: class, interface, enum, or record expected
  for(i=0;i<n;i++){
          ^
Main.java:10: error: class, interface, enum, or record expected
  for(i=0;i<n;i++){
              ^
Main.java:12: error: class, interface, enum, or record expected
    for(k=i+1;k<n;k++){
    ^
Main.java:12: error: class, interface, enum, or record expected
    for(k=i+1;k<n;k++){
              ^
Main.java:12: error: class, interface, enum, or record expected
    for(k=i+1;k<n;k++){
                  ^
Main.java:14: error: class, interface, enum, or record expected
      if(a[k]-b>max)max=a[k]-b;
      ^
Main.java:15: error: class, interface, enum, or record expected
    }
    ^
Main.java:18: error: class, interface, enum, or record expected
  return 0;
  ^
Main.java:19: error: class, interface, enum, or record expected
}
^
17 errors
Language: Java

import java.util.*;

public class D{
    static int x;
    static int y;
    static int s;
    public static void main(String[] args){
        Scanner a = new Scanner(System.in);
        int n = a.nextInt();
        int r[] = new int[n];
        for(int i=0; i < n; i++){
            r[i] = a.nextInt();
        }
        x = r[0];
        for(int i=1; i<n; i++){
            if(i < n-1 && x > r[i]){
                x = r[i];
                s = i;
            }
            else if(i > s && y < r[i]){
                y = r[i];
            }
            else{
                continue;
            }
        }
        System.out.println(y-x);
    }
}


Compiler output:
Main.java:3: error: class D is public, should be declared in a file named D.java
public class D{
       ^
1 error
Language: Java

import java.util.Scanner;
public class MaximumProfit{
    static int dmin = -1000000000;
    static int dmax = 1000000000;
     
    public static void main(String[] arg){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] nums = new int[n];
        for(int i=0; i < n; i++){
            nums[i] = sc.nextInt();
        }
         
        int mp = dmin;
        for(int i=0; i < n; i++){
            for(int j=i+1; j < n; j++){
                if((j-1) != i && nums[j] <= nums[j-1]) continue;
            	int p = nums[j] - nums[i];
                if(p == dmax){
                	mp = p;
                	break;
                }
                if(mp < p) mp = p;
            }
        }
        System.out.println(mp);
    }
}

Compiler output:
Main.java:2: error: class MaximumProfit is public, should be declared in a file named MaximumProfit.java
public class MaximumProfit{
       ^
1 error
Language: Java

import java.util.Scanner;
public class Maximum {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		long[] data = new long[n];
		long max = 0;
		for(int i = 0 ; i < n ; i++){
			data[i]=scan.nextInt();
		}
		for(int i = n-1 ; i >= 0 ; i --){
			for(int j = 0 ; j < i ; j ++){
				if(i==n-1&&j==0){
					max=data[i]-data[j];
				}
				if(max<(data[i]-data[j])){
					max= data[i]-data[j];
				}			}
		}
		System.out.println(max);
	}
}

Compiler output:
Main.java:2: error: class Maximum is public, should be declared in a file named Maximum.java
public class Maximum {
       ^
1 error
Language: C

#include<iostream>
using namespace std;

int main()
{
	int n, r[200000], max = 0, min = 200000000;
	cin >> n;
	cin >> r[0];
	max = -r[0];
	
	for (int i = 1; i < n; i++)
	{
		cin >> r[i];
		if (r[i] - min > max)
			max = r[i] - min;
		if (r[i] < min)
			min = r[i];
	}
	cout << max << endl;

	return 0;
}


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

#include <stdio.h>
int main(){
  int n,A[200000],i,ans=0,a;

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

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


Compiler output:
main.c: In function 'main':
main.c:9:7: error: 'j' undeclared (first use in this function)
    9 |   for(j=1;i<n;i++)
      |       ^
main.c:9:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:10: error: 'maxv' undeclared (first use in this function)
   11 |       if(maxv<R[j]-R[i])
      |          ^~~~
main.c:11:15: error: 'R' undeclared (first use in this function)
   11 |       if(maxv<R[j]-R[i])
      |               ^
Language: C

#include <stdio.h>
int main(){
  int n,A[200000],i,maxv=0,a;

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

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


Compiler output:
main.c: In function 'main':
main.c:9:7: error: 'j' undeclared (first use in this function)
    9 |   for(j=1;i<n;i++)
      |       ^
main.c:9:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:15: error: 'R' undeclared (first use in this function)
   11 |       if(maxv<R[j]-R[i])
      |               ^
Language: C

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

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

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


Compiler output:
main.c: In function 'main':
main.c:11:15: error: 'R' undeclared (first use in this function)
   11 |       if(maxv<R[j]-R[i])
      |               ^
main.c:11:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

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

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


Compiler output:
main.c: In function 'main':
main.c:11:14: error: 'R' undeclared (first use in this function)
   11 |       if(max<R[j]-R[i])
      |              ^
main.c:11:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(){
  int n,A[200000],i,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],i,max=-9999999999,min;
      |                         ^
main.c:11:7: error: 'j' undeclared (first use in this function)
   11 |   for(j=1;j<n-1;j++){
      |       ^
main.c:11: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 | }
      | ^