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

# include<iostream>
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;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    8 |         int ans=max({a,b,c}) -min({a,b,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: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:8:34: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
    8 |         int ans=max({a,b,c}) -min({a,b,c});
      |                               ~~~^~~~~~~~~
/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;
	
	int ans=max(a,b,c) -min(a,b,c);
	cout<< ans <<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::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:8:13:   required from here
    8 |         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:8:25:   required from here
    8 |         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>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'a' was not declared in this scope
    5 |   cin>>a>>b>>c;
      |        ^
a.cc:5:11: error: 'b' was not declared in this scope
    5 |   cin>>a>>b>>c;
      |           ^
a.cc:5:14: error: 'c' was not declared in this scope
    5 |   cin>>a>>b>>c;
      |              ^
Language: C++

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

int main() {
  int a, b, c;
  cin >> (max({a, b, c})-min({a, b, c}) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:41: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    6 |   cin >> (max({a, b, c})-min({a, b, c}) << endl;
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
a.cc:6:48: error: expected ')' before ';' token
    6 |   cin >> (max({a, b, c})-min({a, b, c}) << endl;
      |          ~                                     ^
      |                                                )
Language: C++

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

int main() {
  int a, b, c;
  cin >> (max(a, b, c)-min(a, b, c) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:37: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    6 |   cin >> (max(a, b, c)-min(a, b, c) << endl;
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
a.cc:6:44: error: expected ')' before ';' token
    6 |   cin >> (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: 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 |   cin >> (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:6:27:   required from here
    6 |   cin >> (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++

A1,A2,A3 = (int(i) for i in input().split())

x = abs(A1-A2)
y = abs(A2-A3)
z = abs(A3-A1)

N = [x,y,z]
N.sort()
ans = N[0] + N[1]
print(ans)

Compiler output:
a.cc:1:1: error: 'A1' does not name a type
    1 | A1,A2,A3 = (int(i) for i in input().split())
      | ^~
Language: C++

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

int main(void){
    int sum = 0;
    vector<int> inputs(3);

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

    sort(inputs.begin(),inputs.end());
    for(int i=0; i<2; i++){
        sum << abs(inputs[i+1] - inputs[i]) << endl;
    }
    cout << sum;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:45: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   14 |         sum << abs(inputs[i+1] - inputs[i]) << endl;
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(void){
    int sum = 0;
    vector<int> inputs(3);
    for(int i=0; i<3, i++){
        cin >> inputs[i];
    }
    sort(inputs.begin(),inputs.end());
    for(int i=1; i<3, i++){
        sum+ = inpus[i+1] - inputs[i];
    }
    cout << sum;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:26: error: expected ';' before ')' token
    6 |     for(int i=0; i<3, i++){
      |                          ^
      |                          ;
a.cc:10:26: error: expected ';' before ')' token
   10 |     for(int i=1; i<3, i++){
      |                          ^
      |                          ;
a.cc:11:14: error: expected primary-expression before '=' token
   11 |         sum+ = inpus[i+1] - inputs[i];
      |              ^
a.cc:11:16: error: 'inpus' was not declared in this scope; did you mean 'inputs'?
   11 |         sum+ = inpus[i+1] - inputs[i];
      |                ^~~~~
      |                inputs
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(void){
    int sum = 0;
    vector<int> inputs(3);
    for(int i=0; i<3,i++){
        cin >> inputs[i];
    }
    sort(inputs.begin(),inputs.end())
    for(int i=1;i<3;i++){
        sum+ = inpus[i+1] - inputs[i];
    }
    cout << sum;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:25: error: expected ';' before ')' token
    6 |     for(int i=0; i<3,i++){
      |                         ^
      |                         ;
a.cc:9:38: error: expected ';' before 'for'
    9 |     sort(inputs.begin(),inputs.end())
      |                                      ^
      |                                      ;
   10 |     for(int i=1;i<3;i++){
      |     ~~~                               
a.cc:10:17: error: 'i' was not declared in this scope
   10 |     for(int i=1;i<3;i++){
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >>c;
int ans=0;
ans=max(a,b,c)-min(a,b,c);
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:7:8:   required from here
    7 | 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:7:19:   required from here
    7 | 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 <bits/stdc++.h>
using namespace std;

int main(){
    int a, b, c;
    cin >> a >> b >> c;
    int ans = abs(a-b) + abs(b-c) + abs(c-a) - max(abs(a-b), abs(b-c), abs(c-a));
    cout << ans << 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:7:51:   required from here
    7 |     int ans = abs(a-b) + abs(b-c) + abs(c-a) - max(abs(a-b), abs(b-c), 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<stdio.h>
void swap(int *num1,int *num2)
{
  int num3;
  num3 = *num1;
  *num1 = *num2;
  *num2 = num3;
}
int main(void)
{
	int num1,num2,num3;
    char str[16];
  	
  	fgets(str,sizeof(str),stdin);
  	sscanf(str,"%d%d%d",&num1,&num2,&num3);
  
  	if(num1 < num2)
    {
      swap(&num1,&num2);
    }
 	if(num2 < num3)
    {
      swap(&num2,&num3);
    }
  	if(num1 < num2)
    {
      swap(&num1,&num2);
    }
  
  printf("%d",num1-num3);
  return 0;
}
}


Compiler output:
main.c:33:1: error: expected identifier or '(' before '}' token
   33 | }
      | ^
Language: C++

#include <bits/stdc++.h>
typedef long long ll;
#define REP(i,n) for(int i=0;i<n;i++)
#define ALL(x) (x).begin(),(x).end()
using namespace std;

//素因数分解
vector<pair<ll,int>> factorize(ll n){
    vector<pair<ll,int>>res;
    for(ll i=2;i*i<=n;i++){
        if(n%i)continue;
        res.emplace_back(i,0);
        while (n%i == 0)
        {
        n /= i;
        res.back().second++;
        }
        
    }
    if(n != 1) res.emplace_back(n,1);
    return res;
}

void trace(int A[],int N){
    REP(i,N){
        if(i>0)printf(" ");
        printf("%d",A[i]);
    }
    printf("\n");
}


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/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:36:18:   required from here
   36 |     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:36:31:   required from here
   36 |     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++

//
//  main.cpp
//  oct_23
//
//  Created by 田中諒 on 2019/10/24.
//  Copyright © 2019 田中諒. All rights reserved.
//

#include <iostream>
#include <vector>

using namespace std;

int main() {
    
    vector<int> A(3);
    
    cin >> A.at(0) >> A.at(1) >> A.at(2);
    
    int ans, num;
    ans = 0;
    num = 0;
    
    sort(A.begin(), A.end());
    for (int i=0; i < 3; i++){
        if (i == 0){
            ans += 0;
            num = A.at(i);
        }else {
            ans += abs(num - A.at(i));
            num = A.at(i);
        }
    }
    
    cout << ans << endl;
    
    return 0;
}


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: redeclaration of 'int ans'
    7 |   int ans = min (
      |       ^~~
a.cc:5:15: note: 'int ans' previously declared here
    5 |   int a, b, c,ans;
      |               ^~~
a.cc:7:17: error: no matching function for call to 'min(int, int, int, int, int, int)'
    7 |   int ans = min (
      |             ~~~~^
    8 |     abs(a-b) + abs(a-c),
      |     ~~~~~~~~~~~~~~~~~~~~
    9 |     abs(a-c) + abs(c-b),
      |     ~~~~~~~~~~~~~~~~~~~~
   10 |     abs(b-a) + abs(a-c),
      |     ~~~~~~~~~~~~~~~~~~~~
   11 |     abs(b-c) + abs(c-a),
      |     ~~~~~~~~~~~~~~~~~~~~
   12 |     abs(c-a) + abs(a-b),
      |     ~~~~~~~~~~~~~~~~~~~~
   13 |     abs(c-b) + abs(b-a)
      |     ~~~~~~~~~~~~~~~~~~~
   14 |   );
      |   ~              
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:   candidate expects 2 arguments, 6 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, 6 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, 6 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:   candidate expects 2 arguments, 6 provided
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: no matching function for call to 'min(int, int, int, int, int, int)'
    7 |   int ans = min (
      |             ~~~~^
    8 |     abs(a-b) + abs(a-c),
      |     ~~~~~~~~~~~~~~~~~~~~
    9 |     abs(a-c) + abs(c-b),
      |     ~~~~~~~~~~~~~~~~~~~~
   10 |     abs(b-a) + abs(a-c),
      |     ~~~~~~~~~~~~~~~~~~~~
   11 |     abs(b-c) + abs(c-a),
      |     ~~~~~~~~~~~~~~~~~~~~
   12 |     abs(c-a) + abs(a-b),
      |     ~~~~~~~~~~~~~~~~~~~~
   13 |     abs(c-b) + abs(b-a)
      |     ~~~~~~~~~~~~~~~~~~~
   14 |   );
      |   ~              
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:   candidate expects 2 arguments, 6 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, 6 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, 6 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:   candidate expects 2 arguments, 6 provided
Language: C

#include <stdio.h>
 
int main(void){
  
  int A1;
  int A2;
  int A3;
  
  scanf("%d %d %d",&A1,&A2,&A3);
 
  
  
  if(A1 <= A2 && A2 <= A3){
    printf("%d",(A2 - A1) + (A3 - A2));
  }
  else if(A1 <= A3 && A3 <= A2){
    printf("%d",(A3 - A1) + (A2 - A3));
  }
  else if(A2 <= A1 && A1 <= A3){
    printf("%d",(A1 - A2) + (A3 - A1));
  }
  else if(A2 <= A3 && A3 <= A1){
    printf("%d",(A3 - A2) + (A1 - A3));
  }
  else if(A3 <= A1 && A1 <= A2){
    printf("%d",(A1 - A3) + (A2 - A1));
  }
  else{
    printf("%d",(A2 - A3) + (A1 - A2));
  }
  return 0;
}
#include <stdio.h>

int main(void){
  
  int A1;
  int A2;
  int A3;
  
  scanf("%d %d %d",&A1,&A2,&A3);

  
  
  if(A1 <= A2 && A2 <= A3){
    printf("%d",(A2 - A1) + (A3 - A2));
  }
  else if(A1 <= A3 && A3 <= A2){
    printf("%d",(A3 - A1) + (A2 - A3));
  }
  else if(A2 <= A1 && A1 <= A3){
    printf("%d",(A1 - A2) + (A3 - A1));
  }
  else if(A2 <= A3 && A3 <= A1){
    printf("%d",(A3 - A2) + (A1 - A3));
  }
  else if(A3 <= A1 && A1 <= A2){
    printf("%d",(A1 - A3) + (A2 - A1));
  }
  else{
    printf("%d",(A2 - A3) + (A1 - A2));
  }
  return 0;
}

Compiler output:
main.c:35:5: error: redefinition of 'main'
   35 | int main(void){
      |     ^~~~
main.c:3:5: note: previous definition of 'main' with type 'int(void)'
    3 | int main(void){
      |     ^~~~
Language: C

#include <stdio.h>
 
int main(void){
  
  int A1;
  int A2;
  int A3;
  
  scanf("%d %d %d",&A1,&A2,&A3);
 
  
  
  if(A1 <= A2 && A2 <= A3){
    printf("%d",(A2 - A1) + (A3 - A2));
  }
  else if(A1 <= A3 && A3 <= A2){
    printf("%d",(A3 - A1) + (A2 - A3));
  }
  else if(A2 <= A1 && A1 <= A3){
    printf("%d",(A1 - A2) + (A3 - A1));
  }
  else if(A2 <= A3 && A3 <= A1){
    printf("%d",(A3 - A2) + (A1 - A3));
  }
  else if(A3 <= A1 && A1 <= A2){
    printf("%d",(A1 - A3) + (A2 - A1));
  }
  else{
    printf("%d",(A2 - A3) + (A1 - A2));
  }
  return 0;
}
#include <stdio.h>

int main(void){
  
  int A1;
  int A2;
  int A3;
  
  scanf("%d %d %d",&A1,&A2,&A3);

  
  
  if(A1 <= A2 && A2 <= A3){
    printf("%d",(A2 - A1) + (A3 - A2));
  }
  else if(A1 <= A3 && A3 <= A2){
    printf("%d",(A3 - A1) + (A2 - A3));
  }
  else if(A2 <= A1 && A1 <= A3){
    printf("%d",(A1 - A2) + (A3 - A1));
  }
  else if(A2 <= A3 && A3 <= A1){
    printf("%d",(A3 - A2) + (A1 - A3));
  }
  else if(A3 <= A1 && A1 <= A2){
    printf("%d",(A1 - A3) + (A2 - A1));
  }
  else{
    printf("%d",(A2 - A3) + (A1 - A2));
  }
  return 0
}

Compiler output:
main.c:35:5: error: redefinition of 'main'
   35 | int main(void){
      |     ^~~~
main.c:3:5: note: previous definition of 'main' with type 'int(void)'
    3 | int main(void){
      |     ^~~~
main.c: In function 'main':
main.c:63:11: error: expected ';' before '}' token
   63 |   return 0
      |           ^
      |           ;
   64 | }
      | ~
Language: C++

    #include<iostrem>
    using namespace std;
    int main()
    {
      int A,B,C;
      cin>>A>>B>>C;
      cout<<(A-B);
    }

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

#include <iostream>
#include <vector>

using namespace std;

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

  cout << data[2]-data[0] << endl;

  return 0;
}


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(data.begin(), data.end());
      |   ^~~~
      |   short
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repr(i, n) for (int i = (n); i >= 0; --i)
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
#define FORR(i, m, n) for (int i = (m); i >= (n); --i)
#define ifaxb(a, x, b) if (a < x && x < b)
#define toInt(x) (x - '0')
#define vi vector<int>
#define vvi vector<vi>
#define vs vector<string>
#define vvs vector<vs>
#define all(x) x.begin(), x.end()
#define INF 2147483647
#define _INF -2147483647
#define pi 3.1415926536
#define MAXN 100004
using namespace std;
typedef long long ll;

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: In function 'int main()':
a.cc:25:12: error: expected '}' at end of input
   25 |   return 0;
      |            ^
a.cc:20:12: note: to match this '{'
   20 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repr(i, n) for (int i = (n); i >= 0; --i)
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
#define FORR(i, m, n) for (int i = (m); i >= (n); --i)
#define ifaxb(a, x, b) if (a < x && x < b)
#define toInt(x) (x - '0')
#define vi vector<int>
#define vvi vector<vi>
#define vs vector<string>
#define vvs vector<vs>
#define all(x) x.begin(), x.end()
#define INF 2147483647
#define _INF -2147483647
#define pi 3.1415926536
#define MAXN 100004
using namespace std;
typedef long long ll;

int main() {
  int a1, a2, a3;
  ci >> a1 >> a2 >> a3;
  int ans = max({a1, a2, a3}) - min({a1, a2, a3});
  cout << ans << endl;
  return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:22:3: error: 'ci' was not declared in this scope; did you mean 'vi'?
   22 |   ci >> a1 >> a2 >> a3;
      |   ^~
      |   vi
a.cc:25:12: error: expected '}' at end of input
   25 |   return 0;
      |            ^
a.cc:20:12: note: to match this '{'
   20 | int main() {
      |            ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: expected primary-expression before '>' token
    5 |   cin >> a >>> b >> c;
      |              ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'vec' was not declared in this scope
    9 |   sort(vec.begin(), vec.end());
      |        ^~~
Language: Java

mport java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] a = new int[3];
        for(int i=0;i<3;i++){
            a[i] = Integer.parseInt(sc.next());
        }
        sort(a, 0, 2);
        int cost = (a[1]- a[0]);
        cost += (a[2] - a[1]);
        System.out.println(cost);
    }
    
    private static void sort(int[] d, int left, int right){
        if(left>=right){return;}
        int p = d[(left+right)/2];
        int l=left, r=right;
        int tmp;
        while(l<=r){
            while(d[l]<p){l++;}
            while(d[r]>p){r--;}
            if(l<=r){
                tmp=d[l];
                d[l] = d[r];
                d[r] = tmp;
                l++; r--;
            }
        }
        sort(d, left, r);
        sort(d, l, right);
    }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: expected initializer before '+=' token
    8 |         int ans += v[2] - v[0];
      |                 ^~
Language: C++

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

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


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

#ifdef _DEBUG
#include "MyLib.h"
#else
#define main_A main
#include "bits/stdc++.h" 
#include <regex>
#define _USE_MATH_DEFINES
#include <math.h>
#define FOR(i,s,e) for (int i = int(s); i < int(e); ++i)
#define REP(i,e) FOR(i,0,e)
#define INF (INT_MAX/2)
#define EPS (1.0e-8)
#define LINF (LLONG_MAX/2)
const int MGN = 10;
const int ARY_SZ_MAX = 10000000;
using namespace std;
using ll = long long; using ull = unsigned long long;
using vi = vector<int>; using vvi = vector<vi>; using vvvi = vector<vvi>;
using vb = vector<bool>; using vvb = vector<vb>; using vvvb = vector<vvb>;
using vl = vector<ll>; using vvl = vector<vl>;
using vd = vector<double>; using vs = vector<string>;
using pii = pair<int, int>; using pll = pair<ll, ll>;
using psi = pair<string, int>;
// functions

#endif


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

    const int N = 3;
    vi A(N); REP(i, N) cin >> A[i];

    vs a;
    for (int i = 0; i < 3; i++) a.push_back(to_string(i));

    vector<vs> pm;
    get_permutation(pm, a);

    int ans = INF;
    for(auto p : pm) {
        int cost = 0;
        for(int i=0; i<2; i++) {
            cost += abs(A[stoi(p[i+1])] - A[stoi(p[i])]);
        }
        ans = min(ans, cost);
    }

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:5: error: 'get_permutation' was not declared in this scope
   40 |     get_permutation(pm, a);
      |     ^~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c;
  cin>>a>>b>>c
    if(abs(a-b)>abs(b-c)){ 
      a=0;
      cout<<max(b,c)-min(b,c)+min(b,c);
    }
  else {
    c=0;
    cout<<max(a,b)-min(a,b)+min(a,b);
  }
  
      cout<<"\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: expected ';' before 'if'
    5 |   cin>>a>>b>>c
      |               ^
      |               ;
    6 |     if(abs(a-b)>abs(b-c)){
      |     ~~         
a.cc:10:3: error: 'else' without a previous 'if'
   10 |   else {
      |   ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c;
  cin>>a>>b>>c
    if(abs(a-b)>abs(b-c)) a=0;cout<<max(b,c)-min(b,c)+min(b,c);
  else c=0;cout<<max(a,b)-min(a,b)+min(a,b);
  
      cout<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: expected ';' before 'if'
    5 |   cin>>a>>b>>c
      |               ^
      |               ;
    6 |     if(abs(a-b)>abs(b-c)) a=0;cout<<max(b,c)-min(b,c)+min(b,c);
      |     ~~         
a.cc:7:3: error: 'else' without a previous 'if'
    7 |   else c=0;cout<<max(a,b)-min(a,b)+min(a,b);
      |   ^~~~
Language: C++

#include <iostream>
#include <string>
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:9:16: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    9 |   int ans = max({a,b,c}) - min({a,b,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: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:31: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
    9 |   int ans = max({a,b,c}) - min({a,b,c});
      |                            ~~~^~~~~~~~~
/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>
#include <string>
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:9:16: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    9 |   int ans = max({a,b,c}) - min({a,b,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: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:31: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
    9 |   int ans = max({a,b,c}) - min({a,b,c})
      |                            ~~~^~~~~~~~~
/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>
#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:
a.cc: In function 'int main()':
a.cc:9:15: 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:30: 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
a.cc:9:47: error: expected ')' before ';' token
    9 |   cout << (max({a,b,c}) - min({a,b,c}) << endl;
      |           ~                                   ^
      |                                               )
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<bool> vb;
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define in insert
#define FOR(i,a,b) for (int i = a; i < b; i++)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const int INF = 1e9 + 5;
int main(){
    int a[3];
    for(int i = 0; i < 3; i++) cin >> a[i];
    sort(a, a+n);
    cout << a[3] - a[0]; 
}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator-'
   12 |   cout << max - min << endl;
      |           ~~~~^~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:12:16: error: expected ';' before '}' token
   12 |     t=a;a=b;b=t
      |                ^
      |                ;
   13 |   }
      |   ~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'A' was not declared in this scope
    9 |   sort(A.begin(), A.end());
      |        ^
Language: C++

#include <bits/stdc++.h>
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:6: error: expected ',' or ';' before 'cout'
    7 |      cout << ans << endl;
      |      ^~~~
Language: C++

#include<iostream>
using namespace std;

int main(){

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
    8 |   cout << abs( min({a,b,c}) - max({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:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
a.cc:8:34: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    8 |   cout << abs( min({a,b,c}) - max({a,b,c}) ) << endl;
      |                               ~~~^~~~~~~~~
/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
Language: C++

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

int main (){
   vector<int> x(3);
   cin >> x(0) >> x(1) >> x(2);
   sort(x.begin(), x.end());
   cout << x(1) - x(0) + x(2) - x(1) << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: no match for call to '(std::vector<int>) (int)'
    8 |    cin >> x(0) >> x(1) >> x(2);
      |           ~^~~
a.cc:8:20: error: no match for call to '(std::vector<int>) (int)'
    8 |    cin >> x(0) >> x(1) >> x(2);
      |                   ~^~~
a.cc:8:28: error: no match for call to '(std::vector<int>) (int)'
    8 |    cin >> x(0) >> x(1) >> x(2);
      |                           ~^~~
a.cc:10:13: error: no match for call to '(std::vector<int>) (int)'
   10 |    cout << x(1) - x(0) + x(2) - x(1) << endl;
      |            ~^~~
a.cc:10:20: error: no match for call to '(std::vector<int>) (int)'
   10 |    cout << x(1) - x(0) + x(2) - x(1) << endl;
      |                   ~^~~
a.cc:10:27: error: no match for call to '(std::vector<int>) (int)'
   10 |    cout << x(1) - x(0) + x(2) - x(1) << endl;
      |                          ~^~~
a.cc:10:34: error: no match for call to '(std::vector<int>) (int)'
   10 |    cout << x(1) - x(0) + x(2) - x(1) << endl;
      |                                 ~^~~
Language: C++

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

int A[3];

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: 'max' cannot be used as a function
   11 |   int max = max(A[0],max(A[1],A[2]));
      |                      ~~~^~~~~~~~~~~
a.cc:11:36: error: 'max' cannot be used as a function
   11 |   int max = max(A[0],max(A[1],A[2]));
      |                                    ^
a.cc:12:25: error: 'max' cannot be used as a function
   12 |   int min = min(A[0],max(A[1],A[2]));
      |                      ~~~^~~~~~~~~~~
a.cc:12:36: error: 'min' cannot be used as a function
   12 |   int min = min(A[0],max(A[1],A[2]));
      |                                    ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a[3];
  for(auto$ i:a) cin >> i;
  sort(a,a+3);
  cout << a[2] - a[1] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: 'auto$' was not declared in this scope; did you mean 'auto'?
    5 |   for(auto$ i:a) cin >> i;
      |       ^~~~~
      |       auto
a.cc:6:7: error: could not convert 'std::sort<int*>(((int*)(& a)), (((int*)(& a)) + 12))' from 'void' to 'bool'
    6 |   sort(a,a+3);
      |   ~~~~^~~~~~~
      |       |
      |       void
a.cc:7:30: error: expected ')' before ';' token
    7 |   cout << a[2] - a[1] << endl;
      |                              ^
      |                              )
a.cc:5:6: note: to match this '('
    5 |   for(auto$ i:a) cin >> i;
      |      ^
Language: Java

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

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

    for(int i = 1; i <= 3; i++){
      A[i] = sc.nextInt();
    }

    Arrays.sort(A);

    System.out.println(A[3] - A[1]);
  }
}


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

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

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

    for(i = 1; i <= 3; i++){
      A[i] = sc.nextInt();
    }

    Arrays.sort(A);

    System.out.println(A[3] - A[1]);
  }
}


Compiler output:
Main.java:7: error: cannot find symbol
    int[] A = new Int[3];
                  ^
  symbol:   class Int
  location: class Main
Main.java:9: error: cannot find symbol
    for(i = 1; i <= 3; i++){
        ^
  symbol:   variable i
  location: class Main
Main.java:9: error: cannot find symbol
    for(i = 1; i <= 3; i++){
               ^
  symbol:   variable i
  location: class Main
Main.java:9: error: cannot find symbol
    for(i = 1; i <= 3; i++){
                       ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
      A[i] = sc.nextInt();
        ^
  symbol:   variable i
  location: class Main
5 errors
Language: C++

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

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


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

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


Compiler output:
a.cc:1:31: warning: extra tokens at end of #include directive
    1 | #include <bits/stdc++.h>using namespace std;int main(){int a,b,c;cin>>a>>b>>c;cout<<max({a,b,c})-min({a,b,c});}
      |                               ^~~~~~~~~
a.cc:1:10: fatal error: bits/stdc++.h>usin: No such file or directory
    1 | #include <bits/stdc++.h>using namespace std;int main(){int a,b,c;cin>>a>>b>>c;cout<<max({a,b,c})-min({a,b,c});}
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c;
  std::cin>>a>>b>>c;
  std::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:17:   required from here
    6 |   std::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:28:   required from here
    6 |   std::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))
      |           ~~~~~~^~~~~~~~~~