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

#include<stdio.h>
 
int main(){
 
int a,b,c;
 
scanf("%d %d %d",&a,&b,&c);
 
if(b−a=c−b){
printf("YES\n")
}else{
printf("NO\n")
}
 
}

Compiler output:
main.c: In function 'main':
main.c:9:5: error: stray '\342' in program
    9 | if(b<U+2212>a=c<U+2212>b){
      |     ^~~~~~~~
main.c:9:5: error: expected ')' before 'a'
    9 | if(b−a=c−b){
      |   ~ ^~
      |     )
main.c:9:9: error: stray '\342' in program
    9 | if(b<U+2212>a=c<U+2212>b){
      |                ^~~~~~~~
main.c:10:16: error: expected ';' before '}' token
   10 | printf("YES\n")
      |                ^
      |                ;
   11 | }else{
      | ~               
main.c:12:15: error: expected ';' before '}' token
   12 | printf("NO\n")
      |               ^
      |               ;
   13 | }
      | ~
Language: C

#include<stdio.h>

int main(){

int a,b,c;

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

if(b−a=c−b){
printf("YES\n")
}else{
printf("NO\n")
}

}

Compiler output:
main.c: In function 'main':
main.c:9:5: error: stray '\342' in program
    9 | if(b<U+2212>a=c<U+2212>b){
      |     ^~~~~~~~
main.c:9:5: error: expected ')' before 'a'
    9 | if(b−a=c−b){
      |   ~ ^~
      |     )
main.c:9:9: error: stray '\342' in program
    9 | if(b<U+2212>a=c<U+2212>b){
      |                ^~~~~~~~
main.c:10:16: error: expected ';' before '}' token
   10 | printf("YES\n")
      |                ^
      |                ;
   11 | }else{
      | ~               
main.c:12:15: error: expected ';' before '}' token
   12 | printf("NO\n")
      |               ^
      |               ;
   13 | }
      | ~
Language: Java

import java.util.Scanner;

public class main{
	public static void main (String[] args){
	Scanner scan = new Scanner(System.in);

	String kisupas = scan.nextLine();
	String gusupas = scan.nextLine();
	
	String[] kisu = kisupas.split("", 0);
	String[] gusu = gusupas.split("", 0);

	for(int i=0; i<kisu.length; i++){
	System.out.print(kisu[i]);
	if(i != gusu.length)
	System.out.print(gusu[i]);	
	}
	}
    
}

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

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

class Main {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		String b = sc.next();
		String c = sc.next();
		
		if (b-a == c-b) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}
	}
}

Compiler output:
Main.java:13: error: bad operand types for binary operator '-'
		if (b-a == c-b) {
		     ^
  first type:  String
  second type: String
Main.java:13: error: bad operand types for binary operator '-'
		if (b-a == c-b) {
		            ^
  first type:  String
  second type: String
2 errors
Language: Java

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

class Main {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		String b = sc.next();
		String c = sc.next();
		
		if (b-a == c-b) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}
}

Compiler output:
Main.java:18: error: reached end of file while parsing
}
 ^
1 error
Language: C

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

void main(){
	int a,b,c;
	
	scanf_s("%d %d %d",&a,&b,&c);
	if(b-a == c-b){
		printf("Yes\n");
	}else{
		printf("No\n");
	}
}	

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

a, b, c = map(int(input().split(" ")));

if b-a == c-b:
    print("YES");
else:
    print("NO");


Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a, b, c = map(int(input().split(" ")));
      | ^
a.cc:3:1: error: expected unqualified-id before 'if'
    3 | if b-a == c-b:
      | ^~
a.cc:5:1: error: expected unqualified-id before 'else'
    5 | else:
      | ^~~~
Language: C++

#include <iostream > 
using namespace std; 
int main(){ 
	string E, O; 
	cin >> E >> O; 
	for(int i=0; i < E.size(); i++){ 
	 if (i < O.size()) cout << O[i]; 
	} 
	return 0;
}


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

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		String[] jal = new String[3];
		int[] ana = new int[3];
		jal = line.split(" ");
		for(int i=0;i<jal.length;i++)
			ana[i]=Integer.parseInt(jal[i]);
		if(ana[1]-ana[0]=ana[2]-ana[1])
			System.out.println("YES");
		else
			System.out.println("NO");
	}
}

Compiler output:
Main.java:14: error: unexpected type
		if(ana[1]-ana[0]=ana[2]-ana[1])
		         ^
  required: variable
  found:    value
1 error
Language: Java

public class Main {

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

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();


		if(c - a == b ){

		System.out.println("YES");

		}else{


		System.out.println("NO");

	}
}}


