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

import java.util.Scanner;

public class AtcoderBCA {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] a = new int[3];
			a[0] = sc.nextInt();
			a[1] = sc.nextInt();
			a[2] = sc.nextInt();
			int hoge;
			for(int i = 0;i < a.length;i++) {
				for(int j = 0 ;j < i ;j++) {
					if(a[i] < a[j]) {
						hoge = a[i];
						a[i] = a[j];
						a[j] = hoge;
					}
				}
			}
			hoge = a[1] - a[2];
			int task = hoge + a[2];
			System.out.println(task);
	}

}


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

#include<iostream> 
2.#include<string>  
3.#include<cstdlib>
4.using namespace std; 
5. 
6.int main() {
7.	int a; int b; int c; 
8.	cin >> a >> b >> c;
9.	cout << abs(b - c) + abs(a - c) << endl;
10. 
11. 
12.}


Compiler output:
a.cc:2:3: error: stray '#' in program
    2 | 2.#include<string>
      |   ^
a.cc:3:3: error: stray '#' in program
    3 | 3.#include<cstdlib>
      |   ^
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2.#include<string>
      | ^~
a.cc:5:1: error: expected unqualified-id before numeric constant
    5 | 5.
      | ^~
Language: C

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

int main(void){
	
	int A;
	int B;
	int C;
	int D;

	scanf("%d %d %d", &A, &B, &C);
	int D = abs(A - B);
	if (D > abs(B - A))
		D = abs(B - A);
	if (D > abs(A - C))
		D = abs(A - C);
	if (D > abs(B - C))
		D = abs(B - C);
	if (D > abs(C - A))
		D = abs(C - A);
	if (D > abs(C - B))
		D = abs(C - B);
	if (D > abs(A - B))
		D = abs(A - B);
	printf("%d", D);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:13: error: redeclaration of 'D' with no linkage
   12 |         int D = abs(A - B);
      |             ^
main.c:9:13: note: previous declaration of 'D' with type 'int'
    9 |         int D;
      |             ^
Language: C

#include<stdio.h>

void main()
{
	int A1, A2, A3,mini, cost = 0;

	scanf_s("%d %d %d", &A1, &A2, &A3);

	if (A2 <= A1) 
	{
		mini = A2;
		A2 = A1;
		A1 = mini;
	}
	//前2个完成排序
	//printf("%d %d\n", A1, A2);
	if (A3 <= A1)//A3最小
	{
		mini = A3;
		A3 = A2;A2 = A1;A1 = mini;
	}
	else
		if (A3 <= A2) //A3第二小
		{
			mini = A3;
			A3 = A2;
			A2 = mini;
		}
	//printf("%d %d %d\n", A1, A2, A3);
	cost = A3 - A1;
	printf("%d", cost);
}

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

#include "bits/stdc++.h"
using namespace std;
using ll = long long;

int main() {
  cin.tie(0);
  cin.sync_with_stdio(0);

  int n, m;
  cin >> n >> m;

  vector<pair<int, int>> a(m);
  for (int i = 0; i < m; ++i)
  	cin >> a[i].first >> a[i].second;

  sort(a.begin(), a.end());
  int ans = 0;
  int mn = -1;
  for(auto const& p : a) {
  	int l, r; tie(l, r) = p;
  	// remove first
  	if(mx <= l) {
  		ans++;
  		mx = r;
  	} 
  	// add next
  	else {
  		mx = min(mx, r);
  	}
  }
  cout << ans << flush;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:12: error: 'mx' was not declared in this scope; did you mean 'mn'?
   22 |         if(mx <= l) {
      |            ^~
      |            mn
Language: C++

#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
typedef long long LL;

#define __m int mid=(l+r)>>1
#define lson l,mid,rt<<1
#define rson mid+1,r,rt<<1|1

template<class T>
inline bool rd(T &num) {
    char in;
    bool IsN = false;
    while(in = getchar(), in != '-' && (in < '0' || in > '9'))if(in == EOF)return false;
    in == '-' ? (IsN = true, num = 0) : num = in - '0';
    while(in = getchar(), in >= '0' && in <= '9')num = num * 10 + in - '0';
    return IsN ? num = -num : num, true;
}

#define rep(i,a,b) for(register int i = (a); i< (b); i++)
#define per(i,a,b) for(register int i = (a); i> (b); i--)
#define clr(a) memset(a,0,sizeof(a))
#define inf(a) memset(a,0x3f,sizeof(a))
#define IO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define rd2(a,b) rd(a)&&rd(b)
#define rd3(a,b,c) rd(a)&&rd(b)&&rd(c)
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))

string nico;
#ifdef LOCAL
#define bug(x) cout<<#x<<" : "<<x<<endl
#define infile(x) freopen(x,"r",stdin)
#define outfile(x) freopen(x,"w",stdout)
#else
#define bug(x)
#define infile(x)
#define outfile(x)
#endif

const int maxn = 4e6 + 7;
const int inf  = 0x3f3f3f3f;
const LL linf  = (LL)inf << 32 | inf;
const int mod  = 1e9 + 7;

int main(){
    int ans=inf;
    int num[3];
    cin>>num[0]>>num[1]>>num[2];
    do{
        ans = min(ans,abs(num[1]-num[0])+abs(num[1]-num[2]));
    }while(next_permutation(num,num+3));
    cout<<ans<<endl;
    return 0;
}



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

#include <bits/stdc++.h>
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define ll long long int
using namespace std;
const int N = 1e6 + 5;
const ll inf = -1e18;
const int MOD = 1e9 + 7;


ll a[3];
int main(){
   fast;
   ll ans, out = 1e18;
   for(int i = 0; i < 3; i++)
      cin >> a[i];
   sort(a, a + 3;)
   do{
      ans = abs(a[1] - a[0]) + abs(a[2] - a[1]);
      out = min(out, ans);
   }while(next_permutation(a, a + 3));
   cout << out;



   return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: expected ')' before ';' token
   16 |    sort(a, a + 3;)
      |        ~        ^
      |                 )
a.cc:16:18: error: expected primary-expression before ')' token
   16 |    sort(a, a + 3;)
      |                  ^
Language: Java

/**
 * 
 */
package com.atcoder;

import java.util.ArrayList;
import java.util.Scanner;

/**
 * @author User
 *
 */
public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int[] array = new int[3];
		array[0] = sc.nextInt();
		array[1] = sc.nextInt();
		array[2] = sc.nextInt();
		
		int minCost = 300;
		
		for(int i = 0; i < 3 ; i++) {
			int nextMinCost = 100;
			int nextMinNumber = 0;
			for(int j = 0; j < 3 ; j++) {
				int totalCost = 0;				
				if(j == i) {
					continue;
				}
				
				for(int z = 0; z < 3 ; z++) {
					if(z != i && z != j) {
						totalCost += Math.abs(array[j] - array[i]) + Math.abs(array[z] - array[j]);
					}
				}
				if(totalCost < minCost) {
					minCost = totalCost;
				}
			}	

		}
	
		// 出力
		System.out.println(minCost);
	}



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

