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


#if 1
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <array>
#include <deque>
#include <algorithm>
#include <utility>
#include <cstdint>
#include <functional>
#include <iomanip>
#include <numeric>
#include <assert.h>

auto& in = std::cin;
auto& out = std::cout;

int32_t N;

constexpr int32_t MAX_N = 150000;//頂点数
std::unordered_map<int32_t, double> graph[MAX_N];//木
double get(int32_t v) {
	int32_t count = 0;
	double sum = 0;
	for (auto& c : graph[v]) {
		++count;
		sum += get(c.first, v) + 1;
	}
	if (count == 0) {
		return 0;
	}
	return sum / count;
}
double get(int32_t v, int32_t p) {
	auto& memo = graph[v][p];
	if (memo >= 0) {
		return memo;
	}
	int32_t count = 0;
	double sum = 0;
	for (auto& c : graph[v]) {
		if (c.first != p) {
			++count;
			sum += get(c.first, v)+1;
		}
	}
	if (count == 0) {
		return memo = 0;
	}
	return memo = sum / count;
}
void input_tree()
{
	in >> N;
	for (int32_t i = 0; i < N - 1; ++i)
	{
		int a, b;
		in >> a >> b; --a; --b;
		graph[a][b] = -1;
		graph[b][a] = -1;
	}
}


int main()
{
	using std::endl;
	in.sync_with_stdio(false);
	out.sync_with_stdio(false);
	out  << std::fixed << std::setprecision(9);
	input_tree();
	for (int32_t i = 0; i < N; ++i)
	{
		out << get(i) << endl;
	}

	return 0;
}
#endif

#if 0
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <array>
#include <deque>
#include <algorithm>
#include <utility>
#include <cstdint>
#include <functional>
#include <iomanip>
#include <numeric>
#include <assert.h>

auto& in = std::cin;
auto& out = std::cout;

int32_t N;
std::string S[10000];
std::string T;

int main()
{
	using std::endl;
	in.sync_with_stdio(false);
	out.sync_with_stdio(false);

	in >> N;
	for (int32_t i = 0; i < N; ++i)
	{
		in >> S[i];
	}
	in >> T;



	return 0;
}
#endif


Compiler output:
a.cc: In function 'double get(int32_t)':
a.cc:35:27: error: too many arguments to function 'double get(int32_t)'
   35 |                 sum += get(c.first, v) + 1;
      |                        ~~~^~~~~~~~~~~~
