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

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int a = sc.nextInt();
        // スペース区切りの整数の入力
        int b = sc.nextInt();
        int k = sc.nextInt();
      int tintin=b-a;
        // 文字列の入力
   
  List<Integer> list = new ArrayList<Integer>();
  
      
      if(b-a-1+2>=k*2){
 		 for(i=0;i<k;i++){
  		  list.add(a+i);
		}
  
		  for(i=0;i<k;i++){
 		 	list.add(b-k+1+i);
 		 }
      }else{
      for(i=0;i<=tintin;i++){
      	list.add(a+i);
      	}
      }
 
      for (Integer unti: list){
  System.out.println(unti);
}
      
	}
}

Compiler output:
Main.java:17: error: cannot find symbol
 		 for(i=0;i<k;i++){
 		     ^
  symbol:   variable i
  location: class Main
Main.java:17: error: cannot find symbol
 		 for(i=0;i<k;i++){
 		         ^
  symbol:   variable i
  location: class Main
Main.java:17: error: cannot find symbol
 		 for(i=0;i<k;i++){
 		             ^
  symbol:   variable i
  location: class Main
Main.java:18: error: cannot find symbol
  		  list.add(a+i);
  		             ^
  symbol:   variable i
  location: class Main
Main.java:21: error: cannot find symbol
		  for(i=0;i<k;i++){
		      ^
  symbol:   variable i
  location: class Main
Main.java:21: error: cannot find symbol
		  for(i=0;i<k;i++){
		          ^
  symbol:   variable i
  location: class Main
Main.java:21: error: cannot find symbol
		  for(i=0;i<k;i++){
		              ^
  symbol:   variable i
  location: class Main
Main.java:22: error: cannot find symbol
 		 	list.add(b-k+1+i);
 		 	               ^
  symbol:   variable i
  location: class Main
Main.java:25: error: cannot find symbol
      for(i=0;i<=tintin;i++){
          ^
  symbol:   variable i
  location: class Main
Main.java:25: error: cannot find symbol
      for(i=0;i<=tintin;i++){
              ^
  symbol:   variable i
  location: class Main
Main.java:25: error: cannot find symbol
      for(i=0;i<=tintin;i++){
                        ^
  symbol:   variable i
  location: class Main
Main.java:26: error: cannot find symbol
      	list.add(a+i);
      	           ^
  symbol:   variable i
  location: class Main
12 errors
Language: C

#include<stdio.h>
int main(void){
  int A;
  int B;
  int K;
  int i;
  scanf("%d %d %d", &A , &B ,&K);
  for(i = A;i <= B;i++){
    if((A + (k - 1) - i >= 0 || (B - (K - 1)) - i <= 0){
      printf("%d",i);
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:14: error: 'k' undeclared (first use in this function)
    9 |     if((A + (k - 1) - i >= 0 || (B - (K - 1)) - i <= 0){
      |              ^
main.c:9:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:56: error: expected ')' before '{' token
    9 |     if((A + (k - 1) - i >= 0 || (B - (K - 1)) - i <= 0){
      |       ~                                                ^
      |                                                        )
main.c:12:3: error: expected expression before '}' token
   12 |   }
      |   ^
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int a = sc.nextInt();
        // スペース区切りの整数の入力
        int b = sc.nextInt();
        int k = sc.nextInt();
      int tintin=b-a;
        // 文字列の入力
   
  List<int> list = new ArrayList<int>();
  
      
      if(b-a-1+2>=k*2){
 		 for(i=0;i<k;i++){
  		  list.add(a+i);
		}
  
		  for(i=0;i<k;i++){
 		 	list.add(b-k+1+i);
 		 }
      }else{
      for(i=0;i<=tintin;i++){
      	list.add(a+i);
      	}
      }
 
      for (int unti: list){
  System.out.println(unti);
}
      
	}
}

Compiler output:
Main.java:13: error: unexpected type
  List<int> list = new ArrayList<int>();
       ^
  required: reference
  found:    int
Main.java:13: error: unexpected type
  List<int> list = new ArrayList<int>();
                                 ^
  required: reference
  found:    int
Main.java:17: error: cannot find symbol
 		 for(i=0;i<k;i++){
 		     ^
  symbol:   variable i
  location: class Main
Main.java:17: error: cannot find symbol
 		 for(i=0;i<k;i++){
 		         ^
  symbol:   variable i
  location: class Main
Main.java:17: error: cannot find symbol
 		 for(i=0;i<k;i++){
 		             ^
  symbol:   variable i
  location: class Main
Main.java:18: error: cannot find symbol
  		  list.add(a+i);
  		             ^
  symbol:   variable i
  location: class Main
Main.java:21: error: cannot find symbol
		  for(i=0;i<k;i++){
		      ^
  symbol:   variable i
  location: class Main
Main.java:21: error: cannot find symbol
		  for(i=0;i<k;i++){
		          ^
  symbol:   variable i
  location: class Main
Main.java:21: error: cannot find symbol
		  for(i=0;i<k;i++){
		              ^
  symbol:   variable i
  location: class Main
Main.java:22: error: cannot find symbol
 		 	list.add(b-k+1+i);
 		 	               ^
  symbol:   variable i
  location: class Main
Main.java:25: error: cannot find symbol
      for(i=0;i<=tintin;i++){
          ^
  symbol:   variable i
  location: class Main
Main.java:25: error: cannot find symbol
      for(i=0;i<=tintin;i++){
              ^
  symbol:   variable i
  location: class Main
Main.java:25: error: cannot find symbol
      for(i=0;i<=tintin;i++){
                        ^
  symbol:   variable i
  location: class Main
Main.java:26: error: cannot find symbol
      	list.add(a+i);
      	           ^
  symbol:   variable i
  location: class Main
14 errors
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int a = sc.nextInt();
        // スペース区切りの整数の入力
        int b = sc.nextInt();
        int k = sc.nextInt();
      int tintin=b-a;
        // 文字列の入力
   
  List<int> list = new ArrayList<int>();
  
      
      if(b-a-1+2>=<k*2){
 		 for(i=0;i<k;i++){
  		  list.add(a+i);
		}
  
		  for(i=0;i<k;i++){
 		 	list.add(b-k+1+i);
 		 }
      }else{
      for(i=0;i<=tintin;i++){
      	list.add(a+i);
      }
      }
  
	}
}

Compiler output:
Main.java:16: error: > or ',' expected
      if(b-a-1+2>=<k*2){
                    ^
1 error
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int a = sc.nextInt();
        // スペース区切りの整数の入力
        int b = sc.nextInt();
        int k = sc.nextInt();
        // 文字列の入力
      
      if(b-a-1==k)
    int[] a = java.util.stream.IntStream.rangeClosed(a, b).toArray();
      System.out.println(Arrays.asList(strAry));
    }else{
      break;
    }
   
  List<int> list = new ArrayList<int>();
  
  for(i=0;i<k;i++){
    list.add(a+i)
}
  
  for(i=0;i<k;i++){
  	list.add(b-i)
  }
  
  
}
}
    

Compiler output:
Main.java:13: error: variable declaration not allowed here
    int[] a = java.util.stream.IntStream.rangeClosed(a, b).toArray();
          ^
Main.java:15: error: illegal start of type
    }else{
     ^
Main.java:21: error: illegal start of type
  for(i=0;i<k;i++){
  ^
Main.java:21: error: <identifier> expected
  for(i=0;i<k;i++){
       ^
Main.java:21: error: > or ',' expected
  for(i=0;i<k;i++){
             ^
Main.java:21: error: <identifier> expected
  for(i=0;i<k;i++){
               ^
Main.java:22: error: ';' expected
    list.add(a+i)
                 ^
Main.java:25: error: illegal start of type
  for(i=0;i<k;i++){
  ^
Main.java:25: error: <identifier> expected
  for(i=0;i<k;i++){
       ^
Main.java:25: error: > or ',' expected
  for(i=0;i<k;i++){
             ^
Main.java:25: error: <identifier> expected
  for(i=0;i<k;i++){
               ^
Main.java:26: error: ';' expected
  	list.add(b-i)
  	             ^
Main.java:31: error: class, interface, enum, or record expected
}
^
13 errors
Language: C

#include<stdio.h>
int main(){
  int A,B,K,i;
  scanf("%d %d %d",&A,&B,&K);
  if(B-A<2K){
    for(i=A;i<=B;i++){
      printf("%d\n",i);
    }
  }else{
    for(i=0;i<K;i++){
      printf("%d\n",A+i);
    }for(i=0;i<K;i++){
      printf("%d\n",B-K+1+i);
    }
  }
}


Compiler output:
main.c: In function 'main':
main.c:5:10: error: fixed-point types not supported for this target
    5 |   if(B-A<2K){
      |          ^~
Language: C++

//#include <bits/stdc++.h>
#include "bits:stdc++.h"
#define INF 1234567890987654321
typedef int ll;
using namespace std;
//set <char> s;
ll a, b, k, stop, arr[1001], size;
int main()
{
	freopen("inputfile.cpp", "r", stdin);
	cin >> a >> b >> k;
	for(ll i = a; i < min(a+k, b+1); i++)
	{
		cout << i << '\n';
		stop = i;
	}
	for(ll i = b; i > stop; i--)
	{
		arr[size++] = i;
	}
	sort(arr, arr+size);
	for(ll i = 0; i < size; i++)
	{
		cout << arr[i] << '\n';
	}
}


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

#include "stdio.h"
int main()
{
	long A, B;
	long i;
	int k,start;

	long smallcount = 0;
	long th;
	scanf_s("%ld %ld %d",&A,&B,&k);
	th = B - k;
	if (th < A)th = A;
	for (i = A; i <= B; i++, smallcount++) {
		if (smallcount < k) {
			printf("%ld\n", i);
		}
		else if(i > th) {
			printf("%ld\n", i);
		}
	}

	return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
int x[100];
int main()
{
	int n,m,i,j,a,flag,b,k,num=0
	scanf("%d %d %d",&a,&b,&k);
	for(i=a;i<a+k;i++)
	{
		printf("%d\n",i);
		x[num++]=i;
	}
	for(i=b-k+1;i<=b;i++)
	{
		flag=0;
		for(j=1;j<=num;j++)
		{
			if(i==x[j])
				flag=1;
		}
		if(flag==0)
			printf("%d\n",i);
	}
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected ',' or ';' before 'scanf'
    7 |         scanf("%d %d %d",&a,&b,&k);
      |         ^~~~~
Language: Java


import java.util.HashSet;
import java.util.Scanner;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author rn-sshawish
 */
public class Atcoder93B {

    public static void main(String[] args) {
        HashSet<Integer> values = new HashSet<>();
        Scanner input = new Scanner(System.in);
        int a = input.nextInt();
        int b = input.nextInt();
        int k = input.nextInt();
        int acopy = a;
        StringBuilder out = new StringBuilder();

        for (int i = 0; i < k && acopy <= b; i++) {
            out.append(acopy).append("\n");
            values.add(acopy);
            acopy++;
        }
        int secandCopy = Math.max(a, b - k) + 1;
        for (int i = 0; i < k && secandCopy <= b; i++) {
            if (!values.contains(secandCopy)) {
                out.append(secandCopy).append("\n");
                values.add(secandCopy);
            }
            secandCopy++;
        }
        System.out.print(out);
    }
}


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

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <queue>
#include <sstream>
#include <stack>
#include <time.h>
#include <vector>
#include <complex>
using namespace std;
int main(){
  long long a,b,n;
  cin>>a>>b>>n;
  if (n > b - a + 1)
    for (int i=a;i<=b;i++)
      cout<<i<<endl;
  else{
    for (int j=a;j<=a+n-1;j++)
      cout<<j<<endl;
    for (int q=b-n+1;q<=b;q++)
      cout<<q<<endl;
  system ("pause");
  return 0;
}

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

#include<stdio.h>
int main(){
  int A,B,K,i;
  scanf("%d %d %d",&A,&B,&K);
  for(i=0;i<K;i++){
    printf("%d\n",A+i);
  }for(i=0;i<K;i++){
    print("%d\n",B-K+1+i);
  }
}


Compiler output:
main.c: In function 'main':
main.c:8:5: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
    8 |     print("%d\n",B-K+1+i);
      |     ^~~~~
      |     printf
Language: C++

#include <iostream>
#include <string>
#include <string.h>
#include <map>
#include <set>
#include <vector>
#include <stdio.h>
#include <math.h>
#include <algorithm>
#include <queue>
#include <cmath>
#include <cstdio>
using namespace std;
int a,b,k,ans[100];
bool ok[1000000010];
int main(){
cin>>a>>b>>k;
for(int i=a;i-a<k&&i<b;i++)
ok[i]=true;
for(int i=b;b-i<k&&i>a;i--)
ok[i]=true;
for(int i=a;i-a<k;i++)
if(ok[i])
{
ok[i]=0;
cout<<i<<endl;}
for(int i=b;b-i<k;i--)
if(ok[i])3
cout<<i<<endl;
system("pause");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:11: error: expected ';' before 'cout'
   28 | if(ok[i])3
      |           ^
      |           ;
   29 | cout<<i<<endl;
      | ~~~~
Language: C++

#include<string>
#include<string.h>
#include<map>
#include<set>
#include<vector>
#include<stdio.h>
#include<algorithm>
#include<queue>
using namespace std;
int main()
{ 
  int a,b,k;
  cin>>a>>b>>k;
  int c;
  c=b-a+1;
  if(k*2>=c){
    for(int i;i>=a and i<=b;i++){
       cout<<i<<endl; 
       system("pause");
  return 0;
    }
  }
  else{
  for(int j;j>=a and j<=a+k;j++)
     cout<<j<<endl;
  for(int n;n<=b and n>=b-k;n--){
     cout<<n<<endl;
     system("pause");
     return 0;
     }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'cin' was not declared in this scope
   13 |   cin>>a>>b>>k;
      |   ^~~
a.cc:9:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    8 | #include<queue>
  +++ |+#include <iostream>
    9 | using namespace std;
a.cc:18:8: error: 'cout' was not declared in this scope
   18 |        cout<<i<<endl;
      |        ^~~~
a.cc:18:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:17: error: 'endl' was not declared in this scope
   18 |        cout<<i<<endl;
      |                 ^~~~
a.cc:9:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    8 | #include<queue>
  +++ |+#include <ostream>
    9 | using namespace std;
a.cc:25:6: error: 'cout' was not declared in this scope
   25 |      cout<<j<<endl;
      |      ^~~~
a.cc:25:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:25:15: error: 'endl' was not declared in this scope
   25 |      cout<<j<<endl;
      |               ^~~~
a.cc:25:15: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:27:6: error: 'cout' was not declared in this scope
   27 |      cout<<n<<endl;
      |      ^~~~
a.cc:27:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:27:15: error: 'endl' was not declared in this scope
   27 |      cout<<n<<endl;
      |               ^~~~
a.cc:27:15: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <iostream>
#include <string>
using namespace std;
void f(int a,int b,int k)
{
    for(int i=a;i<a+k;i++)
        cout<<i<<endl;
    for(int i=b-k+1;i<=b;i++)
        cout<<i<<endl;
}
int main()
{
    int a,b,k;
    cin>>a>>b>>k;
    if(k>(b-a)/2)
        for(int i=a; i<=b; i++)
            cout<<i<<endl;
    else if(k==(b-a))
        if((b-a)%2==0)
        {
            for(int i=a; i<=b; i++)
                cout<<i<<endl;
        }
        else
            f(a,b,k);
    else
        f(a,b,k);
    return 0;
}
#include <iostream>
#include <string>
using namespace std;
void f(int a,int b,int k)
{
    for(int i=a;i<a+k;i++)
        cout<<i<<endl;
    for(int i=b-k+1;i<=b;i++)
        cout<<i<<endl;
}
int main()
{
    int a,b,k;
    cin>>a>>b>>k;
    if(k>(b-a)/2)
        for(int i=a; i<=b; i++)
            cout<<i<<endl;
    else if(k==(b-a))
        if((b-a)%2==0)
        {
            for(int i=a; i<=b; i++)
                cout<<i<<endl;
        }
        else
            f(a,b,k);
    else
        f(a,b,k);
    return 0;
}
#include <iostream>
#include <string>
using namespace std;
void f(int a,int b,int k)
{
    for(int i=a;i<a+k;i++)
        cout<<i<<endl;
    for(int i=b-k+1;i<=b;i++)
        cout<<i<<endl;
}
int main()
{
    int a,b,k;
    cin>>a>>b>>k;
    if(k>(b-a)/2)
        for(int i=a; i<=b; i++)
            cout<<i<<endl;
    else if(k==(b-a))
        if((b-a)%2==0)
        {
            for(int i=a; i<=b; i++)
                cout<<i<<endl;
        }
        else
            f(a,b,k);
    else
        f(a,b,k);
    return 0;
}


Compiler output:
a.cc:33:6: error: redefinition of 'void f(int, int, int)'
   33 | void f(int a,int b,int k)
      |      ^
a.cc:4:6: note: 'void f(int, int, int)' previously defined here
    4 | void f(int a,int b,int k)
      |      ^
a.cc:40:5: error: redefinition of 'int main()'
   40 | int main()
      |     ^~~~
a.cc:11:5: note: 'int main()' previously defined here
   11 | int main()
      |     ^~~~
a.cc:62:6: error: redefinition of 'void f(int, int, int)'
   62 | void f(int a,int b,int k)
      |      ^
a.cc:4:6: note: 'void f(int, int, int)' previously defined here
    4 | void f(int a,int b,int k)
      |      ^
a.cc:69:5: error: redefinition of 'int main()'
   69 | int main()
      |     ^~~~
a.cc:11:5: note: 'int main()' previously defined here
   11 | int main()
      |     ^~~~
Language: C++

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

int main(){
	int a, b, k;
	cin >> a >> b >> k;
	if(b-a<2*k){
		for(int i=0; i<k; i++){
			cout << a + i << endl;
		}
		for(int i=k; i>0; i--){
			cout << b - i + 1 << endl;
		}
	} else {
		for(int i=A; i<=B; i++){
			cout << i << endl;
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:27: error: 'A' was not declared in this scope
   16 |                 for(int i=A; i<=B; i++){
      |                           ^
a.cc:16:33: error: 'B' was not declared in this scope
   16 |                 for(int i=A; i<=B; i++){
      |                                 ^
Language: C++

#include<iostream>
using namespace std;
int main() {
    int a, b, c;
    cin >> a >> b >> c;
    for (int i = a[0]; i <= a[1]; i++) {
            if (i < a + c || i > b - c) {
                cout << i << endl;
            }
     }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: invalid types 'int[int]' for array subscript
    6 |     for (int i = a[0]; i <= a[1]; i++) {
      |                   ^
a.cc:6:30: error: invalid types 'int[int]' for array subscript
    6 |     for (int i = a[0]; i <= a[1]; i++) {
      |                              ^
Language: C++

#include <cstdio>
using namespace std;


int main(){
    int A,B,K;

    scanf("%d %d %d",&A,&B,&K);

    for{int i=A,i<A+K;i++}{
        printf("%d \n", i);   
    }
    for{int i=B-K+1,i<=B;i++}{
        printf("%d \n", i);   
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: expected '(' before '{' token
   10 |     for{int i=A,i<A+K;i++}{
      |        ^
      |        (
a.cc:10:8: error: expected primary-expression before '{' token
a.cc:10:27: error: expected primary-expression before '{' token
   10 |     for{int i=A,i<A+K;i++}{
      |                           ^
a.cc:10:27: error: expected ';' before '{' token
   10 |     for{int i=A,i<A+K;i++}{
      |                           ^
      |                           ;
a.cc:10:27: error: expected primary-expression before '{' token
a.cc:10:27: error: expected ')' before '{' token
   10 |     for{int i=A,i<A+K;i++}{
      |        ~                  ^
      |                           )
a.cc:11:25: error: 'i' was not declared in this scope
   11 |         printf("%d \n", i);
      |                         ^
a.cc:13:8: error: expected '(' before '{' token
   13 |     for{int i=B-K+1,i<=B;i++}{
      |        ^
      |        (
a.cc:13:8: error: expected primary-expression before '{' token
a.cc:13:30: error: expected primary-expression before '{' token
   13 |     for{int i=B-K+1,i<=B;i++}{
      |                              ^
a.cc:13:30: error: expected ';' before '{' token
   13 |     for{int i=B-K+1,i<=B;i++}{
      |                              ^
      |                              ;
a.cc:13:30: error: expected primary-expression before '{' token
a.cc:13:30: error: expected ')' before '{' token
   13 |     for{int i=B-K+1,i<=B;i++}{
      |        ~                     ^
      |                              )
a.cc:14:25: error: 'i' was not declared in this scope
   14 |         printf("%d \n", i);
      |                         ^
Language: C++

for(int i=0; i<c; i++)
	{
		cout<<a+i<<endl;
	}

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'for'
    1 | for(int i=0; i<c; i++)
      | ^~~
a.cc:1:14: error: 'i' does not name a type
    1 | for(int i=0; i<c; i++)
      |              ^
a.cc:1:19: error: 'i' does not name a type
    1 | for(int i=0; i<c; i++)
      |                   ^
Language: C++

a, b, k = map(int, input().split())
if b - a + 1 <= k*2:
    for i in range(a, b+1):
        print(i)
else:
    for i in range(a, a+k):
        print(i)
    for i in range(b-k+1, b+1):
        print(i)
    

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a, b, k = map(int, input().split())
      | ^
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 all(x) (x).begin(),(x).end()
using namespace std;
using ll = long long;
using vint = vector<int>;

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

	ll int a, b, k;
	cin >> a >> b >> k;
	for (int i = a; i <= b; ++i){
		if (i <= a+k || i >= b-k){
			cout << i << "\n";
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: two or more data types in declaration of 'a'
   15 |         ll int a, b, k;
      |         ^~
a.cc:15:9: error: two or more data types in declaration of 'b'
a.cc:15:9: error: two or more data types in declaration of 'k'
a.cc:16:16: error: 'a' was not declared in this scope
   16 |         cin >> a >> b >> k;
      |                ^
a.cc:16:21: error: 'b' was not declared in this scope
   16 |         cin >> a >> b >> k;
      |                     ^
a.cc:16:26: error: 'k' was not declared in this scope
   16 |         cin >> a >> b >> k;
      |                          ^
Language: C++

#include<set>
#include<iostream>
using namespace std;
int main(){
int a,b,k;
cin>>a>>b>>k
set<int> s;
for(int i=a;i<=b;i++){
if(i<=a+k-1)
s.insert(i);
if(i>=a-k+1)
s.insert(i);
}
for(auto i:s)
cout<<i<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected ';' before 'set'
    6 | cin>>a>>b>>k
      |             ^
      |             ;
    7 | set<int> s;
      | ~~~          
a.cc:10:1: error: 's' was not declared in this scope
   10 | s.insert(i);
      | ^
a.cc:12:1: error: 's' was not declared in this scope
   12 | s.insert(i);
      | ^
a.cc:14:12: error: 's' was not declared in this scope
   14 | for(auto i:s)
      |            ^
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<utility>
#include<queue>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<map>
#include<complex>
#define INF 2147483647
#define llINF 9223372036854775807
#define pb push_back
#define mp make_pair 
#define F first
#define S second
#define ll long long

using namespace std;
int main(){
  int a,b,c,d;
  string str,strr;
  cin>>a>>b>>c;
  bool flag=false;
  for(int i=a;i<=a+k||i<=b;i++){
    cout<<i<<endl;
    if(i==b){flag=true;break;}
   
	}
  int ij=max(b-k,a+k);
  if(flag==false){
  for(int i=ij;i<=b;i++)
    cout<<i<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:20: error: 'k' was not declared in this scope
   27 |   for(int i=a;i<=a+k||i<=b;i++){
      |                    ^
a.cc:32:16: error: 'k' was not declared in this scope
   32 |   int ij=max(b-k,a+k);
      |                ^
Language: C++

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

int main(){
int d[2];
  for(int i=0;i<3;i++) cin >> d[i];
  sort(d,d+2);
  int a=d[0];
  int b=d[1];
  int c=d[2];
  int count=0;
if((a+b+c)%2==1){
count+=c-b;
a+=c-b;  
if((c-a)%2==0)count+=(c-a)/2;
  else{
  count+=(c-a)/2+1
  }
}
else{
count+=(c-b)/2;
count+=(c-a)/2;  

}
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:19: error: expected ';' before '}' token
   17 |   count+=(c-a)/2+1
      |                   ^
      |                   ;
   18 |   }
      |   ~
Language: C++

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

int main() {
  int x, y;
  int a[10];
  cin >> a[0] >> a[1] >> a[2];

  sort(a.begin(), a.end());
  x = a[2] - a[0];
  y = a[2] - a[1];

  if(x % 2 == 0 && y % 2 == 0){
    // 1つ選んで２増やす の条件から2で割れるか判定
    cout << x / 2 + y / 2 << endl;
    // xとｙも２の倍数分の操作回数を足す
  }else if(x % 2 == 0 || y % 2 == 0){
    // 一方は1つ選んで２増やす の条件が成立するとき
    cout << x / 2 + y / 2 + 1 << endl;
    // +1 は２つ選んで1増やす を1回操作
  }else{
    cout << x / 2 + y / 2 + 1 << endl;
    // x,yとも奇数でも +1 は1回操作
  }

}



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

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

int main() {
  int x, y;
  int a[10];
  cin >> a[0] >> a[1] >> a[2];

  sort(a.begin(), a,end());
  x = a[2] - a[0];
  y = a[2] - a[1];

  if(x % 2 == 0 && y % 2 == 0){
    // 1つ選んで２増やす の条件から2で割れるか判定
    cout << x / 2 + y / 2 << endl;
    // xとｙも２の倍数分の操作回数を足す
  }else if(x % 2 == 0 || y % 2 == 0){
    // 一方は1つ選んで２増やす の条件が成立するとき
    cout << x / 2 + y / 2 + 1 << endl;
    // +1 は２つ選んで1増やす を1回操作
  }else{
    cout << x / 2 + y / 2 + 1 << endl;
    // x,yとも奇数でも +1 は1回操作
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: request for member 'begin' in 'a', which is of non-class type 'int [10]'
    9 |   sort(a.begin(), a,end());
      |          ^~~~~
a.cc:9:24: error: no matching function for call to 'end()'
    9 |   sort(a.begin(), a,end());
      |                     ~~~^~
In file included from /usr/include/c++/14/bits/algorithmfwd.h:39,
                 from /usr/include/c++/14/bits/stl_algo.h:59,
                 from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/initializer_list:99:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
   99 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
/usr/include/c++/14/initializer_list:99:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/range_access.h:74:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/bits/range_access.h:74:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:85:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/bits/range_access.h:85:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:106:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/usr/include/c++/14/bits/range_access.h:106:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/valarray:1249:5: note: candidate: 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1249 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/valarray:1249:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/valarray:1265:5: note: candidate: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/valarray:1265:5: note:   candidate expects 1 argument, 0 provided
Language: C++

#include <iostream>
using namespace std;

int main(){
  int A, B, C;
  cin >> A >> B >> C;
  int ans = 0;
  int max = max(A, max(B,C));
  int min = min(A, min(B,C));
  int med = A+B+C-max-min;
  if(max%2==(A+B+C)%2){
    cout <<  max-med+(med-min)/2;
  }else{
    cout << max-med+(med-min+1)/2;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: 'max' cannot be used as a function
    8 |   int max = max(A, max(B,C));
      |                    ~~~^~~~~
a.cc:8:28: error: 'max' cannot be used as a function
    8 |   int max = max(A, max(B,C));
      |                            ^
a.cc:9:23: error: 'min' cannot be used as a function
    9 |   int min = min(A, min(B,C));
      |                    ~~~^~~~~
a.cc:9:28: error: 'min' cannot be used as a function
    9 |   int min = min(A, min(B,C));
      |                            ^
Language: C++

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

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

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

    sort(a.begin(),a.end(),greater<int>());

    int ans=0;^
    ans+=a[0]-a[1];
    ans+=(a[1]-a[2])/2;
    ans+=((a[1]-a[2])%2)*2;

    cout<<ans<<"\n";

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: expected primary-expression before '^' token
   14 |     int ans=0;^
      |               ^
Language: C

#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i,n) for(int i=0;i<(n);++i)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)
#define all(x) (x).begin(), (x).end()
#define PI 3.14159265358979323846264338327950L
using namespace std;
typedef long long ll;
typedef long double ld;
int main() {
    vector<int> s(3);
    rep(i,3) cin>>s[i];
    sort(all(s));
    int a=s[2],b=s[1],c=s[0],cnt=0;
    if((a-b)%2==(a-c)%2) cnt=a-b+(b-c)/2;
    else cnt=a-b+(b-c+1)/2+1;
    cout<<cnt;
}

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

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int a[4],ans=0;
	cin>>a[1]>>a[2]>>a[3];
	while(a[1]!=a[2]||a[2]!=a[3]||a[1]!=a[3])
	{
		sort(a+1,a+4);
		if(a[2]!=a[3])
		a[1]++;
		a[2]++;
		else
		a[1]+=2;
		ans++;	
	}
	cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'else' without a previous 'if'
   14 |                 else
      |                 ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define ALL(x) (x).begin(), (x).end()
typedef long long ll;
typedef pair<int, int> pii;
const int INF = 1e9;
const int MOD = 1000000007;
const double PI = acos(-1);
int dx[4] = {0,1,0,-1};
int dy[4] = {1,0,-1,0};

void solve() {
	int a, b, c;
	cin >> a >> b >> c;
	int s = a + b + c;
	int mx = max(a, b, c);
	if (s % 2 == mx % 2) {
		cout << (mx * 3 - s) / 2 << endl;
	} else {
		cout << ((mx + 1) * 3 - s) / 2 << endl;
	}
}

int main() {
	solve();
	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:17:14:   required from here
   17 |         int mx = max(a, b, c);
      |                  ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
bool comp(pair<long long int,long long int>a,pair<long long int,long long int>b)
{
    if(a.first==b.first)
    {
        if(a.second<=b.second)
        return true;
        else
        return false;
    }
    if(a.first>b.first)
    return true;
    else return false;
}
bool rev(long long int a,long long int b)
{
    if(a>b)return true;
    else return false;
}
bool compa(pair<string,pair<int,int>>a,pair<string,pair<int,int>>b)
{
    if(a.first==b.first)
    {
        if(a.second.first>b.second.first)
        return true;
        else
        return false;
    }
    if(a.first<b.first)
    return true;
    else 
    return false;
}
long long int gcd(long long int bdda,long long int chota)
{
    if(chota==0)
        return bdda;
    return gcd(chota,bdda%chota);
}
void solve()
{
    long long int p,q,r,ans;
    cin>>p>>q>>r;
    if((3*max({p,q,r})-(p+q+r))%2==0)
    cout<<((3*max({p,q,r})-(p+q+r))/2;
    else
    cout<<((3*max({p,q,r})+1-(p+q+r))/2;
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;    
    t=1;

    //cin>>t;
    while(t--)
    {
        solve();
    }
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:46:38: error: expected ')' before ';' token
   46 |     cout<<((3*max({p,q,r})-(p+q+r))/2;
      |           ~                          ^
      |                                      )
a.cc:48:40: error: expected ')' before ';' token
   48 |     cout<<((3*max({p,q,r})+1-(p+q+r))/2;
      |           ~                            ^
      |                                        )
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);
        Integer[] arr = new Integer[3];
        int total = 0;
        for(int i = 0; i < 3; i++) {
            arr[i] = sc.nextInt();
            total += arr[i];
        }
        Arrays.sort(arr, Collections.reverseOrder());

        int cnt = 0;
        while(total%3!=0 || arr[0]*3>total) {
            cnt++;
            total+=2;
        }
        System.out.println(cnt);
    }
}


Compiler output:
Main.java:13: error: cannot find symbol
        Arrays.sort(arr, Collections.reverseOrder());
                         ^
  symbol:   variable Collections
  location: class Main
1 error
Language: C++

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

void slove(){
    int a[3];
    cin >> a[0]>>a[1]>>a[2];
    sort(a,a+3);
    int ans = 0;
    if((a[1] - a[0])%2){
        a[2]++;
        a[0]++;
        ans++;
    }
    ans += (a[1] - a[0])/2;
    int x = a[2] - a[1];
    if(x%2) ans++;
    ans+=(x/2)*2;
    cout<<ans<<endl;
}

int main(){
    cin.tie(0);
    slove();
    return 0;


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

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

int main(void){
    vector<int>a(3);
    int s = 0;
    for(int i = 0;i < 3;i++){
          cin >> a[i]
          s += a[i];
    }
    sort(a.begin(),a.end());
    int t = a[2] * 3;
    int ans = (t - sum) / 2 + (t - sum) % 2 * 2;
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: expected ';' before 's'
    9 |           cin >> a[i]
      |                      ^
      |                      ;
   10 |           s += a[i];
      |           ~           
a.cc:12:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   12 |     sort(a.begin(),a.end());
      |     ^~~~
      |     short
a.cc:14:20: error: 'sum' was not declared in this scope
   14 |     int ans = (t - sum) / 2 + (t - sum) % 2 * 2;
      |                    ^~~
Language: C++

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

int main() {
  int A,B,C;
  cin >> A >> B >> c;
  vector<int>data(2);
  data.at(0)=A;
  data.at(1)=B;
  data.at(2)=C;
  sort(data.begin(),data.end());
  if((data.at(0)+data.at(1))%2!=0){
    cout << ((data.at(2)+1)*2-data.at(1)-data.at(0)+1)/2 << endl;
  }
  else{
    cout << (data.at(2)*2-data.at(1)-data.at(0))/2 << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: 'c' was not declared in this scope
    6 |   cin >> A >> B >> c;
      |                    ^
Language: C++

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

int main(){
  vector<int> vec(3);
  cin >> vec[0] >> vec[1] >> vec[2];
  
  sort(vec.begin((), vec.end());
  
  int A,B,C;
  A = vec[0];
  B = vec[1];
  C = vec[2];
  
  int n,t;
  n = A-B;
  t = B-C;
  
  if(t%2 == 0) cout << n + t/2 << endl;
  else cout << n + t/2 + 2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected primary-expression before ')' token
    9 |   sort(vec.begin((), vec.end());
      |                   ^
Language: C++

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

int main(){
  vector<int> vec(3);
  cin >> vec[0] >> vec[1] >> vec[2];
  
  int A,B,C;
  A = vec[0];
  B = vec[1];
  C = vec[2];
  
  int n,t;
  n = A-B;
  t = B-C;
  
  if(t%2 == 0) cout << n + t/2 << endl;
  else cout << n + t/2 + 2 << endl;
}

Compiler output:
a.cc:3:2: error: invalid preprocessing directive #defaine; did you mean #define?
    3 | #defaine rep(i,n) for(int i=0; i<n; i++)
      |  ^~~~~~~
      |  define
Language: C++

//   __________________
//  | ________________ |
//  ||          ____  ||
//  ||   /\    |      ||
//  ||  /__\   |      ||
//  || /    \  |____  ||
//  ||________________||
//  |__________________|
//  \###################\
//   \###################\
//    \        ____       \
//     \_______\___\_______\
// An AC a day keeps the doctor away.

#pragma GCC optimize("Ofast")
#pragma loop_opt(on)
#include <bits/extc++.h>
#ifdef local
#define safe std::cerr<<__PRETTY_FUNCTION__<<" line "<<__LINE__<<" safe\n"
#define debug(...) qqbx(#__VA_ARGS__,  __VA_ARGS__)
template <typename H, typename ...T> constexpr void qqbx(const char *s, const H &h, T &&...args) {
    for(; *s && *s != ','; ++s) if(*s != ' ') std::cerr << *s;
    std::cerr << " = " << h << (sizeof...(T) ? ", " : "\n");
    if constexpr(sizeof...(T)) qqbx(++s, args...); // C++ 17!
}
#else
#include <bits/stdc++.h>
#define debug(...) ((void)0)
#define safe ((void)0)
#endif // local
#define all(v) begin(v),end(v)
#define get_pos(v,x) (lower_bound(begin(v),end(v),x)-begin(v))
#define sort_uni(v) sort(begin(v),end(v)),v.erase(unique(begin(v),end(v)),end(v))
#define pb emplace_back
#define ff first
#define ss second
#define mem(v,x) memset(v,x,sizeof v)

using namespace std;
using namespace __gnu_pbds;
typedef int64_t ll;
typedef long double ld;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pld;
template <typename T> using max_heap = std::priority_queue<T,vector<T>,less<T> >;
template <typename T> using min_heap = std::priority_queue<T,vector<T>,greater<T> >;
template <typename T> using rbt = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
constexpr ld PI = acos(-1), eps = 1e-7;
constexpr ll N = 200025, INF = 1e18, MOD = 1000000007, K = 357, inf = 1e9;
constexpr inline ll cdiv(ll x, ll m) { return x/m + ((x<0 ^ m>0) && (x%m)); } // ceiling divide
constexpr inline ll modpow(ll e,ll p,ll m=MOD) { ll r=1; for(e%=m;p;p>>=1,e=e*e%m) if(p&1) r=r*e%m; return r; }

signed main() {
    ios_base::sync_with_stdio(0), cin.tie(0);
    int a,b,c,s;
    cin >> a >> b >> c;
    s = max(a,b,c);
    if(s^a^b^c & 1) ++s;
    cout << s*3 - a-b-c << '\n';
}



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 /usr/include/x86_64-linux-gnu/c++/14/bits/extc++.h:32,
                 from a.cc:17:
/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:57:12:   required from here
   57 |     s = max(a,b,c);
      |         ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    6 |     int d = max({a, b, c}) * 3 - (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
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
ll max3(ll x,ll y,ll z){
  ll max;
  if(x>y){
    max=x;
  }else{
    max=y;
  }
  if(max>z){
    max=z;
  }
  return max;
}
int main(void){
  ll a,b,c,ans;
  cin>>a>>b>>c;
  ll max=max3(a,b,c);
  max*=3;
  ll sum=a+b+c;
  if( (max%2)==(sum%2) ){
    ans=(max-sum)/2;
  }else{
    ans=m-d+3/2;
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:9: error: 'm' was not declared in this scope
   25 |     ans=m-d+3/2;
      |         ^
a.cc:25:11: error: 'd' was not declared in this scope
   25 |     ans=m-d+3/2;
      |           ^
Language: C++

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

int main(){
    vector<int> a(3);
    int ans;
    cin >> a[0] >> a[1] >> a[2];
    /**/
    sort(a.begin(),a.end());
    int x = a.at(2) - a.at(0);
    int y = a.at(2) - a.at(1);

    //cout << x << " " << y << endl;

    if(x%2 == y%2){
        ans = (x + y)/2;
    }
    else{
        ans = (x + y + 1)/2;
        ans++;
    }

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

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

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

int main(){
    vector<int> a(3);
    int ans;
    cin >> a[0] >> a[1] >> a[2];
    /**/
    sort(a.begin(),a.end());
    int x = a.at(2) - a.at(0);
    int y = a.at(2) - a.at(1);

    cout << x << " " << y << endl;

    if(x%2 == y%2){
        ans = (x + y)/2;
    }
    else{
        ans = (x + y + 1)/2;
        ans++;
    }

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

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

#include <bits/stdc++.h> 
using namespace std;
#define rep(i, N) for(int i=0; i<N; i++)
typedef long long ll;
#define dump(x) cerr<<#x<<"="<<x<<endl
using P = pair<int, int>;

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

    if(3*a%2==(a+b+c)%2){
        cout << (2*a - b - c)/2 << endl;
    }
    else{
        cout << (2*a + 3 - b - c)/2 << endl; 
    }

   return 0;
}


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

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

int main(){
    vector<int>v(3);
    cin >>v[0]>>v[1]>>v[2];
    int sum=0;
    if((v[0]%2)==(v[1]%2)==(v[2]%2))
    else if((v[0]%2)==(v[1]%2)){
        v[0]++;
        v[1]++;
        sum++;
    }
    else if((v[0]%2)==(v[2]%2)){
        v[0]++;
        v[2]++;
        sum++;
    }
    else{
        v[1]++;
        v[2]++;
        sum++;
    }
    sort(v.begin(),v.end());
    sum+=(v[2]-v[1])/2;
    sum+=(v[2]-v[0])/2;
    cout << sum << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: expected primary-expression before 'else'
   11 |     else if((v[0]%2)==(v[1]%2)){
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair 
#define F first
#define S second
#define ll long long
#define vi vector<ll>
#define vvi vector<vi>
#define BITLE(n) (1LL<<((ll)n))
#define SHIFT_LEFT(n) (1LL<<((ll)n))
#define SUBS(s,f,t) ((s).substr((f),(t)-(f)))
#define ALL(a) (a).begin(),(a).end()
using namespace std;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  vi A(3);
  cin>>A[0]>>A[1]>>A[2];
  sort(ALL(A),greater<ll>());
  ll ans += A[0]-A[1];
  if((A[1]-A[2])%2){
    cout<<ans+(A[1]-A[2])/2+2<<endl;
  }else{
    cout<<ans+(A[1]-A[2])/2<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:10: error: expected initializer before '+=' token
   24 |   ll ans += A[0]-A[1];
      |          ^~
a.cc:26:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   26 |     cout<<ans+(A[1]-A[2])/2+2<<endl;
      |           ^~~
      |           abs
a.cc:28:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   28 |     cout<<ans+(A[1]-A[2])/2<<endl;
      |           ^~~
      |           abs
Language: C++

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

int plus(int A, int B, int C){
  int count = 0;
  vector<int>array(3) = {A, B, C};
  sort(array.begin(), array.end());
  if(array.at(1) - array.at(2) % 2 == 0){
    count += (array.at(1) - array.at(2) / 2);
    count += array.at(0) - array.at(1);
  }else{
    array.at(0) += 1;
    array.at(2) += 1;
    count++;
    count += (array.at(1) - array.at(2) / 2);
    count += array.at(0) - array.at(1);  
  }
  return count;
}

int main(){
  int A, B, C;
  cin >> A >> B >> C;
  
  cout << plus(A, B, C) << endl;
  
}

Compiler output:
a.cc: In function 'int plus(int, int, int)':
a.cc:6:23: error: expected ',' or ';' before '=' token
    6 |   vector<int>array(3) = {A, B, C};
      |                       ^
a.cc: In function 'int main()':
a.cc:25:11: error: reference to 'plus' is ambiguous
   25 |   cout << plus(A, B, C) << endl;
      |           ^~~~
In file included from /usr/include/c++/14/string:49,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_function.h:160:12: note: candidates are: 'template<class _Tp> struct std::plus'
  160 |     struct plus;
      |            ^~~~
a.cc:4:5: note:                 'int plus(int, int, int)'
    4 | int plus(int A, int B, int C){
      |     ^~~~