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

#include<stdio.h>
int main()
{
int x,a,b,d,s;
if(a>=1&&a<=1000&&b>=1&&b<=1)
{d=a-x;
s=b-x
if(d>s){printf("A");
}
if(d<s){printf("B");
}
else{printf("A or B");
}

}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:6: error: expected ';' before 'if'
    7 | s=b-x
      |      ^
      |      ;
    8 | if(d>s){printf("A");
      | ~~
Language: C

#include<bits/stdc++.h>
 using namespace std;
 int main()
{
    int x,a,b,d1,d2;

    scanf("%d%d%d",&x,&a,&b);

    d1=x-a;
    if(d1<0) d1=d1*(-1);

    d2=x-b;
    if(d2<0) d2=d2*(-1);

    if(d1<d2) printf("A");
    else printf("B");

}


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

#include<iostream>

usning namespace std;

int main()
{
    int x,a,b,k,j;
    cin>>x>>a>>b;
    k=x-a;
    j=x-b;
    if(k>j){
    cout<<"B"<<endl;
    }
else{
cout<<"A"<<endl;
}
return 0;
}
    

Compiler output:
a.cc:3:1: error: 'usning' does not name a type
    3 | usning namespace std;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |     cin>>x>>a>>b;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     cout<<"B"<<endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |     cout<<"B"<<endl;
      |                ^~~~
      |                std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:15:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 | cout<<"A"<<endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:15:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   15 | cout<<"A"<<endl;
      |            ^~~~
      |            std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

#include<stdio.h>
int main()
{
int x,a,b,d,s;
if(a>=1&&a<=1000&&b>=1&&b<=1)
{d=|a-x|;
s=|b-x|;
if(d>s){printf("A");
}
if(d<s){printf("B");
}
else{printf("A or B");
}

}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:4: error: expected expression before '|' token
    6 | {d=|a-x|;
      |    ^
main.c:7:3: error: expected expression before '|' token
    7 | s=|b-x|;
      |   ^
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <conio.h>
#include <math.h>

int main(void)
{
    int x, a, b;
    int dist1, dist2;
    scanf("%d %d %d", &x, &a, &b);

    dist1 = abs(x-a);
    dist2 = abs(x-b);

    if (dist1<dist2) printf("A");
    else printf("B");


    return 0;
}


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

#include  <stdio.h >
#include <math.h>
int main ()
{
	int x,a,b;
	while (scanf("%d%d%d",&x,&a,&b)!=EOF)
	{
		if(abs(x-a)>abs(x-b)) printf("B\n");
	else printf("A\n");
	}
	
	
	return 0;
}

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

#include  <iostream >
#include <math.h>
using namespace std;
int main ()
{
	int x,a,b;
	while (cin >>x>>a>>b)
	{
		if(abs(x-a)>abs(x-b)) cout << "B"<< endl;
	else cout << "A"<< endl ;
	}
	
	
	return 0;
}

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

#include  <iostream >
#include <cmath>
using namespace std;
int main ()
{
	int x,a,b;
	while (cin >>x>>a>>b)
	{
		if(abs(x-a)>abs(x-b)) cout << "B"<< endl;
	else cout << "A"<< endl ;
	}
	
	
	return 0;
}

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

#include <iostream>
#include <string>

using namespace std;
int main() {
  string s;
  cin >> s;
  
  int cnt[26];
  for(char c : s){
    ++cnt[c - 'a'];
  }
  
  int* it = find((int*)cnt, cnt + 26, 0);
  if(it == cnt + 26){
    cout << "None" << endl;
  }else{
    cout << 'a' + (it - cnt) << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: no matching function for call to 'find(int*, int*, int)'
   14 |   int* it = find((int*)cnt, cnt + 26, 0);
      |             ~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:14:17: note:   mismatched types 'std::istreambuf_iterator<_CharT>' and 'int*'
   14 |   int* it = find((int*)cnt, cnt + 26, 0);
      |             ~~~~^~~~~~~~~~~~~~~~~~~~~~~~
Language: Java

import java.util.*;
public class _071_P1 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		int x = sc.nextInt(), a = sc.nextInt(), b = sc.nextInt();
		
		if(Math.abs(x-a) > Math.abs(x-b)) System.out.println("B");
		else System.out.println("A");
	}

}


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

#include<stdio.h>
int main(void)
{
	int x,a,b,A,B;
	scanf("%d%d%d",&x,&a,&b);
	A=x-a;
	B=b=x:
	if(A<B){
		printf("A\n");
		}
	else if(B<A){
		printf("B\n");
		}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before ':' token
    7 |         B=b=x:
      |              ^
      |              ;
a.cc:11:9: error: 'else' without a previous 'if'
   11 |         else if(B<A){
      |         ^~~~
Language: C++

#include<stdio.h>
int main(void)
{
	int x,a,b,A,B;
	scanf("%d%d%d",&x,&a,&b);
	A=x-a;
	B=b=x:
	if(A<B){
		printf("A\n");
		}
	if(B<A){
		printf("B\n");
		}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before ':' token
    7 |         B=b=x:
      |              ^
      |              ;
Language: C++

#include<bits/stdc++.h>
#define int long long
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
	int a,b,c;
	cin>>a>>b>>c;
	if(abs(a-b)>abs(a-c))cout<<'B'<<endl;
	else cout<<"A"<<endl;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include<stdio.h>
#include<math.h>
main()
{
int A,B,x;
	scanf("%d%d%d",&x,&A,&B);
	if(fbs(x-A)<fbs(x-B))
	printf("A");
	else
		printf("B");
	return 0;
	

}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:12: error: 'fbs' was not declared in this scope; did you mean 'fabs'?
    7 |         if(fbs(x-A)<fbs(x-B))
      |            ^~~
      |            fabs
Language: C++

#include<bits/stdc++.h>

using namespace std;
int main()
{

    int x,a,b;
    cin>>x>>a>>b;
    if(fabs(a-x)<fasb(b-x))cout<<"A"<<endl;
    else cout<<"B"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: 'fasb' was not declared in this scope; did you mean 'fabs'?
    9 |     if(fabs(a-x)<fasb(b-x))cout<<"A"<<endl;
      |                  ^~~~
      |                  fabs
Language: C++

#include <bits/stdc++.h>
using namespace std;
Int main(){
int x,a,b;cin>>x>>a>>b;cout<<(abs(x-a)<abs(x-b)?"A":"B")<<endl;
return 0;}

Compiler output:
a.cc:3:1: error: 'Int' does not name a type; did you mean 'int'?
    3 | Int main(){
      | ^~~
      | int
Language: C

#include <stdio.h>
int min(){
int x, a, b;
	scanf("%d%d%d", &x, &a, &b);
 
	int da = abs(x - a), db = abs(x - b);
	if (da < db) {
		printf("A");
	} else {
		printf("B");
	}return 0;
}

Compiler output:
main.c: In function 'min':
main.c:6:18: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
    6 |         int da = abs(x - a), db = abs(x - b);
      |                  ^~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
    1 | #include <stdio.h>
  +++ |+#include <stdlib.h>
    2 | int min(){
Language: C++

    #include <stdio.h>
    int main(void)
    {
    	int x, a, b;
    	int i, j;
    		scanf("%d", &x);
			scanf("%d", &a);
			scanf("%d", &b)
     
    	if(x < a){
    		i == a - x;
    	}else if (x > a){ 
    		i == x - a;
    	}
    	if(x < b){
    		j == b - x;
    	}else if (x > b){
    		j == x - b;
    	}
     
    	if(i < j){
    		printf("A\n");
    	}else if (i > j){
    		printf("B\n");
    	}
    return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:40: error: expected ';' before 'if'
    8 |                         scanf("%d", &b)
      |                                        ^
      |                                        ;
    9 | 
   10 |         if(x < a){
      |         ~~                              
a.cc:12:10: error: 'else' without a previous 'if'
   12 |         }else if (x > a){
      |          ^~~~
Language: C++

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
	
		Scanner scan = new Scanner(System.in);

		
		int x = scan.nextInt();
		int a = scan.nextInt();
		int b = scan.nextInt();
		int sum = Math.abs(x - a);
		int ave = Math.abs(x - b);
		
		if(sum < ave) {
			System.out.println("A");
		}else {
			System.out.println("B");
		}
		
		
		/*for(int i = 0; i <= A; i++) {
			for(int j = 0; j < A; j++) {
				System.out.print("☆");
				
			}
			System.out.println("");
		}*/
		
	}

}


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:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: Java

import java.util.Scanner;

public class At_1 {
	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		int x = scan.nextInt();
		int a = scan.nextInt();
		int b = scan.nextInt();

		if(Math.abs(x-a) < Math.abs(x-b)){
			System.out.println("A");
		}else{
			System.out.println("B");
		}

		scan.close();
	}
}


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

public class Main {


	public static void main(String[] args) throws Exception {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int bb = 0;
		int cc = 0;
		if(a >= b){
			bb = a-b;
		}else if(a <= b){
			bb = b-a;
		}
		if(a >= c){
			cc = a-c;
		}else if(a <= c){
			cc = b-c;
		}
		
		if(bb < cc){
			System.out.println("A");
		}else if(bb > cc){
			System.out.println("B");
		}
		
	}

}

Compiler output:
Main.java:6: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C

    #include <bits/stdc++.h)
    using namespace std;
    int main()
    {
        int a,b,c,ab,ac;
        cin>>a>>b>>c;
        ab=fabs(a-b);
        ac=fabs(a-c);
        if(ab>ac)
        cout<<'B'<<endl;
        if(ac>ab)
        cout<<'A'<<endl;
        return 0;
    }

Compiler output:
main.c:1:29: error: missing terminating > character
    1 |     #include <bits/stdc++.h)
      |                             ^
main.c:1:14: fatal error: bits/stdc++.h): No such file or directory
    1 |     #include <bits/stdc++.h)
      |              ^
compilation terminated.
Language: C++

#include <bits/stdc++.h)
using namespace std;
int main()
{
    int a,b,c,ab,ac;
    cin>>a>>b>>c;
    ab=fabs(a-b);
    ac=fabs(a-c);
    if(ab>ac)
    cout<<'B'<<endl;
    if(ac>ab)
    cout<<'A'<<endl;
    return 0;
}

Compiler output:
a.cc:1:25: error: missing terminating > character
    1 | #include <bits/stdc++.h)
      |                         ^
a.cc:1:10: fatal error: bits/stdc++.h): No such file or directory
    1 | #include <bits/stdc++.h)
      |          ^
compilation terminated.
Language: C++

#include <iostream>

using namespace std;

int main(void){
        int x,a,b,la,lb;
        cin >> x >> a >> b;
        la=x-a;
        if(la<0)la*=(-1);
        lb=x-b;
        if(lb<0)lb*=(-1);
        if(la>lb){
                cout << 'B' << endl;
        }else{
                cout << 'A' << endl;
        }
        retern 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'retern' was not declared in this scope; did you mean 'extern'?
   17 |         retern 0;
      |         ^~~~~~
      |         extern
Language: C++

#include <iostream>

int main(void){
        int x,a,b,la,lb;
        cin >> x >> a >> b;
        la=x-a;
        if(la<0)la*=(-1);
        lb=x-b;
        if(lb<0)lb*=(-1);
        if(la>lb){
                cout << 'B' << endl;
        }else{
                cout << 'A' << endl;
        }
        retern 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin >> x >> a >> b;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |                 cout << 'B' << endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:32: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |                 cout << 'B' << endl;
      |                                ^~~~
      |                                std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:13:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |                 cout << 'A' << endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:32: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |                 cout << 'A' << endl;
      |                                ^~~~
      |                                std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:15:9: error: 'retern' was not declared in this scope; did you mean 'extern'?
   15 |         retern 0;
      |         ^~~~~~
      |         extern
Language: C++

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace atcoder
{
	class Program
	{
		static void Main(string[] args)
		{
			var input = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
			int a = Math.Abs(input[0] - input[1]);
			int b = Math.Abs(input[0] - input[2]);
			if (a < b) Console.WriteLine("A");
			else Console.WriteLine("B");
		}
	}
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Threading.Tasks;
      |       ^~~~~~
a.cc:11:34: error: 'string' has not been declared
   11 |                 static void Main(string[] args)
      |                                  ^~~~~~
a.cc:11:43: error: expected ',' or '...' before 'args'
   11 |                 static void Main(string[] args)
      |                                           ^~~~
a.cc:19:10: error: expected ';' after class definition
   19 |         }
      |          ^
      |          ;
a.cc: In static member function 'static void atcoder::Program::Main(int*)':
a.cc:13:25: error: 'var' was not declared in this scope
   13 |                         var input = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
      |                         ^~~
a.cc:14:33: error: 'Math' was not declared in this scope
   14 |                         int a = Math.Abs(input[0] - input[1]);
      |                                 ^~~~
a.cc:14:42: error: 'input' was not declared in this scope; did you mean 'int'?
   14 |                         int a = Math.Abs(input[0] - input[1]);
      |                                          ^~~~~
      |                                          int
a.cc:16:36: error: 'Console' was not declared in this scope
   16 |                         if (a < b) Console.WriteLine("A");
      |                                    ^~~~~~~
a.cc:17:30: error: 'Console' was not declared in this scope
   17 |                         else Console.WriteLine("B");
      |                              ^~~~~~~
Language: Java

import java.util.Scanner;

public class Contest {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        String x = sc.next();
        String a = sc.next();
        String b = sc.next();
       
        if((Math.abs(Integer.parseInt(x) - Integer.parseInt(a)))< (Math.abs(Integer.parseInt(x) - Integer.parseInt(b))))
            System.out.println("A");
        else if((Math.abs(Integer.parseInt(x) - Integer.parseInt(a))) > (Math.abs(Integer.parseInt(x) - Integer.parseInt(b))))
            System.out.println("B");            
        else
            System.out.println("Draw");
    }
}


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

using namespace std;
#include<bits/stdc++.h>
#define debug(x) clog<<#x<<" = "<<x<<'\n'
#define ll long long
#define pll pair<ll,ll>
#define pii pair<int,int>
#define fir first
#define sec second
#define mp make_pair
#define pb push_back
#define sz(c) ((int)c.size())
#define all(c) (c).begin(),(c).end()
#define MASK(i) (1LL<<(i))
#define BIT(x,i) (((x)>>(i))&1)
#define fn "A"  /// ___FILE_NAME_HERE___
#define rep(c,it) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();it++)
#define __rep(c,it) for(__typeof((c).rbegin()) it=(c).rbegin();it!=(c).rend();it++)

template <class T,class U>
void maximize(T &x,U y)
{
    if(x < y)x=y;
}
template <class T,class U>
void minimize(T &x,U y)
{
    if(x > y)x=y;
}
template <class T>
T Abs(T x)
{
    return (x < 0 ? -x : x);
}
template <class T>
T safe_sqrt(T x)
{
    return sqrt(max(x,(T)0));
}
template <class T,class U,class V>
T addmod(T x,U k,V MOD)
{
    return ((x+k)%MOD + MOD)%MOD;
}
template <class T,class U,class V>
T submod(T x,U k,V MOD)
{
    return ((x-k)%MOD + MOD)%MOD;
}
template <class T,class U,class V>
T mul(T x,U y,V MOD)
{
    return (ll)x*y%MOD;
}
/*------------------------------------------END_OF_TEMPLATE------------------------------------------*/

namespace task{

void solve()
{
    int x,a,b;
    scanf("%d%d%d",&x,&a,&b);
    puts(Abs(x - a) < Abs(x - b) ? 'A' : 'B');
}}

int main(void)
{
    task::solve();
}


Compiler output:
a.cc: In function 'void task::solve()':
a.cc:62:34: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   62 |     puts(Abs(x - a) < Abs(x - b) ? 'A' : 'B');
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
      |                                  |
      |                                  char
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:2:
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C++

using namespace std;
#include<bits/stdc++.h>
#define debug(x) clog<<#x<<" = "<<x<<'\n'
#define ll long long
#define pll pair<ll,ll>
#define pii pair<int,int>
#define fir first
#define sec second
#define mp make_pair
#define pb push_back
#define sz(c) ((int)c.size())
#define all(c) (c).begin(),(c).end()
#define MASK(i) (1LL<<(i))
#define BIT(x,i) (((x)>>(i))&1)
#define fn "A"  /// ___FILE_NAME_HERE___
#define rep(c,it) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();it++)
#define __rep(c,it) for(__typeof((c).rbegin()) it=(c).rbegin();it!=(c).rend();it++)

template <class T,class U>
void maximize(T &x,U y)
{
    if(x < y)x=y;
}
template <class T,class U>
void minimize(T &x,U y)
{
    if(x > y)x=y;
}
template <class T>
T Abs(T x)
{
    return (x < 0 ? -x : x);
}
template <class T>
T safe_sqrt(T x)
{
    return sqrt(max(x,(T)0));
}
template <class T,class U,class V>
T addmod(T x,U k,V MOD)
{
    return ((x+k)%MOD + MOD)%MOD;
}
template <class T,class U,class V>
T submod(T x,U k,V MOD)
{
    return ((x-k)%MOD + MOD)%MOD;
}
template <class T,class U,class V>
T mul(T x,U y,V MOD)
{
    return (ll)x*y%MOD;
}
/*------------------------------------------END_OF_TEMPLATE------------------------------------------*/

namespace task{

void solve()
{
    scanf("%d%d%d",&x,&a,&b);
    puts(Abs(x - a) < Abs(x - b) ? 'A' : 'B');
}}

int main(void)
{
    task::solve();
}


Compiler output:
a.cc: In function 'void task::solve()':
a.cc:60:21: error: 'x' was not declared in this scope
   60 |     scanf("%d%d%d",&x,&a,&b);
      |                     ^
a.cc:60:24: error: 'a' was not declared in this scope
   60 |     scanf("%d%d%d",&x,&a,&b);
      |                        ^
a.cc:60:27: error: 'b' was not declared in this scope; did you mean 'pb'?
   60 |     scanf("%d%d%d",&x,&a,&b);
      |                           ^
      |                           pb
Language: C++

x = io.read "n"
a = io.read "n"
b = io.read "n"

if math.abs(x-a) < math.abs(x-b) then
    io.write("A\n")
else
    io.write("B\n")
end


Compiler output:
a.cc:1:1: error: 'x' does not name a type
    1 | x = io.read "n"
      | ^
Language: C++

using namespace std;
#include<bits/stdc++.h>
#define debug(x) clog<<#x<<" = "<<x<<'\n'
#define ll long long
#define pll pair<ll,ll>
#define pii pair<int,int>
#define fir first
#define sec second
#define mp make_pair
#define pb push_back
#define sz(c) ((int)c.size())
#define all(c) (c).begin(),(c).end()
#define MASK(i) (1LL<<(i))
#define BIT(x,i) (((x)>>(i))&1)
#define fn "A"  /// ___FILE_NAME_HERE___
#define rep(c,it) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();it++)
#define __rep(c,it) for(__typeof((c).rbegin()) it=(c).rbegin();it!=(c).rend();it++)

template <class T,class U>
void maximize(T &x,U y)
{
    if(x < y)x=y;
}
template <class T,class U>
void minimize(T &x,U y)
{
    if(x > y)x=y;
}
template <class T>
T Abs(T x)
{
    return (x < 0 ? -x : x);
}
template <class T>
T safe_sqrt(T x)
{
    return sqrt(max(x,(T)0));
}
template <class T,class U,class V>
T addmod(T x,U k,V MOD)
{
    return ((x+k)%MOD + MOD)%MOD;
}
template <class T,class U,class V>
T submod(T x,U k,V MOD)
{
    return ((x-k)%MOD + MOD)%MOD;
}
template <class T,class U,class V>
T mul(T x,U y,V MOD)
{
    return (ll)x*y%MOD;
}
/*------------------------------------------END_OF_TEMPLATE------------------------------------------*/

namespace task{

void solve()
{
    scanf("%d%d%d",&x,&a,&b);
    puts(Abs(x - a) < Abs(x - b) ? 'A' : 'B');
}}

int main(void)
{
    #ifndef ONLINE_JUDGE
    freopen(fn".inp","r",stdin);
    freopen(fn".out","w",stdout);
    #endif // ONLINE_JUDGE
    task::solve();
}


Compiler output:
a.cc: In function 'void task::solve()':
a.cc:60:21: error: 'x' was not declared in this scope
   60 |     scanf("%d%d%d",&x,&a,&b);
      |                     ^
a.cc:60:24: error: 'a' was not declared in this scope
   60 |     scanf("%d%d%d",&x,&a,&b);
      |                        ^
a.cc:60:27: error: 'b' was not declared in this scope; did you mean 'pb'?
   60 |     scanf("%d%d%d",&x,&a,&b);
      |                           ^
      |                           pb
Language: C++

program main
	implicit none
	integer x,a,b,aa,bb
	read(*,*)x,a,b
	aa=abs(x-a)
	bb=abs(x-b)
	if(aa>bb)then
		write(*,'(a1)')"B"
	else
		write(*,'(a1)')"A"
	endif
end program main


Compiler output:
a.cc:8:25: warning: multi-character character constant [-Wmultichar]
    8 |                 write(*,'(a1)')"B"
      |                         ^~~~~~
a.cc:10:25: warning: multi-character character constant [-Wmultichar]
   10 |                 write(*,'(a1)')"A"
      |                         ^~~~~~
a.cc:1:1: error: 'program' does not name a type
    1 | program main
      | ^~~~~~~
Language: C++

x,a,b=gets.split(" ").map(&:to_i)

if (a-x).abs<(b-x).abs then
  print("A")
else
  print("B")
end

Compiler output:
a.cc:1:1: error: 'x' does not name a type
    1 | x,a,b=gets.split(" ").map(&:to_i)
      | ^
Language: C++

// ConsoleApplication4.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
	int x, a, b;
	cin >> x >> a >> b;
	if (abs(x - a) > abs(x - b))cout << "B";
	else cout << "A";
	return 0;
}



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

#include<stdio.h>
#include<string.h>
#include<boolean.h>

int main()
{
	char s[1000000];
	int i;
	bool b;
	
	scanf("%s",s);
	
	for(char c = 'a';c <= 'z';c++)
	{
		i=0;
		
		b = false;
		
		while(s[i] != '\0')
		{
			if(c == s[i])
			{
				b = true;
				break;
			}
			i++;
		}
		
		if(!b)
		{
			printf("%c\n",c);
			return 0;
		}
	}
	
	printf("None\n");
	
	return 0;
}

Compiler output:
main.c:3:9: fatal error: boolean.h: No such file or directory
    3 | #include<boolean.h>
      |         ^~~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<string.h>

int main()
{
	char s[1000000];
	int i;
	bool b;
	
	scanf("%s",s);
	
	for(char c = 'a';c <= 'z';c++)
	{
		i=0;
		
		b = false;
		
		while(s[i] != '\0')
		{
			if(c == s[i])
			{
				b = true;
				break;
			}
			i++;
		}
		
		if(!b)
		{
			printf("%c\n",c);
			return 0;
		}
	}
	
	printf("None\n");
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:9: error: unknown type name 'bool'
    8 |         bool b;
      |         ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include<string.h>
  +++ |+#include <stdbool.h>
    3 | 
main.c:16:21: error: 'false' undeclared (first use in this function)
   16 |                 b = false;
      |                     ^~~~~
main.c:16:21: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:16:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:37: error: 'true' undeclared (first use in this function)
   22 |                                 b = true;
      |                                     ^~~~
main.c:22:37: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: Java


import java.util.Scanner;


public class Test1 {

	public static void main(String[] args) throws NumberFormatException {
		
		int x,a,b;
		
		Scanner sc = new Scanner(System.in);
		
		x = sc.nextInt();
		a = sc.nextInt();
		b = sc.nextInt();
		
		int distanceA = Math.abs(x - a);
		int distanceB = Math.abs(x - b);
		
		if(distanceA > distanceB){
			System.out.println("B");
		}
		else{
			System.out.println("A");
		}
	}

}

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

#include <iostream>
#include <cmath>
using namespace std;
int main()
{
   int x,a,b;
   cin >> x >> a >> b;
   if(abs(x-a) >abs(x-b)){
       cout >> B >> endl;
   }
   else{
       cout >> A >> endl;
   }
   return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'B' was not declared in this scope
    9 |        cout >> B >> endl;
      |                ^
a.cc:12:16: error: 'A' was not declared in this scope
   12 |        cout >> A >> endl;
      |                ^
Language: C++

fun main(args : Array<String>){
     val (x, a, b) = readLine()!!.split(" ").map(String::toInt)
     println(if (Math.abs(x - a) > Math.abs(x - b)) "B" else "A")
}

Compiler output:
a.cc:1:1: error: 'fun' does not name a type
    1 | fun main(args : Array<String>){
      | ^~~
Language: C

#include <cstdio.h>
 
int main()
{
	int x, a, b;
	scanf("%d%d%d", &x, &a, &b);
 
	int da = abs(x - a), db = abs(x - b);
	if (da < db) {
		puts("A");
	} else {
		puts("B");
	}
	return 0;
}

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

#include <cstdio>
#include <cstdlib>
 
int main()
{
	int x, a, b;
	scanf("%d%d%d", &x, &a, &b);
 
	int da = abs(x - a), db = abs(x - b);
	if (da < db) {
		puts("A");
	} else {
		puts("B");
	}
	return 0;
}

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

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

Compiler output:
main.c: In function 'main':
main.c:6:7: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
    6 |     y=abs(x-a);
      |       ^~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
    1 | #include<stdio.h>
  +++ |+#include <stdlib.h>
    2 | int main()
main.c:8:15: error: expected ';' before '}' token
    8 |     y=abs(x-b)
      |               ^
      |               ;
    9 |     }
      |     ~
Language: C

#include<stdio.h>

int main()
{
int a,b,x;
scanf("%d %d %d",&x,&a,&b);

int A = x-a;
int B = x-b;

if(A < 0) A = -A;
if(B < 0) B = -B;

if(A>B){
printf("B");
}else{
printf("A");
}

Compiler output:
main.c: In function 'main':
main.c:18:1: error: expected declaration or statement at end of input
   18 | }
      | ^
Language: C++

#include <iostream>
#include <math.h>
using namespace std;
int main(){
   int x;
   int a;
   int b;
   cin >> x >> b >> c;
	if ((x-a)*(x-a) > (x-b)*(x-b)) {
		cout << 'A';
	} else {
		cout << 'B';
	}
	cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: 'c' was not declared in this scope
    8 |    cin >> x >> b >> c;
      |                     ^
Language: Java

import java.util.Scanner;


public class Bit {
    public static void main(String[] args) {
    Scanner input = new Scanner(System.in);
        System.out.println( "Podaj pozycje X potem pozycje punku A i B");

    int X = input.nextInt();
    int A = input.nextInt() ;
    int B = input.nextInt();
    if (Math.abs(X-A) < Math.abs(X-B))
            System.out.println("A");
    else {
        System.out.println("B");
    }
            }
        }
     


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

#include <cstdlib>
#include <cmath>

int main(int argc, char **argv)
{
  int x = atoi(argv[1]);
  int a = atoi(argv[2]);
  int b = atoi(argv[3]);

  char ans = std::abs(x - a) > std::abs(x - b) ? 'B' : 'A';
  printf("%c\n", ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:11:3: error: 'printf' was not declared in this scope
   11 |   printf("%c\n", ans);
      |   ^~~~~~
a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    2 | #include <cmath>
  +++ |+#include <cstdio>
    3 |
Language: C++

#include <stdio.h>
#include <stdlib.h>

int main() {
	int x, a, b;
	int ans1, ans2;

	scanf_s("%d%d%d", &x, &a, &b);

	ans1 = abs(x - a);
	ans2 = abs(x - b);

	if (ans1 < ans2)printf("A");
	else            printf("B");

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    8 |         scanf_s("%d%d%d", &x, &a, &b);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <stdio.h>
#include <algorithm>
#include <iostream>

char string[100001];
bool letters[100001];

int main()
{
  std::cin >> string;
  int n = strlen(string);

  for(int i = 0; i < n; i++)
    letters[string[i]] = true;

  for(char i = 'a'; i < '{'; i++)
  {
    if(!letters[i])
    {
      printf("%c", i);
      return 0;
    }
  }
  printf("None");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: 'strlen' was not declared in this scope
   11 |   int n = strlen(string);
      |           ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <iostream>
  +++ |+#include <cstring>
    4 |
Language: Java

import java.util.Scanner;
public class Atcoder{
	public static void main(String[] args){
		Scanner in=new Scanner(System.in);
		int x=in.nextInt();
		int a=in.nextInt();
		int b=in.nextInt();
		int x1=Math.abs(a-x);
		int x2=Math.abs(b-x);
		if (x1<x2){
			System.out.println("A");
		}else{
			System.out.println("B");
		}
	}
}

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

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

int main(){
    int n,a,b;
    cin>>n>>a>>b;
    if(abs(n-a)<abs(n-b)){
        cout<<"A";
    }else{
        cout<<"B";
    }
}

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

#include<stdio.h.>

int main(){
    int x,a,b,A,B;

    scanf("%d %d %d",&x,&a,&b);
    A=x-a;
    B=x-b;
    if(A*A>B*B){
        printf("B");
    }
    else{
        printf("A");
    }

    return 0;
}

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

#include<stdio.h.>

int main(){
    int x,a,b,A,B;

    scanf("%d %d %d",&x,&a,&b);
    A=x-a;
    B=x-b;
    if(A*A>B*B){
        printf("B");
    }
    else{
        printf("A");
    }

    return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) 
for(int i = 0; i < n; i++) 
int main() {    
ios::sync_with_stdio(false);   
string str;    
cin >> str;    
int cnt[26] = {};    
REP(i, str.size()) 
cnt[str[i] - 'a']++;
REP(i, 26) {        
if (cnt[i] == 0) {           
printf("%c\n", i + 'a');            
return 0;        }    }    
cout << "None" << endl;    
return 0;
}





Compiler output:
a.cc:4:1: error: expected unqualified-id before 'for'
    4 | for(int i = 0; i < n; i++)
      | ^~~
a.cc:4:16: error: 'i' does not name a type
    4 | for(int i = 0; i < n; i++)
      |                ^
a.cc:4:23: error: 'i' does not name a type
    4 | for(int i = 0; i < n; i++)
      |                       ^
Language: Java

import java.util.Scanner;

public class Main1 {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan = new Scanner(System.in);

		Integer x = scan.nextInt();
		Integer a = scan.nextInt();
		Integer b = scan.nextInt();

		int ax = x - a;
		int bx = x - b;

		int axx = ax * ax ;
		int bxx = bx * bx ;

		if (axx < bxx) {
			System.out.println("A");
		} else {
			System.out.println("B");
		}
	}
}


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

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int x,a,b,m,n;
    cin>>x>>a>>b;
    if(x>a)
    {
        if(x>a)
        {
            m=x-a;
        }
        else
        {
            m=a-x;
        }
    }
    else if(y>b)
    {
       if(y>b) {
            n=y-a;
        }
        else
        {
            n=a-y;
        }
    }
    if(n<m)
    {
        cout<<"A"<<endl;
    }
    else
    {
        cout<<"B"<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: 'y' was not declared in this scope
   18 |     else if(y>b)
      |             ^
Language: C++

            #include <iostream>
            #include <cstdio>
            #include <algorithm>
            using namespace std;
            int main()
            {
                int x,a,b;
                cin>>x>>a>>b;
                if(x>b&&b>a)
                {
                    cout<<"B"<<endl;
                }
                if(x>a&&a>b)
                {
                    cout<<"A"<<endl;
                if(x<a&&x>b)
                {
                    if((a-x)>(x-b))
                    {
                        cout<<"B"<<endl;
                    }
                    if((a-x)<(x-b))
                    {
                        cout<<"A"<<endl;
                }
                if(x<b&&x>a)
                {
                    if((b-x)>(x-a))
                    {
                        cout<<"A"<<endl;
                    }
                    if((b-x)<(x-a))
                    { 
                        cout<<"B"<<endl;
                    }
                }
                if(x<a&&a<b)
                {
                    cout<<"A"<<endl;
                }
                if(x<b&&b<a)
                {
                    cout<<"B"<<endl;
                }
            return 0;
            }

Compiler output:
a.cc: In function 'int main()':
a.cc:46:14: error: expected '}' at end of input
   46 |             }
      |              ^
a.cc:14:17: note: to match this '{'
   14 |                 {
      |                 ^
a.cc:46:14: error: expected '}' at end of input
   46 |             }
      |              ^
a.cc:6:13: note: to match this '{'
    6 |             {
      |             ^
Language: C++

        #include <iostream>
        #include <cstdio>
        #include <algorithm>
        using namespace std;
        int main()
        {
            int x,a,b;
            cin>>x>>a>>b;
            if(x>b&&b>a)
            {
                cout<<"B"<<endl;
            }
            if(x>a&&a>b)
            {
                cout<<"A"<<endl;
            if(x<a&&x>b)
            {
                if((a-x)>(x-b))
                {
                    cout<<"B"<<endl;
                }
                if((a-x)<(x-b))
                {
                    cout<<"A"<<endl;
            }
            if(x<b&&x>a)
            {
                if((b-x)>(x-a))
                {
                    cout<<"A"<<endl;
                }
                if((b-x)<(x-a))
                { 
                    cout<<"B"<<endl;
                }
            }
            if(x<a&&a<b)
            {
                cout<<"A"<<endl;
            }
            if(x<b&&b<a)
            {
                cout<<"B"<<endl;
            return 0;
        }

Compiler output:
a.cc: In function 'int main()':
a.cc:45:10: error: expected '}' at end of input
   45 |         }
      |          ^
a.cc:17:13: note: to match this '{'
   17 |             {
      |             ^
a.cc:45:10: error: expected '}' at end of input
   45 |         }
      |          ^
a.cc:14:13: note: to match this '{'
   14 |             {
      |             ^
a.cc:45:10: error: expected '}' at end of input
   45 |         }
      |          ^
a.cc:6:9: note: to match this '{'
    6 |         {
      |         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int x,a,b,m,n;
    cin>>x>>a>>b;
    if(x>a)
    {
        if(x>a)
        {
            m=x-a;
        }
        else
        {
            m=a-x;
        }
    }
    else
    {
        if(y>b)
        {
             n=y-a;
        }
        else
        {
             n=a-y;
        }
    }
    if(n<m)
    {
        cout<<"A"<<endl;
    }
    else
    {
        cout<<"B"<<endl;
    }
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:12: error: 'y' was not declared in this scope
   20 |         if(y>b)
      |            ^
Language: C++

    #include <iostream>
    #include <cstdio>
    #include <algorithm>
    using namespace std;
    int main()
    {
        int x,a,b;
        cin>>x>>a>>b;
        if(x>b&&b>a)
        {
            cout<<B<<endl;
        }
        if(x>a&&a>b)
        {
            cout<<A<<endl;
        if(x<a&&x>b)
        {
            if((a-x)>(x-b))
            {
                cout<<B<<endl;
            }
            if((a-x)<(x-b))
            {
                cout<<A<<endl;
        }
        if(x<b&&x>a)
        {
            if((b-x)>(x-a))
            {
                cout<<A<<endl;
            }
            if((b-x)<(x-a))
            { 
                cout<<B<<endl;
            }
        }
        if(x<a&&a<b)
        {
            cout<<A<<endl;
        }
        if(x<b&&b<a)
        {
            cout<<B<<endl;
        return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: 'B' was not declared in this scope
   11 |             cout<<B<<endl;
      |                   ^
a.cc:15:19: error: 'A' was not declared in this scope
   15 |             cout<<A<<endl;
      |                   ^
a.cc:20:23: error: 'B' was not declared in this scope
   20 |                 cout<<B<<endl;
      |                       ^
a.cc:34:23: error: 'B' was not declared in this scope
   34 |                 cout<<B<<endl;
      |                       ^
a.cc:43:19: error: 'B' was not declared in this scope
   43 |             cout<<B<<endl;
      |                   ^
a.cc:45:6: error: expected '}' at end of input
   45 |     }
      |      ^
a.cc:17:9: note: to match this '{'
   17 |         {
      |         ^
a.cc:45:6: error: expected '}' at end of input
   45 |     }
      |      ^
a.cc:14:9: note: to match this '{'
   14 |         {
      |         ^
a.cc:45:6: error: expected '}' at end of input
   45 |     }
      |      ^
a.cc:6:5: note: to match this '{'
    6 |     {
      |     ^
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int main()
{
    int x,a,b;
    cin>>x>>a>>b;
    if(x>b&&b>a)
    {
        cout<<B<<endl;
    }
    if(x>a&&a>b)
    {
        cout<<A<<endl;
    if(x<a&&x>b)
    {
        if((a-x)>(x-b))
        {
            cout<<B<<endl;
        }
        if((a-x)<(x-b))
        {
            cout<<A<<endl;
    }
    if(x<b&&x>a)
    {
        if((b-x)>(x-a))
        {
            cout<<A<<endl;
        }
        if((b-x)<(x-a))
        { 
            cout<<B<<endl;
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: 'B' was not declared in this scope
   11 |         cout<<B<<endl;
      |               ^
a.cc:15:15: error: 'A' was not declared in this scope
   15 |         cout<<A<<endl;
      |               ^
a.cc:20:19: error: 'B' was not declared in this scope
   20 |             cout<<B<<endl;
      |                   ^
a.cc:34:19: error: 'B' was not declared in this scope
   34 |             cout<<B<<endl;
      |                   ^
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:14:5: note: to match this '{'
   14 |     {
      |     ^
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func nextInt() float64 {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return float64(i)
}

func main() {
	sc.Split(bufio.ScanWords)
	x := nextInt()
	a := nextInt()
	b := nextInt()

	if math.Abs(x-a) < math.Abs(x-b) {
		fmt.Println("A")
	} else {
		fmt.Println("B")
	}
}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
	int N, a, b;
	cin >> N >> a >> b;
	if(abs(N - a) < abs(N - b)){
		cout << "A;"
	} else {
		cout << "B";
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:29: error: expected ';' before '}' token
    7 |                 cout << "A;"
      |                             ^
      |                             ;
    8 |         } else {
      |         ~
Language: C

#include <stdio.h>

int main(void)
{
	int x,a,b,c,d;
	scanf("%d%d%d",&x,&a,&b);
	a - x = c;
	if(c < 0)
	{
		c *= -1;
	}
	b - x = d;
	if(d < 0)
	{
		d *= -1;
	}
	if(c > d)
	{
		printf("A\n");
	} else {
	 	printf("B\n");
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:15: error: lvalue required as left operand of assignment
    7 |         a - x = c;
      |               ^
main.c:12:15: error: lvalue required as left operand of assignment
   12 |         b - x = d;
      |               ^