import java.util.Scanner;
public class atcoder103_1 {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc =new Scanner(System.in);
		int n[]=new int[3];
		int t=0;
		int ans=0;
		for(int i=0;i<3;i++){
			n[i]=sc.nextInt();
		}
		for(int i=0;i<2;i++){
			if(n[i+1]-n[i]<0){
				t=n[i];
				n[i]=n[i+1];
				n[i+1]=t;
			}
		}
		for(int i=0;i<2;i++){
			ans+=n[i+1]-n[i];
		}
		System.out.println(ans);
	}

}



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

//:)
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <queue>
#include <sstream>
#include <stack>
#include <time.h>
#include <vector>
#include <complex>
#include <map>
#include <set>
#include <iomanip>
#include <math.h>
#include <stdlib.h>
#include <list>
#include <utility>
#include <memory>
#include <cstring>
#include <fstream>
#include <numeric>
#include <assert.h>
#include <bits/stdc++.h>
using namespace std;

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

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

int main(void){
	
	int A, B, C;
	int D;
	scanf("%d %d %d", A &B &C);
	int D = abs(A - B);
	if (D > abs(B - A))
		D = abs(B - A);
	if (D > abs(A - C))
		D = abs(A - C);
	if (D > abs(B - C))
		D = abs(B - C);
	if (D > abs(C - A))
		D = abs(C - A);
	if (D > abs(C - B))
		D = abs(C - B);
	if (D > abs(A - B))
		D = abs(A - B);
	printf("%d", D);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:13: error: redeclaration of 'D' with no linkage
    9 |         int D = abs(A - B);
      |             ^
main.c:7:13: note: previous declaration of 'D' with type 'int'
    7 |         int D;
      |             ^
Language: C

#include <stdio.h>

int main(void)
{
  int a[3]={};
  int min=999;
  int cost=0;
  int point=0;
  int i,j,k;
  scanf("%d %d %d",&a[0],&a[1],&a[2]); 
  for(i=0; i<2; i++)
  {
    point=a[i];
    for(j=0; j<2; j++)
    {
       if( i==j ) continue;
       cost += ((point - a[j]) > 0)(point - a[j])?(a[j] - point);
       point = a[j];
       for(k=0;k<2;k++)
       {
       if( i==k ) continue;
       if( j==k ) continue;
       cost += ((point - a[k]) > 0)(point - a[k])?(a[k] - point);
       if ( cost < min ) min = cost;
        }
     }
  }
  printf( "%d", cost);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:32: error: called object is not a function or function pointer
   17 |        cost += ((point - a[j]) > 0)(point - a[j])?(a[j] - point);
      |                ~~~~~~~~~~~~~~~~^~~~
main.c:17:65: error: expected ':' before ';' token
   17 |        cost += ((point - a[j]) > 0)(point - a[j])?(a[j] - point);
      |                                                                 ^
      |                                                                 :
main.c:23:32: error: called object is not a function or function pointer
   23 |        cost += ((point - a[k]) > 0)(point - a[k])?(a[k] - point);
      |                ~~~~~~~~~~~~~~~~^~~~
main.c:23:65: error: expected ':' before ';' token
   23 |        cost += ((point - a[k]) > 0)(point - a[k])?(a[k] - point);
      |                                                                 ^
      |                                                                 :
Language: C++

#include<stdio.h>
int main()
{
	int a,b,c,t;
	scanf("%d %d %d",&a,&b,&c);
	if(a>b){t=a;a=b;b=t;}
	if(b>c){t=b;b=c;c=t;}
	if(a>b){t=a;a=b;b=t;}
	if(b>c){t=b;b=c;c=t;}
	sum=b-a+c-b;
	printf("%d",sum);
	
	
	return 0;
	
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'sum' was not declared in this scope
   10 |         sum=b-a+c-b;
      |         ^~~
Language: C

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

int main(void){
	
	int A, B, C, D;
	scanf("%d %d %d", %A %B %C);
	int D = abs(A - B);
	if (D > abs(B - A))
		D = abs(B - A);
	if (D > abs(A - C))
		D = abs(A - C);
	if (D > abs(B - C))
		D = abs(B - C);
	if (D > abs(C - A))
		D = abs(C - A);
	if (D > abs(C - B))
		D = abs(C - B);
	if (D > abs(A - B))
		D = abs(A - B);
	printf("%d", D);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:27: error: expected expression before '%' token
    7 |         scanf("%d %d %d", %A %B %C);
      |                           ^
main.c:8:13: error: redeclaration of 'D' with no linkage
    8 |         int D = abs(A - B);
      |             ^
main.c:6:22: note: previous declaration of 'D' with type 'int'
    6 |         int A, B, C, D;
      |                      ^
Language: C

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

int main(void){
	
	int A, B, C, D;
	scanf("%d %d %d", %A %B %C);
	int D = abs(A - B);
	if (D > abs(B - A))
		int D = abs(B - A);
	if (D > abs(A - C))
		int D = abs(A - C);
	if (D > abs(B - C))
		int D = abs(B - C);
	if (D > abs(C - A))
		int D = abs(C - A);
	if (D > abs(C - B))
		int D = abs(C - B);
	if (D > abs(A - B))
		int D = abs(A - B);
	printf("%d", D);


}

Compiler output:
main.c: In function 'main':
main.c:7:27: error: expected expression before '%' token
    7 |         scanf("%d %d %d", %A %B %C);
      |                           ^
main.c:8:13: error: redeclaration of 'D' with no linkage
    8 |         int D = abs(A - B);
      |             ^
main.c:6:22: note: previous declaration of 'D' with type 'int'
    6 |         int A, B, C, D;
      |                      ^
main.c:10:17: error: expected expression before 'int'
   10 |                 int D = abs(B - A);
      |                 ^~~
main.c:12:17: error: expected expression before 'int'
   12 |                 int D = abs(A - C);
      |                 ^~~
main.c:14:17: error: expected expression before 'int'
   14 |                 int D = abs(B - C);
      |                 ^~~
main.c:16:17: error: expected expression before 'int'
   16 |                 int D = abs(C - A);
      |                 ^~~
main.c:18:17: error: expected expression before 'int'
   18 |                 int D = abs(C - B);
      |                 ^~~
main.c:20:17: error: expected expression before 'int'
   20 |                 int D = abs(A - B);
      |                 ^~~
Language: C++

#include "stdafx.h"
#include <iostream>
#include <algorithm>
#include <cmath>
#include <map>
#include <vector>
#include <queue>
#include <functional>
#include <string>
#include <stack>
#include <set>
#include <sstream>
#include <iomanip>
#include <limits>
#include <cstring>

using namespace std;

int main() {
	int i, A[3], x[3], max,sum, tmp;
	cin >> A[0] >> A[1] >> A[2];
	x[0] = abs( A[2] - A[0]);
	x[1] = abs(A[0] - A[1]);
	x[2] = abs(A[1] - A[2]);
	max = x[2];
	sum = x[2];
	for (i = 0; i < 2; i++) {
		if (max < x[i]) {
			max = x[i];
		}
		sum += x[i];
	}
	cout << sum-max << endl;
}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <vector>
using namespace std;
#define FOR(i,a,b) for (size_t i = a; i < b; i++)
#define REP(i,b) FOR(i,0,b)
#define RFOR(i,a,b) for (size_t i = a-1; i >= b; i--)
#define RREP(i,a) RFOR(i,a,0)
#define INF 1e7

int a[3];

int main()
{
  cin>>a[0]>>a[1]>>a[2];
  sort(a, a+3);
  cout<<a[2]-a[0]<<endl;

  return 0;
}


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

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

int main() {
  int a,b,c;
  cin>>a>>b>>c;
  if(a==b)cout<<|c-b|<<endl;
  else if(b==c)cout<<|a-b|<<endl;
  else if(a<b,b<c||c<b,b<a)cout<<|c-a|<<endl;
  else if(a<c,c<b||b<c,c<a)cout<<|b-a|<<endl;
  else if(b<a,a<c||c<a,a<b)cout<<|c-b|<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected primary-expression before '|' token
    7 |   if(a==b)cout<<|c-b|<<endl;
      |                 ^
a.cc:7:22: error: expected primary-expression before '<<' token
    7 |   if(a==b)cout<<|c-b|<<endl;
      |                      ^~
a.cc:8:22: error: expected primary-expression before '|' token
    8 |   else if(b==c)cout<<|a-b|<<endl;
      |                      ^
a.cc:8:27: error: expected primary-expression before '<<' token
    8 |   else if(b==c)cout<<|a-b|<<endl;
      |                           ^~
a.cc:9:34: error: expected primary-expression before '|' token
    9 |   else if(a<b,b<c||c<b,b<a)cout<<|c-a|<<endl;
      |                                  ^
a.cc:9:39: error: expected primary-expression before '<<' token
    9 |   else if(a<b,b<c||c<b,b<a)cout<<|c-a|<<endl;
      |                                       ^~
a.cc:10:34: error: expected primary-expression before '|' token
   10 |   else if(a<c,c<b||b<c,c<a)cout<<|b-a|<<endl;
      |                                  ^
a.cc:10:39: error: expected primary-expression before '<<' token
   10 |   else if(a<c,c<b||b<c,c<a)cout<<|b-a|<<endl;
      |                                       ^~
a.cc:11:34: error: expected primary-expression before '|' token
   11 |   else if(b<a,a<c||c<a,a<b)cout<<|c-b|<<endl;
      |                                  ^
a.cc:11:39: error: expected primary-expression before '<<' token
   11 |   else if(b<a,a<c||c<a,a<b)cout<<|c-b|<<endl;
      |                                       ^~
Language: C++

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time    : 2018/7/21 20:19
# @Version : 1.1
# @Author  : Jade
# @File    : acm.py
# @Software: PyCharm
#
a,b,c = map(int,input().split(' '))
print(max(a,b,c) - min(a,b,c))

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env python3
      |  ^
a.cc:2:3: error: invalid preprocessing directive #-
    2 | # -*- coding: utf-8 -*-
      |   ^
a.cc:3:3: error: invalid preprocessing directive #@
    3 | # @Time    : 2018/7/21 20:19
      |   ^
a.cc:4:3: error: invalid preprocessing directive #@
    4 | # @Version : 1.1
      |   ^
a.cc:5:3: error: invalid preprocessing directive #@
    5 | # @Author  : Jade
      |   ^
a.cc:6:3: error: invalid preprocessing directive #@
    6 | # @File    : acm.py
      |   ^
a.cc:7:3: error: invalid preprocessing directive #@
    7 | # @Software: PyCharm
      |   ^
a.cc:9:1: error: 'a' does not name a type
    9 | a,b,c = map(int,input().split(' '))
      | ^
Language: C++

#include(bits/stdctt.h)
using namespace std;
int main(){
    int a,b,c;
    cin>>a>>b>>c;
    cout<<"a+b+c-3"<<endl;
    return 0;
}


Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include(bits/stdctt.h)
      |         ^
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin>>a>>b>>c;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include(bits/stdctt.h)
a.cc:6:5: error: 'cout' was not declared in this scope
    6 |     cout<<"a+b+c-3"<<endl;
      |     ^~~~
a.cc:6:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:22: error: 'endl' was not declared in this scope
    6 |     cout<<"a+b+c-3"<<endl;
      |                      ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include(bits/stdctt.h)
Language: C++

#include <iostream>
using namespace std;
int main(void)
{
    int cost1,cost2,cost3,zettai1,zettai2;
    int sum,sum2,high,low;
    cin >> cost1 >> cost2 >> cost3;
    
    high = max({cost1,cost2,cost3});
    low = min({cost1,cost2,cost3});
    sum = cost1 + cost2 + cost3 - high - low;
    zettai1 = pow(pow(sum - low,2),0.5);
    zettai2 = pow(pow(sum - high,2),0.5);
    
    sum2 = zettai1 + zettai2;
    
    cout << sum2 << endl;
    //まずは順番通りに
    /*
    zettai1 = pow(pow(cost2 - cost1,2),0.5);
    zettai2 = pow(pow(cost3 - cost2,2),0.5);
    
    sum1 = zettai1 + zettai2;
    */
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    9 |     high = max({cost1,cost2,cost3});
      |            ~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 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/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
a.cc:10:14: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
   10 |     low = min({cost1,cost2,cost3});
      |           ~~~^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
a.cc:12:19: error: 'pow' was not declared in this scope; did you mean 'low'?
   12 |     zettai1 = pow(pow(sum - low,2),0.5);
      |                   ^~~
      |                   low
a.cc:12:15: error: 'pow' was not declared in this scope; did you mean 'low'?
   12 |     zettai1 = pow(pow(sum - low,2),0.5);
      |               ^~~
      |               low
Language: C++

package test;

import java.util.Arrays;

public class Main {

	public static void main(String[] args) {
		Arrays.sort(args);
		System.out.println(Math.abs(minus(args[1], args[0]) + minus(args[2], args[1])));
	}

	private static int minus(String a, String b) {
		return Integer.parseInt(a) -  Integer.parseInt(b);
	}

}


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

#include(iostream)
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
cout<<"a+b+c-3"<<endl;
return 0;
}


Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include(iostream)
      |         ^
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope
    5 | cin>>a>>b>>c;
      | ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include(iostream)
a.cc:6:1: error: 'cout' was not declared in this scope
    6 | cout<<"a+b+c-3"<<endl;
      | ^~~~
a.cc:6:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:18: error: 'endl' was not declared in this scope
    6 | cout<<"a+b+c-3"<<endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include(iostream)
Language: C++

#include<iostream>
using namespace std;
int main (void){
  int a,b,c,avg,ans;
  cin>>a>>b>>c;
  avg=a+b+c;
  ans=abs(a-avg)+abs(b-ang)+abs(c-avg);
  cout<<ans<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: 'ang' was not declared in this scope; did you mean 'ans'?
    7 |   ans=abs(a-avg)+abs(b-ang)+abs(c-avg);
      |                        ^~~
      |                        ans
Language: C

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

int main(void)
{
	int a1, a2, a3, min, a[6], i;

	scanf("%d %d %d", &a1, &a2, &a3);

	a[0] = fabs(a2-a1) + fabs(a3 - a2);
	a[1] = fabs(a3-a1) + fabs(a2 - a3);
	a[2] = fabs(a1-a2) + fabs(a3 - a1);
	a[3] = fabs(a3-a2) + fabs(a1 - a3);
	a[4] = fabs(a2-a3) + fabs(a1 - a2);
	a[5] = fabs(a1-a3) + fabs(a2 - a1);

	min = a[0];

	for(i=1; i<6; i++){
		if(min > a[i]){
			min = a[i];
		}
	}

	printf("%d", min);

	return 0;

}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 |         scanf("%d %d %d", &a1, &a2, &a3);
      |         ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    2 | #include<math.h>
  +++ |+#include <stdio.h>
    3 | 
main.c:8:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 |         scanf("%d %d %d", &a1, &a2, &a3);
      |         ^~~~~
main.c:8:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:25:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   25 |         printf("%d", min);
      |         ^~~~~~
main.c:25:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:25:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:25:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: Java

import java.lang.*;

public class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int[] a = new int[3];
        for(int i=0; i<3; i++){
            a[i] = sc.nextInt();
        }
        int cost = 0;
        int pcost = 0;
        
        for(int i=0; i<3; i++){
            for(int j=0; j<3; j++){
                if(i != j){
                    for(int k=0; k<3; k++){
                        if(k != i && k != j){
                            pcost = Math.abs(a[j]-a[i]) + Math.abs(a[k]-a[j]);
                            if(pcost < cost){
                                cost = pcost;
                            }
                        }
                    }
                }
            }
        }
        System.out.println(cost);
    }
}

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

#include(iostream)
using namespace std;
int main(){
int a,b,c
cin>>a>>b>>c;
cout<<"a+b+c-3"<<endl;
return 0;
}


Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include(iostream)
      |         ^
a.cc: In function 'int main()':
a.cc:5:1: error: expected initializer before 'cin'
    5 | cin>>a>>b>>c;
      | ^~~
a.cc:6:1: error: 'cout' was not declared in this scope
    6 | cout<<"a+b+c-3"<<endl;
      | ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include(iostream)
a.cc:6:18: error: 'endl' was not declared in this scope
    6 | cout<<"a+b+c-3"<<endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include(iostream)
Language: C++

include<iostream>
using namespace std;
int main (void){
  int a,b,c,avg,ans;
  cin>>a>>b>>c;
  avg=a+b+c;
  ans=abs(a-avg)+abs(b-ang)+abs(c-avg);
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>a>>b>>c;
      |   ^~~
a.cc:7:7: error: 'abs' was not declared in this scope; did you mean 'ans'?
    7 |   ans=abs(a-avg)+abs(b-ang)+abs(c-avg);
      |       ^~~
      |       ans
a.cc:7:24: error: 'ang' was not declared in this scope; did you mean 'ans'?
    7 |   ans=abs(a-avg)+abs(b-ang)+abs(c-avg);
      |                        ^~~
      |                        ans
a.cc:8:3: error: 'cout' was not declared in this scope
    8 |   cout<<ans<<endl;
      |   ^~~~
a.cc:8:14: error: 'endl' was not declared in this scope
    8 |   cout<<ans<<endl;
      |              ^~~~
Language: Java

public class Main {

    public static void main(String[] args) {
//
//        int a = 11;
//        int b = 5;
//        int c = 5;
        Scanner cin = new Scanner(System.in);
        int a = cin.nextInt();
        int b = cin.nextInt();
        int c = cin.nextInt();

        int res = 0;
        int cost1 = Math.abs(b-a)+Math.abs(c-b);
        res = cost1;
        int cost2 = Math.abs(c-a)+Math.abs(b-c);
        if (cost2<res) res =cost2;
        int cost3 = Math.abs(c-b)+Math.abs(a-c);
        if (cost3<res) res = cost3;
        int cost4 = Math.abs(a-b)+Math.abs(c-a);
        if (cost4<res) res = cost4;
        int cost5 = Math.abs(a-c)+Math.abs(b-a);
        if (cost5<res) res = cost5;
        int cost6 = Math.abs(b-c)+Math.abs(a-b);
        if (cost6<res) res = cost6;

        System.out.println(res);

    }

}

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

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int a , b , c ;
    cin>>a>>b>>c ;
    ans = abs(b - a) + abs(c - b) ;
    ans = min(ans , abs(c - a) + abs(c-b));
    cout<<ans<<"\n";
    return 0 ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |     ans = abs(b - a) + abs(c - b) ;
      |     ^~~
      |     abs
Language: C++

#include<stdio.h>
int main()
{int a[3],t,i,j,sum=0;
scanf("%d %d %d",&a[0],&a[1],&a[2];

for(i=0;i<3;i++)
for(j=0;j<2-i;j++)
if(a[i+1]<a[i]){ t=a[i];a[i]=a[i+1];a[i+1]=t;}








sum=a[1]-a[0]+a[2]-a[1];

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


return 0;




}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:35: error: expected ')' before ';' token
    4 | scanf("%d %d %d",&a[0],&a[1],&a[2];
      |      ~                            ^
      |                                   )
Language: C

#include <bits/stdc++.h>

#define sz(s) (ll)(s.size())
#define all(x) (x.begin(), x.end())

#define pb push_back
#define pf push_front
#define F first
#define S second
#define ort1 exit(0);
#define nl endl
#define db double

#define TL clock() / (double)CLOCKS_PER_SEC
#define NFS ios_base :: sync_with_stdio(0), cin.tie(0), cout.tie(0);

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;


const double pi = acos(-1.0);
const double eps = 1e-9;
const int mod = 1e9 + 7;
const ll INF = 1e12 + 1;
const int N = 1e2 + 9;

int ans;
int a, b, c;
vector<int> v;

int main()
{
    cin >> a >> b >> c;
    v.pb(a);
    v.pb(b);
    v.pb(c);
    sort(v.begin(), v.end());
    ans += abs(v[1] - v[0]) + abs(v[2] - v[1]);

    cout << ans;

    return 0;
}


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

#include <stdio.h>
#include <math.h>
int main(int argc, char *argv[])
{
	int n,k,m,a[3],i,j,s;
	scanf("%d %d %d",&m,&n,&k)
		
		a[0]=fabs(m-n);
		a[1]=fabs(m-k);
		a[2]=fabs(n-k);
		for(i=0;i<3;i++){
			for(j=i+1;j<3;j++){
				if(a[i]<a[j]){
					int t=a[i];
						a[j]=a[i];
						a[i]=t;
				}
			}
		}
		printf("%d\n",a[1]+a[2]);	
	
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:6:35: error: expected ';' before 'a'
    6 |         scanf("%d %d %d",&m,&n,&k)
      |                                   ^
      |                                   ;
    7 | 
    8 |                 a[0]=fabs(m-n);
      |                 ~
Language: C++

    #include <bits/stdc++.h>
    using namespace std;
     
    int a,b,c,d[3];
     
    int main(){
      cin>>a>>b>>c
      d[0]=abs(b-a);
      d[1]=abs(c-b);
      d[2]=abs(c-a);
      sort(d,d+3);
      cout<<d[1]+d[2];
      return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected ';' before 'd'
    7 |       cin>>a>>b>>c
      |                   ^
      |                   ;
    8 |       d[0]=abs(b-a);
      |       ~
Language: C++

#include<bits/stdc++.h
using namespace std;
int main()
{
	int a,b,c,p,q,x,y,z;
	cin>>a>>b>>c;
	x=abs(a-b)+abs(a-c);
	y=abs(b-c)+abs(b-a);
	z=abs(c-a)+abs(c-b);
	p=min(y,z);
	q=min(p,x);
	cout<<q<<endl;
}

Compiler output:
a.cc:1:23: error: missing terminating > character
    1 | #include<bits/stdc++.h
      |                       ^
Language: C++

#include <iostream>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <ctime>
using namespace std;
typedef long long ll;
const int N = 262200;
const ll INF = 1e18;

int mian() {
	int a[3];
	while(~scanf("%d %d %d", &a[0], &a[1], &a[2])) {
		printf("%d\n", a[2] - a[0]);
	}
	return 0;
}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: Java

import java.util.Arrays;
import java.util.Scanner;

public class TaskSchedulingProblem {

	public static void main(String[] args) 
	{
		Scanner s = new Scanner(System.in);		
		int taskCost[] = new int[3];
		for(int i = 0; i< 3 ; i++)
		{
			taskCost[i] = s.nextInt();
		}
		int minCost = 0;
		Arrays.sort(taskCost);
		for(int i = 1; i>= 0; i--)
		{
			minCost = minCost + Math.abs(taskCost[i+1]-taskCost[i]);
		}
		System.out.println(minCost);

	}

}


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

import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class questionA {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		ArrayList<Integer> list = new ArrayList<Integer>();
		int a[] = new int[3];
		for(int i = 0; i < 3 ; i++) {
			list.add(scanner.nextInt());
		}

		Collections.sort(list, Collections.reverseOrder());

		int sum = 0;
		int buf = 0;
		int count = 0;
		for(int i : list) {
			if(count != 0) {
				sum += (buf - i);
			}
			count++;
			buf = i;
		}
		System.out.println(sum);

	}

}

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

a1,a2,a3 = map(int, input().split())
a = [a1,a2,a3]

b = [0,0,0,0,0,0]
b[0] = abs(a[1]-a[0]) + abs(a[2]-a[1])
b[1] = abs(a[2]-a[0]) + abs(a[1]-a[2])
b[2] = abs(a[0]-a[1]) + abs(a[2]-a[0])
b[3] = abs(a[2]-a[1]) + abs(a[0]-a[2])
b[4] = abs(a[0]-a[2]) + abs(a[1]-a[0])
b[5] = abs(a[1]-a[2]) + abs(a[0]-a[1])


print(int(min(b)))

Compiler output:
a.cc:1:1: error: 'a1' does not name a type
    1 | a1,a2,a3 = map(int, input().split())
      | ^~
Language: C

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


int max(int a, int b){
    if(a > b){
        return a;
    }else{
        return b;
    }
}

int min(int a, int b){
    if(a < b){
        return a;
    }else{
        return b;
    }
}


int main(){

    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);

    printf("%d", max(max(a,b),c) - min(min(a,b),c));

    return 0;
}

int max(int a, int b){
    if(a > b){
        return a;
    }else{
        return b;
    }
}

int min(int a, int b){
    if(a < b){
        return a;
    }else{
        return b;
    }
}

Compiler output:
main.c:34:5: error: redefinition of 'max'
   34 | int max(int a, int b){
      |     ^~~
main.c:7:5: note: previous definition of 'max' with type 'int(int,  int)'
    7 | int max(int a, int b){
      |     ^~~
main.c:42:5: error: redefinition of 'min'
   42 | int min(int a, int b){
      |     ^~~
main.c:15:5: note: previous definition of 'min' with type 'int(int,  int)'
   15 | int min(int a, int b){
      |     ^~~
Language: C++

#include <cstdio>
using namespace std;
int main() {
    int a, b, c;
    cin >> a >> b >> c;
    cout << max({a, b, c}) - min({a, b, c}) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> a >> b >> c;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <cstdio>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:6:5: error: 'cout' was not declared in this scope
    6 |     cout << max({a, b, c}) - min({a, b, c}) << endl;
      |     ^~~~
a.cc:6:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:13: error: 'max' was not declared in this scope
    6 |     cout << max({a, b, c}) - min({a, b, c}) << endl;
      |             ^~~
a.cc:6:30: error: 'min' was not declared in this scope; did you mean 'main'?
    6 |     cout << max({a, b, c}) - min({a, b, c}) << endl;
      |                              ^~~
      |                              main
a.cc:6:48: error: 'endl' was not declared in this scope
    6 |     cout << max({a, b, c}) - min({a, b, c}) << endl;
      |                                                ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <cstdio>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C

#include<stdio.h>
int main()
{
	int a, b, c, ans;
	scanf("%d%d%d", &a, &b, &c);
	ans = abs(a - b) + abs(b - c) + abs(c - a);
	ans -= min(abs(a - b), min(abs(b - c), abs(c - a)));
	printf("%d", ans);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:15: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
    6 |         ans = abs(a - b) + abs(b - c) + abs(c - a);
      |               ^~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
    1 | #include<stdio.h>
  +++ |+#include <stdlib.h>
    2 | int main()
main.c:7:16: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
    7 |         ans -= min(abs(a - b), min(abs(b - c), abs(c - a)));
      |                ^~~
      |                main
Language: Java

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

Compiler output:
Main.java:2: error: <identifier> expected
import.java.util.Arrays;
      ^
1 error
Language: C++

#include(iostream)
using namespace std;
int main () {
     int a,b,c;
     cin>>a>>b>>c;
     if(a>c){
     cout<<"a-c"<<endl;
}
     if(a<c){
     cout<<"c-a"<<endl;
}
     return 0;
}

Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include(iostream)
      |         ^
a.cc: In function 'int main()':
a.cc:5:6: error: 'cin' was not declared in this scope
    5 |      cin>>a>>b>>c;
      |      ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include(iostream)
a.cc:7:6: error: 'cout' was not declared in this scope
    7 |      cout<<"a-c"<<endl;
      |      ^~~~
a.cc:7:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:19: error: 'endl' was not declared in this scope
    7 |      cout<<"a-c"<<endl;
      |                   ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include(iostream)
a.cc:10:6: error: 'cout' was not declared in this scope
   10 |      cout<<"c-a"<<endl;
      |      ^~~~
a.cc:10:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:19: error: 'endl' was not declared in this scope
   10 |      cout<<"c-a"<<endl;
      |                   ^~~~
a.cc:10:19: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

int main()
{
  int A[3];
  cin >> A[0] >> A[1] >> A[2];

  vector<int> c;
  c.emplace_back(abs(A[0]-A[1]));
  c.emplace_back(abs(A[1]-A[2]));
  c.emplace_back(abs(A[2]-A[0]));
  sort(begin(c),end(c));
  cout << c[0]+c[1] << endl;
}


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

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

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

#include<stdio.h>

int main()
{
	int a, b, c, mem;
  	scanf(" %d %d %d", &a, &b, &c);
  	
  	if(a > c)
    {
      mem = a;
      a = c;
      c = mem;
    }
    if(a > b)
    {
      mem = a;
      a = b;
      b = mem;
    }
	if(b > c)
    {
      mem = b;
      b = c;
      c = mem;
    }

  	printf("%d\n", (b-a)+(c-b));
  
  	return 0:
  
}

Compiler output:
main.c: In function 'main':
main.c:29:17: error: expected ';' before ':' token
   29 |         return 0:
      |                 ^
      |                 ;
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 入力
		int a1 = sc.nextInt();
		int a2 = sc.nextInt();
		int a3 = sc.nextInt();

		int wk;
		if (a2 > a3) {
			wk = a2;
			a2 = a3;
			a3 = wk;
		}

		int cost = Math.abs(a2 -a1) + Math.abs(a3 - a2);
		// 出力
		System.out.println(cost);
	}

Compiler output:
Main.java:21: error: reached end of file while parsing
	}
	 ^
1 error
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
using namespace std;
typedef long long unsigned int ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
int main(){
  int a1;
  int a2;
  int a3;
  cin >> a1 >> a2 >> a3;
  vector<int> vec;
  vec.push_back(a1);
  vec.push_back(a2);
  vec.push_back(a3);
  sort(vec.begin(), vec.end(), greater<int>());
  int i;
  int sum  = 0;
  for(i = 1; i < vec.size(); i++){
    sum += vec[i] - vec[i - 1]
  }
  cout << sum << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:31: error: expected ';' before '}' token
   35 |     sum += vec[i] - vec[i - 1]
      |                               ^
      |                               ;
   36 |   }
      |   ~
Language: C++

#include<cstdio>
#include<iostream>
using namespace std;
long long a,b,c,d,e;
int main(){
  cin>>a>>b>>c
  d=max(max(a,b),c);
  e=min(min(a,b),c);
  cout<<d-e;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: expected ';' before 'd'
    6 |   cin>>a>>b>>c
      |               ^
      |               ;
    7 |   d=max(max(a,b),c);
      |   ~
Language: C++

import numpy as np
a1,a2,a3 = map(int, input().split())
a = np.array([a1,a2,a3])

b = np.zeros((2,3))
b[0,0] = np.abs(a[1]-a[0]) + np.abs(a[2]-a[1])
b[1,0] = np.abs(a[2]-a[0]) + np.abs(a[1]-a[2])
b[0,1] = np.abs(a[0]-a[1]) + np.abs(a[2]-a[0])
b[1,1] = np.abs(a[2]-a[1]) + np.abs(a[0]-a[2])
b[0,2] = np.abs(a[0]-a[2]) + np.abs(a[1]-a[0])
b[1,2] = np.abs(a[1]-a[2]) + np.abs(a[0]-a[1])

print(int(np.min(b)))

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import numpy as np
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;

int main(void){

  vector<int>v(3);
  for(int i=0;i<3;i++)
    cin >> b[i];

  sort(v.begin(), v.end());

  int ans=0;
  for(int i=1;i<3;i++)
    ans += v[i] - v[i-1];

  cout << ans << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: 'b' was not declared in this scope
   11 |     cin >> b[i];
      |            ^
Language: C++

#include<cstdio>
#include<iostream>
using namespace std;
int a[3];
int main()
{
	cin>>a[1]>>a[2]>>a[3];
	sort(a+1,a+3);
	cout<<a[3]-a[1]<<endl;
	return 0;
}

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

using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;

namespace Problem
{
    class Solver{
        public void Solve(){
            int [] a = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            Array.Sort(a);
            Console.WriteLine(a[2]-a[0]);
        }

    }

    class M{
        public static void Main(string[] args)
        {
            new Solver().Solve();
        }
    }
    
};


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Text;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Linq;
      |       ^~~~~~
a.cc:9:15: error: expected ':' before 'void'
    9 |         public void Solve(){
      |               ^~~~~
      |               :
a.cc:15:6: error: expected ';' after class definition
   15 |     }
      |      ^
      |      ;
a.cc: In member function 'void Problem::Solver::Solve()':
a.cc:10:17: error: structured binding declaration cannot have type 'int'
   10 |             int [] a = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
      |                 ^~
a.cc:10:17: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:10:17: error: empty structured binding declaration
a.cc:10:20: error: expected initializer before 'a'
   10 |             int [] a = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
      |                    ^
a.cc:11:13: error: 'Array' was not declared in this scope
   11 |             Array.Sort(a);
      |             ^~~~~
a.cc:11:24: error: 'a' was not declared in this scope
   11 |             Array.Sort(a);
      |                        ^
a.cc:12:13: error: 'Console' was not declared in this scope
   12 |             Console.WriteLine(a[2]-a[0]);
      |             ^~~~~~~
a.cc: At global scope:
a.cc:18:15: error: expected ':' before 'static'
   18 |         public static void Main(string[] args)
      |               ^~~~~~~
      |               :
a.cc:18:33: error: 'string' has not been declared
   18 |         public static void Main(string[] args)
      |                                 ^~~~~~
a.cc:18:42: error: expected ',' or '...' before 'args'
   18 |         public static void Main(string[] args)
      |                                          ^~~~
a.cc:22:6: error: expected ';' after class definition
   22 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void Problem::M::Main(int*)':
a.cc:20:25: error: expected ';' before '.' token
   20 |             new Solver().Solve();
      |                         ^