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

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c;
  cin>>a>>b>>c;
  cout<<max(a,b,c)-min(a,c,b);
}

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:6:12:   required from here
    6 |   cout<<max(a,b,c)-min(a,c,b);
      |         ~~~^~~~~~~
/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:23:   required from here
    6 |   cout<<max(a,b,c)-min(a,c,b);
      |                    ~~~^~~~~~~
/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>
int main(){
  int a,b,c;
  cin>>a>>b>>c;
  cout<<max(a,b,c)-min(a,c,b);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin>>a>>b>>c;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   cout<<max(a,b,c)-min(a,c,b);
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:5:9: error: 'max' was not declared in this scope; did you mean 'std::max'?
    5 |   cout<<max(a,b,c)-min(a,c,b);
      |         ^~~
      |         std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:5:20: error: 'min' was not declared in this scope; did you mean 'std::min'?
    5 |   cout<<max(a,b,c)-min(a,c,b);
      |                    ^~~
      |                    std::min
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c;
  cin>>a>>b>>c;
 int n = max({a,b,c});
  int x = min({a,b,c}):
  cout << n-x << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: expected ',' or ';' before ':' token
    7 |   int x = min({a,b,c}):
      |                       ^
Language: C++

#include <iostream>

using namespace std;

int main() {
  // input
  int a[3];
  for (int i=0; i<3; i++){
    cin >> a[i];
  }

  sort(a.begin(), a.end());
  int ans = a[2]-a[0];
  cout << ans << endl;

  return 0;
}


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

#include <bits/stdc++.h>
 
using namespace std;
 
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef pair<ll, P> PP;
 
static const double EPS = 1e-8;
static const double PI = 4.0 * atan(1.0);
static const ll INF = 1023456789;
 
#define REP(i,n)	for(int i=0;i<n;++i)
#define REPR(i,n)	for(int i=n-1;i>=0;--i)
#define FOR(i,s,n)	for(int i=s;i<n;++i)
#define FORR(i,s,n)	for(int i=n-1;i>=s;--i)
#define ALL(c)		(c).begin(),(c).end()
#define CLEAR(v)	memset(v,0,sizeof(v))
#define MP(a,b)		make_pair((a),(b))
#define ABS(a)		((a)>0?(a):-(a))
#define F			first
#define S			second
 
int main(int argc, char **argv) {
	int a, b, c;
	cin >> a >> b >> c;
	cout << (min(abs(a - b) + abs(b - c), min(abs(a - c) + abs(c - b), abs(b - a) + abs(a - c))) << endl;
	return 0;
}
 

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:28:102: error: invalid operands of types 'const int' and '<unresolved overloaded function type>' to binary 'operator<<'
   28 |         cout << (min(abs(a - b) + abs(b - c), min(abs(a - c) + abs(c - b), abs(b - a) + abs(a - c))) << endl;
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
a.cc:28:109: error: expected ')' before ';' token
   28 |         cout << (min(abs(a - b) + abs(b - c), min(abs(a - c) + abs(c - b), abs(b - a) + abs(a - c))) << endl;
      |                 ~                                                                                           ^
      |                                                                                                             )
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 = 0;
    
  ans += A[2] - A[1];
  ans += A[1] - A[0];
  
  cout << ans << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'cin'
    8 |   cin >> A[0] >> A[1] >> A[2];
      |   ^~~
Language: C++

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

int main(){
 int a,b,c;
  cin >> a >> b >>c;
  
  min(abs(b-c)+abs(c-a),abs(b-a)+abs(a-c))  
    
  cout << min(abs(c-b)+abs(b-a), min(abs(b-c)+abs(c-a),abs(b-a)+abs(a-c))) << endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:43: error: expected ';' before 'cout'
    9 |   min(abs(b-c)+abs(c-a),abs(b-a)+abs(a-c))
      |                                           ^
      |                                           ;
   10 | 
   11 |   cout << min(abs(c-b)+abs(b-a), min(abs(b-c)+abs(c-a),abs(b-a)+abs(a-c))) << endl;
      |   ~~~~                                     
a.cc:9:6: warning: ignoring return value of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&) [with _Tp = int]', declared with attribute 'nodiscard' [-Wunused-result]
    9 |   min(abs(b-c)+abs(c-a),abs(b-a)+abs(a-c))
      |   ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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: declared here
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
Language: Java

import java.util.Scanner;
public class Main2 {
    public static void main(String[] args) {
        int[] A = new int[3];
        Scanner scan = new Scanner(System.in);
        A[0] = Integer.parseInt(scan.next());
        A[1] = Integer.parseInt(scan.next());
        A[2] = Integer.parseInt(scan.next());

        int tmpmin = 101;
        int nummin=0;
        int tmpmax = 0;
        int nummax=0;
        int num=0;
        for(int i = 0;i<3;i++){
            if(tmpmin>=A[i]){
                tmpmin = A[i];
                nummin = i;
            }
            if(tmpmax<A[i]){
                tmpmax=A[i];
                nummax = i;
            }
            if(i!=nummin && i !=nummax){
                num = i;
            }
        }
        int cost = 0;
        cost += A[num]-A[nummin];
        cost+= A[nummax]-A[num];
        System.out.println(cost);
    }
}

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

import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int ans = Math.abs(Math.max(Math.max(a,b),c)-Math.min(Math.min(a,b),c));

        System.out.println(ans)
    }
}

Compiler output:
Main.java:11: error: ';' expected
        System.out.println(ans)
                               ^
1 error
Language: C++

#include<bits/stdc++.h>

using namespcae std;

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

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namespcae'
    3 | using namespcae std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         cin>>arr[0]>>arr[1]>>arr[2];
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:9: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
    8 |         sort(arr,arr+3);
      |         ^~~~
      |         std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:9:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |         cout<<(arr[2]-arr[1])+(arr[1]-arr[0]);
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<bits/stdc++.h>

using namespcae std;

int main(){
	int arr[5];
  	cin>>arr[0]>>arr[1]>>arr[2];
  	sort(arr,arr+3,greater<int>());
  	cout<<(arr[0]-arr[1])+(arr[1]-arr[2]);
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namespcae'
    3 | using namespcae std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         cin>>arr[0]>>arr[1]>>arr[2];
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:24: error: 'greater' was not declared in this scope; did you mean 'std::greater'?
    8 |         sort(arr,arr+3,greater<int>());
      |                        ^~~~~~~
      |                        std::greater
In file included from /usr/include/c++/14/string:49,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/stl_function.h:353:12: note: 'std::greater' declared here
  353 |     struct greater;
      |            ^~~~~~~
a.cc:8:32: error: expected primary-expression before 'int'
    8 |         sort(arr,arr+3,greater<int>());
      |                                ^~~
a.cc:8:9: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
    8 |         sort(arr,arr+3,greater<int>());
      |         ^~~~
      |         std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:9:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |         cout<<(arr[0]-arr[1])+(arr[1]-arr[2]);
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

int main(){
  int a[3];
  cin >> a[0] >> a[1] >> a[2];
  int min = 10000000;
  for(int i=0;i<3;i++){
    int sum = abs(a[0]-a[i])+abs(a[1]-a[i])+a(a[2]-a[i]);
    if(min>sum) min = sum;
  }
  cout << min << endl;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:46: error: 'a' cannot be used as a function
   10 |     int sum = abs(a[0]-a[i])+abs(a[1]-a[i])+a(a[2]-a[i]);
      |                                             ~^~~~~~~~~~~
Language: C++

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

int main(){
  int a[3];
  for (int i = 0; i <3; i++){
    cin >> a[i];
  }
  int m,n;
  m=max(a[0], max(a[1],a[2]);
  n=min(a[0], min(a[1],a[2]);
        
   cout << m-n << endl;     
        
        
  return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: expected ')' before ';' token
   10 |   m=max(a[0], max(a[1],a[2]);
      |        ~                    ^
      |                             )
a.cc:11:29: error: expected ')' before ';' token
   11 |   n=min(a[0], min(a[1],a[2]);
      |        ~                    ^
      |                             )
Language: C++

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

int main(){
  int a[3];
  for (int i = 0; i <3; i++){
    cin >> a[i];
  }
  
  m=max(a[0], max(a[1],a[2]);
  n=min(a[0], min(a[1],a[2]);
        
   cout << m-n << endl;     
        
        
  return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'm' was not declared in this scope
   10 |   m=max(a[0], max(a[1],a[2]);
      |   ^
a.cc:10:29: error: expected ')' before ';' token
   10 |   m=max(a[0], max(a[1],a[2]);
      |        ~                    ^
      |                             )
a.cc:11:3: error: 'n' was not declared in this scope
   11 |   n=min(a[0], min(a[1],a[2]);
      |   ^
a.cc:11:29: error: expected ')' before ';' token
   11 |   n=min(a[0], min(a[1],a[2]);
      |        ~                    ^
      |                             )
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  vector<int> MY(3);
  for (int i=0;i<3;i++){
    cin >> MY.at(i);
  }
  sort(MY.begin(), MY.end());
  cout << MY.(2)-MY.(0) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected unqualified-id before '(' token
   10 |   cout << MY.(2)-MY.(0) << endl;
      |              ^
a.cc:10:21: error: expected unqualified-id before '(' token
   10 |   cout << MY.(2)-MY.(0) << endl;
      |                     ^
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 x = Math.abs(a1-a2);
      int y = Math.abs(a2-a3);
      int z = Math.abs(a3-a1);
      int max = Math.max(x,y);
      int max = Math.max(z,max);
      System.out.println(x+y+z-max);
      sc.close();
    }
}

Compiler output:
Main.java:12: error: variable max is already defined in method main(String[])
      int max = Math.max(z,max);
          ^
1 error
Language: C++

#include <bits/stdc++.h>
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:4:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 | int a,b,c;cin>>a>>b>>c;
      |           ^~~
      |           std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 | cout<<max({a,b,c})-min({a,b,c})<<endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:5:7: error: 'max' was not declared in this scope; did you mean 'std::max'?
    5 | cout<<max({a,b,c})-min({a,b,c})<<endl;
      |       ^~~
      |       std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:5:20: error: 'min' was not declared in this scope; did you mean 'std::min'?
    5 | cout<<max({a,b,c})-min({a,b,c})<<endl;
      |                    ^~~
      |                    std::min
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:5:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 | cout<<max({a,b,c})-min({a,b,c})<<endl;
      |                                  ^~~~
      |                                  std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main(){
    int a, b, c;
    cin >> a >> b >> c;

    int k = max(a, b, c);
    int j = min(a, b, c);

    cout << k - j << endl;
}

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:16:   required from here
    9 |     int k = max(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:10:16:   required from here
   10 |     int j = 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<bits/stdc++.h>
#include <math.h>
#include<iostream>
#include <string>
using namespace std;
typedef long long ll;
#define pb pushback
#define fr(i,n) for(int i=0;i<n;i++)
#define ifr(i,n) for(int i=n-1;i>=0;i--)


int main() {
    int a[3];
	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:15:16: error: expected ';' before 'cout'
   15 |     sort(a,a+3)
      |                ^
      |                ;
   16 |       cout << a[2]-a[0] << endl;
      |       ~~~~
Language: C++

#include<iostream>
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:13: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    5 |   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:5:26: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
    5 |   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<iostream>
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:21: error: expected ')' before '-' token
    5 |   cout<<(max({a,b,c}-min({a,b,c}))<<endl;
      |             ~       ^
      |                     )
a.cc:5:13: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    5 |   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:5:41: error: expected ')' before ';' token
    5 |   cout<<(max({a,b,c}-min({a,b,c}))<<endl;
      |         ~                               ^
      |                                         )
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
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:
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:8:16:   required from here
    8 |     cout << max(a,b,c) - min(a,b,c) << endl;
      |             ~~~^~~~~~~
/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:8:29:   required from here
    8 |     cout << max(a,b,c) - min(a,b,c) << endl;
      |                          ~~~^~~~~~~
/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(){
   vector<int>a(3);
   for(int i=0;i<3;i++){
     cin>>a[i];
   }
   sort(a.begin(),a.end());
   cout<<s[2]-s[0]<<endl;
  }


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

#include <iostream>
#include <bits/stdc++.h>
#include <vector>
#include<algorithm>

using namespace std;
#define REP(i,n) FOR(i,0,n)
#define FOR(i,a,b) for(long long i=(a),i##Len_=(b);i<i##Len_;i++)
typedef long long ll;

int main()
{
    ll N,res,T,;
    vector <ll> A(3);
    REP(i,3)cin >> A[i];

    sort(A.begin(),A.end());
    res = 0;

    res+= A[1]-A[0];
    res+= A[2]-A[1];
    cout << res << endl;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: expected unqualified-id before ';' token
   13 |     ll N,res,T,;
      |                ^
Language: C++

#include <iostream>
#include <bits/stdc++.h>
#include <vector>
#include<algorithm>

using namespace std;
#define REP(i,n) FOR(i,0,n)
#define FOR(i,a,b) for(long long i=(a),i##Len_=(b);i<i##Len_;i++)
typedef long long ll;

int main()
{
    ll N,res,T,;
    vector <ll> A(3);
    REP(i,3)cin >> A[i];

    sort(A.begin(),A.end())
    res = 0;

    res+= A[1]-A[0];
    res+= A[2]-A[1];
    cout << res << endl;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: expected unqualified-id before ';' token
   13 |     ll N,res,T,;
      |                ^
a.cc:17:28: error: expected ';' before 'res'
   17 |     sort(A.begin(),A.end())
      |                            ^
      |                            ;
   18 |     res = 0;
      |     ~~~
Language: C++

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

Compiler output:
a.cc:1:10: fatal error: bits/stdc++: No such file or directory
    1 | #include <bits/stdc++>
      |          ^~~~~~~~~~~~~
compilation terminated.
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.begin(), A.end());
  cout << A[2] - A[0] << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: request for member 'begin' in 'A', which is of non-class type 'int [3]'
    9 |   sort(A.begin(), A.end());
      |          ^~~~~
a.cc:9:21: error: request for member 'end' in 'A', which is of non-class type 'int [3]'
    9 |   sort(A.begin(), A.end());
      |                     ^~~
Language: C++

#include<iostream>
using namespace std;

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

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

package main

import (
    "fmt"
    "sort"
)

func main() {
    as := make([]int, 3)
    for i := 0; i < 3; i++ {
        fmt.Scan(&as[i])
    }   
    sort.Sort(sort.Reverse(sort.IntSlice(as)))
    var sum int 
    for i := 1; i < len(as); i++ {
        sum += as[i-1] - as[i]
    }   
    fmt.Println(sum)
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
Language: C++

*a,=map(int,input().split())
print(max(a)-min(a))

Compiler output:
a.cc:1:3: error: expected constructor, destructor, or type conversion before ',' token
    1 | *a,=map(int,input().split())
      |   ^
a.cc:1:4: error: expected unqualified-id before '=' token
    1 | *a,=map(int,input().split())
      |    ^
Language: C++

a=list(map(int,input().split()))
t=abs(a[0]-a[1])+abs(a[0]-a[2])+abs(a[1]-a[2])
print(t-max(abs(a[0]-a[1]),abs(a[0]-a[2]),abs(a[1]-a[2])))

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

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

int main()
{
	int a, b, c;
	cin >> a >> b >> c;

	cout << a + b + c - max(a, b, c) << endl;

	return 0;
}


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:25:   required from here
    9 |         cout << a + b + c - max(a, b, c) << endl;
      |                             ~~~^~~~~~~~~
/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 <bits/stdc++.h>
using  namespace  std;
using ll=long long;
int main(){
  vecotor<int> a(3);
  int sum=0;
  for (int i=0;i<3;i++)cin>>a.at(i);
  sort(a.begin(),a.end(),greater<int>());
  for(int i=1;i<3;i++){
    sum+=a.at(i-1)-a.at(i);
}
  cout<<sum<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'vecotor' was not declared in this scope
    5 |   vecotor<int> a(3);
      |   ^~~~~~~
a.cc:5:11: error: expected primary-expression before 'int'
    5 |   vecotor<int> a(3);
      |           ^~~
a.cc:7:29: error: 'a' was not declared in this scope
    7 |   for (int i=0;i<3;i++)cin>>a.at(i);
      |                             ^
a.cc:8:8: error: 'a' was not declared in this scope
    8 |   sort(a.begin(),a.end(),greater<int>());
      |        ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int a1,a2,a3;
  cin >> a1 >> a2 >> a3;
  cout << max(a1,a2,a3)-min(a1,a2,a3) << endl;
}

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:7:14:   required from here
    7 |   cout << max(a1,a2,a3)-min(a1,a2,a3) << endl;
      |           ~~~^~~~~~~~~~
/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:7:28:   required from here
    7 |   cout << max(a1,a2,a3)-min(a1,a2,a3) << endl;
      |                         ~~~^~~~~~~~~~
/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>
using namespace std;
int main(){
  int a1,a2,a3;
  cin >> a1 >> a2 >> a3;
  cout << max(a1,a2,a3)-min(a1,a2,a3) << endl;
}

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:6:14:   required from here
    6 |   cout << max(a1,a2,a3)-min(a1,a2,a3) << endl;
      |           ~~~^~~~~~~~~~
/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:28:   required from here
    6 |   cout << max(a1,a2,a3)-min(a1,a2,a3) << endl;
      |                         ~~~^~~~~~~~~~
/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<stdlib.h>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:62: error: 'avs' was not declared in this scope; did you mean 'abs'?
    7 |   cout<<abs(b-a)+abs(c-a)+abs(a-c)-max(abs(b-a),max(abs(a-c),avs(c-b)))<<endl;
      |                                                              ^~~
      |                                                              abs
Language: C++

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

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

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

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:62: error: 'avs' was not declared in this scope; did you mean 'abs'?
    6 |   cout<<abs(b-a)+abs(c-a)+abs(a-c)-max(abs(b-a),max(abs(a-c),avs(c-b)))<<endl;
      |                                                              ^~~
      |                                                              abs
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];
  return 0;
}


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 <iostream>
using namespace std;
int main(){
int a[3];
  cin >> a[1] >> a[2] >> a[3];
  sort(a,a+3);
  cout <<a[3]-a[1];
  return 0;
}


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;

int main(){
 int a,b,c,d;cin>>a>>b>>c;
  d=max(a,b,c);
  cout<<a+b+c-d;
}
  
  
  

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:7:8:   required from here
    7 |   d=max(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))
      |           ~~~~~~^~~~~~~~~~
Language: C++

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

int main(void){
    int M,m;
    int A1,A2,A3;
    cin>>A1>>A2>>A3;
    cout<<max({A1,A2,A3})-min({A1,A2,A3})
}





Compiler output:
a.cc: In function 'int main()':
a.cc:9:42: error: expected ';' before '}' token
    9 |     cout<<max({A1,A2,A3})-min({A1,A2,A3})
      |                                          ^
      |                                          ;
   10 | }
      | ~
Language: C++

#include <bits/stdc++.h>
#define all(x) begin(x), end(x)
#define dbg(x) cerr << #x << " = " << x << endl
#define _ << ' ' <<
using namespace std;
using ll = long long;
using vi = vector<int>;


int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int a, b, c;
    cin >> a >> b >> c;
    cout << min(abs(c - a) + abs(c - b), min(abs(a - b) + abs(a - c), abs(a - b) + abs(b - c));
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:95: error: expected ')' before ';' token
   16 |     cout << min(abs(c - a) + abs(c - b), min(abs(a - b) + abs(a - c), abs(a - b) + abs(b - c));
      |                ~                                                                              ^
      |                                                                                               )
Language: C++

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

void swap(int *a,int *b)
{
  int temp=*a;
  *a=*b;
  *b=temp;
}
void sort(int *a,int *b,int *c)
{
  if(*a>*b)
  swap(a,b);
  if(*b>*c)
  swap(b,c);
  if(*a>*b)
  swap(a,b);
}
int main(void)
{

  sort(&a,&b,&c);

  int i=b-a,m=c-b;
  if(i<0)
    i=-i;
  if(m<0)
    m=-m;
  
  cout<<i+m<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: 'a' was not declared in this scope
   22 |   sort(&a,&b,&c);
      |         ^
a.cc:22:12: error: 'b' was not declared in this scope
   22 |   sort(&a,&b,&c);
      |            ^
a.cc:22:15: error: 'c' was not declared in this scope
   22 |   sort(&a,&b,&c);
      |               ^
a.cc:27:6: error: 'm' was not declared in this scope
   27 |   if(m<0)
      |      ^
a.cc:30:11: error: 'm' was not declared in this scope
   30 |   cout<<i+m<<endl;
      |           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: request for member 'begin' in 'a', which is of non-class type 'int [3]'
    6 |   sort(a.begin(),a.end());
      |          ^~~~~
a.cc:6:20: error: request for member 'end' in 'a', which is of non-class type 'int [3]'
    6 |   sort(a.begin(),a.end());
      |                    ^~~
Language: C++

#include<stdio.h>

int main()
{
	int a, b, c, ar[3], k, i, j;
	scanf("%d%d%d", &a, &b, &c);
	ar[0]=abs(a-b)+abs(b-c);
	ar[1]=abs(b-c)+abs(a-c);
	ar[2]=abs(c-a)+abs(b-c);
	
	for(i=0;i<3;i++)
	{
		for(j=i+1;j<3;j++)
		{
			if(ar[i]>ar[j])
			{
				k=ar[i];
				ar[i]=ar[j];
				ar[j]=k;
			}
		}
	}
	
	printf("%d", ar[0]);
	
	

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'abs' was not declared in this scope
    7 |         ar[0]=abs(a-b)+abs(b-c);
      |               ^~~
Language: C++

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

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


#include<stdio.h>

int main()
{
	int a, b, c, cost;
	scanf("%d%d%d", &a, &b, &c);//taking nput

	cost=abs(b-a);
	printf("%d", cost);//print cost
	return 0;
}

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

#include <iostream>
#include <vector>
#include <cstdio>
#include <string>
#include <stack>
#include <algorithm>
#include <iomanip>
#include <math.h>
#include <numeric>
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:
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:15:18:   required from here
   15 |     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:15:31:   required from here
   15 |     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 <stdio.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: expected ';' before '}' token
    8 |       printf("%d",A-C)
      |                       ^
      |                       ;
    9 |     }else{
      |     ~                  
a.cc:10:23: error: expected ';' before '}' token
   10 |       printf("%d",A-B)
      |                       ^
      |                       ;
   11 |     }
      |     ~                  
a.cc:14:23: error: expected ';' before '}' token
   14 |       printf("%d",B-C)
      |                       ^
      |                       ;
   15 |     }else{
      |     ~                  
a.cc:16:23: error: expected ';' before '}' token
   16 |       printf("%d",B-A)
      |                       ^
      |                       ;
   17 |     }
      |     ~                  
a.cc:20:23: error: expected ';' before '}' token
   20 |       printf("%d",C-A)
      |                       ^
      |                       ;
   21 |     }else{
      |     ~                  
a.cc:22:23: error: expected ';' before '}' token
   22 |       printf("%d",C-B)
      |                       ^
      |                       ;
   23 |     }
      |     ~
Language: C++

#include <bits/stdc++.h>
#include <sstream>

using namespace std;


int main(){
    int A,B,C,ans;
    cin >> A >> B >> C;
    cout << max((A,B,C)) - min((A,B),C) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: no matching function for call to 'max(int&)'
   10 |     cout << max((A,B,C)) - min((A,B),C) << endl;
      |             ~~~^~~~~~~~~
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: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
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:10:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   10 |     cout << max((A,B,C)) - min((A,B),C) << endl;
      |             ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided