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

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

/*
,,,,
　　　　　　　　　　　　　　　　　　　　　　　　　　,.斗*''“i:i:{
　　　　　　　　　　　　　,.　｡. . . * : : : ''' : : : :” :”“ ''ｰ - 弋,,_
　　　　　 　 　 ,.斗*''“ : : : : : : : : : : : : : ' ' ' ' ' ' : : : : : : : : : : :”: '':* ｡ ,
　　　 ,.斗*''“ ” ＼：　　 ”・・． ' ' ' '　　　　　　　　 ' ' ' ' : : : : : : : : : : : : ”ミ*｡,,,,,,　　　　　　 　 　 　 ＿
　　く.　 ◎　 ﾞ:.ﾞ:..　ﾟ:,　:　───────────　　　--　　,,,,,,__ ' ' ' :.:.:.:.:.”≧s｡.　　＿,,,｡s*i:i:i:i:<
　　ﾏ*s｡ :,　 }　ﾟ:,　 :}　　　　　　　　　　　　　　　　　　　　　　　　　　　　”　''　-　”””：：”：：`*｡i:i:i:i:i:i:i;:’
　　　` .｡`　 ,　,ノ ／｡ ,,,_　　　　　　　　　　　　　　　　　　　　　　　　　　　　　＿＿`　　} }　　ﾉi:i:i:i:i:ﾂ
　　　　　 `　*　｡　　`*｡i:i:i::*=-　　　　　　　　　　　＿＿　　　　　　,,,....｡s*'i,:’　　　”`*｡＿,*’i:i:i:i:r’
　　　　　　　　　　　”　─ --　　　　｡｡｡｡｡　　 -　－`''''''''ヽ ─ '''”　　　｀ｰ“　　　　　　　`*｡i:i:i:i:i:i:
　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　`*｡i:i:::
　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　`*ﾟ:,
         fozubaoyou    no BUGs alive!
*/

typedef long long ll;

//{
#define mp make_pair
#define nsort(a) sort(a.begin(),a.end())
#define rsort(a) sort(a.rbegin(),a.rend())
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define dumo dump
#define hi debug("hi");
//}

#define debug_interval ','
#define dump_interval endl
#define debug_toggle 0

//{
inline int toInt(string s){int v;istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
template<class...A> inline void dump(){cout<<endl;}
template<class...A> inline void dump_rest() {cout<<endl;}
template<class T, class...A> inline void dump_rest(const T& first, const A&... rest){cout<<dump_interval<<first;dump_rest(rest...);}
template<class T,class...A> inline void dump(const T&first,const A&...rest){cout<<first;dump_rest(rest...);}
template<class...A> inline void debug(){cout<<endl;}
template<class...A> inline void debug_rest() {cout<<endl;}
template<class T, class...A> inline void debug_rest(const T& first, const A&... rest){cout<<debug_interval<<first;debug_rest(rest...);}
template<class T,class...A> inline void debug(const T&first,const A&...rest){if(debug_toggle)cout<<first,debug_rest(rest...);}
//}

int a,b,c,maxv,ans,minv,s,midv;

int main(){
    cin>>a>>b>>c;
    s=a%2+b%2+c%2;
    maxv=max({a,b,c});
    minv=min({a,b,c});
    midv=a+b+c-maxv-minv;
    sum=a+b+c;
    if(s==0){
        ans=(3*maxv-sum)/2;
    }else if(s==2){
        if(!(maxv%2))ans=(maxv-midv)+(maxv-(maxv-midv))/2;
        if(!(midv)%2))ans=(3*maxv-sum-2)/2+1;
        else ans=(3*maxv-sum-2)/2+3;
    }else if(s==3){
        ans=(3*maxv-sum)/2;
    }else if(s==1){
        if(maxv%2)ans=(midv-minv)/2+(maxv-midv);
        else ans=(midv-minv)/2+(maxv-midv)+2;
    }
    dump(ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:57:5: error: 'sum' was not declared in this scope
   57 |     sum=a+b+c;
      |     ^~~
a.cc:62:22: error: expected primary-expression before ')' token
   62 |         if(!(midv)%2))ans=(3*maxv-sum-2)/2+1;
      |                      ^
Language: C++

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

/*
,,,,
　　　　　　　　　　　　　　　　　　　　　　　　　　,.斗*''“i:i:{
　　　　　　　　　　　　　,.　｡. . . * : : : ''' : : : :” :”“ ''ｰ - 弋,,_
　　　　　 　 　 ,.斗*''“ : : : : : : : : : : : : : ' ' ' ' ' ' : : : : : : : : : : :”: '':* ｡ ,
　　　 ,.斗*''“ ” ＼：　　 ”・・． ' ' ' '　　　　　　　　 ' ' ' ' : : : : : : : : : : : : ”ミ*｡,,,,,,　　　　　　 　 　 　 ＿
　　く.　 ◎　 ﾞ:.ﾞ:..　ﾟ:,　:　───────────　　　--　　,,,,,,__ ' ' ' :.:.:.:.:.”≧s｡.　　＿,,,｡s*i:i:i:i:<
　　ﾏ*s｡ :,　 }　ﾟ:,　 :}　　　　　　　　　　　　　　　　　　　　　　　　　　　　”　''　-　”””：：”：：`*｡i:i:i:i:i:i:i;:’
　　　` .｡`　 ,　,ノ ／｡ ,,,_　　　　　　　　　　　　　　　　　　　　　　　　　　　　　＿＿`　　} }　　ﾉi:i:i:i:i:ﾂ
　　　　　 `　*　｡　　`*｡i:i:i::*=-　　　　　　　　　　　＿＿　　　　　　,,,....｡s*'i,:’　　　”`*｡＿,*’i:i:i:i:r’
　　　　　　　　　　　”　─ --　　　　｡｡｡｡｡　　 -　－`''''''''ヽ ─ '''”　　　｀ｰ“　　　　　　　`*｡i:i:i:i:i:i:
　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　`*｡i:i:::
　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　`*ﾟ:,
         fozubaoyou    no BUGs alive!
*/

typedef long long ll;

//{
#define mp make_pair
#define nsort(a) sort(a.begin(),a.end())
#define rsort(a) sort(a.rbegin(),a.rend())
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define dumo dump
#define hi debug("hi");
//}

#define debug_interval ','
#define dump_interval endl
#define debug_toggle 0

//{
inline int toInt(string s){int v;istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
template<class...A> inline void dump(){cout<<endl;}
template<class...A> inline void dump_rest() {cout<<endl;}
template<class T, class...A> inline void dump_rest(const T& first, const A&... rest){cout<<dump_interval<<first;dump_rest(rest...);}
template<class T,class...A> inline void dump(const T&first,const A&...rest){cout<<first;dump_rest(rest...);}
template<class...A> inline void debug(){cout<<endl;}
template<class...A> inline void debug_rest() {cout<<endl;}
template<class T, class...A> inline void debug_rest(const T& first, const A&... rest){cout<<debug_interval<<first;debug_rest(rest...);}
template<class T,class...A> inline void debug(const T&first,const A&...rest){if(debug_toggle)cout<<first,debug_rest(rest...);}
//}

int a,b,c,maxv,ans,minv,s,midv;

int main(){
    cin>>a>>b>>c;
    s=a%2+b%2+c%2;
    maxv=max({a,b,c});
    minv=min({a,b,c});
    midv=a+b+c-maxv-minv;
    if(s==0){
        ans=(a+b+c-3*minv)/2;
    }else if(s==2){
        if(!(maxv%2))ans=(maxv-midv)+(maxv-(maxv-midv))/2;
        if(!(midv)%2))ans=(3*maxv-a-b-c-2)/2+1;
        else ans=(3*maxv-a-b-c-2)/2+3;
    }else if(s==3){
        ans=(3*maxv-a-b-c)/2;
    }else if(s==1){
        if(maxv%2)ans=(midv-minv)/2+(maxv-midv);
        else ans=(midv-minv)/2+(maxv-midv)+2;
    }
    dump(ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:61:22: error: expected primary-expression before ')' token
   61 |         if(!(midv)%2))ans=(3*maxv-a-b-c-2)/2+1;
      |                      ^
Language: C++

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

/*
,,,,
　　　　　　　　　　　　　　　　　　　　　　　　　　,.斗*''“i:i:{
　　　　　　　　　　　　　,.　｡. . . * : : : ''' : : : :” :”“ ''ｰ - 弋,,_
　　　　　 　 　 ,.斗*''“ : : : : : : : : : : : : : ' ' ' ' ' ' : : : : : : : : : : :”: '':* ｡ ,
　　　 ,.斗*''“ ” ＼：　　 ”・・． ' ' ' '　　　　　　　　 ' ' ' ' : : : : : : : : : : : : ”ミ*｡,,,,,,　　　　　　 　 　 　 ＿
　　く.　 ◎　 ﾞ:.ﾞ:..　ﾟ:,　:　───────────　　　--　　,,,,,,__ ' ' ' :.:.:.:.:.”≧s｡.　　＿,,,｡s*i:i:i:i:<
　　ﾏ*s｡ :,　 }　ﾟ:,　 :}　　　　　　　　　　　　　　　　　　　　　　　　　　　　”　''　-　”””：：”：：`*｡i:i:i:i:i:i:i;:’
　　　` .｡`　 ,　,ノ ／｡ ,,,_　　　　　　　　　　　　　　　　　　　　　　　　　　　　　＿＿`　　} }　　ﾉi:i:i:i:i:ﾂ
　　　　　 `　*　｡　　`*｡i:i:i::*=-　　　　　　　　　　　＿＿　　　　　　,,,....｡s*'i,:’　　　”`*｡＿,*’i:i:i:i:r’
　　　　　　　　　　　”　─ --　　　　｡｡｡｡｡　　 -　－`''''''''ヽ ─ '''”　　　｀ｰ“　　　　　　　`*｡i:i:i:i:i:i:
　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　`*｡i:i:::
　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　`*ﾟ:,
         fozubaoyou    no BUGs alive!
*/

typedef long long ll;

//{
#define mp make_pair
#define nsort(a) sort(a.begin(),a.end())
#define rsort(a) sort(a.rbegin(),a.rend())
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define dumo dump
#define hi debug("hi");
//}

#define debug_interval ','
#define dump_interval endl
#define debug_toggle 0

//{
inline int toInt(string s){int v;istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
template<class...A> inline void dump(){cout<<endl;}
template<class...A> inline void dump_rest() {cout<<endl;}
template<class T, class...A> inline void dump_rest(const T& first, const A&... rest){cout<<dump_interval<<first;dump_rest(rest...);}
template<class T,class...A> inline void dump(const T&first,const A&...rest){cout<<first;dump_rest(rest...);}
template<class...A> inline void debug(){cout<<endl;}
template<class...A> inline void debug_rest() {cout<<endl;}
template<class T, class...A> inline void debug_rest(const T& first, const A&... rest){cout<<debug_interval<<first;debug_rest(rest...);}
template<class T,class...A> inline void debug(const T&first,const A&...rest){if(debug_toggle)cout<<first,debug_rest(rest...);}
//}

int a,b,c,maxv,ans,minv,s;

int main(){
    cin>>a>>b>>c;
    s=a%2+b%2+c%2;
    maxv=max({a,b,c});
    minv=min({a,b,c});
    midv=a+b+c-maxv-minv;
    if(s==0){
        ans=(a+b+c-3*minv)/2;
    }else if(s==2){
        if(!(maxv%2))ans=(maxv-(a+b+c-maxv-minv))+(maxv-(maxv-(a+b+c-maxv-minv)))/2;
        if(!((maxv-(a+b+c-maxv+minv))%2))ans=(3*maxv-a-b-c-2)/2+1;
        else ans=(3*maxv-a-b-c-2)/2+3;
    }else if(s==3){
        ans=(3*maxv-a-b-c)/2;
    }else if(s==1){
        if(maxv%2)ans=(midv-minv)/2+(maxv-midv);
        else ans=(midv-minv)/2+(maxv-midv)+2;
    }
    dump(ans);
}

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

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

/*
,,,,
　　　　　　　　　　　　　　　　　　　　　　　　　　,.斗*''“i:i:{
　　　　　　　　　　　　　,.　｡. . . * : : : ''' : : : :” :”“ ''ｰ - 弋,,_
　　　　　 　 　 ,.斗*''“ : : : : : : : : : : : : : ' ' ' ' ' ' : : : : : : : : : : :”: '':* ｡ ,
　　　 ,.斗*''“ ” ＼：　　 ”・・． ' ' ' '　　　　　　　　 ' ' ' ' : : : : : : : : : : : : ”ミ*｡,,,,,,　　　　　　 　 　 　 ＿
　　く.　 ◎　 ﾞ:.ﾞ:..　ﾟ:,　:　───────────　　　--　　,,,,,,__ ' ' ' :.:.:.:.:.”≧s｡.　　＿,,,｡s*i:i:i:i:<
　　ﾏ*s｡ :,　 }　ﾟ:,　 :}　　　　　　　　　　　　　　　　　　　　　　　　　　　　”　''　-　”””：：”：：`*｡i:i:i:i:i:i:i;:’
　　　` .｡`　 ,　,ノ ／｡ ,,,_　　　　　　　　　　　　　　　　　　　　　　　　　　　　　＿＿`　　} }　　ﾉi:i:i:i:i:ﾂ
　　　　　 `　*　｡　　`*｡i:i:i::*=-　　　　　　　　　　　＿＿　　　　　　,,,....｡s*'i,:’　　　”`*｡＿,*’i:i:i:i:r’
　　　　　　　　　　　”　─ --　　　　｡｡｡｡｡　　 -　－`''''''''ヽ ─ '''”　　　｀ｰ“　　　　　　　`*｡i:i:i:i:i:i:
　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　`*｡i:i:::
　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　`*ﾟ:,
         fozubaoyou    no BUGs alive!
*/

typedef long long ll;

//{
#define mp make_pair
#define nsort(a) sort(a.begin(),a.end())
#define rsort(a) sort(a.rbegin(),a.rend())
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define dumo dump
#define hi debug("hi");
//}

#define debug_interval ','
#define dump_interval endl
#define debug_toggle 0

//{
inline int toInt(string s){int v;istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
template<class...A> inline void dump(){cout<<endl;}
template<class...A> inline void dump_rest() {cout<<endl;}
template<class T, class...A> inline void dump_rest(const T& first, const A&... rest){cout<<dump_interval<<first;dump_rest(rest...);}
template<class T,class...A> inline void dump(const T&first,const A&...rest){cout<<first;dump_rest(rest...);}
template<class...A> inline void debug(){cout<<endl;}
template<class...A> inline void debug_rest() {cout<<endl;}
template<class T, class...A> inline void debug_rest(const T& first, const A&... rest){cout<<debug_interval<<first;debug_rest(rest...);}
template<class T,class...A> inline void debug(const T&first,const A&...rest){if(debug_toggle)cout<<first,debug_rest(rest...);}
//}

int a,b,c,maxv,ans,minv,s;

int main(){
    cin>>a>>b>>c;
    s=a%2+b%2+c%2;
    maxv=max({a,b,c});
    minv=min({a,b,c});
    if(s==0){
        ans=(a+b+c-3*minv)/2;
    }else if(s==2){
        if(!maxv%2)ans=(3*maxv-a-b-c-2)/2+1;
        /*else ans=(3*maxv-a-b-c-2)/2+3;
    }else if(s==3){
        ans=(3*maxv-a-b-c)/2;
    }else if(s==1){
        if(maxv%2)ans=(a+b+c-maxv-minv-minv)/2+(maxv-a-b-c+maxv+minv);
        else ans=(a+b+c-maxv-minv-minv)/2+(maxv-a-b-c+maxv+minv)+2;
    }*/
    dump(ans);
}



Compiler output:
a.cc: In function 'int main()':
a.cc:68:2: error: expected '}' at end of input
   68 | }
      |  ^
a.cc:51:11: note: to match this '{'
   51 | int main(){
      |           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:56: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    8 | cout<<a[2]-a[1]+(a[1]-a[0]%2)?(a[1]-a[0]+2):(a[1]-a[0])<<endl;
      |                                             ~~~~~~~~~~~^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:52: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    8 | cout<<a[2]-a[1]+(a[1]-a[0]%2)?a[1]-a[0]+2:a[1]-a[0]<<endl;
      |                                           ~~~~~~~~~^~~~~~
Language: C++

#include <algorithm>
#include<iostream>
#include<vector>
#include<map>
#include<string>

#include<stdlib.h>
#include<string.h>
#include<math.h>
#include<limits.h>

using namespace std;
int main(){
  vector<int> vec;
  int ii;
  int max,min,middle;
  int num1,num2;
  vec.resize(3);

  for(ii=0;ii<3;ii++){
	cin >> vec[ii];
  }

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

  min = vec[0];
  middle = vec[1];
  max = vec[2];
  num1 = (max-min)/2;
  num2 = (max-middle)/2;
  
  cout << (num1+num2) << endl;

  vec[0] = min + num1 * 2;
  vec[1] = middle + num * 2;

  sort(vec.begin(),vec.end());
  
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:21: error: 'num' was not declared in this scope; did you mean 'num2'?
   35 |   vec[1] = middle + num * 2;
      |                     ^~~
      |                     num2
Language: Java

import java.util.*;

public class SameIntegers {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a  = sc.nextInt();
        int b  = sc.nextInt();
        int c  = sc.nextInt();

        boolean isEvenA = false;
        boolean isEvenB = false;
        boolean isEvenC = false;

        int count = 0;

        if(a % 2 == 0){
            isEvenA = true;
            count++;
        }

        if(b % 2 == 0){
            isEvenB = true;
            count++;
        }

        if(c % 2 == 0){
            isEvenC = true;
            count++;
        }


        int ans = 0;

        switch (count){
            case 0:
                break;
            case 1:
                if(! isEvenA){
                    a++;
                }
                if(! isEvenB){
                    b++;
                }
                if(! isEvenC){
                    c++;
                }

                ans += 1;
                break;
            case 2:
                if(isEvenA){
                    a++;
                }
                if(isEvenB){
                    b++;
                }
                if(isEvenC){
                    c++;
                }

                ans += 1;
                break;
            case 3:
                break;
        }


        List<Integer> list = Arrays.asList(a, b, c);
        Collections.sort(list);


        System.out.println((((list.get(2) * 2) - (list.get(0) + list.get(1))) / 2) + ans);
    }
}


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

#include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
#include <numeric>
#include <string>
using namespace std;
const double PI = acos(-1.0);
const string alp = "abcdefghijklmnopqrstuvwxyz";
const string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define SUM(c) accumulate((c).begin(),(c).end(),0)
#define UNIQ(c) (c).erase(unique((c).begin(), (c).end()), (c).end());
#define Yn(b) puts(b?"Yes":"No")
#define YN(b) puts(b?"YES":"NO")
 
bool isprime(int p) {
  if (p==1) return false;
    FOR(i,2,p) {
      if (p%i==0) return false;
    }
  return true;
}
 
int main(){
  int a,b,c,t;
  cin >> a >> b >> c;
  t=0;
  if (b-a>=2) {
    t+=(b-a)/2
    a+=((b-a)/2)*2;
  }
  if (c-a>=2) {
    t+=(c-a)/2
    a+=((c-a)/2)*2;
  }
  if (a-b>=2) {
    t+=(a-b)/2
    b+=((a-b)/2)*2;
  }
  if (c-b>=2) {
    t+=(c-b)/2
    b+=((c-b)/2)*2;
  }
  if (b-c>=2) {
    t+=(b-c)/2
    c+=((b-c)/2)*2;
  }
  if (a-c>=2) {
    t+=(a-c)/2
    c+=((a-c)/2)*2;
  }
  int m = max({a,b,c});
  if (a==b&&b==c){
    cout << t;
  } else if ((m==a)+(m==b)+(m==c)==2) {
    cout << t+2;
  } else if ((m==a)+(m==b)+(m==c)==1) {
    cout << t+1;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:15: error: expected ';' before 'a'
   33 |     t+=(b-a)/2
      |               ^
      |               ;
   34 |     a+=((b-a)/2)*2;
      |     ~          
a.cc:37:15: error: expected ';' before 'a'
   37 |     t+=(c-a)/2
      |               ^
      |               ;
   38 |     a+=((c-a)/2)*2;
      |     ~          
a.cc:41:15: error: expected ';' before 'b'
   41 |     t+=(a-b)/2
      |               ^
      |               ;
   42 |     b+=((a-b)/2)*2;
      |     ~          
a.cc:45:15: error: expected ';' before 'b'
   45 |     t+=(c-b)/2
      |               ^
      |               ;
   46 |     b+=((c-b)/2)*2;
      |     ~          
a.cc:49:15: error: expected ';' before 'c'
   49 |     t+=(b-c)/2
      |               ^
      |               ;
   50 |     c+=((b-c)/2)*2;
      |     ~          
a.cc:53:15: error: expected ';' before 'c'
   53 |     t+=(a-c)/2
      |               ^
      |               ;
   54 |     c+=((a-c)/2)*2;
      |     ~
Language: Java

import javafx.collections.transformation.SortedList;

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

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        ArrayList<Integer> as = new ArrayList(3);
        as.add(scanner.nextInt());
        as.add(scanner.nextInt());
        as.add(scanner.nextInt());
        Collections.sort(as, Collections.reverseOrder());
        int count = 0;
        while(as.get(0) != as.get(1)) {
            as.set(1, as.get(1) + 1);
            as.set(2, as.get(2) + 1);
            count++;
        }
        count += (as.get(0) - as.get(2)) / 2 + (as.get(0) - as.get(2)) % 2 * 2;
        System.out.println(count);
    }
}



Compiler output:
Main.java:1: error: package javafx.collections.transformation does not exist
import javafx.collections.transformation.SortedList;
                                        ^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Language: C++

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

    if(a[2] % 2 != (a[0] + a[1] + a[2]) % 2){
      a[0]++;
      a[2]++;
      count++;
    }

    while(a[0] != a[2] || a[1] != a[2]){
      if(a[1] != a[2]){
        a[0]++;
        a[1]++;
        count++;
      }else{
        a[0] += 2;
        count++;
      }
    }


    System.out.println(count);
  }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.Arrays;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:9: error: expected ':' before 'static'
    4 |   public static void main(String args[]){
      |         ^~~~~~~
      |         :
a.cc:4:27: error: 'String' has not been declared
    4 |   public static void main(String args[]){
      |                           ^~~~~~
a.cc:33:2: error: expected ';' after class definition
   33 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:5: error: 'Scanner' was not declared in this scope
    5 |     Scanner sc = new Scanner(System.in);
      |     ^~~~~~~
a.cc:6:15: error: initializer fails to determine size of 'a'
    6 |     int a[] = new int [3];
      |               ^~~~~~~~~~~
a.cc:6:15: error: array must be initialized with a brace-enclosed initializer
a.cc:8:14: error: 'sc' was not declared in this scope
    8 |       a[i] = sc.nextInt();
      |              ^~
a.cc:10:5: error: 'Arrays' was not declared in this scope
   10 |     Arrays.sort(a);
      |     ^~~~~~
a.cc:31:5: error: 'System' was not declared in this scope
   31 |     System.out.println(count);
      |     ^~~~~~
Language: C++

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

int main() {
    int n,s,t,counter=0;
    vector<int> v;
    for(int i=0;i<3;i++){
        cin >> n;
        v.push_back(n);
    }
    sort(v.begin(),v.end());
    s = v[2] - v[0];
    t = v[2] - v[1];
    counter += s/2;
    s -= (s/2)*2;
    counter += t/2;
    t -= (t/2)*2;
    if(s + t == 2)counter += 1;
    else if(s + t == 1)counter += 2;
    cout << counter << endl;
    return 0;
}


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

#include <iostream>
#include <algorithm>

using namespace std;

int A, B, C;

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

	sort(X, X + 3);
	int cnt = 0;
	cnt = X[2] - X[1];
	if ((X[2] - X[0] - cnt) % 2 == 0)
		cnt += (X[2] - X[0] - cnt) / 2;
	else
		cnt += ceil((X[2] - X[0] - cnt) / 2.0) + 1;
	cout << cnt << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: 'ceil' was not declared in this scope
   18 |                 cnt += ceil((X[2] - X[0] - cnt) / 2.0) + 1;
      |                        ^~~~
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
		int[] x = new int[3];
		x[0] = sc.nextInt();
		x[1] = sc.nextInt();
		x[2] = sc.nextInt();
		int answer = 0;

		while (x[0] != x[1] || x[1] != x[2]) {
			Arrays.sort(x);

			if (x[0] == x[1]) {
				x[2] += 2;
			} else {
				x[1] += 1;
				x[2] += 1;
			}
			answer++;
		}

		System.out.println(answer)
  }
}


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

int main(){
  int n[3];

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

  int cnt = 0;

  while(true){
    if(n[0] == n[1] && n[1] == n[2]){
      break;
    }
    sort(n, n+3);
    if(n[0] + 2 <= n[2]){
      n[0] += 2;
    }else{
      n[0]++;
      n[1]++;
    }
    cnt++;
  }
  cout << cnt << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin >> n[0] >> n[1] >> n[2];
      |   ^~~
a.cc:12:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   12 |     sort(n, n+3);
      |     ^~~~
      |     short
a.cc:21:3: error: 'cout' was not declared in this scope
   21 |   cout << cnt << endl;
      |   ^~~~
a.cc:21:18: error: 'endl' was not declared in this scope
   21 |   cout << cnt << endl;
      |                  ^~~~
Language: C++

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

int main(int argc, const char * argv[]) {
    vector<int> n(3);
    for(int i = 0; i < 3; i++) cin >> n[i];
    sort(n.begin(), n.end());
    
    int cnt = 0;
    while(!(n[0] == n[1] && n[1] == n[2])) {
        if(n[1] == n[2]) {
            n[0] +=2;
            cnt++;
        } else {
            n[0]++; n[1]++;
            cnt++;
        }
        sort(n.begin(), n.end());
    }
    
    cout << cnt << endl;

    return 0;
}


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

#include<iostream>
#include<string>
#include<cmath>
#include<vector>
#include<algorithm>
#include<utility>

using namespace std;#include<iostream>
#include<string>
#include<cmath>
#include<vector>
#include<algorithm>
#include<utility>

using namespace std;

int main(){
    int a,b,c;
    int x1,x2,x3;

    cin >> a >> b >> c;

    if(  a < b){
         if ( b < c ){
          x1 = a;
          x2 = b;
          x3 = c;
         }
         else if ( c < a ){
          x1 = c;
          x2 = a;
          x3 = b;
         }
         else {
          x1 = a;
          x2 = c;
          x3 = b;
         }

    }else {
        if ( a < c ){
          x1 = b;
          x2 = a;
          x3 = c;
        }
        else if ( c < b ){
          x1 = c;
          x2 = b;
          x3 = a;
        }
        else{
          x1 = b;
          x2 = c;
          x3 = a;
        }
    }
    int cnt = 0;
    if(x1%2 != x2%2){
        if(x1%2 == x3%2){
            x1 += 1;
            x3 += 1;
            cnt += 1;
        }
        else{
            x2 += 1;
            x3 += 1;
            cnt += 1;
        }
    }
    cnt += (x3 - x1)/2;
     cnt += (x3 - x2)/2;

    cout << cnt << endl;
    return 0;
}

int main(){
    int a,b,c;
    int x1,x2,x3;

    cin >> a >> b >> c;

    if(  a < b){
         if ( b < c ){
          x1 = a;
          x2 = b;
          x3 = c;
         }
         else if ( c < a ){
          x1 = c;
          x2 = a;
          x3 = b;
         }
         else {
          x1 = a;
          x2 = c;
          x3 = b;
         }

    }else {
        if ( a < c ){
          x1 = b;
          x2 = a;
          x3 = c;
        }
        else if ( c < b ){
            x1 = c;
          x2 = b;
          x3 = a;
        }
        else{
            x1 = b;
          x2 = a;
          x3 = c;
        }
    }
    int cnt = 0;
    if(x1%2 != x2%2){
        if(x1%2 == x3%2){
            x1 += 1;
            x3 += 1;
            cnt += 1;
        }
        else{
            x2 += 1;
            x3 += 1;
            cnt += 1;
        }
    }
    cnt += (x3 - x1)/2;
     cnt += (x3 - x2)/2;

    cout << cnt << endl;
    return 0;
}


Compiler output:
a.cc:8:21: error: stray '#' in program
    8 | using namespace std;#include<iostream>
      |                     ^
a.cc:8:22: error: 'include' does not name a type
    8 | using namespace std;#include<iostream>
      |                      ^~~~~~~
a.cc:77:5: error: redefinition of 'int main()'
   77 | int main(){
      |     ^~~~
a.cc:17:5: note: 'int main()' previously defined here
   17 | int main(){
      |     ^~~~
Language: C++

#include <iostream>
#include <vector>
using namespace std;
#define reps(x,c) for(auto x:c)
#define all(x) begin(x), end(x)
int main(){
    vector<int> v(3);cin>>v[0]>>v[1]>>v[2];
    sort(all(v));
    int a=v[0];reps(&x,v)x-=a;
    int b=v[1],c=v[2];
    int r_b=b%2,r_c=c%2;
    int ans=0,r=r_b+r_c;
    if(r==1||r==2)ans++;
    if((r_c==r_b||r_c==0)&&(r_c%2!=r_b%2||r_c%2!=0))ans++;
    reps(x,v)ans+=(c-x)/2;
    cout<<ans<<endl;
}

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

#include<stdio.h>
int a(int a,int b,int c);
int main(void)
{
        int a,b,c,s;
        scanf("%d %d %d",&a,&b,&c);
        if((a>b)&&(a>c)) s=a(a,b,c);
        else if(b>c) s=a(b,a,c);
        else s=a(c,a,b);
        printf("%d",s);
        return 0;
}
int a(int a,int b,int c)
{
        int i,n=0,r=0;
        for(i=b;i<a;i=i+2) n++;
        r=r+b-a;
        for(i=c;i<a;i=i+2) n++;
        r=r+c-a;
        return n+r;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:29: error: 'a' cannot be used as a function
    7 |         if((a>b)&&(a>c)) s=a(a,b,c);
      |                            ~^~~~~~~
a.cc:8:25: error: 'a' cannot be used as a function
    8 |         else if(b>c) s=a(b,a,c);
      |                        ~^~~~~~~
a.cc:9:17: error: 'a' cannot be used as a function
    9 |         else s=a(c,a,b);
      |                ~^~~~~~~
Language: C++

#include<stdio.h>
int a(int a,int b,int c);
int main(void)
{
        int a,b,c,s;
        scanf("%d %d %d",&a,&b,&c);
        if((a>b)&&(a>c)) s=a(a,b,c);
        else if(b>c) s=a(b,a,c);
        else s=a(c,a,b);
        printf("%d",s);
        return 0;
}
int a(int a,int b,int c)
{
        int n=0,r=0;
        for(i=b;i<a;i=i+2) n++;
        r=r+b-a;
        for(i=c;i<a;i=i+2) n++;
        r=r+c-a;
        return n+r;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:29: error: 'a' cannot be used as a function
    7 |         if((a>b)&&(a>c)) s=a(a,b,c);
      |                            ~^~~~~~~
a.cc:8:25: error: 'a' cannot be used as a function
    8 |         else if(b>c) s=a(b,a,c);
      |                        ~^~~~~~~
a.cc:9:17: error: 'a' cannot be used as a function
    9 |         else s=a(c,a,b);
      |                ~^~~~~~~
a.cc: In function 'int a(int, int, int)':
a.cc:16:13: error: 'i' was not declared in this scope
   16 |         for(i=b;i<a;i=i+2) n++;
      |             ^
a.cc:18:13: error: 'i' was not declared in this scope
   18 |         for(i=c;i<a;i=i+2) n++;
      |             ^
Language: C++

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

int main() {
	int A, B, C;
	cin >> A >> B >> C;
	
	int D = 3 * max(A, max(B, C)) - (A + B + C);
	if (D % 2 != 0) D += 3;
	D /= 2
	cout << D << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: expected ';' before 'cout'
   12 |         D /= 2
      |               ^
      |               ;
   13 |         cout << D << endl;
      |         ~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a[4],i,s2=0,s1=0;
	scanf("%d %d %d",&a[0],&a[1],&a[2]);
	sort(a,a+3);
	s2+=(a[2]-a[0])/2+(a[2]-a[1])/2;
	s1+=s+=(a[2]-a[0])%2+(a[2]-a[1])%2; 
	printf("%d",s2+s1/2); 
	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 's' was not declared in this scope; did you mean 's1'?
    9 |         s1+=s+=(a[2]-a[0])%2+(a[2]-a[1])%2;
      |             ^
      |             s1
Language: C++

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

int main(void) {
	int N[3];
	int a = 0;
	cin >> N[0] >> N[1] >> N[2];
	sort(N,N+3);
	a = abs(N[2] - N[0]) + abs(N[2]-N[1]);
	if (a % 2 == 0)
		cout << a / 2 << endl;
	else
		cout << (a + 1) / 2 + 2 << endl;
	return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: expected '}' at end of input
   16 |         return 0;
      |                  ^
a.cc:6:16: note: to match this '{'
    6 | int main(void) {
      |                ^
Language: C++

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

int main(){
    vector<int> a(3);
    cin >> a[0] >> a[1] >> a[2];
    sort(a.begin(), a.end());

    int num = a[2] - a[1];
    a[0] += num;
    if(a[0]%2 == a[2]%2){
        num += (a[2]-a[0]) / 2;
    }else{
        num += (a[2]-a[0]) / 2 + 2;
    }
    cout << num << endl;
  
    return 0;
}


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

#include<iostream>
#include<algorithm>
using namespace std;
main()
{
    int a,b,c;
    cin>>a>>b>>c;
    int t=(3*max(a,max(b,c))-a-b-c);
    if(t%2)cout<<((t+3)/2;
    else cout<<t/2;
}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:9:26: error: expected ')' before ';' token
    9 |     if(t%2)cout<<((t+3)/2;
      |                  ~       ^
      |                          )
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int a,b,c;
    cin>>a>>b>>c;
    int t=(3*max(a,max(b,c))-a-b-c)%2;
    t%2? cout<<((t+3)/2:cout<<t/2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: expected ')' before ':' token
    9 |     t%2? cout<<((t+3)/2:cout<<t/2;
      |                ~       ^
      |                        )
a.cc:9:34: error: expected ':' before ';' token
    9 |     t%2? cout<<((t+3)/2:cout<<t/2;
      |                                  ^
      |                                  :
a.cc:9:34: error: expected primary-expression before ';' token
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int a,b,c;
    cin>>a>>b>>c;
    int t=(3*max(a,max(b,c))-a-b-c)%2;
    t%2?cout<<((t+3)/2:cout<<t/2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: expected ')' before ':' token
    9 |     t%2?cout<<((t+3)/2:cout<<t/2;
      |               ~       ^
      |                       )
a.cc:9:33: error: expected ':' before ';' token
    9 |     t%2?cout<<((t+3)/2:cout<<t/2;
      |                                 ^
      |                                 :
a.cc:9:33: error: expected primary-expression before ';' token
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int a,b,c;
    cin>>a>>b>>c;
    int t=(3*max(a,max(b,c))-a-b-c)%2;
    t%2?cout<<((+3)/2:cout<<t/2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: expected ')' before ':' token
    9 |     t%2?cout<<((+3)/2:cout<<t/2;
      |               ~      ^
      |                      )
a.cc:9:32: error: expected ':' before ';' token
    9 |     t%2?cout<<((+3)/2:cout<<t/2;
      |                                ^
      |                                :
a.cc:9:32: error: expected primary-expression before ';' token
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int a,b,c;
    cin>>a>>b>>c;
    (3*max(a,max(b,c))-a-b-c)%2==1? cout<<(t+3)/2 : cout<<t/2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:44: error: 't' was not declared in this scope
    8 |     (3*max(a,max(b,c))-a-b-c)%2==1? cout<<(t+3)/2 : cout<<t/2;
      |                                            ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int a,b,c;
    cin>>a>>b>>c;
    (3*max(a,max(b,c))-a-b-c)%2? cout<<(t+3)/2:cout<<t/2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:41: error: 't' was not declared in this scope
    8 |     (3*max(a,max(b,c))-a-b-c)%2? cout<<(t+3)/2:cout<<t/2;
      |                                         ^
Language: C

#include<stdio.h>int main(){	int a, b, c, t;	int j = 0;	int temp;	scanf("%d%d%d", &a, &b, &c);	if (a == b && b == c)	printf("0");	if ((a == b && a != c)||(a==c&&a!=b)||(b==c&&a!=b))	{	if (a>b)	{	t = a; a = b; b = t;	}	if (b>c)	{	t = b; b = c; c = t;	}	if (a>b)	{	t = a; a = b, b = t;	}	if ((c - a) % 2 != 0)	{	temp = (c - a+1) / 2 ;	temp = temp + 1;	printf("%d", temp);	}	else	printf("%d", (c - a) / 2);	}	if (a != b && a != c && 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;	}	for (a; b < c; b++)	{	a++;	j++;	}	if ((c - a) % 2 != 0)	{	j = j + (c - a + 1) / 2;	j = j + 1;	printf("%d", j);	}	else	{	j = j + (c - a) / 2;	printf("%d", j);	}	}	return 0;}

Compiler output:
main.c:1:18: warning: extra tokens at end of #include directive
    1 | #include<stdio.h>int main(){    int a, b, c, t; int j = 0;      int temp;       scanf("%d%d%d", &a, &b, &c);    if (a == b && b == c)   printf("0");    if ((a == b && a != c)||(a==c&&a!=b)||(b==c&&a!=b))     {       if (a>b)        {       t = a; a = b; b = t;    }       if (b>c)        {       t = b; b = c; c = t;    }       if (a>b)        {       t = a; a = b, b = t;    }       if ((c - a) % 2 != 0)   {       temp = (c - a+1) / 2 ;  temp = temp + 1;        printf("%d", temp);     }       else    printf("%d", (c - a) / 2);      }       if (a != b && a != c && 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;    }       for (a; b < c; b++)     {       a++;    j++;    }       if ((c - a) % 2 != 0)   {       j = j + (c - a + 1) / 2;        j = j + 1;      printf("%d", j);        }       else    {       j = j + (c - a) / 2;    printf("%d", j);        }       }       return 0;}
      |                  ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
using namespace std;

int main(){
        int a,b,c;
        int res=0;
        cin>>a>>b>>c;
        while(1){
	if(a==b&&a==c)break;
        if(a>b&&a>c){
                   b++;c++;res++;     
        }else if(b>a&&b>c){
                        a++;c++;res++;
        }else if(c>>a&&c>>b){
                        b++;a++;res++;
        }else{
        if(a==b){
                while(1){
                        if(b-1==c){a++;b++;res++;}
                        c+=2;
                        res++;
                        if(a==c)break;
                }
        }else if(a==c){
                while(1){
                        if(a-1==b){a++;c++;res++;}
                        b+=2;res++;if(a==b)break;
                }
        }else if(b==c){
                while(1){
                        if(b-1==a){b++;c++;res++;}
                        a+=2;res++;if(a==c)break;
                }
        }
        if(a==b&&a==c)break;
        }
        cout<<res<<endl;
}

Compiler output:
a.cc:1:1: error: stray '\177' in program
    1 | <U+007F>#include<iostream>
      | ^~~~~~~~
a.cc:1:2: error: stray '#' in program
    1 | #include<iostream>
      |  ^
a.cc:1:3: error: 'include' does not name a type
    1 | #include<iostream>
      |   ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin>>a>>b>>c;
      |         ^~~
a.cc:37:9: error: 'cout' was not declared in this scope
   37 |         cout<<res<<endl;
      |         ^~~~
a.cc:37:20: error: 'endl' was not declared in this scope
   37 |         cout<<res<<endl;
      |                    ^~~~
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

tmp = list(map(int, input().split()))
tmp.sort()
a, b, c = tmp[0], tmp[1] , tmp[2]
if (b - a) % 2:
  print(c-b+(b-a+3)//2)
else:
  print(c-b + (b-a)//2)


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

tmp = list(map(int, input().split()))
tmp.sort()
a, b, c = tmp[0], tmp[1] , tmp[2]
if (b - a) % 2:
  print(c-b+(b-a+3)/2)
else:
  print(c-b + (b-a)/2)

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
        int a[3]={0};
        cin>>a[0]>>a[1]>>a[2];
        sort(a,a+3);
        int a1=a[2]-a[0],a2=a[2]-a[1];
        int n2=a1/2+a2/2;
        int n1=a1-(a1/2*2)+a2-(a2/2*2);
        if(n1%2==0)
        {
                cout<<n2+n1/2<<endl;
        }
        else
        {
                cout<<n2+(n1+3)/2<<endl;
        }
        return 0;
}
~           

Compiler output:
a.cc:21:2: error: expected class-name at end of input
   21 | ~
      |  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A,B,C;
  int a,b,c;
  int d=0;
  cin>>A>>B>>C;
  if(A>=B&&A>=C){
    a=A;b=B;c=C;
  }
  if(B>=A&&B>=C){
    a=B;b=A;c=C;
  }
  if(C>=A&&C>=B){
    a=C;b=A;c=B;
  }
  b=a-b;
  c=a-c;
  if(b%2==1){
    b=b-1;
    d++;
  }
  if(c%2==1){
    c=c-1;
    d++
  }
  d+=b/2;
  d+=c/2;
}
    
  
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:26:8: error: expected ';' before '}' token
   26 |     d++
      |        ^
      |        ;
   27 |   }
      |   ~
Language: C

#include <iostream>
#include <string>
#include <algorithm>
#include <set>
#include <numeric>
#include <climits>
#include <math.h>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define rrep(i, k, n) for(int i = (k); i < (int)(n); i++)
using namespace std;
using ll = long long;
int cnt = 0;
int main(){
    int A[3];
    rep(i, 3) cin >> A[i];
    while(!(A[0] == A[1] && A[1] == A[2])){
        sort(A, A+3);
        if(A[1] == A[2] || A[2] - A[0] > 1){
            A[0] += 2;
        }else{
            A[0]++;
            A[1]++;
        }
        cnt++;
    }
    cout << cnt << endl;
    return 0;
}

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

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

int bubsort(int, int, int);

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

	int count = 0;
	int i, j;/*変数宣言*/
	for (j = 0; j < 2; j++) {
		for ( i = 0; i < 2 - j; i++) {/*隣同士の比較を繰り返す。順を追う毎に回数が1ずつ小さくなるので、その実装に'j'を使用*/
		if (num[i] < num[i+1]) {
			swap(num[i], num[i+1]);
		}
	}
}

while (num[0] != num[1] || num[1] != num[2]) {
	if (num[1] - num[2] >= 2) {
		num[2] = num[2] + 2;
		count++;
	}
	if (num[1] - num[2] == 1) {
		num[0]++;
		num[2]++;
		count++;
	}
	if (num[1] - num[2] == 0) {
		num[1]++;
		num[2]++;
		count++;
	}
}

cout << count << '\n';

return 0;
}


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

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

int calc(int a,int b,int c){
	int max = max({a,b,c});
	if(((max - a) + (max - b) + (max - c)) % 2 == 0){
		return (max - a) + (max - b) + (max - c);
	}else{
		max += 1;
		return (max - a) + (max - b) + (max - c);
	}
}
int main(){
	int a,b,c;
	cin >> a >> b >> c;
	int delta = calc(a,b,c);
	cout << delta / 2 << endl;	
}

Compiler output:
a.cc: In function 'int calc(int, int, int)':
a.cc:6:22: error: 'max' cannot be used as a function
    6 |         int max = max({a,b,c});
      |                   ~~~^~~~~~~~~
Language: C++

import java.util.*;
import java.lang.*;
import java.io.*;

class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		int a, b, c;
		a = sc.nextInt();
		b = sc.nextInt();
		c = sc.nextInt();
		int[] arr = {a, b, c};
		Arrays.sort(arr);
		int max = arr[2];
		int diff1 = max - arr[0];
		int diff2 = max - arr[1];
		//System.out.println(diff1 + " " + diff2 + " " + max);
		if(diff1 % 2 == 0 && diff2 % 2 == 0) {
			System.out.println(diff1/2 + diff2/2);
		} else if(diff1 % 2 == 1 && diff2 % 2 == 1) {
			System.out.println(1+(diff1-1)/2 + (diff2-1)/2);
		} else if(diff1 % 2 == 0 && diff2 % 2 == 1) {
			int ans = 0;
			ans += (diff2+1)/2 + diff1/2 + 1;
			System.out.println(ans);
		} else if(diff1 % 2 == 1 && diff2 % 2 == 0) {
			int ans = 0;
			ans += (diff1+1)/2 + diff2/2 + 1;
			System.out.println(ans);
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.lang.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:15: error: expected ':' before 'static'
    7 |         public static void main (String[] args) throws java.lang.Exception
      |               ^~~~~~~
      |               :
a.cc:7:34: error: 'String' has not been declared
    7 |         public static void main (String[] args) throws java.lang.Exception
      |                                  ^~~~~~
a.cc:7:43: error: expected ',' or '...' before 'args'
    7 |         public static void main (String[] args) throws java.lang.Exception
      |                                           ^~~~
a.cc:7:47: error: expected ';' at end of member declaration
    7 |         public static void main (String[] args) throws java.lang.Exception
      |                                               ^
      |                                                ;
a.cc:7:49: error: 'throws' does not name a type
    7 |         public static void main (String[] args) throws java.lang.Exception
      |                                                 ^~~~~~
a.cc:34:2: error: expected ';' after class definition
   34 | }
      |  ^
      |  ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void){
    // Your code here!
    vector<int> a(3);
    cin>>a[0]>>a[1]>>a[2];
    sort(a.begin(),a.end());
    int ans=0;
    if(a[2]%2!=a[1]%2 or a[2]%2!=a[0]%2){
        if(a[0]%2==a[1]%2){
            a[0]++; a[1]++;
        }else if(a[0]%2==a[2]%2){
            a[0]++; a[2]++;
        }else{
            a[1]++;a[2]++;
        }
        ans=1;
    } 
    cout<<ans+(a[2]-a[1])/2+(a[2]-a[0]])/2<<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:39: error: expected ')' before ']' token
   19 |     cout<<ans+(a[2]-a[1])/2+(a[2]-a[0]])/2<<endl;
      |                             ~         ^
      |                                       )
Language: C++

#include <iostream>
using namespace std;

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

    if ((a+b+c)%2 == max(a, b, c)%2){
        cout << (3*max(a, b, c)-(a+b+c))/2 << endl;
    }
    else {
        cout << (3*(max(a, b, c)+1)-(a+b+c))/2 << 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:25:   required from here
    8 |     if ((a+b+c)%2 == max(a, b, c)%2){
      |                      ~~~^~~~~~~~~
/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;

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

    if ((a+b+c)%2 == max(a, b, c)%2){
        cout << (3*max(a, b, c)-(a+b+c))/2 << endl;
    }
    else {
        cout << (3*(max(a, b, c)+1)-(a+b+c))/2 << 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:8:25:   required from here
    8 |     if ((a+b+c)%2 == max(a, b, c)%2){
      |                      ~~~^~~~~~~~~
/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;

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

    if ((a+b+c)%2 == max(a, b, c)%2){
        cout << (3*max(a, b, c)-(a+b+c))/2 << endl;
    }
    else {
        cout << (3*(max(a, b, c)+1)-(a+b+c))/2 << 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:8:25:   required from here
    8 |     if ((a+b+c)%2 == max(a, b, c)%2){
      |                      ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~