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

#include <iostream>

int r,g,b;

int main() {

    std::cin>>r>>g>>b;

    if((r*100+g*10+b)%4==0)#include <iostream>

int r,g,b;

int main() {

    std::cin>>r>>g>>b;

    if((r*100+g*10+b)%4==0)
        std::cout<<"YES"<<std::endl;
    else
        std::cout<<"NO"<<std::endl;

    return 0;
}
        std::cout<<"YES"<<std::endl;
    else
        std::cout<<"NO"<<std::endl;

    return 0;
}

Compiler output:
a.cc:9:28: error: stray '#' in program
    9 |     if((r*100+g*10+b)%4==0)#include <iostream>
      |                            ^
a.cc: In function 'int main()':
a.cc:9:29: error: 'include' was not declared in this scope
    9 |     if((r*100+g*10+b)%4==0)#include <iostream>
      |                             ^~~~~~~
a.cc:9:38: error: 'iostream' was not declared in this scope; did you mean 'std::iostream'?
    9 |     if((r*100+g*10+b)%4==0)#include <iostream>
      |                                      ^~~~~~~~
      |                                      std::iostream
In file included from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/iosfwd:146:41: note: 'std::iostream' declared here
  146 |   typedef basic_iostream<char>          iostream;
      |                                         ^~~~~~~~
a.cc:11:1: error: expected primary-expression before 'int'
   11 | int r,g,b;
      | ^~~