a.cc:30:8: note: declared here
   30 | double get(int32_t v) {
      |        ^~~
Language: C++

int main(void){
	int i,j,k,N=200,a;
	vector<pair<int,int>> kotae;
	scanf("%d",&N);
	for(i=0;i<N;i++){
		for(j=i+1;j<N;j++){
			printf("? ");
			for(k=0;k<N;k++){
				if(k==i||k==j){a=1;} else{a=0;}
				printf("%d",a);
				
			}
			fflush(stdout);
			scanf("%d",&a);
			if(a!=0){kotae.pub(mp(i,j));}
		}
	}
	printf("!");
	for(i=0;i<kotae.size();i++){
		printf(" (%d,%d)",kotae[i].first,kotae[i].second);
	}
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'vector' was not declared in this scope
    3 |         vector<pair<int,int>> kotae;
      |         ^~~~~~
a.cc:3:16: error: 'pair' was not declared in this scope
    3 |         vector<pair<int,int>> kotae;
      |                ^~~~
a.cc:3:21: error: expected primary-expression before 'int'
    3 |         vector<pair<int,int>> kotae;
      |                     ^~~
a.cc:4:9: error: 'scanf' was not declared in this scope
    4 |         scanf("%d",&N);
      |         ^~~~~
a.cc:7:25: error: 'printf' was not declared in this scope
    7 |                         printf("? ");
      |                         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void){
a.cc:13:32: error: 'stdout' was not declared in this scope
   13 |                         fflush(stdout);
      |                                ^~~~~~
a.cc:13:32: note: 'stdout' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:13:25: error: 'fflush' was not declared in this scope
   13 |                         fflush(stdout);
      |                         ^~~~~~
a.cc:15:34: error: 'kotae' was not declared in this scope
   15 |                         if(a!=0){kotae.pub(mp(i,j));}
      |                                  ^~~~~
a.cc:15:44: error: 'mp' was not declared in this scope
   15 |                         if(a!=0){kotae.pub(mp(i,j));}
      |                                            ^~
a.cc:18:9: error: 'printf' was not declared in this scope
   18 |         printf("!");
      |         ^~~~~~
a.cc:18:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:19:19: error: 'kotae' was not declared in this scope
   19 |         for(i=0;i<kotae.size();i++){
      |                   ^~~~~
Language: C++

#include <iostream>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected ';' before '}' token
    8 |         res = "YES"
      |                    ^
      |                    ;
    9 |   } else {
      |   ~                 
a.cc:10:19: error: expected ';' before '}' token
   10 |         res = "NO"
      |                   ^
      |                   ;
   11 |   }
      |   ~
Language: C++

#include<stdio.h>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<algorithm>
#include<cmath>
#include<bitset>
 
#define Vsort(a) sort(a.begin(), a.end())
#define Vreverse(a) reverse(a.begin(), a.end())
#define Srep(n) for(int i = 0; i < (n); i++)
#define Lrep(i,a,n) for(int i = (a); i < (n); i++)
#define Brep(n) for(int bit = 0; bit < (1<<n); bit++)
#define rep2nd(n,m) Srep(n) Lrep(j,0,m)
#define vi vector<int>
#define vi64 vector<int64_t>
#define vvi vector<vector<int>>
#define vvi64 vector<vector<int64_t>>
 
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:26:8: error: lvalue required as left operand of assignment
   26 |   if(b - a = c - b) cout << "YES" << endl;
      |      ~~^~~
Language: C++

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

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

#include <bits/stdc++.h>
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:7:9: error: extended character − is not valid in an identifier
    7 |     if((b−a) == (c−b)){
      |         ^
a.cc:7:18: error: extended character − is not valid in an identifier
    7 |     if((b−a) == (c−b)){
      |                  ^
a.cc: In function 'int main()':
a.cc:7:9: error: 'b\U00002212a' was not declared in this scope
    7 |     if((b−a) == (c−b)){
      |         ^~~
a.cc:7:18: error: 'c\U00002212b' was not declared in this scope
    7 |     if((b−a) == (c−b)){
      |                  ^~~
Language: C++

#include <bits/stdc++.h>
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:7:8: error: extended character − is not valid in an identifier
    7 |     if(b−a==c−b){
      |        ^
a.cc:7:13: error: extended character − is not valid in an identifier
    7 |     if(b−a==c−b){
      |             ^
a.cc: In function 'int main()':
a.cc:7:8: error: 'b\U00002212a' was not declared in this scope
    7 |     if(b−a==c−b){
      |        ^~~
a.cc:7:13: error: 'c\U00002212b' was not declared in this scope
    7 |     if(b−a==c−b){
      |             ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define pb push_back
#define vi vector<int>
#define bn(n) (n).begin(), (n).end()
#define FOR(n) for(int i = 0; i < (int)n; i++)


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

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

    int t = 1, i = 1;
    //cin >> t;
    while(t--) {
        //cout << "Case #" << i << ": ";
        solve();
        //i++;
    }
    return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:18:23: error: expected ';' before '}' token
   18 |         cout << "NO\n"
      |                       ^
      |                       ;
   19 |     }
      |     ~
Language: Java

import java.util.*;

public class main{
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int a = s.nextInt();
		int b = s.nextInt();
		int c = s.nextInt();
		
		if(b - a == c - b) {
			System.out.println("YES");
		}else {
			System.out.println("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: C++

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

#define ll long long

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: expected '}' at end of input
   11 |   else{cout << "NO";}
      |                      ^
a.cc:7:1: note: to match this '{'
    7 | {
      | ^
Language: C++

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

#define ll long long

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:43: error: expected '}' at end of input
   10 |   cout << ((b-a) == (c-b) ? "YES" : "NO");
      |                                           ^
a.cc:7:1: note: to match this '{'
    7 | {
      | ^
Language: C++

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

#define ll long long

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:37: error: expected '}' at end of input
   10 |   cout << (b-a==c-b ? "YES" : "NO");
      |                                     ^
a.cc:7:1: note: to match this '{'
    7 | {
      | ^
Language: Java

import java.util.Scanner;

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


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

#include <stdio.h>
int main()
{
    int a,b,c,z,y;
    scanf("%d %d %d", &a, &b, &c);

    z=b-a;

    y=c-b;


    if(x==y)
    {
        printf("YES");
    }
    else{
        printf("NO");
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:8: error: 'x' undeclared (first use in this function)
   12 |     if(x==y)
      |        ^
main.c:12:8: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

//type
#define ll long long
typedef pair<int, int> P;
//定数
#define INF 1000000000000 //10^12:∞
#define MOD 1000000007    //10^9+7:合同式の法
#define MAXR 100000       //10^5:配列の最大のrange
//略記
#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
#define F first      //pairの一つ目の要素
#define S second     //pairの二つ目の要素
#define Z class
// OTHER
// xの二乗を返す (関数テンプレート版)
template <typename T>
T square(T x) { return x * x; }
#define chmax(x, y) (x = max(x, y))
#define chmin(x, y) (x = min(x, y))
// loop
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REPD(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = a; i <= ll(b); i++)
#define FORD(i, a, b) for (ll i = a; i >= ll(b); i--)
#define FORA(i, I) for (const auto &i : I)

// vector
#define ALL(x) x.begin(), x.end()

// output
#define YES() printf("YES\n")
#define NO() printf("NO\n")
#define isYES(x) printf("%s\n", (x) ? "YES" : "NO")
#define Yes() printf("Yes\n")
#define No() printf("No\n")
#define ln cout << '\n'
template <Z A>
void pr(A a)
{
  cout << a;
  ln;
}
template <Z A, Z B>
void pr(A a, B b)
{
  cout << a << ' ';
}

int ans = 0;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

int main()
{
  int a, b, n, x, y;
  cin >> a >> b >> c;
  if (b - a == c - b)
    Yes();
  else
    No();
  return 0;
}

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

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

//type
#define ll long long
typedef pair<int, int> P;
//定数
#define INF 1000000000000 //10^12:∞
#define MOD 1000000007    //10^9+7:合同式の法
#define MAXR 100000       //10^5:配列の最大のrange
//略記
#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
#define F first      //pairの一つ目の要素
#define S second     //pairの二つ目の要素
#define Z class
// OTHER
// xの二乗を返す (関数テンプレート版)
template <typename T>
T square(T x) { return x * x; }
#define chmax(x, y) (x = max(x, y))
#define chmin(x, y) (x = min(x, y))
// loop
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REPD(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = a; i <= ll(b); i++)
#define FORD(i, a, b) for (ll i = a; i >= ll(b); i--)
#define FORA(i, I) for (const auto &i : I)

// vector
#define ALL(x) x.begin(), x.end()

// output
#define YES() printf("YES\n")
#define NO() printf("NO\n")
#define isYES(x) printf("%s\n", (x) ? "YES" : "NO")
#define Yes() printf("Yes\n")
#define No() printf("No\n")
#define ln cout << '\n'
template <Z A>
void pr(A a)
{
  cout << a;
  ln;
}
template <Z A, Z B>
void pr(A a, B b)
{
  cout << a << ' ';
}

int ans = 0;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

int main()
{
  int a, b, n, x, y;
  cin >> a >> b >> c;
  if(b-a==c-b)Yes():
  else No();
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:59:20: error: 'c' was not declared in this scope
   59 |   cin >> a >> b >> c;
      |                    ^
a.cc:60:20: error: expected ';' before ':' token
   60 |   if(b-a==c-b)Yes():
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  
  if (b-a == c-b)
    cout << "YES";
  else
    cout << "NO"
}

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

#include <bits/stdc++.h>
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: In function 'int main()':
a.cc:7:8: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (const char*)'
    7 |   cout (b-a == c-b ? "YES" : "NO") << endl;
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <cstdio>

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: expected primary-expression before '==' token
    9 |   if (b - a) == (c - a){
      |              ^~
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:9: error: extended character − is not valid in an identifier
    7 |   if (b − a == c − b)
      |         ^
a.cc:7:18: error: extended character − is not valid in an identifier
    7 |   if (b − a == c − b)
      |                  ^
a.cc: In function 'int main()':
a.cc:7:8: error: expected ')' before '\U00002212'
    7 |   if (b − a == c − b)
      |      ~ ^~
      |        )
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:7: error: extended character − is not valid in an identifier
    7 |   if (b−a==c−b)
      |       ^
a.cc:7:12: error: extended character − is not valid in an identifier
    7 |   if (b−a==c−b)
      |            ^
a.cc: In function 'int main()':
a.cc:7:7: error: 'b\U00002212a' was not declared in this scope
    7 |   if (b−a==c−b)
      |       ^~~
a.cc:7:12: error: 'c\U00002212b' was not declared in this scope
    7 |   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-c==c-b)printf("YES\n");
        else printf("NO\n");
        return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    5 |         int a,b.c;
      |                ^
main.c:6:28: error: 'b' undeclared (first use in this function)
    6 |         scanf("%d%d%d",&a,&b,&c);
      |                            ^
main.c:6:28: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:31: error: 'c' undeclared (first use in this function)
    6 |         scanf("%d%d%d",&a,&b,&c);
      |                               ^
Language: C

#include <stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:5:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    5 |         int a.b.c;
      |              ^
main.c:5:14: error: expected expression before '.' token
main.c:6:25: error: 'a' undeclared (first use in this function)
    6 |         scanf("%d%d%d",&a,&b,&c);
      |                         ^
main.c:6:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:28: error: 'b' undeclared (first use in this function)
    6 |         scanf("%d%d%d",&a,&b,&c);
      |                            ^
main.c:6:31: error: 'c' undeclared (first use in this function)
    6 |         scanf("%d%d%d",&a,&b,&c);
      |                               ^
Language: C

#include <stdio.h>

int main(void){
  int A, B, C;
  scanf("%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:11: error: lvalue required as left operand of assignment
    6 |   if (B-A = C-B){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
string a,b;
  cin>>a>>b;
  int k=a.size(),l=b.size();
  string s;
  if(k>=l){
  for(int i=0;i<k-1;i++){
  s+=k[i]+l[i];
  }
    s +=a[k-1];
    cout << s <<endl;
  }
  else{ 
    for(int i=0;i<k-1;i++){
  s+=l[i]+k[i];
  }
    s +=b[k-1];
    cout << s <<endl;
  
  
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: invalid types 'int[int]' for array subscript
   11 |   s+=k[i]+l[i];
      |       ^
a.cc:11:12: error: invalid types 'int[int]' for array subscript
   11 |   s+=k[i]+l[i];
      |            ^
a.cc:18:7: error: invalid types 'int[int]' for array subscript
   18 |   s+=l[i]+k[i];
      |       ^
a.cc:18:12: error: invalid types 'int[int]' for array subscript
   18 |   s+=l[i]+k[i];
      |            ^
Language: Java

import java.util.*;

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


Compiler output:
Main.java:6: error: cannot find symbol
    int a = nextInt();
            ^
  symbol:   method nextInt()
  location: class Main
Main.java:7: error: cannot find symbol
    int b = nextInt();
            ^
  symbol:   method nextInt()
  location: class Main
Main.java:8: error: cannot find symbol
    int c = nextInt();
            ^
  symbol:   method nextInt()
  location: class Main
3 errors
Language: C++

#include <iostream>
#include <math.h>
#include <string>
#include <algorithm>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected initializer before 'cin'
    9 |   cin >> a >> b >> c;
      |   ^~~
a.cc:10:17: error: 'c' was not declared in this scope
   10 |   cout << (b-a==c-b ? "YES" : "NO");
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void){

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

    return 0; 
}


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

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


Compiler output:
main.c: In function 'main':
main.c:7:21: error: 'd' undeclared (first use in this function)
    7 |     if(b - a == c - d){
      |                     ^
main.c:7:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using namespace std;
using P = pair<int, int>; 
using ll = long long;
 
int main()
{
  int a, b, c;
  cin >> a >> b >> c;
  if((abs(c - b) == abs(b - a)) cout << "YES" << endl;
     else cout << "NO"<< endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:32: error: expected ';' before 'cout'
   12 |   if((abs(c - b) == abs(b - a)) cout << "YES" << endl;
      |                                ^~~~~
      |                                ;
a.cc:13:6: error: expected primary-expression before 'else'
   13 |      else cout << "NO"<< endl;
      |      ^~~~
a.cc:12:55: error: expected ')' before 'else'
   12 |   if((abs(c - b) == abs(b - a)) cout << "YES" << endl;
      |     ~                                                 ^
      |                                                       )
   13 |      else cout << "NO"<< endl;
      |      ~~~~
Language: C++

#include<iostream>
using namespae std;
int main()
{
  int a,b,c;
  cin>>a>>b>>c;
  if(2*b==a+c)
    cout<<"YES";
  else
    cout<<"NO";
}



Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespae'
    2 | using namespae std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>a>>b>>c;
      |   ^~~
      |   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:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout<<"YES";
      |     ^~~~
      |     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:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |     cout<<"NO";
      |     ^~~~
      |     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>
using namespace std;
int main(void){
    // Your code here!
    int a, b, c;
    
    cin >> a >> b >> c;
    
    
    
    if (  b - a == c - b  )
    cout << "Yes" << endl;
    
    else
    cout << "No" << endl;
    retrun 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'retrun' was not declared in this scope
   16 |     retrun 0;
      |     ^~~~~~
Language: C++

#include <bits/stdc++.h>

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:8:7: error: lvalue required as left operand of assignment
    8 |   if(b-a=c-b)
      |      ~^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
 int main(){
   int a,b,c;
cin>>a>>b>>c;
if((b-a)==(c-b)){
      cout<<"Yes";
}
else(){
cout<<"No";
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: expected primary-expression before ')' token
    9 | else(){
      |      ^
Language: Java

import java.util.*;

public class Main{
	
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
  	int[] n=new int[3];
    for(int i=0;i<3;i++){
      n[i]=sc.nextInt();
    }
    
    if(n[1]-n[0]==n[2]-n[1]){
      System.out.println("YES");
    }else{
      System.out.pritnln("NO");
    }
  }
}


Compiler output:
Main.java:15: error: cannot find symbol
      System.out.pritnln("NO");
                ^
  symbol:   method pritnln(String)
  location: variable out of type PrintStream
1 error
Language: C++

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

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

Compiler output:
a.cc:9:16: warning: missing terminating " character
    9 |   else cout << "NO\n;
      |                ^
a.cc:9:16: error: missing terminating " character
    9 |   else cout << "NO\n;
      |                ^~~~~~
a.cc: In function 'int main()':
a.cc:10:5: error: expected primary-expression before 'return'
   10 |     return 0;
      |     ^~~~~~
Language: C++

#include<bits/sdtc++.h>
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:1:9: fatal error: bits/sdtc++.h: No such file or directory
    1 | #include<bits/sdtc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c;
  cin>>a>>b>>c;
  if(b-a==c-b){
    cout<<"YES";
  }
  else{
    cout<<"NO"+
  }
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: expected primary-expression before '}' token
   11 |   }
      |   ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected ';' before '}' token
    8 |     else cout << "NO"
      |                      ^
      |                      ;
    9 | }
      | ~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expected ';' before '}' token
    8 |     else "NO"
      |              ^
      |              ;
    9 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;

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


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

import java.util.*;

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

Compiler output:
Main.java:6: error: incompatible types: String cannot be converted to int
    	int a = sc.next();
    	               ^
Main.java:7: error: incompatible types: String cannot be converted to int
    	int b = sc.next();
    	               ^
Main.java:8: error: incompatible types: String cannot be converted to int
    	int c = sc.next();
    	               ^
3 errors
Language: Java

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

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 <bits/stdc++.h>
using namespace std;

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

  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: expected primary-expression before ')' token
   11 |   else){
      |       ^
Language: C++

#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include<set>
#include<map>
using namespace std;


int main() {
    vector<int> v(3);
    for(int i = 0; i < 3; i++){
        cin >> v[i];
    }
    sort(v.begin(), v.sort());
    if(v[1] - v[0] == v[2] - v[1]){
        cout << "YES";
    }
    else{
        cout << "NO";
    }
    cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:23: error: 'class std::vector<int>' has no member named 'sort'
   16 |     sort(v.begin(), v.sort());
      |                       ^~~~
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");
  }
  putchar('\n');
  return 0;
}
¥

Compiler output:
a.cc:13:1: error: extended character ¥ is not valid in an identifier
   13 | ¥
      | ^
a.cc:13:1: error: '\U000000a5' does not name a type
   13 | ¥
      | ^
Language: C

#include<stdio.h>
int main(void){
  int a,b,c;
  scanf("%d %d %d",&a,&b,&c);
  char y_n[5];
  y_n=(b-a==c-b)?"YES":"NO";
  printf("%s",y_n);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:6: error: assignment to expression with array type
    6 |   y_n=(b-a==c-b)?"YES":"NO";
      |      ^
Language: C++

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

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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < n; i++)
#define rep1(i, n) for(int i = 1; i < n+1; i++)
#define sort(A) sort(A.begin(),A.end())
#define reverse(A) reverse(A.begin(),A.end());
#define vecmin(A) *min_element(A.begin(),A.end());
#define vecmax(A) *max_element(A.begin(),A.end());
typedef long long ll;

int main(){
  int a,b,c;
  cin >> a >> b >> c;
  string ans = (b*2 == a+c) ? "YES" : "NO";
  cout << and << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: expected identifier before '<<' token
   15 |   cout << and << endl;
      |               ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
int main()
{
int a,b,c; 	
cin>>a>>b>>c; 	
 
	if(b-c==c-b)
cout<<"YES"<<endl;	
	else
	cout<<"NO"<<endl;
  return: 0;
}

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

#iclude<bits/stdc++.h>
using namespace std;
 
int main()
{
int a,b,c ; 	
cin>>a>>b>>c; 	
 
	if(b-c==c-b)
cout<<"YES"<<endl;	
	else
	cout<<"NO"<<endl;		
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #iclude; did you mean #include?
    1 | #iclude<bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope
    7 | cin>>a>>b>>c;
      | ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #iclude<bits/stdc++.h>
a.cc:10:1: error: 'cout' was not declared in this scope
   10 | cout<<"YES"<<endl;
      | ^~~~
a.cc:10:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:14: error: 'endl' was not declared in this scope
   10 | cout<<"YES"<<endl;
      |              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #iclude<bits/stdc++.h>
a.cc:12:9: error: 'cout' was not declared in this scope
   12 |         cout<<"NO"<<endl;
      |         ^~~~
a.cc:12:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:21: error: 'endl' was not declared in this scope
   12 |         cout<<"NO"<<endl;
      |                     ^~~~
a.cc:12:21: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#incude<bits/stdc++.h>
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:1:2: error: invalid preprocessing directive #incude; did you mean #include?
    1 | #incude<bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>a>>b>>c;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incude<bits/stdc++.h>
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout<<"YES"<<endl;
      |     ^~~~
a.cc:8:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:18: error: 'endl' was not declared in this scope
    8 |     cout<<"YES"<<endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incude<bits/stdc++.h>
a.cc:10:5: error: 'cout' was not declared in this scope
   10 |     cout<<"NO"<<endl;
      |     ^~~~
a.cc:10:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:17: error: 'endl' was not declared in this scope
   10 |     cout<<"NO"<<endl;
      |                 ^~~~
a.cc:10:17: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
using ll = long long;
using P = pair<int,int>;
int main(void) {
    int a, b, c; cin >> a >> b >> c;
    string ans;
    if(b-a = c-b) ans = "YES";
    else ans = "NO";
    cout << ans;
}


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

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


#define f(i,a,b) for(int i=(int)(a);i<=(int)(b);i++)
#define char_f(i,a) for(int i=(int)(a);(char)s[i]!='\0';i++)
#define rf(i,a,b) for(int i=(int)(a);i>=(int)(b);i--)
#define llf(i,a,b) for(long long int i=(long long int)(a);i<=(long long int)(b);i++)
#define llrf(i,a,b) for(long long int i=(long long int)(a);i>=(long long int)(b);i--)



#define ll long long
#define fi first
#define se second
#define pb push_back
#define pop pop_back
#define mem(ara) memset((ara),0,sizeof(ara))
#define memn(ara) memset((ara),-1,sizeof(ara))
#define b begin()
#define e end()
#define em emplace
#define eb emplace_back





#define si set<int>
#define sd set<double>
#define sll set<long long int>
#define ss set<string>
#define sc set<char>

#define pii pair<int,int>
#define pli pair<long long int,int>
#define pil pair<int,long long int>
#define pll pair<long long int,long long int>
#define pci pair<char,int>
#define pic pair<int,char>
#define pcl pair<char,long long int>
#define plc pair<long long int,char>

#define pss pair<string,string>
#define pcc pair<char,char>

#define pis pair<int,string>
#define psi pair<string,int>
#define pls pair<long long int,string>
#define psl pair<string,long long int>
#define pdd pair<double,double>
#define pcs pair<char,string>
#define psc pair<string,char>



#define vi  vector<int>
#define vll vector<long long int>
#define vd vector<double>
#define vs vector<string>
#define vc vector<char>
#define vii vector<pii>



#define mod 1000000007
#define mx (1<<30)-1
#define llmx (1ll<<62)
#define n_size 100005
#define g_size 10000005
double PI=acos(-1);



///unsigned int uMAX=4294967295;
///unsigned ll int ullMAX=18446744073709551615;





int arr[g_size];



int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	int n,m,T,res;

	int maxi=-mx,mini=mx,count=0;

	int i,j,k;

	bool flag;

	string s1,s2;

	char s[100000];

	int ara[n_size],ara2[n_size];
	
	cin>>n>>m>>k;
	
	(m-n==l-m)?cout<<"YES"<<endl:cout<<"NO"<<endl;
	
	
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:108:15: error: 'l' was not declared in this scope
  108 |         (m-n==l-m)?cout<<"YES"<<endl:cout<<"NO"<<endl;
      |               ^
Language: C++

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

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

  bool ans = true;
  if(b-a == c-b) ans = true;
  cout << (ans ? "YES"|"NO") << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: invalid operands of types 'const char [4]' and 'const char [3]' to binary 'operator|'
   13 |   cout << (ans ? "YES"|"NO") << endl;
      |                  ~~~~~^~~~~
      |                  |     |
      |                  |     const char [3]
      |                  const char [4]
a.cc:13:28: error: expected ':' before ')' token
   13 |   cout << (ans ? "YES"|"NO") << endl;
      |                            ^
      |                            :
a.cc:13:28: error: expected primary-expression before ')' token
Language: C++

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

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

  bool ans = true;
  if(b-a = c-b) ans = true;
  cout << (ans ? "Yes"|"No") << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: lvalue required as left operand of assignment
   12 |   if(b-a = c-b) ans = true;
      |      ~^~
a.cc:13:23: error: invalid operands of types 'const char [4]' and 'const char [3]' to binary 'operator|'
   13 |   cout << (ans ? "Yes"|"No") << endl;
      |                  ~~~~~^~~~~
      |                  |     |
      |                  |     const char [3]
      |                  const char [4]
a.cc:13:28: error: expected ':' before ')' token
   13 |   cout << (ans ? "Yes"|"No") << endl;
      |                            ^
      |                            :
a.cc:13:28: error: expected primary-expression before ')' token
Language: C++

#include <bits/stdc++.h>
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:6:6: error: expected '(' before 'b'
    6 |   if b - a == c - b{
      |      ^
      |      (
a.cc:8:4: error: 'else' without a previous 'if'
    8 |   }else{
      |    ^~~~
Language: Java

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

public class Solution1 {
    static class Reader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;
 
        public Reader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }
 
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
 
        public int nextInt() {
            return Integer.parseInt(next());
        }
 
    }

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


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

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

int main () {
  int a, b, c;
  cin >> a >> b >> c;
  if(b==(a+c)/2) {

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected '}' at end of input
    7 |   if(b==(a+c)/2) {
      |                  ~^
a.cc:7:19: error: expected '}' at end of input
a.cc:4:13: note: to match this '{'
    4 | int main () {
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if((b-a)==(c-b)){
cout<<"YES";
else
cout<<"NO";
return 1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: expected '}' before 'else'
    8 | else
      | ^~~~
a.cc:6:17: note: to match this '{'
    6 | if((b-a)==(c-b)){
      |                 ^
Language: C++

#include<bits.stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if((b-a)==(c-b)){
cout<<"YES";
else
cout<<"NO";
return 1;
}

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

#include<bits/stdc++.h>
using namespace std
int main(){
int a,b,c;
cin>>a>>b>>c;
if((b-a)==(c-b)){
cout<<"YES";
else
cout<<"NO";
return 1;
}

Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | int main(){
      | ~~~                 
a.cc: In function 'int main()':
a.cc:8:1: error: expected '}' before 'else'
    8 | else
      | ^~~~
a.cc:6:17: note: to match this '{'
    6 | if((b-a)==(c-b)){
      |                 ^
Language: C++

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

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

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

Compiler output:
a.cc:2:1: error: '::main' must return 'int'
    2 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:6:12: error: 'abs' was not declared in this scope
    6 |         if(abs(b-a)==abs(c-b))
      |            ^~~
Language: C

#include<stdio.h>
int main()
{
int a,b,c;
clrscr();
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:5:1: error: implicit declaration of function 'clrscr' [-Wimplicit-function-declaration]
    5 | clrscr();
      | ^~~~~~
Language: C++

#include<iostream>
int main()
{   int a,b,c;
    cout<<"a=";
    cin>>a;
    cout<<"b=";
    cin>>b;
    cout<<"c=";
    cin>>c;
    if(1<=a and 1<=b and 1<=c and a<=100 and b<=100 and c<=100)
    {
        if(b-a==c-b){
        cout<<"Yes";
        }
    else if(c-b==b-a){
        cout<<"Yes";
    }
    else{
        cout<<"NO";
    }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    4 |     cout<<"a=";
      |     ^~~~
      |     std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin>>a;
      |     ^~~
      |     std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include<bits/stdc++.h>
int main()
{   int a,b,c;
    cout<<"a=";
    cin>>a;
    cout<<"b=";
    cin>>b;
    cout<<"c=";
    cin>>c;
    if(1<=a and 1<=b and 1<=c and a<=100 and b<=100 and c<=100)
    {
        if(b-a==c-b){
        cout<<"Yes";
        }
    else if(c-b==b-a){
        cout<<"Yes";
    }
    else{
        cout<<"NO";
    }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    4 |     cout<<"a=";
      |     ^~~~
      |     std::cout
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:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin>>a;
      |     ^~~
      |     std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include<iostream.h>
int main()
{   int a,b,c;
    cout<<"a=";
    cin>>a;
    cout<<"b=";
    cin>>b;
    cout<<"c=";
    cin>>c;
    if(1<=a and 1<=b and 1<=c and a<=100 and b<=100 and c<=100)
    {
        if(b-a==c-b){
        cout<<"Yes";
        }
    else if(c-b==b-a){
        cout<<"Yes";
    }
    else{
        cout<<"NO";
    }
    }
    return 0;
}

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