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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: expected primary-expression before '|' token
    7 |   if (|x - a| > |x - b|) {
      |       ^
a.cc:7:15: error: expected primary-expression before '>' token
    7 |   if (|x - a| > |x - b|) {
      |               ^
a.cc:7:17: error: expected primary-expression before '|' token
    7 |   if (|x - a| > |x - b|) {
      |                 ^
a.cc:7:24: error: expected primary-expression before ')' token
    7 |   if (|x - a| > |x - b|) {
      |                        ^
Language: Java


public class Main {

    public static void main(String[] args) {
        int x , a , b;
        Scanner sc = new Scanner(System.in);
        x = sc.nextInt();
        a = sc.nextInt();
        b = sc.nextInt();
        simpleDist(x, a, b);

    }

    private static void simpleDist(int x, int a, int b) {
        int max = 1000, min =1;
        if ((x <= max && a<=max && b<=max) && (x >= min && a >=min && b>=min)  ){
            String res= Math.abs(x-a) < Math.abs(x-b) ? "A" : "B";
            System.out.println(res);
        }
    }
}

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: Java

public class SimpleDistance {

    public static void main(String[] args) {
        int x = 5, a =2 , b = 7;
        simpleDist(x, a, b);

    }

    private static void simpleDist(int x, int a, int b) {
        int max = 1000, min =1;
        if ((x <= max && a<=max && b<=max) && (x >= min && a >=min && b>=min)  ){
            String res= Math.abs(x-a) < Math.abs(x-b) ? "A" : "B";
            System.out.println(res);
        }
    }
}

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

public void simpleDist(int x, int a, int b) {
        int max = 1000, min =1;
        if ((x <= max && a<=max && b<=max) && (x >= min && a >=min && b>=min)  ){
            String res= Math.abs(x-a) < Math.abs(x-b) ? "A" : "B";
            System.out.println(res);
        }
    }

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public void simpleDist(int x, int a, int b) {
       ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

public class Main {
    public static void main(String[] args) {
        int x = 5, a =2 , b = 7;
        int max = 1000;
        if ((x <= max && a<=max && b<=max) && (x >= min && a >=min && b>=min) ){
            String res= Math.abs(x-a) < Math.abs(x-b) ? "A" : "B";
            System.out.println(res);

        }
    }
}

Compiler output:
Main.java:5: error: cannot find symbol
        if ((x <= max && a<=max && b<=max) && (x >= min && a >=min && b>=min) ){
                                                    ^
  symbol:   variable min
  location: class Main
Main.java:5: error: cannot find symbol
        if ((x <= max && a<=max && b<=max) && (x >= min && a >=min && b>=min) ){
                                                               ^
  symbol:   variable min
  location: class Main
Main.java:5: error: cannot find symbol
        if ((x <= max && a<=max && b<=max) && (x >= min && a >=min && b>=min) ){
                                                                         ^
  symbol:   variable min
  location: class Main
3 errors
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: 'andl' was not declared in this scope
    7 |   else cout << 'B' << andl;
      |                       ^~~~
Language: Java

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

Compiler output:
Main.java:2: error: cannot find symbol
import static java.lang.Math;
                  ^
  symbol:   class lang
  location: package java
Main.java:2: error: static import only from classes and interfaces
import static java.lang.Math;
^
Main.java:9: error: cannot find symbol
if(abs(a-x)<abs(b-x)){
   ^
  symbol:   method abs(int)
  location: class Main
Main.java:9: error: cannot find symbol
if(abs(a-x)<abs(b-x)){
            ^
  symbol:   method abs(int)
  location: class Main
4 errors
Language: C++

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

int main() {
int x,a,b;
  cin>>x>>a>>b;
int c=abs(a-x)
  int d=abs(b-x)
  if(c>d){
    cout<<'A'<<endl;
}
     else if (d>c){
       cout<<'B'<<endl;
}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'int'
    8 |   int d=abs(b-x)
      |   ^~~
a.cc:12:6: error: 'else' without a previous 'if'
   12 |      else if (d>c){
      |      ^~~~
a.cc:12:15: error: 'd' was not declared in this scope
   12 |      else if (d>c){
      |               ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: expected ',' or ';' before '}' token
    9 | }
      | ^
a.cc:12:1: error: expected ',' or ';' before '}' token
   12 | }
      | ^
a.cc:15:1: error: expected ',' or ';' before '}' token
   15 | }
      | ^
a.cc:18:1: error: expected ',' or ';' before '}' token
   18 | }
      | ^
a.cc:19:6: error: 'c' was not declared in this scope
   19 |   if(c>d){
      |      ^
a.cc:19:8: error: 'd' was not declared in this scope
   19 |   if(c>d){
      |        ^
Language: C++

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

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





Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before '}' token
    9 |   }
      |   ^
a.cc:12:3: error: expected ',' or ';' before '}' token
   12 |   }
      |   ^
a.cc:15:3: error: expected ',' or ';' before '}' token
   15 |   }
      |   ^
a.cc:18:3: error: expected ',' or ';' before '}' token
   18 |   }
      |   ^
a.cc:19:6: error: 'c' was not declared in this scope
   19 |   if(c>d){
      |      ^
a.cc:19:8: error: 'd' was not declared in this scope
   19 |   if(c>d){
      |        ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: expected primary-expression before '|' token
    8 |   if(|a-x|<|b-x|){
      |      ^
a.cc:8:11: error: expected primary-expression before '<' token
    8 |   if(|a-x|<|b-x|){
      |           ^
a.cc:8:12: error: expected primary-expression before '|' token
    8 |   if(|a-x|<|b-x|){
      |            ^
a.cc:8:17: error: expected primary-expression before ')' token
    8 |   if(|a-x|<|b-x|){
      |                 ^
Language: C++

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

int main(){
  int x, a, b;
  cin >> x >> a >> b;
  if ((x-a)*(x-a)>(x-b)(x-b)){//絶対値ってどうやってやるんだ、調べるのかったりい
    cout << "B" << endl;
  }else{
    cout << "A" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: expression cannot be used as a function
    7 |   if ((x-a)*(x-a)>(x-b)(x-b)){//絶対値ってどうやってやるんだ、調べるのかったりい
      |                   ~~~~~^~~~~
Language: C++

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

Compiler output:
a.cc:3:20: error: expected ';' before 'int'
    3 | using namespace std
      |                    ^
      |                    ;
    4 | int main(void)
      | ~~~
Language: C++

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

Compiler output:
a.cc:3:20: error: expected ';' before 'int'
    3 | using namespace std
      |                    ^
      |                    ;
    4 | int main(void)
      | ~~~                 
a.cc: In function 'int main()':
a.cc:14:14: error: expected ';' before '}' token
   14 |     cout<<"b"
      |              ^
      |              ;
   15 |   }
      |   ~
Language: C++

#include <iostream>
using namespace std;

int main(){
    int x, a, b;
    cin >> x >> a >> b;
    if(abs(x-a) < abs(x-b)){
        cout << 'A';
    }else{
        cout << 'B'
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: expected ';' before '}' token
   10 |         cout << 'B'
      |                    ^
      |                    ;
   11 |     }
      |     ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>x>>a>>b;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<cmath>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:6:25: error: 'cout' was not declared in this scope
    6 |   if(abs(x-a)<abs(x-b)) cout<<"A"<<endl;
      |                         ^~~~
a.cc:6:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:36: error: 'endl' was not declared in this scope
    6 |   if(abs(x-a)<abs(x-b)) cout<<"A"<<endl;
      |                                    ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<cmath>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:7:8: error: 'cout' was not declared in this scope
    7 |   else cout<<"B"<<endl;
      |        ^~~~
a.cc:7:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:19: error: 'endl' was not declared in this scope
    7 |   else cout<<"B"<<endl;
      |                   ^~~~
a.cc:7:19: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<bits\stdc++.h>

int main()
{
    int x,a,b;
    scanf("%d %d %d", &x, &a, &b);
    if(abs(x-a)==abs(x-b))
        printf("equal");
    if(abs(x-a)<abs(x-b))
        printf("A");
    else
        printf("B");
    return 0;
}


Compiler output:
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
    1 | #include<bits\stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
 
class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int a = sc.nextInt();
      　int b = sc.nextInt();
      
      int y = Math.abs(x-a);
      int z = Math.abs(x-b);
       
      if(y<z){
        System.out.print("A");
      }else{
        System.out.print("B");
      }

    }
}

Compiler output:
Main.java:8: error: illegal character: '\u3000'
      ?int b = sc.nextInt();
      ^
1 error
Language: Java

import java.util.*;
 
class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int a = sc.nextInt();
      　int b = sc.nextInt();
      
      int y = Math.abs(x-a)
      int z = Math.abs(x-b)
       
      if(y<z){
        System.out.print("A");
      }else{
        System.out.print("B");
      }

    }
}

Compiler output:
Main.java:8: error: illegal character: '\u3000'
      ?int b = sc.nextInt();
      ^
Main.java:10: error: ';' expected
      int y = Math.abs(x-a)
                           ^
Main.java:11: error: ';' expected
      int z = Math.abs(x-b)
                           ^
3 errors
Language: C++

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

int main()
{
  int x, a, b;
  cin >> x >> a >> b;
  if(abs(x - a) < abx(x - b)){
    cout << 'A' << endl;
  }
  else{
    cout << 'B' << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: 'abx' was not declared in this scope; did you mean 'abs'?
    9 |   if(abs(x - a) < abx(x - b)){
      |                   ^~~
      |                   abs
Language: C++

#include <iostream>
#include <cstdlib>

using namespace std;

int main(void){
  
  int x,a,b;
  cin >> x >> a >> b;
  
  cout << (abs(x-a) < abs(x-b) ? "A" : "B") << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:11:53: error: expected '}' at end of input
   11 |   cout << (abs(x-a) < abs(x-b) ? "A" : "B") << endl;
      |                                                     ^
a.cc:6:15: note: to match this '{'
    6 | int main(void){
      |               ^
Language: C++

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

int main(){
    int x, a, b;    cin>>x>>a>>b;
    x-a<0?a=a-x:a=x-a;
    x-b<0?b=b-x:b=x-b;
    cout<<(a<b?b'B':'A')<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: expected ':' before 'B'
   10 |     cout<<(a<b?b'B':'A')<<endl;
      |                 ^~~
      |                 :
a.cc:10:20: error: expected ')' before ':' token
   10 |     cout<<(a<b?b'B':'A')<<endl;
      |           ~        ^
      |                    )
Language: C++

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

int main()
{
	int x,a,b;
	cin>>x>>a>>b;
	
	if(abs(x-a)<abs(x-b)) cout<<'A'<<endl;
	else cout<<'B'<<endl;
	
	return 0;
}


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

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

int main(){int x,a,b,A,B;cin>>x>>a>>b;
           A=max(x,a)-min(x,a);
           B=max(x,b)-min(x,b);
           if(A>B)cout<<'B'<<endl;
           else{cout<<'A'<<endl;}}

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

#include<stdio.h>

int main(){
  int x, a, b, dis_a, dis_b;
  
  scanf("%d %d %d", &x, &a, &b);
  
  dis_a = (a - x > 0) ? a - x : x - a;
  dis_b = (b - x > 0) ? b - x : x - b;
  
 　(dis_a > dis_b) ? printf("B\n") : printf("A\n");
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:2: error: stray '\343' in program
   11 |  <U+3000>(dis_a > dis_b) ? printf("B\n") : printf("A\n");
      |  ^~~~~~~~
Language: C

#include<stdio.h>

int main(){
  int x, a, b, dis_a, dis_b;
  
  scanf("%d %d %d", &x, &a, &b);
  
  dis_a = (a - x > 0) ? a - x : x - a;
  dis_b = (b - x > 0) ? b - x : x - b;
  
 　(dis_a > dis_b) ? printf("B\n") : printff("A\n");
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:2: error: stray '\343' in program
   11 |  <U+3000>(dis_a > dis_b) ? printf("B\n") : printff("A\n");
      |  ^~~~~~~~
main.c:11:38: error: implicit declaration of function 'printff'; did you mean 'printf'? [-Wimplicit-function-declaration]
   11 |  　(dis_a > dis_b) ? printf("B\n") : printff("A\n");
      |                                      ^~~~~~~
      |                                      printf
Language: C++

#include <iostream>
#include <math.h>
usign namespace std;

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


Compiler output:
a.cc:3:1: error: 'usign' does not name a type
    3 | usign namespace std;
      | ^~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   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:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     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:9:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |     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:11:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |     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:11:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |     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 <iostream>
#include <algorithm>
 
void fastin(int &number) {
    bool negative = false;
    int c;
    number = 0;
    c = getchar_unlocked();
    if (c == '-') {
        negative = true;
        c = getchar_unlocked();
    }
    for (; (c > 47 && c < 58); c = getchar_unlocked()) number = number * 10 + c - 48;
    if (negative) number *= -1;
}
 
void fastout(int64_t n) {
    int64_t N = n, rev, count = 0;
    rev = N;
    if (N == 0) { putchar_unlocked('0'); putchar_unlocked('\n'); return ;}
    while ((rev % 10) == 0) { count++; rev /= 10;}
    rev = 0;
    while (N != 0) { rev = (rev<<3) + (rev<<1) + N % 10; N /= 10;}
    while (rev != 0) { putchar_unlocked(rev % 10 + '0'); rev /= 10;}
    while (count--) putchar('0');
}
     
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
        
    int N; fastin(N);
    int A[N];
    for (int i = 0; i < N; ++i) fastin(A[i]);
    sort(A, A + N, std::greater<int>());
     
    int point1 = -1; int point2 = -1;
    int len1, len2;
    for (int i = 0; i < N - 1; ++i) {
    if (A[i] == A[i + 1]){
           point1 = i; len1 = A[i]; break;
        }
    }
    if (point1 < 0){
        fastout(0); return 0;
    }
    for (int i = point1 + 2; i < N - 1; ++i) {
        if (A[i] == A[i + 1]){
            point2 = i; len2 = A[i]; break;
        }
    }
    if (point2 < 0){
        fastout(0); return 0;
    }    
    int64_t ans = 1LL * len1 * len2;
    fastout(ans);
     
    return 0;
}

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

#include <bits/stdc++.h>
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
typedef long long ll;
using namespace std;
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;

int h,w,x;
char s[1000][1000];
bool visited [1000][1000];
pair<int,int> start,goal;
queue<pair<int,pair<int,int>>> q;
vector<pair<int,int>> ino;

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



Compiler output:
a.cc: In function 'int main()':
a.cc:19:23: error: expected ')' before '{' token
   19 |   if(abs(a-b>abs(a-c)){
      |     ~                 ^
      |                       )
a.cc:24:1: error: expected primary-expression before '}' token
   24 | }
      | ^
Language: C++

#include<iostream>
#include<cmath>
int main(void){
	int x,a,b;
	cin>>x>>a>>b;
	if(abs(x-a)>abs(x-b)){
		cout<<"A";
	}
	else{
		cout<<"B";
	}
	return 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:7:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |                 cout<<"A";
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |                 cout<<"B";
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<iostream>
#include<math>
int main(void){
	int x,a,b;
	cin>>x>>a>>b;
	if(abs(x-a)>abs(x-b)){
		cout<<"A";
	}
	else{
		cout<<"B";
	}
	return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: expected '}' at end of input
   10 |   cout << "B" << endl;
      |                       ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: expected '}' at end of input
    9 |   cout << "B" << endl;
      |                       ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C

#include<stdio.h>
#include<stdilib.h>

int main(){
int x,a,b;
scanf("%d%d%d",&x,&a,&b);
if(abs(x-a)>abs(x-b))puts("A");
else puts("B");
return 0;
}

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

"use strict"

function main(input) {
  input = input.split(' ').map(v => ~~v)

  let ans = (Math.abs(input[1] - input[0]) < Math.abs(input[2] - input[0])) ? 'A' : 'B'
  console.log(ans)
}
main(require("fs").readFileSync("/dev/stdin", "utf8"))


Compiler output:
a.cc:1:1: error: expected unqualified-id before string constant
    1 | "use strict"
      | ^~~~~~~~~~~~
a.cc:9:5: error: expected constructor, destructor, or type conversion before '(' token
    9 | main(require("fs").readFileSync("/dev/stdin", "utf8"))
      |     ^
Language: C++

#include<iostream>
#include<cmath>


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
  }
  
  cout<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: expected ';' before '}' token
   16 |     cout<<B
      |            ^
      |            ;
   17 |   }
      |   ~
Language: C++

#include<iostream>
#include<cmath>


using namespace std;

int main(){
  int N,A,B;
  
  cin>>N>>A>>B;
  
  
  if(abbs(N-A)<abs(N-B)){
    cout<<A;
  }else{
    cout<<B
  }
  
  cout<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:6: error: 'abbs' was not declared in this scope; did you mean 'abs'?
   13 |   if(abbs(N-A)<abs(N-B)){
      |      ^~~~
      |      abs
a.cc:16:12: error: expected ';' before '}' token
   16 |     cout<<B
      |            ^
      |            ;
   17 |   }
      |   ~
Language: C++

#include<intstream>
#include<cmath>


using namespace std;

int main(){
  int N,A,B;
  
  cin>>N>>A>>B;
  
  
  if(abbs(N-A)<abs(N-B)){
    cout<<A;
  }else{
    cout<<B
  }
  
  cout<<endl;
}


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

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

int main(){
    int x,a,b;
    cin >> x >> a >> b;
    int da=abs(x-a);
    int db=abs(x-b);
    if(da>db)
    put('B');
    else
    put('A');
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'put' was not declared in this scope; did you mean 'putw'?
   10 |     put('B');
      |     ^~~
      |     putw
a.cc:12:5: error: 'put' was not declared in this scope; did you mean 'putw'?
   12 |     put('A');
      |     ^~~
      |     putw
Language: C++

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

int main(){
    int x,a,b;
    cin >> x >> a >> b;
    int da=abs(x-a);db=abs(x-b);
    if(da>db)
    put('B')
    else
    put('A');
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: 'db' was not declared in this scope; did you mean 'da'?
    7 |     int da=abs(x-a);db=abs(x-b);
      |                     ^~
      |                     da
a.cc:9:5: error: 'put' was not declared in this scope; did you mean 'putw'?
    9 |     put('B')
      |     ^~~
      |     putw
Language: C++

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

int main(){
    int x,a,b;
    cin >> x >> a >> b;
    int da=abs(x-a);db=abs(x-b);
    if(da>db)
    put(B);
    else
    put(A);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: 'db' was not declared in this scope; did you mean 'da'?
    7 |     int da=abs(x-a);db=abs(x-b);
      |                     ^~
      |                     da
a.cc:9:9: error: 'B' was not declared in this scope
    9 |     put(B);
      |         ^
a.cc:9:5: error: 'put' was not declared in this scope; did you mean 'putw'?
    9 |     put(B);
      |     ^~~
      |     putw
a.cc:11:9: error: 'A' was not declared in this scope
   11 |     put(A);
      |         ^
a.cc:11:5: error: 'put' was not declared in this scope; did you mean 'putw'?
   11 |     put(A);
      |     ^~~
      |     putw
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected primary-expression before '|' token
    6 |   if(|a-b|>|a-c|){
      |      ^
a.cc:6:11: error: expected primary-expression before '>' token
    6 |   if(|a-b|>|a-c|){
      |           ^
a.cc:6:12: error: expected primary-expression before '|' token
    6 |   if(|a-b|>|a-c|){
      |            ^
a.cc:6:17: error: expected primary-expression before ')' token
    6 |   if(|a-b|>|a-c|){
      |                 ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected primary-expression before '|' token
    6 |   if(|a-b|>|a-c|){
      |      ^
a.cc:6:11: error: expected primary-expression before '>' token
    6 |   if(|a-b|>|a-c|){
      |           ^
a.cc:6:12: error: expected primary-expression before '|' token
    6 |   if(|a-b|>|a-c|){
      |            ^
a.cc:6:17: error: expected primary-expression before ')' token
    6 |   if(|a-b|>|a-c|){
      |                 ^
a.cc:13:3: error: expected primary-expression before ':' token
   13 |   :
      |   ^
a.cc:13:4: error: expected '}' at end of input
   13 |   :
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C

main(a,b,c){scanf("%d%d%d",&a,&b.&c);puts((b-a)*(b-a)<(c-a)*(c-a)?"B":"A");}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(a,b,c){scanf("%d%d%d",&a,&b.&c);puts((b-a)*(b-a)<(c-a)*(c-a)?"B":"A");}
      | ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'c' defaults to 'int' [-Wimplicit-int]
main.c:1:13: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(a,b,c){scanf("%d%d%d",&a,&b.&c);puts((b-a)*(b-a)<(c-a)*(c-a)?"B":"A");}
      |             ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(a,b,c){scanf("%d%d%d",&a,&b.&c);puts((b-a)*(b-a)<(c-a)*(c-a)?"B":"A");}
main.c:1:13: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(a,b,c){scanf("%d%d%d",&a,&b.&c);puts((b-a)*(b-a)<(c-a)*(c-a)?"B":"A");}
      |             ^~~~~
main.c:1:13: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:34: error: expected identifier before '&' token
    1 | main(a,b,c){scanf("%d%d%d",&a,&b.&c);puts((b-a)*(b-a)<(c-a)*(c-a)?"B":"A");}
      |                                  ^
main.c:1:38: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
    1 | main(a,b,c){scanf("%d%d%d",&a,&b.&c);puts((b-a)*(b-a)<(c-a)*(c-a)?"B":"A");}
      |                                      ^~~~
main.c:1:38: note: include '<stdio.h>' or provide a declaration of 'puts'
Language: C++

#include<iostream>
using namespace std;
 
int main()
{   
    int x,a,b,ka,kb;
    char str[100001];
    cin >> x >> a >> b;
  ka = a - x;
  kb = b - x;
  
  if(ka<0){
    ka = 0-ka;
  }else if(kb<0){
    kb = 0- kb;
  }
  if(ka<kb){
    cout << A << endl;
  }else if(ka>kb){
    cout << B << endl;
  }
       return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: 'A' was not declared in this scope
   18 |     cout << A << endl;
      |             ^
a.cc:20:13: error: 'B' was not declared in this scope
   20 |     cout << B << endl;
      |             ^
Language: C++

#include<iostream>
#include<numeric>
#include<cmath>
#include<vector>
#include<string>

using namespace std;

int main() {
    
    int x,a,b;
    cin>>x>>a>>b;
    if(abs(x-a)>abs(x-b)){
    coout<<"A"<<endl;
    }
     if(abs(x-a)<abs(x-b)){
    coout<<"B"<<endl;
    }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'coout' was not declared in this scope
   14 |     coout<<"A"<<endl;
      |     ^~~~~
a.cc:17:5: error: 'coout' was not declared in this scope
   17 |     coout<<"B"<<endl;
      |     ^~~~~
Language: C++

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

int main(){
  int x,A,B;
  cin>>x>>A>>B;
  if((abs(x-A))<abs(x-B)) cout<<"A"<<endl;
  else cout<<"B"<<endl;
}

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

#include <iostream>
#include <string>
#include <vector>
#include <utility>
#include <algorithm>
#include <set>
#include <map>
#include <cassert>
#include <cstdio>
#include <cstdlib>

using namespace std;

int n,p[100001];

int main(int argc,char** argv) {
	int x,a,b;
	cin >> x >> a >> b;
	if(abs(x-a) < abs(x-b)) cout << "A";
	else cout << "B"
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:20:25: error: expected ';' before '}' token
   20 |         else cout << "B"
      |                         ^
      |                         ;
   21 | }
      | ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: 'abs' was not declared in this scope
    6 |     int da = abs(x - a), db = abs(x - b);
      |              ^~~
a.cc:7:14: error: 'db' was not declared in this scope; did you mean 'da'?
    7 |     if (da < db) printf("A\n");
      |              ^~
      |              da
Language: C++

#include <bits/stdc++.h>
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:6:35: error: expected primary-expression before ',' token
    6 |   if(abs(x-a)>=abs(x-b))cout<<'B'<,endl;
      |                                   ^
Language: C++

#include <iostream>
using namespace std;
int main(){
  int x,a,b;
  cim >> x >> a >> b;
  if(x>a && x>b){
    if ( a<b){
      cout << x-a << endl;
    } else {
      cout << c- b >endl;
      c@iy

Compiler output:
a.cc:11:8: error: stray '@' in program
   11 |       c@iy
      |        ^
a.cc: In function 'int main()':
a.cc:5:3: error: 'cim' was not declared in this scope
    5 |   cim >> x >> a >> b;
      |   ^~~
a.cc:10:15: error: 'c' was not declared in this scope
   10 |       cout << c- b >endl;
      |               ^
a.cc:11:8: error: expected ';' before 'iy'
   11 |       c@iy
      |        ^~~
      |        ;
a.cc:11:11: error: expected '}' at end of input
   11 |       c@iy
      |           ^
a.cc:9:12: note: to match this '{'
    9 |     } else {
      |            ^
a.cc:11:11: error: expected '}' at end of input
   11 |       c@iy
      |           ^
a.cc:6:17: note: to match this '{'
    6 |   if(x>a && x>b){
      |                 ^
a.cc:11:11: error: expected '}' at end of input
   11 |       c@iy
      |           ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

＃include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b,x;
  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:1: error: '\U0000ff03include' does not name a type
    1 | ＃include<bits/stdc++.h>
      | ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>x>>a>>b;
      |   ^~~
a.cc:6:6: error: 'abs' was not declared in this scope
    6 |   if(abs(x-a) > abs(x-b)) cout<<'B'<<endl;
      |      ^~~
a.cc:6:27: error: 'cout' was not declared in this scope
    6 |   if(abs(x-a) > abs(x-b)) cout<<'B'<<endl;
      |                           ^~~~
a.cc:6:38: error: 'endl' was not declared in this scope
    6 |   if(abs(x-a) > abs(x-b)) cout<<'B'<<endl;
      |                                      ^~~~
a.cc:7:8: error: 'cout' was not declared in this scope
    7 |   else cout<<'A'<<endl;
      |        ^~~~
a.cc:7:19: error: 'endl' was not declared in this scope
    7 |   else cout<<'A'<<endl;
      |                   ^~~~
Language: Java

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt(),a = sc.nextInt(),b = sc.nextInt();
		System.out.println(x-a < b -x ? "A" : "B");
	}
}


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

#include<iostream>
#include<algorithm>
#include<stdio.h>
#include<string.h>
using namespace std;
int main(){
	int a,b,c;
	int d,e;
	cin>>a>>b>>c;
	if(a>b)d=a-b;
	else d=b-a;
	else if(a>c)e=a-c;
	else e=c-a;
	else if(d>e)cout<<"A"<<endl;
	else cout<<"B"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'else' without a previous 'if'
   12 |         else if(a>c)e=a-c;
      |         ^~~~
a.cc:14:9: error: 'else' without a previous 'if'
   14 |         else if(d>e)cout<<"A"<<endl;
      |         ^~~~
Language: C++

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

int main() {
    string S;
    string result = "None";
    cin >> S;

    for (char c='a'; c <= 'z'; ++c){
        if (count(S.begin(), S.end(), c) == 0) cout << c << endl;

    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: 'count' was not declared in this scope
   11 |         if (count(S.begin(), S.end(), c) == 0) cout << c << endl;
      |             ^~~~~
Language: C++

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

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


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

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

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


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

#include<iostream>
using namespace std;

int main(){
  int x,a,b;
  cin >> x >> a >> b;
  if (x <= (a+b)/2){
    if (a < b){
      cout << "A" << endl;
    }
    else {
      cout << "B" << endl;
    }
  }
  else {
    if (a < b){
      cout << "B" << endl;
    }
    else {
      cout << "A" << endl;
  }
}

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

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

int main() {
    int x,a,b;
    cin >> x >> a >> b;
  if( (a-x)< (b-x)) cout << "A" << endl;
    
    else cout << "B" << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:9:30: error: expected '}' at end of input
    9 |     else cout << "B" << endl;
      |                              ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#import<ios>
int x,a,b;main(){scanf("%d%d%d",&a,&b,&c);a-=x;b-=x;puts(a*a>b*b?"B":"A");}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<ios>
      |  ^~~~~~
a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | int x,a,b;main(){scanf("%d%d%d",&a,&b,&c);a-=x;b-=x;puts(a*a>b*b?"B":"A");}
      |           ^~~~
a.cc: In function 'int main()':
a.cc:2:40: error: 'c' was not declared in this scope
    2 | int x,a,b;main(){scanf("%d%d%d",&a,&b,&c);a-=x;b-=x;puts(a*a>b*b?"B":"A");}
      |                                        ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:41: error: expected ';' before string constant
    8 |         if (abs(x - a) < abs(x - b))cout"A" << endl;
      |                                         ^~~
      |                                         ;
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<long long> Arr(N);
  for (int i = 0; i < N; i++)
    cin >> A[i];
  sort(Arr.begin(), Arr.end());
  vector<long long> Lis;
  for (int i = N - 1; i >= 0; i--) {
    if (i >= 1 && Arr[i] == Arr[i - 1]) {
      Lis.push_back(Arr[i]);
      i--;
    }
  }
  if (Lis.size() < 2) {
    cout << 0 << endl;
    return 0;
  }

  cout << Lis[0] * Lis[1] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'A' was not declared in this scope
    9 |     cin >> A[i];
      |            ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<long long> Arr(N);
  for (int i = 0; i < N; i++)
    cin >> A[i];
  sort(Arr.begin(), Arr.end());
  vector<long long> Lis;
  for (int i = N - 1; i >= 0; i--) {
    if (i >= 1 && A[i] == A[i - 1]) {
      Lis.push_back(A[i]);
      i--;
    }
  }
  if (Lis.size() < 2) {
    cout << 0 << endl;
    return 0;
  }

  cout << Lis[0] * Lis[1] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'A' was not declared in this scope
    9 |     cin >> A[i];
      |            ^
a.cc:13:19: error: 'A' was not declared in this scope
   13 |     if (i >= 1 && A[i] == A[i - 1]) {
      |                   ^
Language: C++

use std::io::*;

fn main() {
    let mut x = read();
    let mut a = read();
    let mut b = read();

    let ax = zet(a - x);
    let bx = zet(b - x);

    let out = stdout();
    let mut out = BufWriter::new(out.lock());

    if ax > bx {
        out.write(b"B");
    } else {
        out.write(b"A");
    }
}

fn zet(mut x: i32) -> i32 {
    if x < 0 {
        x = -x;
    }
    x
}

//fn read_v() -> Vec<char> {
//    let s = stdin();
//    //    let mut s = BufReader::new(s.lock());
//    let b = s.bytes()
//        .map(|c| c.unwrap() as char)
//        .take_while(|c| !c.is_whitespace())
//        .collect();
//    b
//}

// fn read_t() -> (u32, u32) {
//     let mut s = String::new();
//     stdin().read_line(&mut s).expect("failed read_t");
//     let mut i = s.split_whitespace().map(|c| c.parse().ok().unwrap());
//     (i.next().unwrap(), i.next().unwrap())
// }

fn read() -> i32 {
    let s = stdin();
    //    let mut s = BufReader::new(s.lock());
    let b = s.bytes()
        .map(|c| c.unwrap() as char)
        .take_while(|c| !c.is_whitespace())
        .collect::<String>();
    b.parse().ok().expect("read() failed")
}


Compiler output:
a.cc:1:1: error: 'use' does not name a type
    1 | use std::io::*;
      | ^~~
a.cc:3:1: error: 'fn' does not name a type
    3 | fn main() {
      | ^~
a.cc:21:1: error: 'fn' does not name a type
   21 | fn zet(mut x: i32) -> i32 {
      | ^~
a.cc:45:1: error: 'fn' does not name a type
   45 | fn read() -> i32 {
      | ^~
Language: C++

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int a,b,c,x,y;
    cin >> a >> b >>c;
    x = abs(b-a);
    y = abs(c-b);
    cout << min(x,y); << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: expected primary-expression before '<<' token
    9 |     cout << min(x,y); << endl;
      |                       ^~
Language: C++

#include<cstdio>
int abs(int n){
if(n<0)n=-n;
return n;
}
int main()[
int x,a,b;
scanf("%d%d%d",&x,&a,&b);
if(abs(a-x)>abs(b-x))printf("B\n");
else printf("A\n");
return 0;
}

Compiler output:
a.cc:7:1: error: expected primary-expression before 'int'
    7 | int x,a,b;
      | ^~~
a.cc:6:12: error: expected ']' before 'int'
    6 | int main()[
      |            ^
      |            ]
    7 | int x,a,b;
      | ~~~         
a.cc:8:6: error: expected constructor, destructor, or type conversion before '(' token
    8 | scanf("%d%d%d",&x,&a,&b);
      |      ^
a.cc:9:1: error: expected unqualified-id before 'if'
    9 | if(abs(a-x)>abs(b-x))printf("B\n");
      | ^~
a.cc:10:1: error: expected unqualified-id before 'else'
   10 | else printf("A\n");
      | ^~~~
a.cc:11:1: error: expected unqualified-id before 'return'
   11 | return 0;
      | ^~~~~~
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
typedef long long ll;
typedef pair<ll,ll> P;
 
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const ll INF = 1LL<<29;
const ll mod = 1e9+7;
 
#define rep(i, a, b) for(ll (i) = (a); (i) < (b);++i)
 
ll gcd(ll x, ll y)
{
  if (x % y == 0)
  {
    return y;
  }
  return gcd(y, x % y);
}
 
int main()
{
  string a;
  cin >> a;
  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:27:11: error: 'x' was not declared in this scope
   27 |   if (abs(x-a) > abs(x-b)){
      |           ^
a.cc:27:24: error: 'b' was not declared in this scope
   27 |   if (abs(x-a) > abs(x-b)){
      |                        ^
Language: C++

#include<bits/stdc++.h>

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:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin >> x >> a >> b;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |                 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:8:32: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |                 cout << "B" << endl;
      |                                ^~~~
      |                                std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:10:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |                 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:10:32: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |                 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;
  scanf("%d %d %d",&x,&a,&b);
  
  int shopa=x-a;
  int shopb=x-b;
  
  if(shopa<0){
     int trueshopa=shopa*-1;
      printf("%d\n",trueshopa);
  }
  else if(shopa>=0){
      printf("%d\n"shopa);
  }
  else if(shopb<0){
  int trueshopb=shopb*-1;
    printf("%d\n",trueshopb);
  }
  else{
     printf("%d\n",shopb);
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: unable to find string literal operator 'operator""shopa' with 'const char [4]', 'long unsigned int' arguments
   14 |       printf("%d\n"shopa);
      |              ^~~~~~~~~~~
Language: C++

#include <stdio.h>
int main(){
	int x,a,b,c,d;
	scanf("%d %d %d",&x,&a,&b)
	c=(x-a);
	d=(x-b);
	if (c<0){
		c=c*-1;
	}
	if (d<0){
		d=d*-1;
	}
	if(c<d){
		printf("B");
	}else{
		printf("A");
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:35: error: expected ';' before 'c'
    4 |         scanf("%d %d %d",&x,&a,&b)
      |                                   ^
      |                                   ;
    5 |         c=(x-a);
      |         ~