a.cc:13:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   13 | int main() {
      |         ^~
a.cc:13:9: note: remove parentheses to default-initialize a variable
   13 | int main() {
      |         ^~
      |         --
a.cc:13:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:13:12: error: a function-definition is not allowed here before '{' token
   13 | int main() {
      |            ^
a.cc:25:5: error: 'else' without a previous 'if'
   25 |     else
      |     ^~~~
Language: C++

#include <climits>
#include <cstring>
#include <cmath>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <functional>
#define fi first
#define se second
#define FO(x, n) for (int x = 0; x < n; ++x)
#define FOR(x, a, b) for (int x = a; x < b; ++x)
#define RFO(x, n) for (int x = n - 1; x >= 0; --x)
#define RFOR(x, a, b) for (int x = b - 1; x >= a; --x)
using namespace std;
typedef unsigned char byte;
typedef long long llong;
typedef unsigned long long ullong;
typedef pair<int, int> pii;
typedef pair<double, double> pdd;
typedef pair<string, string> pss;
typedef pair<llong, llong> pll;
inline bool feq(const double& a, const double& b) { return fabs(a - b) < 1e-10; }

int main()
{
    int r, g, b;
    cin >> r >> g >> b;
    int val = r * 100 + g * 10 + b;
    cout << ((val % 4) ? "NO" : "YES") << endl;
    return;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
   34 |     return;
      |     ^~~~~~
Language: C++

#include<iostream>
#include<stdio.h>

int main()
{
    int a,b,c;
    cin>>a>>b>>c;
    int num=a*100+b*10+c;
    if(num%4==0)cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |     cin>>a>>b>>c;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     if(num%4==0)cout<<"YES"<<endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |     if(num%4==0)cout<<"YES"<<endl;
      |                              ^~~~
      |                              std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:10:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |     else cout<<"NO"<<endl;
      |          ^~~~
      |          std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |     else cout<<"NO"<<endl;
      |                      ^~~~
      |                      std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main
{
  int r,g,b;
  cin>>r>>g>>b;
  if((r*100+g*10+b)%4==0)cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
}  

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main
      |     ^~~~
a.cc:6:3: error: expected primary-expression before 'int'
    6 |   int r,g,b;
      |   ^~~
a.cc:6:3: error: expected '}' before 'int'
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
a.cc:7:3: error: 'cin' does not name a type
    7 |   cin>>r>>g>>b;
      |   ^~~
a.cc:8:3: error: expected unqualified-id before 'if'
    8 |   if((r*100+g*10+b)%4==0)cout<<"YES"<<endl;
      |   ^~
a.cc:9:3: error: expected unqualified-id before 'else'
    9 |   else cout<<"NO"<<endl;
      |   ^~~~
a.cc:10:1: error: expected declaration before '}' token
   10 | }
      | ^
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main(void){
    char a, b, c;
    int n;
    cin >> a >> b >> c;
    string s="";
    s += a;
    s += b;
    s += c;
    n = atoi(s);
    if(n%4 == 0){
        cout << "YES" << endl;
    }else{
        cout << "NO" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   13 |     n = atoi(s);
      |              ^
      |              |
      |              std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C++

/**
 * @author Finn Lidbetter
 */
import java.util.*;
import java.io.*;
import java.awt.geom.*;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringBuilder sb = new StringBuilder();
    String[] s=  br.readLine().split(" ");
    int r = Integer.parseInt(s[0]);
    int g = Integer.parseInt(s[1]);
    int b = Integer.parseInt(s[2]);
    int val = 100*r + 10*g + b;
    if (val%4==0) {
      System.out.println("YES");
    } else {
      System.out.println("NO");
    }
  }
}


Compiler output:
a.cc:4:1: error: 'import' does not name a type
    4 | import java.util.*;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import java.io.*;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import java.awt.geom.*;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: expected unqualified-id before 'public'
    8 | public class Main {
      | ^~~~~~
Language: C++

#include <algorithm>
#include <stdint.h>
using ll = long long;

int main() {
	int R, G, B, x;
	scanf("%d %d %d", &R, &G, &B);
	x = R * 100 + G * 10 + B;
	printf("%s\n", (x % 4 ? "NO" : "YES"));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'scanf' was not declared in this scope
    7 |         scanf("%d %d %d", &R, &G, &B);
      |         ^~~~~
a.cc:9:9: error: 'printf' was not declared in this scope
    9 |         printf("%s\n", (x % 4 ? "NO" : "YES"));
      |         ^~~~~~
a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    2 | #include <stdint.h>
  +++ |+#include <cstdio>
    3 | using ll = long long;
Language: C++

#include <stdio.h>

int main(void) {
  int a, b, c;
  scanf("%i %i %i", &a, &b, &c);
  puts((a*100+b*10+c) % 4 == 0 ? "YES" : "NO");
  return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: expected ';' before '}' token
    7 |   return 0
      |           ^
      |           ;
    8 | }
      | ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
inline long long getnum()
{
    long long now=0;long long fh=1;char ch=getchar();
    while(ch<'0' || ch>'9'){if(ch=='-')fh=-1;ch=getchar();}
    while(ch>='0' && ch<='9'){now=(now<<3)+(now<<1)+ch-'0';ch=getchar();}
    return now*fh;
}
int main()
{
  int x=getnum()*100;
  x+=getnum()*10;
  x+=getnum();
  if (x%4==0) printf("YES\n");else printf("NO\n")
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:50: error: expected ';' before 'return'
   15 |   if (x%4==0) printf("YES\n");else printf("NO\n")
      |                                                  ^
      |                                                  ;
   16 |     return 0;
      |     ~~~~~~
Language: C++

#include <iostream>
int main(){
 int a,b,c;
 cin>>a>>b>>c;
 if((b*10+c)%4==0){
  cout<<"YES";
 }else cout<<"NO";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |  cin>>a>>b>>c;
      |  ^~~
      |  std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   cout<<"YES";
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |  }else cout<<"NO";
      |        ^~~~
      |        std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
    // Here your code !
    int r,g,b;
    cin >> r >> g >> b;
    int total = t * 100 + g * 10 + b;
    if(total % 4 == 0){
        cout << "YES" << endl;
        
    }else{
        cout << "NO" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 't' was not declared in this scope
    7 |     int total = t * 100 + g * 10 + b;
      |                 ^
Language: C++

import java.util.*;


/**
 * Created by santa on 2016/10/16.
 */

public class Main {

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

        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        int ans = a * 100 + b * 10 + c;
        if(ans % 4 == 0){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        }


    }// mainMethod




} // MainClass


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: expected unqualified-id before 'public'
    8 | public class Main {
      | ^~~~~~
Language: C++

#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
 
using namespace std;
 
typedef long long ll;
 
#define sz size()
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(c) (c).begin(), (c).end()
#define rep(i,a,b) for(ll i=(a);i<(b);++i)
#define per(i,a,b) for(ll i=b-1LL;i>=(a);--i)
#define clr(a, b) memset((a), (b) ,sizeof(a))
#define ctos(c) string(1,c)
#define print(x) cout<<#x<<" = "<<x<<endl;
 
#define MOD 1000000007

int main() {
  ll a,b,c;
  cin>>a>>b>>c;
  ll d = 100*a+10*b+c;
  if(d%4==){
    cout << "YES" << endl;
  }
  else{
    cout << "NO" << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:11: error: expected primary-expression before ')' token
   43 |   if(d%4==){
      |           ^
Language: C

#include<cstdio>
#include<deque>
using namespace std;
#define EPS 1e-8
typedef long long ll;
deque<int>q;
int n;
ll m,sum[500010],f[500010];
//借鉴了:http://www.cnblogs.com/ka200812/archive/2012/08/03/2621345.html
ll getDP(int i,int j){
    return f[j]+m+(sum[i]-sum[j])*(sum[i]-sum[j]);
}
ll getUP(int j,int k){//yj-yk，即斜率的分子部分
    return (f[j]+sum[j]*sum[j])-(f[k]+sum[k]*sum[k]);
}
ll getDOWN(int j,int k){//xj-xk，即斜率的分母部分
    return 2ll*(sum[j]-sum[k]);
}
int main(){
    freopen("k.in","r",stdin);
    while(scanf("%d%lld",&n,&m)!=EOF){
        for(int i=1;i<=n;++i){
            scanf("%lld",&sum[i]);
        }
        for(int i=2;i<=n;++i){
            sum[i]+=sum[i-1];
        }
        q.clear();
        q.push_back(0);
        for(int i=1;i<=n;++i){
            while(q.size()>1 && getUP(q[1],q[0])<=sum[i]*getDOWN(q[1],q[0])){
                q.pop_front();
            }
            f[i]=getDP(i,q.front());
            while(q.size()>1 && getUP(i,q.back())*getDOWN(q.back(),q[q.size()-2])<=getUP(q.back(),q[q.size()-2])*getDOWN(i,q.back())){
                q.pop_back();
            }
            q.push_back(i);
        }
        printf("%lld\n",f[n]);
    }
    return 0;
}

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

#include <cstdio>
#include <stdio.h>
#include <string>
#include <string.h>
#include <algorithm>
#include <vector>
#include <iostream.h>
using namespace std;

#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)

int main(){
	int a,b,c;
	cin >>a>>b>>c;
	if((10*b+c)%4 == 0){
		cout << "YES" << endl;
	}
	else{
		cout << "NO" <<endl;
	}
	
}

Compiler output:
a.cc:7:10: fatal error: iostream.h: No such file or directory
    7 | #include <iostream.h>
      |          ^~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++/h>
using namespace std;

typedef long long ll;

int main() {
	int r, g, b;
	cin >> r>>g >>b;
	int x=10*g+b;
	if(x%4==0) {
		cout << "YES\n";
	}
	else	cout << "NO\n";
	return 0;
}

Compiler output:
a.cc:1:10: fatal error: bits/stdc++/h: No such file or directory
    1 | #include <bits/stdc++/h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<string>
#include<deque>
#include<queue>
#include<vector>
#include<algorithm>
#include<iostream>
#include<set>
#include<cmath>
#include<tuple>
#include<map>
using namespace std;
typedef long long int llint;
#define mp make_pair
#define mt make_tuple
#define pub push_back
#define puf push_front
#define pob pop_back
#define pof pop_front
#define fir first
#define sec second
#define res resize
#define ins insert
#define era erase
const llint mod=100000007;
const llint big=1e9;
const llint red=0xE869120;
const llint pro=1002001;
int main(void){
	int a,b,i,j,ans=0,gen,bmax=max,bmin,q,w,n,m;
	string str;
	vector<int> vec;
	cin>>n>>m>>w;
	if((n*100+m*10+w)%4==0){cout<<"YES"<<endl;}
	else{cout<<"NO"<<endl;}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:36: error: cannot resolve overloaded function 'max' based on conversion to type 'int'
   29 |         int a,b,i,j,ans=0,gen,bmax=max,bmin,q,w,n,m;
      |                                    ^~~
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main()
{
  int R, G, B;
  cin >> R >> G >> B;
  if((R * 100 + G * 10 + B) % 4 == 0) {
    cout << < "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: expected primary-expression before '<' token
   10 |     cout << < "YES" << endl;
      |             ^
a.cc:10:21: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
   10 |     cout << < "YES" << endl;
      |               ~~~~~~^~~~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n; cin >> n;
  int mn = INT_MAx , mx = INT_MIN;
 while(n--){
   int x; cin >> x;
   mn = min(x,mn) , mx = max(mx , x);
 }
  cout << mx - mn;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: 'INT_MAx' was not declared in this scope
    6 |   int mn = INT_MAx , mx = INT_MIN;
      |            ^~~~~~~
a.cc:9:21: error: 'mx' was not declared in this scope; did you mean 'x'?
    9 |    mn = min(x,mn) , mx = max(mx , x);
      |                     ^~
      |                     x
a.cc:11:11: error: 'mx' was not declared in this scope; did you mean 'mn'?
   11 |   cout << mx - mn;
      |           ^~
      |           mn
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(n); ++i)
using namespace std;

int main(){
  int n;
  cin >> n;
  vector<int> a(n);
  rep(i,n) cin >> a[i];
  a.sort(a.begin(), a.end());
  cout << a[n-1]-a[0] << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'class std::vector<int>' has no member named 'sort'
   10 |   a.sort(a.begin(), a.end());
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int n;
  cin >> n;
  vector<int> a(n);
  rep(i,n) cin >> a[i];
  a.sort(a.begin(), a.end());
  cout << a[n-1]-a[0] << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   rep(i,n) cin >> a[i];
      |       ^
a.cc:8:3: error: 'rep' was not declared in this scope
    8 |   rep(i,n) cin >> a[i];
      |   ^~~
a.cc:9:5: error: 'class std::vector<int>' has no member named 'sort'
    9 |   a.sort(a.begin(), a.end());
      |     ^~~~
Language: Java

import java.util.*; import java.io.*; import java.math.*;
public class Main{
	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
		solve();flush();
	}
	//Don't have to see. end------------------------------------------
	static void solve(){//Here is the main function
		int N = nextInt();
		ArrayList<Integer> list = nextIntArray();
		Collections.sort(list);
		myout(list.get(N - 1) - list.get(0))
	}
	//Method addition frame start



	//Method addition frame end
}


Compiler output:
Main.java:75: error: ';' expected
		myout(list.get(N - 1) - list.get(0))
		                                    ^
1 error
Language: C++

// lcmとか__builtin_popcountとかはg++ -std=c++17 default.cppみたいなかんじで

#include <bits/stdc++.h>
#define mod 1000000007
#define INF LLONG_MAX
#define ll long long
#define ln cout<<endl
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define rep(i,n) REP(i,0,n)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
using namespace std;
ll dx[4]={1,0,-1,0};
ll dy[4]={0,1,0,-1};

int main() {
    cin.tie(0);
   	ios::sync_with_stdio(false);

    ll  a,b,c,d,e,n,maxi=0,f=0,mini=INF,sum=0,q;
	string str,g;
    cin>>n;
    vector<ll> v(n);
    rep(i,n) cin>>v[i];
    sort(all(v));
    cout<<v[v.length()-1]-v[0]<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:15: error: 'class std::vector<long long int>' has no member named 'length'
   28 |     cout<<v[v.length()-1]-v[0]<<endl;
      |               ^~~~~~
Language: Java

import java.util.Scanner;

public class Main {

	static Scanner scanner;

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

	    int n=gi();
        int[] A=new int[n];
        
        for(int i=0; i<n;i++) {
        	A[i]=gi();
        }
        
        Arrays.parallelSort(A);
	   
	    System.out.print(A[A.length-1]-A[0]);

//        if (t.equals("Sunny")) {
//        	System.out.print("Cloudy");
//        }else if(t.equals("Cloudy")){
//        	System.out.print("Rainy");
//        } else {
//        	System.out.print("Sunny");
//        }


	}
	// 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	}

	// intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	}

	// longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	}

	// doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	}
}

Compiler output:
Main.java:17: error: cannot find symbol
        Arrays.parallelSort(A);
        ^
  symbol:   variable Arrays
  location: class Main
1 error
Language: C

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:17:17: error: expected expression before '<' token
   17 |          if(max=<a[i])      max=a[i];
      |                 ^
main.c:18:22: error: expected expression before '>' token
   18 |          else if(min=>a[i]) min=a[i];
      |                      ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;

int main(){
    int n;
    cin >> n;
    vector<int> a(n);
    for(int i = 0;i < n;i++){
        cin >> a[i];
    }
    /**/
    sort(a.begin(),a.end());

    cout << abs(a[n - 1] - a[0]) << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |     sort(a.begin(),a.end());
      |     ^~~~
      |     short
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
int n,i,x;
cin >> n;
int number[n];
for (i = 1;  i <= N; i++)
{
cin >> number[i];
}

int max,min= 0;
max = min = number[0];

for(x = 1; x <= N; x++)
{
if(number[x] > max)
max = number[x];
if(number[x] < min)
min = number[x];

}
cout << max-min<< endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 'N' was not declared in this scope
    8 | for (i = 1;  i <= N; i++)
      |                   ^
a.cc:16:17: error: 'N' was not declared in this scope
   16 | for(x = 1; x <= N; x++)
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
int n,i,x;
cin >> n;
int number[n];
for (i = 1;  i <= n; i++)
{
cin >> number[i];
}

int max,min= 0;
max = min = number[0];
/
for(x = 1; x <= n; x++)
{
if(number[x] > max)
max = number[x];
if(number[x] < min)
min = number[x];

}
cout << max-min<< endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:15:1: error: expected primary-expression before '/' token
   15 | /
      | ^
a.cc:16:1: error: expected primary-expression before 'for'
   16 | for(x = 1; x <= n; x++)
      | ^~~
a.cc:16:23: error: expected ';' before ')' token
   16 | for(x = 1; x <= n; x++)
      |                       ^
      |                       ;
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
int n,i,x;
cin >> n;
int number[n];
for (i = 1;  i <= n; i++)
{
cin >> number[i];
}

int max,min= 0;
max = min = number[0];
/
for(x = 1; x <= n; x+)
{
if(number[x] > max)
max = number[x];
if(number[x] < min)
min = number[x];

}
cout << max-min<< endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:15:1: error: expected primary-expression before '/' token
   15 | /
      | ^
a.cc:16:1: error: expected primary-expression before 'for'
   16 | for(x = 1; x <= n; x+)
      | ^~~
a.cc:16:22: error: expected primary-expression before ')' token
   16 | for(x = 1; x <= n; x+)
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
int n,a,i,x;
cin >> n;
int number[n];
for (i = 1;  i <= n; i++)
{
cin >> number[i];
}

int max,min= 0;
max = min = number[0];
/
for(x = 1; x <= n; x+)
{
if(number[x] > max)
max = number[x];
if(number[x] < min)
min = number[x];

}
cout << max-min<< endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:15:1: error: expected primary-expression before '/' token
   15 | /
      | ^
a.cc:16:1: error: expected primary-expression before 'for'
   16 | for(x = 1; x <= n; x+)
      | ^~~
a.cc:16:22: error: expected primary-expression before ')' token
   16 | for(x = 1; x <= n; x+)
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
int res=v[0];
for(int i=0 ; i<N ; i++){
 res=min(res,v[i]);
 }
 int res1 = v[o];
  for(int i=0 ; i<N; i++){
  res1= max(res1,v[i]);
  }
  cout << res1-res<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'v' was not declared in this scope
    5 | int res=v[0];
      |         ^
a.cc:6:17: error: 'N' was not declared in this scope
    6 | for(int i=0 ; i<N ; i++){
      |                 ^
a.cc:9:15: error: 'o' was not declared in this scope
    9 |  int res1 = v[o];
      |               ^
a.cc:10:19: error: 'N' was not declared in this scope
   10 |   for(int i=0 ; i<N; i++){
      |                   ^
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.next());
    int[] a=new int[n];
    for(int i=0;i<n;i++){
      a[i]=Integer.parseInt(sc.next());
    }
    Array.sort(a);
    System.out.println(a[n-1]-a[0]);
  }
}


Compiler output:
Main.java:12: error: cannot find symbol
    Array.sort(a);
    ^
  symbol:   variable Array
  location: class Main
1 error
Language: C++

#include <iostream>
#include <vector>
#define REP(i, n) for (int i = 0; i < (n); i++)
using namespace std;

void solve(long long N, std::vector<long long> a){
    sort(a.begin(), a.end());
    cout << a[N - 1] - a[0] << '\n';
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    long long N;
    scanf("%lld",&N);
    std::vector<long long> a(N);
    for(int i = 0 ; i < N ; i++){
        scanf("%lld",&a[i]);
    }
    solve(N, std::move(a));
    return 0;
}


Compiler output:
a.cc: In function 'void solve(long long int, std::vector<long long int>)':
a.cc:7:5: error: 'sort' was not declared in this scope; did you mean 'short'?
    7 |     sort(a.begin(), a.end());
      |     ^~~~
      |     short
Language: C++

#include <bits/stdc++.h>
using namespace std;

int n;
 
int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	cin >> n;
	int a[n];
	REP(i, 0, n) cin >> a[i];
	sort(a, a + n);
	cout << a[n - 1] - a[0];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'i' was not declared in this scope
   12 |         REP(i, 0, n) cin >> a[i];
      |             ^
a.cc:12:9: error: 'REP' was not declared in this scope
   12 |         REP(i, 0, n) cin >> a[i];
      |         ^~~
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 a=sc.nextInt();
    for(int i=1;i<N;i++){
      int Min;
      int Max;
      if(Min>a)Min=a;
      if(Max<a)Max=a;
    System.out.println(Max-Min);}
} 
}


Compiler output:
Main.java:4: error: <identifier> expected
    Scanner sc=new.Scanner(System.in);
                  ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    int N =sc.nextInt();
    int a=sc.nextInt();
    for(int i=1;i<N;i++){
      int Min;
      int Max;
      if(Min>a)Min=a;
      if(Max<a)Max=a;
    System.out.println(Max-Min);}
} 
}

Compiler output:
Main.java:4: error: cannot find symbol
    int N =sc.nextInt();
           ^
  symbol:   variable sc
  location: class Main
Main.java:5: error: cannot find symbol
    int a=sc.nextInt();
          ^
  symbol:   variable sc
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    int N = sc.nextInt();
    int a = sc.nextInt();
    for(int i=1;i<N;i++){
      int Min=a;
      int Max=a;
      System.out.println(Max-Min);}
}   
}


Compiler output:
Main.java:4: error: cannot find symbol
    int N = sc.nextInt();
            ^
  symbol:   variable sc
  location: class Main
Main.java:5: error: cannot find symbol
    int a = sc.nextInt();
            ^
  symbol:   variable sc
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    int N,a,Min,Max;
    for(int i=1;i<N;i++){
      if(Min>a)Min=a;
      if(Max<a)Max=a;
      System.out.println(Max-Min);}
}   
}


Compiler output:
Main.java:5: error: variable N might not have been initialized
    for(int i=1;i<N;i++){
                  ^
Main.java:6: error: variable Min might not have been initialized
      if(Min>a)Min=a;
         ^
Main.java:6: error: variable a might not have been initialized
      if(Min>a)Min=a;
             ^
Main.java:7: error: variable Max might not have been initialized
      if(Max<a)Max=a;
         ^
4 errors
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    int N =sc.nextInt();
    int a=sc.nextInt();
    int Min;
    int Max;
    for(int i=1;i<N;i++){
      if(Min>a)Min=a;
      if(Max<a)Max=a;
      System.out.println(Max-Min);}
}   
}


Compiler output:
Main.java:4: error: cannot find symbol
    int N =sc.nextInt();
           ^
  symbol:   variable sc
  location: class Main
Main.java:5: error: cannot find symbol
    int a=sc.nextInt();
          ^
  symbol:   variable sc
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    int N =sc.nextInt();
    int a=sc.nextInt();
    for(int i=1;i<N;i++){
      int Min;
      int Max;
      if(Min>a)Min=a;
      if(Max<a)Max=a;}
    System.out.println(Max-Min);}
}   


Compiler output:
Main.java:4: error: cannot find symbol
    int N =sc.nextInt();
           ^
  symbol:   variable sc
  location: class Main
Main.java:5: error: cannot find symbol
    int a=sc.nextInt();
          ^
  symbol:   variable sc
  location: class Main
Main.java:11: error: cannot find symbol
    System.out.println(Max-Min);}
                       ^
  symbol:   variable Max
  location: class Main
Main.java:11: error: cannot find symbol
    System.out.println(Max-Min);}
                           ^
  symbol:   variable Min
  location: class Main
