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

#include <bits/stdc++.h>
using namespace std;
#define REP(i,N) for(i=0;i<N;i++)
#define INF 1e9
typedef long long ll;

int main(void){
  int A,B,C;cin >> A >> B >> C;
  int ans = min(INF,abs(A-B));
  ans = min(ans,abs(B-C));
  ans = min(ans,abs(C-A));
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: no matching function for call to 'min(double, int)'
    9 |   int ans = min(INF,abs(A-B));
      |             ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/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:   template argument deduction/substitution failed:
a.cc:9:16: note:   deduced conflicting types for parameter 'const _Tp' ('double' and 'int')
    9 |   int ans = min(INF,abs(A-B));
      |             ~~~^~~~~~~~~~~~~~
/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, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:9:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'double'
    9 |   int ans = min(INF,abs(A-B));
      |             ~~~^~~~~~~~~~~~~~
Language: C++

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<int> a(3);
      |   ^~~~~~
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 | using namespace std;
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   vector<int> a(3);
      |          ^~~
a.cc:7:27: error: 'a' was not declared in this scope
    7 | for(int i=0;i<3;++i) cin>>a[i];
      |                           ^
a.cc:8:8: error: 'a' was not declared in this scope
    8 |   sort(a.begin(), a.end());
      |        ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: expected ',' or ';' before 'cout'
    7 |     cout << ans << endl;
      |     ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: expected ',' or ';' before 'cout'
    7 |     cout << ans << endl;
      |     ^~~~
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: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:6:16:   required from here
    6 |   int ans = max(a,b,c) - min(a,b,c)
      |             ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:6:29:   required from here
    6 |   int ans = max(a,b,c) - min(a,b,c)
      |                          ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <iostream>
#include <cstdlib>
using namespace std;
int main(){
  int a, b, c;
  cin >> a >> b >> c;
  if(abs(a - b) >= abs(a - c) && abs(a - b) >= abs(b - c)){
    cout << abs(a - c) + abs (b - c) << endl;
  }else if(abs(a - c) >= abs(a - b) && abs(a - c) >= abs(b - c){
    cout << abs(a - b) + abs(b - c) << endl;
  }else{
    cout << abs(a - b) + abs(a - c) << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:64: error: expected ')' before '{' token
    9 |   }else if(abs(a - c) >= abs(a - b) && abs(a - c) >= abs(b - c){
      |           ~                                                    ^
      |                                                                )
a.cc:14:1: error: expected primary-expression before '}' token
   14 | }
      | ^
Language: C++

#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main() {
    vector<int> A(3);
    for(int i=0; i < 3; i++) {
        cin >> A[i];
    }
    sort(A.begin(), A.end());

    int ans = 0;
    for(int i=0; i < 2; i++) {
        ans += abs(A[i] - A[i+1]);
    }

    cout << ans << endl;
}


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

#include<iostream>
#include<cmath>

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:9:12: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    9 |   cout<<max({a,b,c})-min({a,b,c})<<endl;
      |         ~~~^~~~~~~~~
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:9:25: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
    9 |   cout<<max({a,b,c})-min({a,b,c})<<endl;
      |                      ~~~^~~~~~~~~
/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
Language: C++

#include <cstdio>  
#include <algorithm>
using namespace std;  
int main() { 	
	int a,b,c;
	int d;
	scanf("%d %d %d", &a, &b, &c);
	if(a>=b && a>=c){
		if(b>=c){
		printf("%d", a-b + b-c);
				}
		else{
			pritnf("%d", a-c + c-b);
		}
	}
	else if(b>=a && b>=c){
		if(a>=c){
			printf("%d", b-a + a-c);
		}
		else{
			printf("%d", b-c + c-a);
		}
		
	}
	else if(c>=a && c>=b){
		 if(a>=b){
		printf("%d", c-a + a-b);
	}	
		else{
			printf("%d", c-b + c-a);
		}
}
	
	
}






Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: 'pritnf' was not declared in this scope; did you mean 'printf'?
   13 |                         pritnf("%d", a-c + c-b);
      |                         ^~~~~~
      |                         printf
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(void){
  int a, b, c;
  cin >> a >> b>>c;
  int d=abs(a-b); int e=abs(a-c); int f=abs(c-b);
  int g=min(d+e, e+f)
  cout<<min(g, d+f)<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'cout'
    9 |   cout<<min(g, d+f)<<endl;
      |   ^~~~
Language: C++

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

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

 #include "bits/stdc++.h"

using namespace std;

#define sp(x) cout<<setprecision(x);
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define all(a) (a).begin(), (a).end()
#define inf 10000000
#define linf INT64_MAX*0.99
#define print(s) cout<<(s)<<endl
#define lint long long
#define yes "Yes"
#define no "No"

typedef pair<int, int> P;
 
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    vector<int> a(3);
    cin>>a[0]>>a[1]>>a[2];
    sort(all(a);
    print(a[2]-a[0]);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:16: error: expected ')' before ';' token
   23 |     sort(all(a);
      |         ~      ^
Language: C++

#include<iostream>
#include<string>

using namespace std;

int cost(int x, int y, int z) {
    return abs(x - y) + abs(y - z);
}



int main() {
    int x, y, z;
    cin >> x;
    cin >> y;
    cin >> z;
    
    cout << min({cost(x, y, z), cost(x, z, y), cost(y, x, z), cost(y, z, x), cost(z, x, y), cost(z, y, x)}) << endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
   18 |     cout << min({cost(x, y, z), cost(x, z, y), cost(y, x, z), cost(y, z, x), cost(z, x, y), cost(z, y, x)}) << endl;
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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: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
Language: C

#include<stdio.h>
#define len(array) (sizeof(array) / sizeof(int))

void sort(int *array, int len) {
	int i, j, temp;
	for (i = 0; i < len; i++) {
		for (j = 0; j < len - 1 - i; j++) {
			if (array[j] > array[j + 1]) {
				temp = array[j];
				array[j] = array[j + 1];
				array[j + 1] = temp;
			}
		}
	}
}

int main(void) {
	int array[3];
	int* pt = array;
	scanf("%d", pt);
	scanf("%d", pt + 1);
	scanf("%d", pt + 2);
	sort(array);
	printf("%d", array[2] - array[0]);
}

Compiler output:
main.c: In function 'main':
main.c:23:9: error: too few arguments to function 'sort'
   23 |         sort(array);
      |         ^~~~
main.c:4:6: note: declared here
    4 | void sort(int *array, int len) {
      |      ^~~~
Language: C++

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

int main() {
	int a , b, c;
  	cin >> a >> b >> c;
  
  	int cos1 = abs(a - b), cos2 = abs(b - c), cos3 = abs(c - a);
  	int maximum = max(max(cos2,cos3), cos1);
  
  	int ans = cos1 + cos2 + cos3 - max;
  	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:38: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-'
   11 |         int ans = cos1 + cos2 + cos3 - max;
      |                   ~~~~~~~~~~~~~~~~~~~^~~~~
Language: C++

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

int main() {
	int a , b, c;
  	cin >> a >> b >> c;
  
  	int cos1 = abs(a - b), cos2 = abs(b - c), cos3 = abs(c - a);
  	int max = max(max(cos2,cos3), cos1);
  
  	int ans = cos1 + cos2 + cos3 - max;
  	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: 'max' cannot be used as a function
    9 |         int max = max(max(cos2,cos3), cos1);
      |                       ~~~^~~~~~~~~~~
a.cc:9:22: error: 'max' cannot be used as a function
    9 |         int max = max(max(cos2,cos3), cos1);
      |                   ~~~^~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

int main() {
	int a , b, c;
  	cin >> a >> b >> c;
  
  	int cos1 = abs(a - b), cos2 = abs(b - c), cos3 = abs(c - a);
  	int max = max(cos1,max(cos2,cos3));
  
  	int ans = cos1 + cos2 + cos3 - max;
  	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:31: error: 'max' cannot be used as a function
    9 |         int max = max(cos1,max(cos2,cos3));
      |                            ~~~^~~~~~~~~~~
a.cc:9:42: error: 'max' cannot be used as a function
    9 |         int max = max(cos1,max(cos2,cos3));
      |                                          ^
Language: C++

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

int main() {

  int a,b,c,d,e,f;

  cin >> a>>b>>c ;
  d=max(a,(maxb,c)));
  f=min(a,(min(b,c)));
  if(a!=max(a,(max(b,c)))&&a!=min(a,(min(b,c)))) {
    e=a;
  }
  else if(b!=max(a,(max(b,c)))&&b!=min(a,(min(b,c)))){
e=b;
  }
          else{
            e=c;
          }
  cout<<d-f<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'maxb' was not declared in this scope
    9 |   d=max(a,(maxb,c)));
      |            ^~~~
Language: C++

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

int main() {

  int a,b,c,d,e,f;

  cin >> a>>b>>c ;
  d=max(a,(maxb,c)));
  f=min(a,(min(b,c)));
  if(a!=max(a,(maxb,c))&&a!=min(a,(min(b,c)))) {
    e=a;
  }
  else if(b!=max(a,(maxb,c))&&b!=min(a,(min(b,c)))){
e=b;
  }
          else{
            e=c;
          }
  cout<<d-f<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'maxb' was not declared in this scope
    9 |   d=max(a,(maxb,c)));
      |            ^~~~
Language: C++

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

int main() {

  int a,b,c,d,e,f;

  cin >> a>>b>>c ;
  d=max(a,(maxb,c));
  f=min(a,(min(b,c));
  if(a!=max(a,(maxb,c))&&a!=min(a,(min(b,c))) {
    e=a;
  }
  else if(b!=max(a,(maxb,c))&&b!=min(a,(min(b,c))){
e=b;
  }
          else{
            e=c;
          }
  cout<<d-f<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'maxb' was not declared in this scope
    9 |   d=max(a,(maxb,c));
      |            ^~~~
a.cc:10:21: error: expected ')' before ';' token
   10 |   f=min(a,(min(b,c));
      |        ~            ^
      |                     )
a.cc:11:46: error: expected ')' before '{' token
   11 |   if(a!=max(a,(maxb,c))&&a!=min(a,(min(b,c))) {
      |     ~                                        ^~
      |                                              )
Language: C++

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

int main() {

  int a,b,c,d,e,f;

  cin >> a>>b>>c ;
  d=max(a(maxb,c));
  f=min(a(min(b,c));
  if(a!=max(a(maxb,c))&&a!=min(a(min(b,c))) {
    e=a;
  }
  else if(b!=max(a(maxb,c))&&b!=min(a(min(b,c))){
e=b;
  }
          else{
            e=c;
          }
  cout<<d-f<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 'maxb' was not declared in this scope
    9 |   d=max(a(maxb,c));
      |           ^~~~
a.cc:9:10: error: 'a' cannot be used as a function
    9 |   d=max(a(maxb,c));
      |         ~^~~~~~~~
a.cc:10:10: error: 'a' cannot be used as a function
   10 |   f=min(a(min(b,c));
      |         ~^~~~~~~~~~
a.cc:11:14: error: 'a' cannot be used as a function
   11 |   if(a!=max(a(maxb,c))&&a!=min(a(min(b,c))) {
      |             ~^~~~~~~~
a.cc:11:33: error: 'a' cannot be used as a function
   11 |   if(a!=max(a(maxb,c))&&a!=min(a(min(b,c))) {
      |                                ~^~~~~~~~~~
a.cc:11:44: error: expected ')' before '{' token
   11 |   if(a!=max(a(maxb,c))&&a!=min(a(min(b,c))) {
      |     ~                                      ^~
      |                                            )
Language: C++

#include<iostream>
using namespace std;

int main(){
  int a[3];
  cin>>a[0]>>a[1]>>a[2];
  sort(a.begin(),a.end());
  cout<<min(a[1]-a[0]+a[2]-a[0],a[1]-a[2]+a[0]-a[2]);
}




Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: request for member 'begin' in 'a', which is of non-class type 'int [3]'
    7 |   sort(a.begin(),a.end());
      |          ^~~~~
a.cc:7:20: error: request for member 'end' in 'a', which is of non-class type 'int [3]'
    7 |   sort(a.begin(),a.end());
      |                    ^~~
a.cc:7:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    7 |   sort(a.begin(),a.end());
      |   ^~~~
      |   short
Language: Java

import java.util.*;

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 cost = Math.abs(Math.max(math.max(a1,a2),a3) - Math.min(math.min(a1,a2),a3));

		System.out.println(cost);

	}
}

Compiler output:
Main.java:10: error: cannot find symbol
		int cost = Math.abs(Math.max(math.max(a1,a2),a3) - Math.min(math.min(a1,a2),a3));
		                             ^
  symbol:   variable math
  location: class Main
Main.java:10: error: cannot find symbol
		int cost = Math.abs(Math.max(math.max(a1,a2),a3) - Math.min(math.min(a1,a2),a3));
		                                                            ^
  symbol:   variable math
  location: class Main
2 errors
Language: C++

#include<iostream>
using namespace std;

int main(void) {
	int A[3],max=INT_MIN,min=INT_MAX;
	
	for (int i = 0; i < 3; i++) {
		cin >> A[i];
		if (max < A[i])max = A[i];
		if (min > A[i])min = A[i];
	}
	
	cout<<max-min;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:22: error: 'INT_MIN' was not declared in this scope
    5 |         int A[3],max=INT_MIN,min=INT_MAX;
      |                      ^~~~~~~
a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include<iostream>
  +++ |+#include <climits>
    2 | using namespace std;
a.cc:10:25: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>'
   10 |                 if (min > A[i])min = A[i];
      |                     ~~~~^~~~~~
a.cc:10:41: error: overloaded function with no contextual type information
   10 |                 if (min > A[i])min = A[i];
      |                                         ^
a.cc:13:18: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-'
   13 |         cout<<max-min;
      |               ~~~^~~~
Language: C++

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

using namespace std;

int main(void){
  int a,b,c;
  vector (int) v;
  
  cin>>a>>b>>c;
  
  v.pushback(a);
  v.pushback(b);
  v.pushback(c);
  
  sort(v.begin,v.end);
  
  cout<<(v[2]-v[1])+(v[1]-v[0])<<endl;
  
  return 0;
    


}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: missing template arguments before '(' token
   10 |   vector (int) v;
      |          ^
a.cc:10:11: error: expected primary-expression before 'int'
   10 |   vector (int) v;
      |           ^~~
a.cc:14:3: error: 'v' was not declared in this scope
   14 |   v.pushback(a);
      |   ^
Language: C++

#include<iostream>
#include<algorithm>

using namespace std;

int main()
{
  int a,b,c;
  cin >> a >> b >> c;
  int maxi = max((int)abs(a-b),(int)abs(b-c),(int)abs(c-a));
  cout << maxi;
  return 0;
}

Compiler output:
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: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:10:17:   required from here
   10 |   int maxi = max((int)abs(a-b),(int)abs(b-c),(int)abs(c-a));
      |              ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include<iostream>

using namespace std;

int main()
{
  int a,b,c;
  cin >> a >> b >> c;
  int maxi = max((int)abs(a-b),(int)abs(b-c),(int)abs(c-a));
  cout << maxi;
  return 0;
}

Compiler output:
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: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:9:17:   required from here
    9 |   int maxi = max((int)abs(a-b),(int)abs(b-c),(int)abs(c-a));
      |              ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

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

int main(){
  int vector<int> v(3);
  cin >> v[0] >> v[1] >> v[2];
  sort(v.begin(),v.end());
  
  cout <<  v[0] - v[2] << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: invalid declarator before 'v'
    7 |   int vector<int> v(3);
      |                   ^
a.cc:8:10: error: 'v' was not declared in this scope
    8 |   cin >> v[0] >> v[1] >> v[2];
      |          ^
Language: C++

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

int main() {
  vector<int> p(3);
  for ( int i = 0; i < 3 + i++) cin >> p.at(i);
  sort(p.begin(), p.end());
  cout << p.at(2) - p.at(0) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:31: error: expected ';' before ')' token
    6 |   for ( int i = 0; i < 3 + i++) cin >> p.at(i);
      |                               ^
      |                               ;
Language: C++

#include <iostream>
#include <string>
#include <cstring>
#include <cmath>
#include <cstdio>
#include <algorithm>
using namespace std;
int main(){
    int a, b, c;
    cin >> a >> b >> c;
    int d = fabs(a-b);
    int e = fabs(b-c);
    int f = fabs(a-c);
    int g = min(d, e, f);
    cout << d+e+f-g << endl;
    return 0;
}


Compiler output:
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: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:14:16:   required from here
   14 |     int g = min(d, e, f);
      |             ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C;
  cin >> A >> B >> C; 
  vector<int> vec = { A, B, C};
  
  sort(vec.begin(),vec end());
  cout << vec.at(3) - vec.at(2) + vec.at(2) - vec.at(1) << endl;
}
    
  


Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: expected ')' before 'end'
    8 |   sort(vec.begin(),vec end());
      |       ~               ^~~~
      |                       )
a.cc:8:7: error: no matching function for call to 'sort(std::vector<int>::iterator, std::vector<int>&)'
    8 |   sort(vec.begin(),vec end());
      |   ~~~~^~~~~~~~~~~~~~~~~~~~
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:   template argument deduction/substitution failed:
a.cc:8:7: note:   deduced conflicting types for parameter '_RAIter' ('__gnu_cxx::__normal_iterator<int*, std::vector<int> >' and 'std::vector<int>')
    8 |   sort(vec.begin(),vec end());
      |   ~~~~^~~~~~~~~~~~~~~~~~~~
/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, 2 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, 2 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, 2 provided
Language: C++

#include <iostream >
#include <algorithm >
using namespace std;
int main() {
	int A1, A2, A3; cin >> A1 >> A2 >> A3;
	int ans = max({ A1, A2, A3 }) - min({ A1, A2, A3 });
	cout << ans << endl;
	return 0;
}

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

#include <iostream >
#include <algorithm >
using namespace std;
int main() {
	int A1, A2, A3; cin >> A1 >> A2 >> A3;
	int ans = max({ A1, A2, A3 }) - min({ A1, A2, A3 });
	cout << ans << endl;
}


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

#include <iostream >
#include <algorithm >
#include <math.h>
using namespace std;
int main() {
	int A1, A2, A3; 
	cin >> A1 >> A2 >> A3;
	int ans = max(A1, A2);
	int m = max(A3, ans);

	int answer = min(A1, A2);
	int n = min(answer, A3);
	cout << m -n << endl;

	return 0;
}

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

#include <iostream >
#include <algorithm >
#include <math.h>
using namespace std;
int main() {
	int A1, A2, A3; 
	cin >> A1 >> A2 >> A3;
	int ans = max({ A1, A2, A3 }) - min({ A1, A2, A3 });
	cout << ans << endl;

	return 0;
}

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


#include <iostream >
#include <algorithm >
	using namespace std;
	int main() {
		int A1, A2, A3; cin >> A1 >> A2 >> A3;
		int ans = max({ A1, A2, A3 }) - min({ A1, A2, A3 });
		cout << ans << endl;

	return 0;
}

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

#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
using namespace std;
typedef long long unsigned int ll;
 
int main() {
 
 vector< int> a(3);
  cin >> a[0];
  cin >> a[1];
  cin >> a[2];
  sort(a.begin(),a.end());
  
  cout << a[2]-a[0] <,endl;
  
   return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:22: error: expected primary-expression before ',' token
   16 |   cout << a[2]-a[0] <,endl;
      |                      ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
using namespace std;
typedef long long unsigned int ll;
 
int main() {
 
 vector< int> a(3);
  cin >> a[0];
  cin >> a[1];
  cin >. a[2];
  sort(a.begin(),a.end());
  
  cout << a[2]-a[0] <,endl;
  
   return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: expected primary-expression before '.' token
   13 |   cin >. a[2];
      |        ^
a.cc:16:22: error: expected primary-expression before ',' token
   16 |   cout << a[2]-a[0] <,endl;
      |                      ^
Language: C++

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

int main(){
  
  vector<int> a(3);
  for(int i = 0; i < 3; i++) cin >> a[i];
  sort(a.begin(), a.end());
  
  int ans = INF;
  do{
    int tmp = 0;
    tmp += (int)abs(a[1] - a[2]);
    tmp += (int)abs(a[0] - a[1]);
    
    ans = min(ans, tmp);
  }while(next_permutation(a.begin(), a.end()));
    
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'INF' was not declared in this scope
   10 |   int ans = INF;
      |             ^~~
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
  int a[3];
  REP(i,3){
    cin>>a[i];
  }
  
  int m=1000;
  int temp=0;
  REP(i,n){
    REP(j,n){
      temp+=abs(a[j]-a[i]);
    }
    m = min(m,temp);
    temp = 0;
  }
  cout<<m<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'n' was not declared in this scope
   12 |   REP(i,n){
      |         ^
a.cc:2:32: note: in definition of macro 'REP'
    2 | #define REP(i,n) 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 A1 = sc.nextInt()
        int A2 = sc.nextInt()
        int A3 = sc.nextInt();
		int mic = Math.abs(Math.max(Math.max(A1, A2), A3) - Math.min(Math.min(A1,A2), A3));
		System.out.println(mic);
	}
}


Compiler output:
Main.java:6: error: ';' expected
		int A1 = sc.nextInt()
		                     ^
Main.java:7: error: ';' expected
        int A2 = sc.nextInt()
                             ^
2 errors
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main(){
    vector<int> a(3, 0);
    for(int i=0;i<3;i++) cin >> a.at(i);
    sort(a.begin(), a.end());
    cout << (a.at(1) - a.at(0)) + (a.at(2) - a.at(1)) << endl;
    return 0;
}


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

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

public class A103 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] li = new int[3];
		li[0] = sc.nextInt();
		li[1] = sc.nextInt();
		li[2] = sc.nextInt();
		Arrays.sort(li);
		int i = (li[2] - li[1]) + (li[1] - li[0]);
		System.out.println(i);
	}
}

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

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

int main() {
    vector<int> a(3);
    cin >> a[0] >> a[1] >> a[2];
    sort(a.begin(), a.end);
    int ans = a[2] - a[0];
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: no matching function for call to 'sort(std::vector<int>::iterator, <unresolved overloaded function type>)'
    7 |     sort(a.begin(), a.end);
      |     ~~~~^~~~~~~~~~~~~~~~~~
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: 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<int*, vector<int> >]'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:63: note:   no known conversion for argument 2 from '<unresolved overloaded function type>' to '__gnu_cxx::__normal_iterator<int*, std::vector<int> >'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |                                         ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/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, 2 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, 2 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, 2 provided
Language: C++

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

int main()
{
  int A1, A2, A3;
  cin >> A1 >> A2 >> A3;
  
  int ans = max(A1, A2, A3) - min(A1, A2, A3);
  
  cout << ans << endl;
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:9:16:   required from here
    9 |   int ans = max(A1, A2, A3) - min(A1, A2, A3);
      |             ~~~^~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:9:34:   required from here
    9 |   int ans = max(A1, A2, A3) - min(A1, A2, A3);
      |                               ~~~^~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

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

int main(){
    int a[3];
    for(int i=0; i<3; i++) cin >> a[i];
    sort(a, a+N);
    cout << abs(a[0]-a[1])+abs(a[1]-a[2]) << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'N' was not declared in this scope
    7 |     sort(a, a+N);
      |               ^
Language: C++

#include <iostream>
using namespace std;

int main(){

    int a[3];
    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:9:5: error: 'sort' was not declared in this scope; did you mean 'short'?
    9 |     sort(a, a+3);
      |     ^~~~
      |     short
Language: C++

#include "pch.h"
#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
	int a[3];

	cin >> a[0] >> a[1] >> a[2];

	sort(&a, &a + 3);

	cout << (a[2] - a[1]) + (a[1] - a[0]) <<endl;

	return 0;
}

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

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

int main(){
	int N,a[3],sum=0;
  	cin>>N;
  	for(int i=0;i<N;++i){
      cin>>a[i];
    }sort(a,a+N,greater<int>());
  	a[0]=0;
  	for(int i=1;i<N;++i)sum+=abs(a[i]-a[i-1]);
	cout<<sum<<endl;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:6: error: 'sort' was not declared in this scope; did you mean 'short'?
   10 |     }sort(a,a+N,greater<int>());
      |      ^~~~
      |      short
Language: C++

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


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

#include <stdio.h>
#include <stdlib.h>
int max(int a,int b,int c);
int min(int a,int b,int c);

int main(void){
int a,b,c;
  int max,min;
  scanf("%d %d %d",&a,&b,&c);
  max=max(a,b,c);
  min=min(a,b,c);
  printf("%d\n",abs(max-min));
  
return 0;
}

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

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

Compiler output:
main.c: In function 'main':
main.c:10:7: error: called object 'max' is not a function or function pointer
   10 |   max=max(a,b,c);
      |       ^~~
main.c:8:7: note: declared here
    8 |   int max,min;
      |       ^~~
main.c:11:7: error: called object 'min' is not a function or function pointer
   11 |   min=min(a,b,c);
      |       ^~~
main.c:8:11: note: declared here
    8 |   int max,min;
      |           ^~~
Language: C

#include <stdio.h>
#include <stdlib.h>
int max(int a,b,c);
int min(int a,b,c);

int main(void){
int a,b,c;
  int max,min;
  scanf("%d %d %d",&a,&b,&c);
  max=max(a,b,c);
  min=min(a,b,c);
  printf("%d\n",abs(max-min));
  
return 0;
}

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

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

Compiler output:
main.c:3:15: error: unknown type name 'b'
    3 | int max(int a,b,c);
      |               ^
main.c:3:17: error: unknown type name 'c'
    3 | int max(int a,b,c);
      |                 ^
main.c:4:15: error: unknown type name 'b'
    4 | int min(int a,b,c);
      |               ^
main.c:4:17: error: unknown type name 'c'
    4 | int min(int a,b,c);
      |                 ^
main.c: In function 'main':
main.c:10:7: error: called object 'max' is not a function or function pointer
   10 |   max=max(a,b,c);
      |       ^~~
main.c:8:7: note: declared here
    8 |   int max,min;
      |       ^~~
main.c:11:7: error: called object 'min' is not a function or function pointer
   11 |   min=min(a,b,c);
      |       ^~~
main.c:8:11: note: declared here
    8 |   int max,min;
      |           ^~~
main.c: At top level:
main.c:17:15: error: unknown type name 'b'
   17 | int max(int a,b,c){
      |               ^
main.c:17:17: error: unknown type name 'c'
   17 | int max(int a,b,c){
      |                 ^
main.c:26:15: error: unknown type name 'b'
   26 | int min(int a,b,c){
      |               ^
main.c:26:17: error: unknown type name 'c'
   26 | int min(int a,b,c){
      |                 ^
Language: C

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

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

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

Compiler output:
main.c: In function 'main':
main.c:7:7: error: called object 'max' is not a function or function pointer
    7 |   max=max(a,b,c);
      |       ^~~
main.c:5:7: note: declared here
    5 |   int max,min;
      |       ^~~
main.c:8:7: error: called object 'min' is not a function or function pointer
    8 |   min=min(a,b,c);
      |       ^~~
main.c:5:11: note: declared here
    5 |   int max,min;
      |           ^~~
main.c: At top level:
main.c:14:15: error: unknown type name 'b'
   14 | int max(int a,b,c){
      |               ^
main.c:14:17: error: unknown type name 'c'
   14 | int max(int a,b,c){
      |                 ^
main.c:22:15: error: unknown type name 'b'
   22 | int min(int a,b,c){
      |               ^
main.c:22:17: error: unknown type name 'c'
   22 | int min(int a,b,c){
      |                 ^
Language: C++

#include<iostream>
#include<vector>
int main(void) {
  std::vector<int> v;
  for(int i=0; i<3; i++) {
    int x;
    std::cin >> x;
    v.push_back(x);
  }
  std::sort(v.begin(), v.end());
  std::cout << (v[1]-v[0]) + (v[2]-v[1]) << std::endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   10 |   std::sort(v.begin(), v.end());
      |        ^~~~
      |        qsort
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: no matching function for call to 'sort(int [3], int&)'
   12 |     sort(a,a[2]);
      |     ~~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/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:   template argument deduction/substitution failed:
a.cc:12:9: note:   deduced conflicting types for parameter '_RAIter' ('int*' and 'int')
   12 |     sort(a,a[2]);
      |     ~~~~^~~~~~~~
/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, 2 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, 2 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, 2 provided
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 M = sc.nextInt();
      	//String S = sc.next();
      	int list[] = new int[3];
      	for(int i=0;i<N;i++){
        	list[i] = sc.nextInt();
        }
      	Arrays.sort(list);
      	System.out.println((list[1]-list[0])+(list[2]-list[1]));
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
      	for(int i=0;i<N;i++){
      	              ^
  symbol:   variable N
  location: class Main
1 error