Compiler output:
Main.java:3: error: cannot find symbol
	public static void main(String[] args) throws IOException {
	                                              ^
  symbol:   class IOException
  location: class Main
Main.java:5: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
3 errors
Language: C++

/* @CopyRight:   Script by vimer(micro.script@hotmail.com). All rights reserved.
 * @Version:     1.0
 * @Date:        Saturday, May 20, 2017
 * @Description: A - ι⊥l
 * @Environment: Code::Blocks 16.01, GCC 4.9.
 */
#include<iostream>
using namespace std;
int main(){
    int a = 0, b = 0, c = 0;
    cin >> a >> b >> c;
    if(b - a = c - b) cout << "YES" ;
    else cout << "NO";
    cout << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: lvalue required as left operand of assignment
   12 |     if(b - a = c - b) cout << "YES" ;
      |        ~~^~~
Language: C++

#include<cstdio>
#include<algorithm>
#include<vector>
#include<deque>
#include<string>
#include<iostream>
#include<tuple>
#include<utility>
#include<set>
#include<queue>
using namespace std;
typedef long long int llint;
const llint big=((llint)1<<(llint)30);
#define mt make_tuple
#define mp make_pair
#define fi first
#define se second
#define pub push_back
#define res resize
//JOI 2017 semiexp O(NlogN)
//3:25~4:40
//Tmin 
int main(void){
	int a,b,c;
	cin>>a>>b>>c;
	if(b+b==a+c){cout<<"YES"<<endl;}
	else{cout<<"NO"<<<endl;}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:26: error: expected primary-expression before '<' token
   27 |         else{cout<<"NO"<<<endl;}
      |                          ^
Language: C++

#include<iostream>
using namespace std;
int main(){
    int a,b,c;
    cin >> a >> b >> c;
    if(b-a=c-b) {
        cout << "YES" << endl;
    }else{
            cout << "NO" << endl;
        }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: lvalue required as left operand of assignment
    6 |     if(b-a=c-b) {
      |        ~^~
Language: Java

import java.util.Scanner;
public class A.java {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		
		if(b - a == c - b) {
			System.out.println("YES");
		}else {
			System.out.println("NO");
		}
		
	}
}


Compiler output:
Main.java:2: error: '{' expected
public class A.java {
              ^
1 error
Language: Java

import java.util.Scanner;
public class A {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		
		if(b - a == c - b) {
			System.out.println("YES");
		}else {
			System.out.println("NO");
		}
		
	}
}


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: lvalue required as left operand of assignment
    6 | if (a-b=b-c){
      |     ~^~
a.cc:12:9: error: expected ';' before '}' token
   12 | return 0
      |         ^
      |         ;
   13 | }
      | ~
Language: C++

#include <iostream>
using namespace std;

int main(){
    int a,b,c;
    cin>>a>>b>>c;
    cout<<(b-a==c-b)?"YES":"NO"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:32: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 |     cout<<(b-a==c-b)?"YES":"NO"<<endl;
      |                            ~~~~^~~~~~
Language: C++

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

int main() {
	
	int a, b, c;
	cin >> a >> b >> c;
	
	if (b - a == c - d) 
		cout << "YES" << endl;
	else 
		cout << "NO" << endl;
}
	


Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: 'd' was not declared in this scope
    9 |         if (b - a == c - d)
      |                          ^
Language: Java


import java.util.Scanner;

public class MainA {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		if(c-b==b-a) System.out.println("YES");
		else System.out.println("NO");

	}

}


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

package main

import (
  "fmt"
)

func main(){
  var a,b,c int
  fmt.Scan(&a, &b, &c)

  if b - a == c - b {
    fmt.Println("YES")
  } else {
    fmt.Println("NO")
  }
}

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

int a,b,c;
cin >> a >> b >>c;
if (b-a == c-b){
cout << "YES";
}else{
cout << "NO";
}

Compiler output:
a.cc:2:1: error: 'cin' does not name a type
    2 | cin >> a >> b >>c;
      | ^~~
a.cc:3:1: error: expected unqualified-id before 'if'
    3 | if (b-a == c-b){
      | ^~
a.cc:5:2: error: expected unqualified-id before 'else'
    5 | }else{
      |  ^~~~
Language: C++

int a,b,c;
if (b-a == c-b){
cout << "YES";
}else{
cout << "NO"
}

Compiler output:
a.cc:2:1: error: expected unqualified-id before 'if'
    2 | if (b-a == c-b){
      | ^~
a.cc:4:2: error: expected unqualified-id before 'else'
    4 | }else{
      |  ^~~~
Language: C++

#include<iostream>
using namespace std;

	int main()
{

	// 変数
	int a,b,c;
	
	// 入力
	cin >> a >> b >> c;
	
	ba = b - a;
	cb = c - b;
	
	if (ba == cb) {
		cout << "YES" << endl;
	}
	
	else {
		cout << "NO" << endl;
	}
	
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'ba' was not declared in this scope; did you mean 'b'?
   13 |         ba = b - a;
      |         ^~
      |         b
a.cc:14:9: error: 'cb' was not declared in this scope; did you mean 'c'?
   14 |         cb = c - b;
      |         ^~
      |         c
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println(abc058_a(sc.next(),sc.next(),sc.next()));
    }

    static String abc058_a(int a, int b, int c) {
        if (b - a == c - b) {
            return "YES";
        }
        return "NO";
    }

}


Compiler output:
Main.java:6: error: incompatible types: String cannot be converted to int
        System.out.println(abc058_a(sc.next(),sc.next(),sc.next()));
                                           ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: C++

#include <iostream>
using namespace std;

int main() {
	long a[3];
	cin>>a[0]>>a[1]>>a[2];
	sort(a,a+3);
	if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n";
	else cout<<"NO\n";
	// your code goes here
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'sort' was not declared in this scope; did you mean 'short'?
    7 |         sort(a,a+3);
      |         ^~~~
      |         short
a.cc:8:24: error: expected identifier before numeric constant
    8 |         if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n";
      |                        ^
a.cc: In lambda function:
a.cc:8:26: error: expected '{' before '-' token
    8 |         if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n";
      |                          ^
a.cc: In function 'int main()':
a.cc:8:26: error: no match for 'operator-' (operand types are 'main()::<lambda()>' and 'long int')
    8 |         if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n";
      |                       ~~~^~~~~
      |                       |      |
      |                       |      long int
      |                       main()::<lambda()>
In file included from /usr/include/c++/14/string:48,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  618 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note:   template argument deduction/substitution failed:
a.cc:8:30: note:   'main()::<lambda()>' is not derived from 'const std::reverse_iterator<_Iterator>'
    8 |         if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n";
      |                              ^
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1790 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note:   template argument deduction/substitution failed:
a.cc:8:30: note:   'main()::<lambda()>' is not derived from 'const std::move_iterator<_IteratorL>'
    8 |         if(a[1]-a[0]==[2]-a[1]) cout<<"YES\n";
      |                              ^
Language: C++

#include <stdio.h>
using namespace std;

int main()
{
 

 
int main()

 {
  cin >> odd >> even;
  int e, o;
  e = even.size();
  o = odd.size();
  for(int i = 0; i < e + o; i++)
  {
    if(i % 2 == 0){
      cout << odd[i / 2];
    }
    else{
      cout << even[(i - 1) / 2];
    }
 return 0; }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    9 | int main()
      |         ^~
a.cc:9:9: note: remove parentheses to default-initialize a variable
    9 | int main()
      |         ^~
      |         --
a.cc:9:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:11:2: error: a function-definition is not allowed here before '{' token
   11 |  {
      |  ^
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include <stdio.h>
using namespace std;

int main()
{
 

 
int main()

  cin >> odd >> even;
  int e, o;
  e = even.size();
  o = odd.size();
  for(int i = 0; i < e + o; i++)
  {
    if(i % 2 == 0){
      cout << odd[i / 2];
    }
    else{
      cout << even[(i - 1) / 2];
    }
  }
  return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    9 | int main()
      |         ^~
a.cc:9:9: note: remove parentheses to default-initialize a variable
    9 | int main()
      |         ^~
      |         --
a.cc:9:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:11:3: error: expected initializer before 'cin'
   11 |   cin >> odd >> even;
      |   ^~~
a.cc:13:7: error: 'even' was not declared in this scope
   13 |   e = even.size();
      |       ^~~~
a.cc:14:7: error: 'odd' was not declared in this scope
   14 |   o = odd.size();
      |       ^~~
a.cc:18:7: error: 'cout' was not declared in this scope
   18 |       cout << odd[i / 2];
      |       ^~~~
a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <stdio.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:21:7: error: 'cout' was not declared in this scope
   21 |       cout << even[(i - 1) / 2];
      |       ^~~~
a.cc:21:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:24:12: error: expected '}' at end of input
   24 |   return 0;
      |            ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include <stdio.h>
using namespace std;

int main()
{
 
string even, odd;
 
int main()
{
  cin >> odd >> even;
  int e, o;
  e = even.size();
  o = odd.size();
  for(int i = 0; i < e + o; i++)
  {
    if(i % 2 == 0){
      cout << odd[i / 2];
    }
    else{
      cout << even[(i - 1) / 2];
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'string' was not declared in this scope
    7 | string even, odd;
      | ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    1 | #include <stdio.h>
  +++ |+#include <string>
    2 | using namespace std;
a.cc:9:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    9 | int main()
      |         ^~
a.cc:9:9: note: remove parentheses to default-initialize a variable
    9 | int main()
      |         ^~
      |         --
a.cc:9:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:10:1: error: a function-definition is not allowed here before '{' token
   10 | {
      | ^
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include <stdio.h>
using namespace std;

int main(){
  cin >> odd >> even;
  int e, o;
  a = even.size();
  b = odd.size();
  for(int a = 0; a < b + a; a++){
    if(a % 2 == 0){
      cout << odd[i / 2];
    }
    else{
      cout << even[(a - 1) / 2];
    }
  }
  return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> odd >> even;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <stdio.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:5:10: error: 'odd' was not declared in this scope
    5 |   cin >> odd >> even;
      |          ^~~
a.cc:5:17: error: 'even' was not declared in this scope
    5 |   cin >> odd >> even;
      |                 ^~~~
a.cc:7:3: error: 'a' was not declared in this scope
    7 |   a = even.size();
      |   ^
a.cc:8:3: error: 'b' was not declared in this scope
    8 |   b = odd.size();
      |   ^
a.cc:11:7: error: 'cout' was not declared in this scope
   11 |       cout << odd[i / 2];
      |       ^~~~
a.cc:11:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:19: error: 'i' was not declared in this scope
   11 |       cout << odd[i / 2];
      |                   ^
a.cc:14:7: error: 'cout' was not declared in this scope
   14 |       cout << even[(a - 1) / 2];
      |       ^~~~
a.cc:14:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:11: error: expected ';' before '}' token
   17 |   return 0
      |           ^
      |           ;
   18 | }
      | ~
Language: C++

#include <stdio.h>
using namespace std;
{
int main(){
  cin >> odd >> even;
  int e, o;
  a = even.size();
  b = odd.size();
  for(int a = 0; a < b + a; a++){
    if(a % 2 == 0){
      cout << odd[i / 2];
    }
    else{
      cout << even[(a - 1) / 2];
    }
  }
  return 0
}

Compiler output:
a.cc:3:1: error: expected unqualified-id before '{' token
    3 | {
      | ^
Language: C++

#include <stdio.h>
using namespace std;

int main()
{
	int a,b,c;
	scanf("%d %d %d",&a,&b,&c);
	if(b-a=c-b)
	{	
		 printf("YES\n");
	}
	else{
	printf("NO\n");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: lvalue required as left operand of assignment
    8 |         if(b-a=c-b)
      |            ~^~
Language: C++

#include <stdio.h>
using namespace std;

int main()
{
	int a,b,c;
	scanf("%d %d %d",&a,&b,&c);
	if(b-a=c-b)
	{	
		 printf("YES\n");
	}
	else{
	printf("NO\n");
	}
	return0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: lvalue required as left operand of assignment
    8 |         if(b-a=c-b)
      |            ~^~
a.cc:15:9: error: 'return0' was not declared in this scope
   15 |         return0;
      |         ^~~~~~~
Language: C++

#include <stdio.h>
using namespace std;

int main()
{
	int a,b,c;
	scanf("%d %d %d",&a,&b,&c);
	if(b-a=c-b)
	{	
		 printf("YES\n");
	}
	{else
	printf("NO\n");
	}
	return0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: lvalue required as left operand of assignment
    8 |         if(b-a=c-b)
      |            ~^~
a.cc:12:10: error: 'else' without a previous 'if'
   12 |         {else
      |          ^~~~
a.cc:15:9: error: 'return0' was not declared in this scope
   15 |         return0;
      |         ^~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int a,b,c;
	scanf("%d %d %d",&a,&b,&c);
	if(a-b=b-c)
	{	
		 printf("YES\n");
	}
	{else
	printf("NO\n");}
	return0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: lvalue required as left operand of assignment
    8 |         if(a-b=b-c)
      |            ~^~
a.cc:12:10: error: 'else' without a previous 'if'
   12 |         {else
      |          ^~~~
a.cc:14:9: error: 'return0' was not declared in this scope
   14 |         return0;
      |         ^~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int a,b,c;
	scanf("%d %d %d",&a,&b,&c);
	if(a-b=b-c)
	{	
		 printf("YES\n");
	}
	{else
	printf("NO\n");}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: lvalue required as left operand of assignment
    8 |         if(a-b=b-c)
      |            ~^~
a.cc:12:10: error: 'else' without a previous 'if'
   12 |         {else
      |          ^~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
	if(a-b=b-c)
	yes
	else
	no
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: 'a' was not declared in this scope
    6 |         if(a-b=b-c)
      |            ^
a.cc:6:14: error: 'b' was not declared in this scope
    6 |         if(a-b=b-c)
      |              ^
a.cc:6:18: error: 'c' was not declared in this scope
    6 |         if(a-b=b-c)
      |                  ^
a.cc:7:9: error: 'yes' was not declared in this scope
    7 |         yes
      |         ^~~
Language: C++

a,b,c = gets.split.map{|n| n.to_i}

puts (b-a === c-b) ? 'YES' : 'NO'


Compiler output:
a.cc:3:22: warning: multi-character character constant [-Wmultichar]
    3 | puts (b-a === c-b) ? 'YES' : 'NO'
      |                      ^~~~~
a.cc:3:30: warning: multi-character character constant [-Wmultichar]
    3 | puts (b-a === c-b) ? 'YES' : 'NO'
      |                              ^~~~
a.cc:1:1: error: 'a' does not name a type
    1 | a,b,c = gets.split.map{|n| n.to_i}
      | ^
a.cc:3:6: error: expected constructor, destructor, or type conversion before '(' token
    3 | puts (b-a === c-b) ? 'YES' : 'NO'
      |      ^
Language: C++

#include <iostream>
using namespace std;

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

  if (b - a == c - b){
    cout << "YES"　<< endl;
}
  else cout << "NO" << endl;
return (0);
} 

Compiler output:
a.cc:10:13: error: extended character 　 is not valid in an identifier
   10 |     cout << "YES"　<< endl;
      |             ^
a.cc: In function 'int main()':
a.cc:10:13: error: unable to find string literal operator 'operator""\U00003000' with 'const char [4]', 'long unsigned int' arguments
   10 |     cout << "YES"　<< endl;
      |             ^~~~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
 
int main(){
  int a, b, c;
  cin >> a >> b >> c;

  if(b - a == c - b)
    cout << "YES" << endl;
 
  else
    cout << "NO" << endl;

  return = 0;
};

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

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


int a, b, c;
cin >> a >> b >> c;
if(b - a == c - b)
    cout >> "YES" >> endl;

else
    cout >> "NO" >> endl;



Compiler output:
a.cc:7:1: error: 'cin' does not name a type
    7 | cin >> a >> b >> c;
      | ^~~
a.cc:8:1: error: expected unqualified-id before 'if'
    8 | if(b - a == c - b)
      | ^~
a.cc:11:1: error: expected unqualified-id before 'else'
   11 | else
      | ^~~~
Language: C++

#include <iostream>
#include <string>

int a, b, c;
cin >> a >> b >> c;
if(b - a == c - b)
  cout >> "YES" >> endl;

else
  cout >> "NO" >> endl;


Compiler output:
a.cc:5:1: error: 'cin' does not name a type
    5 | cin >> a >> b >> c;
      | ^~~
a.cc:6:1: error: expected unqualified-id before 'if'
    6 | if(b - a == c - b)
      | ^~
a.cc:9:1: error: expected unqualified-id before 'else'
    9 | else
      | ^~~~
Language: C++

#include <iostream>
#include <string>

int a, b, c;
cin << a << b << c;
if(b - a == c - b){
   cout >> "YES" >> endl;
}
else{
   cout >> "NO" >> endl;
}


Compiler output:
a.cc:5:1: error: 'cin' does not name a type
    5 | cin << a << b << c;
      | ^~~
a.cc:6:1: error: expected unqualified-id before 'if'
    6 | if(b - a == c - b){
      | ^~
a.cc:9:1: error: expected unqualified-id before 'else'
    9 | else{
      | ^~~~
Language: Java

package gaja;

import java.util.Scanner;

public class Cihiro33
{
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
	int B = sc.nextInt();
	int C = sc.nextInt();
	if(B-A == C-B){
		System.out.print("Yes");
	}	else
	{
		System.out.print("No");

		// TODO 自動生成されたメソッド・スタブ

	}


	}

}


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


1.#include<stdio.h>
2.int main(void){
3. 
4.int a,b,c,d,e;
5.scanf("%d",&a);
6.scanf("%d",&b);
7.scanf("%d",&c);
8. 
9.d=b-a; e=c-b;
10. 
11.if(d==e){
12.printf("YES\n");
13.}else{
14.printf("NO\n");
15.}
16. 
17.return 0;
18.}
19. 



Compiler output:
a.cc:2:3: error: stray '#' in program
    2 | 1.#include<stdio.h>
      |   ^
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 1.#include<stdio.h>
      | ^~
a.cc:20:1: error: expected unqualified-id before numeric constant
   20 | 19.
      | ^~~
Language: C++

#include<stdio.h>
int main(void){

double a,b,c,d,e;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);

d=b-a; e=c-b;

if(d==e){
printf("YES\n");
}else{
printd("NO\n");
}

return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:14:1: error: 'printd' was not declared in this scope; did you mean 'printf'?
   14 | printd("NO\n");
      | ^~~~~~
      | printf
Language: C++

#include <iostream>
using namespace std ;
int main () {
    string E, O;
    cin >> E >> O;
     for (int i=0; i < E. size () - 1 ; i++) {
     cout << E[i];
     cout << O[i];
  }
cout << E[E.size() - 1]
   if(E.size() == O. size () ) cout << O[O.size() - 1];
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: expected ';' before 'if'
   10 | cout << E[E.size() - 1]
      |                        ^
      |                        ;
   11 |    if(E.size() == O. size () ) cout << O[O.size() - 1];
      |    ~~
Language: C++

#include < iostream >
using namespace std ;
int main () {
int a, b, c;
cin >> a >> b >> c;
cout << ( b-a == c-b ? "YES " : "NO" ) << endl ;
}

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

#include <boost/lexical_cast.hpp>
#include <iostream>
#include <string>
#include <typeinfo>

int main()
{
    const std::string str;
    std::cin >> str;
    long a = boost::lexical_cast<int>(str[0]);
    long b = boost::lexical_cast<int>(str[2]);
    long c = boost::lexical_cast<int>(str[4]);
    return b - a == c - a;
}

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

a, b, c = map(int, raw_input().split())
print 'YES' if b - a = c - b else 'NO'

Compiler output:
a.cc:2:7: warning: multi-character character constant [-Wmultichar]
    2 | print 'YES' if b - a = c - b else 'NO'
      |       ^~~~~
a.cc:2:35: warning: multi-character character constant [-Wmultichar]
    2 | print 'YES' if b - a = c - b else 'NO'
      |                                   ^~~~
a.cc:1:1: error: 'a' does not name a type
    1 | a, b, c = map(int, raw_input().split())
      | ^
Language: C

#include<stdio.h>
int main()
{
int a, b, c;
	scanf_s("%d", &a);
	scanf_s("%d", &b);
	scanf_s("%d", &c);
	
	
	if (b-a == c-b) { printf("YES"); }

	else { printf("NO"); }
return 0;
}

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

int a, b, c;
	scanf("%d", &a);
	scanf("%d", &b);
	scanf("%d", &c);
	
	
	if (b-a == c-b) { printf("YES"); }

	else { printf("NO"); }

Compiler output:
main.c:2:15: error: expected declaration specifiers or '...' before string constant
    2 |         scanf("%d", &a);
      |               ^~~~
main.c:2:21: error: expected declaration specifiers or '...' before '&' token
    2 |         scanf("%d", &a);
      |                     ^
main.c:3:15: error: expected declaration specifiers or '...' before string constant
    3 |         scanf("%d", &b);
      |               ^~~~
main.c:3:21: error: expected declaration specifiers or '...' before '&' token
    3 |         scanf("%d", &b);
      |                     ^
main.c:4:15: error: expected declaration specifiers or '...' before string constant
    4 |         scanf("%d", &c);
      |               ^~~~
main.c:4:21: error: expected declaration specifiers or '...' before '&' token
    4 |         scanf("%d", &c);
      |                     ^
main.c:7:9: error: expected identifier or '(' before 'if'
    7 |         if (b-a == c-b) { printf("YES"); }
      |         ^~
main.c:9:9: error: expected identifier or '(' before 'else'
    9 |         else { printf("NO"); }
      |         ^~~~
Language: C

#include<stdio.h>
int main()
{
	int a, b, c;
	scanf_s("%d", &a);
	scanf_s("%d", &b);
	scanf_s("%d", &c);
	
	
	if (b-a == c-b) { printf("YES"); }

	else { printf("NO"); }
	


    return 0;
}

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

#include <stdio.h>


int main()
{
	int a, b, c, d;
	scanf_s("%d", &a);
	scanf_s("%d", &b);
	scanf_s("%d", &c);
	d = 2 * b -(a + c);
	
	if (d == 0) { printf("YES"); }

	else { printf("NO"); }
	


    return 0;
}

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

#include "stdafx.h"


int main()
{
	int a, b, c, d;
	scanf_s("%d", &a);
	scanf_s("%d", &b);
	scanf_s("%d", &c);
	d = 2 * b -(a + c);
	
	if (d == 0) { printf("YES"); }

	else { printf("NO"); }
	


    return 0;
}

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

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		if (b - a == c - b) {
                           System.out.println("YES");
                } else {
                           System.out.println("NO");
                }
		System.out.println((a+b+c) + " " + s);
	}
}

Compiler output:
Main.java:13: error: cannot find symbol
		System.out.println((a+b+c) + " " + s);
		                                   ^
  symbol:   variable s
  location: class Main
1 error
Language: Java

import java.util;

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

    if (b - a == c - b) {
      System.out.println("YES");
    } else {
      System.out.println("NO");
    }
  }
}


Compiler output:
Main.java:1: error: cannot find symbol
import java.util;
           ^
  symbol:   class util
  location: package java
Main.java:5: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
3 errors
Language: C

#include<stdio.h>

void main(){
	int a,b,c,jd1,jd2;
	
	scanf("%d %d %d", &a, &b, &c);

	if(a<1 || a>101 || b<1 || b>101 || c<1 || c>101) {
		exit(0);
	}

	jd1 = b - a; jd2 = c - b;

	if(jd1 == jd2){
		puts("YES");
	} else {
		puts("NO");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:17: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
    9 |                 exit(0);
      |                 ^~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
    1 | #include<stdio.h>
  +++ |+#include <stdlib.h>
    2 | 
main.c:9:17: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
    9 |                 exit(0);
      |                 ^~~~
main.c:9:17: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:19:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   19 |         return 0;
      |                ^
main.c:3:6: note: declared here
    3 | void main(){
      |      ^~~~
Language: C++

#include<stdio.h>

int main(){
	int a,b,c,jd1,jd2;
	
	scanf("%d %d %d", &a, &b, &c);

	if(a<1 || a>101 || b<1 || b>101 || c<1 || c>101) exit(0);

	jd1 = b - a; jd2 = c - b;

	if(jd1 == jd2){
		puts("YES");
	} else {
		puts("NO");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:58: error: 'exit' was not declared in this scope
    8 |         if(a<1 || a>101 || b<1 || b>101 || c<1 || c>101) exit(0);
      |                                                          ^~~~
a.cc:2:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
    1 | #include<stdio.h>
  +++ |+#include <cstdlib>
    2 |
Language: C++

# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
a, b, c = map(int, input().split())
if a-b == b-c :
    print("YES")
else:
    print("NO")

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #-
    1 | # -*- coding: utf-8 -*-
      |   ^
a.cc:2:3: error: invalid preprocessing directive #\U000030b9\U000030da\U000030fc\U000030b9\U0000533a\U00005207\U0000308a\U0000306e\U00006574\U00006570\U0000306e\U00005165\U0000529b
    2 | # スペース区切りの整数の入力
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:3:1: error: 'a' does not name a type
    3 | a, b, c = map(int, input().split())
      | ^
Language: C++

a, b, c = map(int, input().split().split())
if  b−a=c−b:
  print ("YES")
elif print("NO")

Compiler output:
a.cc:2:5: error: extended character − is not valid in an identifier
    2 | if  b−a=c−b:
      |     ^
a.cc:2:9: error: extended character − is not valid in an identifier
    2 | if  b−a=c−b:
      |         ^
a.cc:1:1: error: 'a' does not name a type
    1 | a, b, c = map(int, input().split().split())
      | ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
    // 整数の入力
    int a,b,c;
    cin >> a >> b >> c;
    if (c-b) == (b-a)
        cout << "YES" << endl;
    else
        cout << "NO" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expected primary-expression before '==' token
    8 |     if (c-b) == (b-a)
      |              ^~
Language: C

#include<stdio.h>

int main(void){
  int a,b,c;

  if (
  scanf("%d %d %d",&a,&b,&c);
  if (b-a == c-b) printf("YES");
  else printf("NO");

  return 0;
    
}


Compiler output:
main.c: In function 'main':
main.c:7:29: error: expected ')' before ';' token
    7 |   scanf("%d %d %d",&a,&b,&c);
      |                             ^
      |                             )
main.c:6:6: note: to match this '('
    6 |   if (
      |      ^
main.c:13:1: error: expected expression before '}' token
   13 | }
      | ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:10:14: error: expected '}' before 'else'
   10 |              else
      |              ^~~~
main.c: At top level:
main.c:14:4: error: expected identifier or '(' before 'return'
   14 |    return 0;
      |    ^~~~~~
main.c:16:9: error: expected identifier or '(' before '}' token
   16 |         }
      |         ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:8:14: error: expected '}' before 'else'
    8 |              else
      |              ^~~~
main.c: At top level:
main.c:12:4: error: expected identifier or '(' before 'return'
   12 |    return 0;
      |    ^~~~~~
main.c:14:9: error: expected identifier or '(' before '}' token
   14 |         }
      |         ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:6:20: error: lvalue required as left operand of assignment
    6 |              if(b-a=c-b){
      |                    ^
main.c:8:14: error: expected '}' before 'else'
    8 |              else
      |              ^~~~
main.c: At top level:
main.c:12:4: error: expected identifier or '(' before 'return'
   12 |    return 0;
      |    ^~~~~~
main.c:14:9: error: expected identifier or '(' before '}' token
   14 |         }
      |         ^
Language: Java



import java.util.*;

public class Poles{

	// static void equal(){

		


	// }


	public static void main(String[] args) {
		
		int input;
		ArrayList<Integer> tempList;
		tempList = new ArrayList<Integer>();

		Scanner s = new Scanner(System.in);

		for (int i=0; i<3; i++){
			input = s.nextInt();
			tempList.add(input);
		}

		Collections.sort(tempList);

		int a,b,c;

		a = tempList.get(0);
		b = tempList.get(1);
		c = tempList.get(2);

		if ((b-a) == (c-b)){

			System.out.println("YES");

		}
		else{
			System.out.println("NO");
		}

	}

}

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



import java.util.*;

public class Poles{

	static void equal(){

		int input;
		ArrayList<Integer> tempList;
		tempList = new ArrayList<Integer>();

		Scanner s = new Scanner(System.in);

		for (int i=0; i<3; i++){
			input = s.nextInt();
			tempList.add(input);
		}

		Collections.sort(tempList);

		int a,b,c;

		a = tempList.get(0);
		b = tempList.get(1);
		c = tempList.get(2);

		if ((b-a) == (c-b)){

			System.out.println("YES");

		}
		else{
			System.out.println("NO");
		}


	}


	public static void main(String[] args) {
		
		Poles.equal();

	}

}

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

#include <iostream>

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

std::cin >> a >> b >> c;

if (b-a == c-b){
std::cout << "YES" << std::endl
}
else {
std::cout << "NO" << std::endl;
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:32: error: expected ';' before '}' token
    9 | std::cout << "YES" << std::endl
      |                                ^
      |                                ;
   10 | }
      | ~
Language: C++

#include <iostream>
using namespace std;

int main() {
	int a,b,c;
	cin>>a>>b>>c;
	if(b−a==c−b){
		cout<<"Yes"<<endl;
	}
	else{
		cout<<"No"<<endl;
	}
	return 0;
}

Compiler output:
a.cc:7:12: error: extended character − is not valid in an identifier
    7 |         if(b−a==c−b){
      |            ^
a.cc:7:17: error: extended character − is not valid in an identifier
    7 |         if(b−a==c−b){
      |                 ^
a.cc: In function 'int main()':
a.cc:7:12: error: 'b\U00002212a' was not declared in this scope
    7 |         if(b−a==c−b){
      |            ^~~
a.cc:7:17: error: 'c\U00002212b' was not declared in this scope
    7 |         if(b−a==c−b){
      |                 ^~~
Language: C++

#include<stdio.h>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
 
using namespace std;
 
//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
 
//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}
 
//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
 
//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
 
//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
 
//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);
 
//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))
 
//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
 
int main(void){
  cin >> a >> b >> c;
  if (b-a == c-b)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}



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

#include <cstdlib>
#include <iostream>


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

  int a, b, c;
  std::cin >> a >> b >> c

  if(c-b==b-a)
    std::cout << "YES" << std::endl;
  else
    std::cout << "NO" << std::endl;
  return EXIT_SUCCESS;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:26: error: expected ';' before 'if'
   12 |   std::cin >> a >> b >> c
      |                          ^
      |                          ;
   13 | 
   14 |   if(c-b==b-a)
      |   ~~                      
a.cc:16:3: error: 'else' without a previous 'if'
   16 |   else
      |   ^~~~
Language: C++

#include <iostream>
using namespace std;

int a,b,c;

void read_input(){
    cin >> a >> b >> c;
}

int main(void){
    read_input();
    if (b-a == c-b{
        cout << "YES" << endl;
    }else{
        cout << "NO" << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: expected ';' before '{' token
   12 |     if (b-a == c-b{
      |                   ^
      |                   ;
a.cc:14:6: error: expected primary-expression before 'else'
   14 |     }else{
      |      ^~~~
a.cc:14:6: error: expected ')' before 'else'
   14 |     }else{
      |      ^~~~
      |      )
a.cc:12:8: note: to match this '('
   12 |     if (b-a == c-b{
      |        ^
Language: C

#include <stdio.h>

int main(void) {
  int a,b,c;
  scanf ("%d %d %d",&a,&b,&c);
  if (b-a=c-b) {
    printf ("YES¥n");
  } else {
    printf ("NO¥n");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:10: error: lvalue required as left operand of assignment
    6 |   if (b-a=c-b) {
      |          ^
Language: Java

import java.util.*;

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        if ((b - a) == (c - b)){
            System.out.print("YES");
        }
        else System.out.print("NO");
    }


Compiler output:
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
    public static void main(String[] args){
                  ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.*;

public class MAIN {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        if ((b - a) == (c - b)){
            System.out.print("YES");
        }
        else System.out.print("NO");
    }
}

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

import java.util.*;

public class BeginnerTest058_1 {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        if ((b - a) == (c - b)){
            System.out.print("YES");
        }
        else System.out.print("NO");
    }
}

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