4 errors
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    int N =sc.nextInt();
    int a=sc.nextInt();
    for(int i=1;i<N;i++){
      int Min;
      int Max;
      if(Min>a)Min=a;
      if(Max<a)Max=a;}
    System.out.println(Max-Min);}
      
      

Compiler output:
Main.java:11: error: reached end of file while parsing
    System.out.println(Max-Min);}
                                 ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int ctoi(const char c) {
    if ('0' <= c && c <= '9') return (c - '0');
    return -1;
}
vector<int> input(int n) {
    vector<int> vec(n);
    for (int i = 0; i < n; i++) {
        cin >> vec.at(i);
    }
    return vec;
}
void output(vector<int> vec) {
    for (int i = 0; i < vec.size(); i++) {
        cout << vec[i] << " ";
    }
    return;
}
vector<vector<int>> input(int n, int m) {
    vector<vector<int>> table(n, vector<int>(m));
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            cin >> table. at(i).at(j);
        }
    }
    return table;
}
void output(vector<vector<int>> table) {
    for (int i = 0; i < table.size(); i++) {
        for (int j = 0; j < table.at(0).size(); j++) {
            cout << table.at(i).at(j) << " ";
        }
        cout << endl;
    }
}
long long perm(int n, int r) {
    if (n < r) {
        cout << "error" << endl;
        return 0;
    }
    long long perm = 1;
    for (int i = n; i > n - r; i--) {
        perm *= i;
    }
    return perm;
}
long long comb(int n, int r) {
    if (n < r) {
        cout << "error" << endl;
        return 0;
    }
    long long comb = perm(n,r);
    for (int i = r; i > 0; i--) {
        comb /= i;
    }
    return comb;
}
long long homo(int n, int r) {
    return comb(n + r - 1, n - 1);
}
long long fact(int n) {
    long long fact = 1;
    for (int i = n; i > 0; i--) {
        fact *= i;
    }
    return fact;
}
int gcd(int a, int b)
{
    if (a % b == 0)
    {
        return(b);
    }
    else
    {
        return(gcd(b, a % b));
    }
}
int lcm(int a, int b) {
    return a * b / gcd(a, b);
}
int main() {
  int n;
  cin >> n;
  vector<int> a=input(n);
  sort(a.begin(),a.end());
  cout << s[n-1]-s[0] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:89:11: error: 's' was not declared in this scope
   89 |   cout << s[n-1]-s[0] << endl;
      |           ^
Language: C

#include <stdio.h>

int main (void)
{
  int n , min = 10000 , max = 0;
  scanf("%d",&n);
  int a[n];
  for(int i = 0;i < n; i ++){
    scanf("%d",&a[i]);
    if(min>a[i]){
      min = a[i];
    }
    if(max<a[i]){
      max = a[i];
    }}
  
 printf("%d",max - min);
 return 0;

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

#include <iostream>
#include <vector>
#include <cstdlib>
using namespace std;

int main(void) {
    int N;cin>>N;
    vector<int> A(N);
    for (int i = 0; i < N; i++) cin>>A[i];
    vector<int> index(N);
    for (int i = 0 ;i < N; i++) index.push_back(i);
    int mi = 1e9;
    do {
        int cur = 0;
        for (int i = 0; i < N - 1; i++) {
            cur += abs(A[i] - A[i + 1]);
        }
        if (mi > cur) mi = cur;
    } while (next_permutation(A.begin(), A.end()));
    cout << mi << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:14: error: 'next_permutation' was not declared in this scope
   19 |     } while (next_permutation(A.begin(), A.end()));
      |              ^~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>

using namespace std;

int main(void)
{
  int n; cin>>n;
  vector<int> a(n);
  for(int i=0;i<n;i++){
    cin>>a[i];
  }
  
  int mx=*max_element(a.begin(),a.end());
  int mi=*min_element(a.begin(),a.end());
  
  cout<<mx-mi<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'vector' was not declared in this scope
    9 |   vector<int> a(n);
      |   ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include<algorithm>
  +++ |+#include <vector>
    3 | 
a.cc:9:10: error: expected primary-expression before 'int'
    9 |   vector<int> a(n);
      |          ^~~
a.cc:11:10: error: 'a' was not declared in this scope
   11 |     cin>>a[i];
      |          ^
a.cc:14:23: error: 'a' was not declared in this scope
   14 |   int mx=*max_element(a.begin(),a.end());
      |                       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin>>N;
  vector<int> vec(N);
  for(int i=0;i<N;i++) {
    cin>>vec.at(i);
  }
  sort(vec);
  int ans=vec.at(N)-vec.at(1);
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: no matching function for call to 'sort(std::vector<int>&)'
   11 |   sort(vec);
      |   ~~~~^~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 1 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 1 provided
Language: C++

// #include <iostream>
#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int n;
    cin >> n;

    vector<int> v(n);

    for (int i = 0; i < n; i++)
    {
        cin >> v.at(i);
    }

    sort(v.begin(), v.end());
    cout << v.end() - v.begin() << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   19 |     sort(v.begin(), v.end());
      |     ^~~~
      |     short
Language: C++

#include<iostream>
using namespace std;

int main(){
  int N,min,max;
  max = 0;
  min = 1000;
  cin >> N;
  long a[N];
  for(int i=0;i<N;i++){
    cin >> a[i];
    min = min(a[i],min);
    max = max(a[i],max);
  }
  cout << max-min << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: 'min' cannot be used as a function
   12 |     min = min(a[i],min);
      |           ~~~^~~~~~~~~~
a.cc:13:14: error: 'max' cannot be used as a function
   13 |     max = max(a[i],max);
      |           ~~~^~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n; cin >> n;
  int A[n];
  for (int i = 0; i < n; i++) cin >> A[i];
  sort(A, A + n);
  cout << A[n - 1] - A[0] << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    7 |   sort(A, A + n);
      |   ^~~~
      |   short
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; i++) {
    cin >> a[i];
  }
  sort(a.begin(),a.end());
  int ans = A[N - 1] - A[0];
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: 'A' was not declared in this scope
   11 |   int ans = A[N - 1] - A[0];
      |             ^
Language: C++

//#define _GLIBCXX_DEBUG

#include<bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int INF= 1e9+5;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>>vvi;

int main(){
  int n;cin>>n;
  vi a(n);
  rep(i,n)cin>>a[i];
  MIN=a[0],MAX=a[0];
  rep(i,n){
    MIN=min(MIN,a[i]);
    MAX=max(MAX,a[i]);
  }
  cout<<MAX-MIN<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: 'MIN' was not declared in this scope
   16 |   MIN=a[0],MAX=a[0];
      |   ^~~
a.cc:16:12: error: 'MAX' was not declared in this scope
   16 |   MIN=a[0],MAX=a[0];
      |            ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	cin>>n;
	for(int i=1;i<=n;i++)cin>>a[i];
	sort(a+1,a+n+1);
	cout<<a[n]-a[1];
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:35: error: 'a' was not declared in this scope
    7 |         for(int i=1;i<=n;i++)cin>>a[i];
      |                                   ^
a.cc:8:14: error: 'a' was not declared in this scope
    8 |         sort(a+1,a+n+1);
      |              ^
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int a[] = new a[n];
    for(int i = 0;i < n;i++){
      a[i] = sc.nextInt();
    }
    Arrays.sort(a);
    System.out.println(a[n-1] - a[0]);
  }
}


Compiler output:
Main.java:6: error: cannot find symbol
    int a[] = new a[n];
                  ^
  symbol:   class a
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>
#define rep(i,m,n) for(int i=m; i<n; i++)
#define ci(n) cin >> n
#define co(n) cout << n << endl
using namespace std;

int main(){
  long n;
  cin >> n;
  int [n];
  rep(i,0,n) cin >> a[i];
  sort(a, a+n);
  co(a[n-1]-a[0]);
         
         
    
    
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: structured binding declaration cannot have type 'int'
   10 |   int [n];
      |       ^~~
a.cc:10:7: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:10:8: error: conflicting declaration 'auto n'
   10 |   int [n];
      |        ^
a.cc:8:8: note: previous declaration as 'long int n'
    8 |   long n;
      |        ^
a.cc:10:10: error: expected initializer before ';' token
   10 |   int [n];
      |          ^
a.cc:11:21: error: 'a' was not declared in this scope
   11 |   rep(i,0,n) cin >> a[i];
      |                     ^
a.cc:12:8: error: 'a' was not declared in this scope
   12 |   sort(a, a+n);
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int n;
  cin >> n;
  vector<int> a(n);
  int i;
  for(i=0;i<n;i++){
    cin >> a[i];
  }
  sort(a.begin(), a.end(),);
  cout << a[n-1]-a[0];
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:27: error: expected primary-expression before ')' token
   12 |   sort(a.begin(), a.end(),);
      |                           ^
Language: C++

#include <iostream>

using namespace std;

int main(void)
{
    int N, a[101], i;

    cin >> N;

    for(i=1; i<=N; i++){
        cin >> a[i];
    }

    sort(a+1, a+N+1);

    cout << a[N]-a[1] << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   15 |     sort(a+1, a+N+1);
      |     ^~~~
      |     short
Language: C++

#include <iostream>
#include <vector>
using namespace std;

int main(){
  int N;
  cin >> N;
  vector<int> A(N);

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

  int MAX, MIN;
  MAX = *max_element(A.begin(), A.end());
  MIN = *min_element(A.begin(), A.end());

  cout << MAX-MIN << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: 'max_element' was not declared in this scope
   15 |   MAX = *max_element(A.begin(), A.end());
      |          ^~~~~~~~~~~
a.cc:16:10: error: 'min_element' was not declared in this scope
   16 |   MIN = *min_element(A.begin(), A.end());
      |          ^~~~~~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   for(i = 1; i < n; i++){
      |       ^