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

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

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'nmaespace'
    2 | using nmaespace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:1: 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:9:12: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 | if(d == e) 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:6: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 | else 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<bits/stdc++.h> using namespace std; int main() { int a[4]; cin>>a[1]>>a[2]>>a[3]; sort(a+1,a+4); if(a[3]-a[2]==a[2]-a[1]) cout<<"YES"; else cout<<"NO"; }

Compiler output:
a.cc:1:25: warning: extra tokens at end of #include directive
    1 | #include<bits/stdc++.h> using namespace std; int main() { int a[4]; cin>>a[1]>>a[2]>>a[3]; sort(a+1,a+4); if(a[3]-a[2]==a[2]-a[1]) cout<<"YES"; else cout<<"NO"; }
      |                         ^~~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
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:8:16: error: expected ';' before '}' token
    8 |   cout << "YES"
      |                ^
      |                ;
    9 |   }else{
      |   ~             
a.cc:10:15: error: expected ';' before '}' token
   10 |   cout << "NO"
      |               ^
      |               ;
   11 |   }
      |   ~
Language: C++

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

int main(){
 
  string o,e;
  cin>>o>>e;
 
  int oLen=o.size(),eLen=e.size(), i;
 
  if(oLen==eLen) {
    for (i=0; i < oLen; i++) {
      cout<<o[i]<<e[i];
    }
  } else {
    for (i,i < eLen; i++) {
      cout<<o[i]<<e[i];
    }
    cout<<o[o.size()-1];
  }
  cout<<endl;
 
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: expected ';' before ')' token
   16 |     for (i,i < eLen; i++) {
      |                         ^
      |                         ;
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <cmath>
#include <complex>
#include <deque>
#include <iterator>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <limits>
#include <iomanip>
using namespace std;

using ll=long long;
template<class T> using V = vector<T>;
template<class T, class U> using P = pair<T, U>;
using vll = V<ll>;
using vvll = V<vll>;
#define rep(i, k, n) for (ll i=k; i<(ll)n; ++i)
#define REP(i, n) rep(i, 0, n)
template<class T> inline bool chmax(T& a, T b) {if (a<b) {a=b; return true;} return false;}
template<class T> inline bool chmin(T& a, T b) {if (a>b) {a=b; return true;} return false;}

const ll MOD = 1000000007;
const ll HIGHINF = (ll)1e18;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:35:13: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
   35 |   else "NO" << endl;
      |        ~~~~~^~~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: unable to find numeric literal operator 'operator""b'
    7 |   if(2b==a+c){
      |      ^~
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\n";
	else
		cout<<"NO\n";
	return 0;
}

Compiler output:
a.cc:1:9: fatal error: Bits/stdc++.h: No such file or directory
    1 | #include<Bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: 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:6:5: 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(){
  int a,b,c;
  cin>>a>>b>>c;
  cout <<(a+c=2*b?"YES":"NO")<<endl;
}

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

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

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

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

const int MOD = 1000000007;

//long long
using ll = long long;

//出力系
#define print(x) cout << x << endl
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
 
// begin() end()
#define all(x) (x).begin(),(x).end()

//for
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)

//最大公約数 
unsigned gcd(unsigned a, unsigned b) {
  if(a < b) return gcd(b, a);
  unsigned r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
}

 int main(){
int a, b, c;
cin >> a >> b >> c;
if(b - a == c - b) {
  YES;
  return 0
}
NO;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:38:11: error: expected ';' before '}' token
   38 |   return 0
      |           ^
      |           ;
   39 | }
      | ~
Language: C++

#include<stdio.h>
int main(void)
{
	int a,b,c;
	scanf("%d",&a);
	scanf("%d",&b);
	scanf("%d",&c);
	if(a-b=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(a-b=c-b){
      |            ~^~
a.cc:9:24: error: expected ';' before '}' token
    9 |         printf("Yes\n")
      |                        ^
      |                        ;
   10 |         }
      |         ~               
a.cc:12:23: error: expected ';' before '}' token
   12 |         printf("No\n")
      |                       ^
      |                       ;
   13 |         }
      |         ~
Language: C++

int main()
{
    int Z=0;
    //-----------

    int a=0,b=0,c=0;

    cin>>a>>b>>c;

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

    

    //------------
    //cin>>Z;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin>>a>>b>>c;
      |     ^~~
a.cc:12:9: error: 'cout' was not declared in this scope
   12 |         cout<<"YES"<<endl;
      |         ^~~~
a.cc:12:22: error: 'endl' was not declared in this scope
   12 |         cout<<"YES"<<endl;
      |                      ^~~~
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout<<"NO"<<endl;
      |     ^~~~
a.cc:15:17: error: 'endl' was not declared in this scope
   15 |     cout<<"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 - B) {
    cout << "YES" << endl;
  }
  else {
    cout << "NO" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: found ':' in nested-name-specifier, expected '::'
    5 |   int A,B,C:
      |            ^
      |            ::
a.cc:5:11: error: 'C' has not been declared
    5 |   int A,B,C:
      |           ^
a.cc:6:7: error: qualified-id in declaration before '>>' token
    6 |   cin >> A >> B >> C;
      |       ^~
a.cc:7:14: error: 'C' was not declared in this scope
    7 |   if (B-A == C - B) {
      |              ^
Language: Java

a, b, c = (int(x) for x in input().split())
if b - a == c - b:
  print('YES')
else:
  print('NO')

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
a, b, c = (int(x) for x in input().split())
^
Main.java:3: error: unclosed character literal
  print('YES')
        ^
Main.java:3: error: unclosed character literal
  print('YES')
            ^
Main.java:5: error: unclosed character literal
  print('NO')
        ^
Main.java:5: error: unclosed character literal
  print('NO')
           ^
5 errors
Language: C++

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

#define ll long long

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll 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:9:18: error: expected unqualified-id before ',' token
    9 |         ll a, b, ,c;
      |                  ^
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:7:8: error: lvalue required as left operand of assignment
    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(a-b==b-c)cout<<"YES"<<endl;
  else<<cout<<"NO"<<endl;
}

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

#include<bits/stdc++.h>
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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:27: error: 'B' was not declared in this scope
    5 |         int a,b,c;cin>>a>>B>>C;
      |                           ^
a.cc:5:30: error: 'C' was not declared in this scope
    5 |         int a,b,c;cin>>a>>B>>C;
      |                              ^
a.cc:7:7: error: expected primary-expression before '<<' token
    7 |   else<<cout<<"NO"<<endl;
      |       ^~
Language: C++

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

int main() {
  string a , b , c;
  cin >> a >> b >> c;
  
 
    vector<int> vec = {a, b , c};
    sort(vec.begin(), vec.end());

    for (int i = 0; i < vec.size(); i++) ;
  
  if ((vec.at(1)-vec.at(0)) == (vec.at(2)-vec.at(1)){
    cout << "YES" << endl;
    }
      else if ((vec.at(1)-vec.at(0)) != (vec.at(2)-vec.at(1)){
        cout << "NO" << endl;
               
}

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:32: error: could not convert '{a, b, c}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
    9 |     vector<int> vec = {a, b , c};
      |                                ^
      |                                |
      |                                <brace-enclosed initializer list>
a.cc:14:53: error: expected ')' before '{' token
   14 |   if ((vec.at(1)-vec.at(0)) == (vec.at(2)-vec.at(1)){
      |      ~                                              ^
      |                                                     )
a.cc:22:1: error: expected primary-expression before '}' token
   22 | }
      | ^
Language: C++

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

Compiler output:
a.cc:8:14: warning: missing terminating " character
    8 |   else cout<<"NO<<endl;
      |              ^
a.cc:8:14: error: missing terminating " character
    8 |   else cout<<"NO<<endl;
      |              ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:1: error: expected primary-expression before '}' token
    9 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i=0; i<(n); ++i)
#define rep1(i,n) for(int i=1; i<=(n); ++i)
#define repi(i,a,b) for(int i=a; i<=(b); ++i)
#define rrep(i,n) for(int i=(n-1); i>=0; --i)
#define ALL(obj) (obj).begin(), (obj).end()
#define RALL(obj) (obj).rbegin(), (obj).rend()
#define pb push_back
#define mp make_pair
#define to_s to_string
#define sz(v) (int)v.size()
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() )
#define pr(x) cout<<(x)<<'\n'
#define debug(x) cout << #x << ": " << (x) << '\n'
#define yes "YES"
#define no "NO"
using ll = long long;
using namespace std;
typedef pair<int,int> P;
struct aaa{aaa(){ cin.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(20);};}aaaaaaa;
int MOD = 1e9 + 7;
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int lcm(int a,int b){return (a*b)/gcd(a,b);}
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

int a,b,c;
int main(){
    cin >> a >> b >> c;
    pr((b-a == c-a)?yes : no);
}
    
}

Compiler output:
a.cc:33:1: error: expected declaration before '}' token
   33 | }
      | ^
Language: C++

#include <bits/stdc++.h>

#define ld long double
#define ll long long int
#define ull unsigned long long int
#define vi vector<int>
#define vl vector<ll>
#define vvi vector< vector<int> >
#define vvl vector< vector<ll> >
#define repd(i, a, b) for (int i=(a);i<(b);i++)
#define rep(i, n) repd(i,0,n)
#define ALL(v) v.begin(), v.end()
#define INF 1e9

using namespace std;

/**
 * calculate GCD(greatest common divisor)
 * @param a
 * @param b
 * @return
 */
unsigned euclidean_gcd(unsigned a, unsigned b) {
    if (a < b) return euclidean_gcd(b, a);
    unsigned r;
    while ((r = a % b)) {
        a = b;
        b = r;
    }
    return b;
}

/**
 * change minimum
 * @tparam T
 * @param a
 * @param b
 * @return bool
 */
template<class T>
inline bool changeMinimum(T &a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}

/**
 * change maximum
 * @tparam T
 * @param a
 * @param b
 * @return bool
 */
template<class T>
inline bool changeMaximum(T &a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

/**
 * output answer
 * @tparam T
 * @param answer
 * @return
 */
template<typename T>
T output(T answer) {
    cout << answer << endl;
    return 0;
}

/** ----from here ---------------------------------------------------------- */

int main() {

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:85:12: error: conflicting declaration 'std::string a'
   85 |     string a;
      |            ^
a.cc:81:9: note: previous declaration as 'int a'
   81 |     int a, b, c;
      |         ^
a.cc:86:15: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   86 |     if(ans){a="YES";}else{a="NO";}cout<<a<<endl;
      |               ^~~~~
      |               |
      |               const char*
a.cc:86:29: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   86 |     if(ans){a="YES";}else{a="NO";}cout<<a<<endl;
      |                             ^~~~
      |                             |
      |                             const char*
Language: C++


#include <iostream>
#include <string>
#include <cmath>
#include <sstream>
#include <iomanip>

using namespace std;

int main(int argc, char* argv[])
{

	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(int, char**)':
a.cc:17:28: error: expected ')' before string constant
   17 |         cout << ((b-a==c-b) "YES": "NO") << endl;
      |                 ~          ^~~~~~
      |                            )
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:23: error: 'a' was not declared in this scope
    5 |   vector<int> vec = { a,b,c };
      |                       ^
a.cc:5:25: error: 'b' was not declared in this scope
    5 |   vector<int> vec = { a,b,c };
      |                         ^
a.cc:5:27: error: 'c' was not declared in this scope
    5 |   vector<int> vec = { a,b,c };
      |                           ^
a.cc:5:29: error: could not convert '{<expression error>, <expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
    5 |   vector<int> vec = { a,b,c };
      |                             ^
      |                             |
      |                             <brace-enclosed initializer list>
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: In function 'int main()':
a.cc:7:14: error: unable to find string literal operator 'operator""endl' with 'const char [3]', 'long unsigned int' arguments
    7 |   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 - d) cout << "YES";
  else cout << "NO";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 'd' was not declared in this scope
    8 |   if(b - a == c - d) cout << "YES";
      |                   ^
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cstdlib>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <stack>
#include <math.h>
#include <map>
#define Z class
#define ln cout<<'\n'
#define ll long long
#define rep(i, n) for(int i = 0; i < (n); ++i)
//ASCII a=97, A=65
// int H[N]; rep(i,N) scanf("%d", &H[i]);
// int max_x = *std::max_element(x.begin(), x.end());
// int min_y = *std::min_element(y.begin(), y.end());
using namespace std;
template<class T> inline bool chmax(T& a, T b){ if(a < b) { a=b; return 1; }return 0;}
template<class T> inline bool chmin(T& a, T b){ if(a > b) { a=b; return 1; }return 0;}
template<Z A>void pr(A a){cout<<a;ln;}
template<Z A,Z B>void pr(A a,B b){cout<<a<<' ';pr(b);}
template<Z A,Z B,Z C>void pr(A a,B b,C c){cout<<a<<' ';pr(b,c);}
template<Z A,Z B,Z C,Z D>void pr(A a,B b,C c,D d){cout<<a<<' ';pr(b,c,d);}
template<Z A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}ln;}

int GCD(int a, int b) { return b ? GCD(b, a%b) : a; }
const long long INF = 1LL << 60;

int main(){
    int A,B,C; cin >. A >> B >> C;
    if(B-A==C-B) pr("YES");
    else pr("NO");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:21: error: expected primary-expression before '.' token
   32 |     int A,B,C; cin >. A >> B >> C;
      |                     ^
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;
    }
  
     if((b-a)!=(c-b)){
      cout<<"NO"<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected primary-expression before 'if'
    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"<<entl;
    }
  
     if((b-a)!=(c-b)){
      cout<<"NO"<<entl;
    }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected primary-expression before 'if'
    8 |     if((b-a)==(c-b)){
      |     ^~
a.cc:13:19: error: 'entl' was not declared in this scope
   13 |       cout<<"NO"<<entl;
      |                   ^~~~
Language: C++

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

using ll = long long;
const ll amari = 1e9+7;
#define ben(a) a.begin(),a.end()
#define pb(a,b) a.push_back(b)

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:1: error: 'nclude' does not name a type
    1 | nclude<bits/stdc++.h>
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:11:9: error: 'cin' was not declared in this scope
   11 |         cin >> a >> b >> c;
      |         ^~~
a.cc:12:27: error: 'cout' was not declared in this scope
   12 |         if(b - a == c - b)cout << "Yes" << endl;
      |                           ^~~~
a.cc:12:44: error: 'endl' was not declared in this scope
   12 |         if(b - a == c - b)cout << "Yes" << endl;
      |                                            ^~~~
a.cc:13:14: error: 'cout' was not declared in this scope
   13 |         else cout << "No" << endl;
      |              ^~~~
a.cc:13:30: error: 'endl' was not declared in this scope
   13 |         else cout << "No" << endl;
      |                              ^~~~
Language: C++

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

int main() {

	int a,b,c;

	cin >> a >> b >> c;

	if (b - a == c - b) {
		puts("YES");
	}

	else {
		puts("NO")
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:27: error: expected ';' before '}' token
   18 |                 puts("NO")
      |                           ^
      |                           ;
   19 |         }
      |         ~
Language: C++

#include <cstdio>

using namespace std;

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

#include <cstdio>

using namespace std;

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:9:12: error: extended character − is not valid in an identifier
    9 |         if(b−a==c−b){
      |            ^
a.cc:9:17: error: extended character − is not valid in an identifier
    9 |         if(b−a==c−b){
      |                 ^
a.cc: In function 'int main()':
a.cc:8:35: error: expected primary-expression before '%' token
    8 |         scanf("%d %d %d", &a, &b ,%c);
      |                                   ^
a.cc:9:12: error: 'b\U00002212a' was not declared in this scope
    9 |         if(b−a==c−b){
      |            ^~~
a.cc:9:17: error: 'c\U00002212b' was not declared in this scope
    9 |         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(a-2*b+c==0){
      cout<<"YES";
    }
  	else{
      cout<<"NO";
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: expected ';' before 'if'
    6 |   cin>>a>>b>>c
      |               ^
      |               ;
    7 |         if(a-2*b+c==0){
      |         ~~     
a.cc:10:9: error: 'else' without a previous 'if'
   10 |         else{
      |         ^~~~
Language: C++

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


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

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

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


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesspace'
    2 | using namesspace std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     cin>>a>>b>>c;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |         cout<<"YES"<<endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |         cout<<"YES"<<endl;
      |                      ^~~~
      |                      std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |         cout<<"NO"<<endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |         cout<<"NO"<<endl;
      |                     ^~~~
      |                     std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
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:1: error: extended character − is not valid in an identifier
    7 | b−a==c−b)cout<<"YES"<<endl;else cout<<"NO"<<endl;}
      | ^
a.cc:7:6: error: extended character − is not valid in an identifier
    7 | b−a==c−b)cout<<"YES"<<endl;else cout<<"NO"<<endl;}
      |      ^
a.cc: In function 'int main()':
a.cc:7:1: error: 'b\U00002212a' was not declared in this scope
    7 | b−a==c−b)cout<<"YES"<<endl;else cout<<"NO"<<endl;}
      | ^~~
a.cc:7:6: error: 'c\U00002212b' was not declared in this scope
    7 | b−a==c−b)cout<<"YES"<<endl;else cout<<"NO"<<endl;}
      |      ^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'cou' was not declared in this scope; did you mean 'cos'?
    9 |     cou << endl;
      |     ^~~
      |     cos
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>

int main(void){
  int a,b,c;
  scanf("%d%d%d",&a,&b,&c);
  printf("%s", b - a == c - b ? "YES" : "NO");
  return 0;

Compiler output:
main.c: In function 'main':
main.c:11:3: error: expected declaration or statement at end of input
   11 |   return 0;
      |   ^~~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: lvalue required as left operand of assignment
    7 |   if(a+c=2*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:5:8: error: stray '\342' in program
    5 |   if((b<U+2212>a)==(c<U+2212>b)) printf("YES\n");
      |        ^~~~~~~~
main.c:5:8: error: expected ')' before 'a'
    5 |   if((b−a)==(c−b)) printf("YES\n");
      |      ~ ^~
      |        )
main.c:5:15: error: stray '\342' in program
    5 |   if((b<U+2212>a)==(c<U+2212>b)) printf("YES\n");
      |                      ^~~~~~~~
main.c:5:15: error: expected ')' before 'b'
    5 |   if((b−a)==(c−b)) printf("YES\n");
      |             ~ ^~
      |               )
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:5:7: error: stray '\342' in program
    5 |   if(b<U+2212>a==c<U+2212>b) printf("YES\n");
      |       ^~~~~~~~
main.c:5:7: error: expected ')' before 'a'
    5 |   if(b−a==c−b) printf("YES\n");
      |     ~ ^~
      |       )
main.c:5:12: error: stray '\342' in program
    5 |   if(b<U+2212>a==c<U+2212>b) printf("YES\n");
      |                   ^~~~~~~~
Language: C++

#include <iostream>
#include <climits>
#include <set>
#include <string>
#include <algorithm>
#include <vector>
#define MAX 1000000007


using namespace std;
#define ll long long
#define dbg if(0)
#define ISRANGE(val,lo,hi) ((lo<=val)&&(val<hi))



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


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

    dbg cout <<ans<<endl;

    return 0;

}

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

#include <iostream>
#include <climits>
#include <set>
#include <string>
#include <algorithm>
#include <vector>
#define MAX 1000000007


using namespace std;
#define ll long long
#define dbg if(0)
#define ISRANGE(val,lo,hi) ((lo<=val)&&(val<hi))



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


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

    dbg cout <<ans<<endl;

    return 0;

}

Compiler output:
a.cc:23:12: error: extended character − is not valid in an identifier
   23 |         if(b−a=c−b)cout <<"YES"<<endl;
      |            ^
a.cc:23:16: error: extended character − is not valid in an identifier
   23 |         if(b−a=c−b)cout <<"YES"<<endl;
      |                ^
a.cc: In function 'int main()':
a.cc:23:12: error: 'b\U00002212a' was not declared in this scope
   23 |         if(b−a=c−b)cout <<"YES"<<endl;
      |            ^~~
a.cc:23:16: error: 'c\U00002212b' was not declared in this scope
   23 |         if(b−a=c−b)cout <<"YES"<<endl;
      |                ^~~
Language: C++

#include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<queue>
#include<stack>
#include<stdio.h>
#include<vector>
#include<set>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
typedef int long long ll;
using namespace std;

int main(){
    
    int a,b,c;
    cin>>a>>b>>c;
    if(b-a==0&&c-b==0){puts("YES");}else{puts("NO")}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:52: error: expected ';' before '}' token
   21 |     if(b-a==0&&c-b==0){puts("YES");}else{puts("NO")}
      |                                                    ^
      |                                                    ;
Language: C++

// abc059.a

#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstdio>

using namespace std;

#define REP(i, n) for (int i = 0; i < n; i++) 

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	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:31:15: error: lvalue required as left operand of assignment
   31 |         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";clse cout<<"NO";}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:59: error: 'clse' was not declared in this scope; did you mean 'close'?
    3 | int main(){int a,b,c;cin>>a>>b>>c;if(b-a==c-b)cout<<"YES";clse cout<<"NO";}
      |                                                           ^~~~
      |                                                           close
Language: C++

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

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:1: error: expected primary-expression before 'int'
    4 | int a,b,c;
      | ^~~
a.cc:4:1: error: expected '}' before 'int'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:5:6: error: 'cin' in namespace 'std' does not name a type
    5 | std::cin>>a>>b>>c;
      |      ^~~
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:6:1: error: 'string' does not name a type; did you mean 'stdin'?
    6 | string ans="NO";
      | ^~~~~~
      | stdin
a.cc:7:1: error: expected unqualified-id before 'if'
    7 | if (a-b==b-c) ans="YES";
      | ^~
a.cc:8:6: error: 'cout' in namespace 'std' does not name a type
    8 | std::cout<<ans<<std::endl;
      |      ^~~~
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:1: error: expected declaration before '}' token
    9 | }
      | ^
Language: C++

#include <iostream>
int a,b,c;
std::cin>>a>>b>>c;
string ans="NO";
if (a-b==b-c) ans="YES";
std::cout<<ans<<std::endl;

Compiler output:
a.cc:3:6: error: 'cin' in namespace 'std' does not name a type
    3 | std::cin>>a>>b>>c;
      |      ^~~
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:4:1: error: 'string' does not name a type; did you mean 'stdin'?
    4 | string ans="NO";
      | ^~~~~~
      | stdin
a.cc:5:1: error: expected unqualified-id before 'if'
    5 | if (a-b==b-c) ans="YES";
      | ^~
a.cc:6:6: error: 'cout' in namespace 'std' does not name a type
    6 | std::cout<<ans<<std::endl;
      |      ^~~~
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<iomanip>
#include<algorithm>
#include<queue>
#include<stack>
#include<map>
using namespace std;
#define ll long long
int main(){
    int a,b,c;
    cin >> a >> b >> c;
    if(b-a == c-a){
      cout <<"YES";
    }else{
      cout << "NO"
    }
    return 0;
}


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

#include <iostrem>
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:1:10: fatal error: iostrem: No such file or directory
    1 | #include <iostrem>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
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:7:9: error: lvalue required as left operand of assignment
    7 |     if(b-a=c-b) cout<<"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" << endl ;
    { else {
      cout << "NO" << endl ;
    }
}

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

#include <iostream>

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:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   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:6:23: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   if (b - a == c - b) cout << "YES" << endl;
      |                       ^~~~
      |                       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:6:40: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   if (b - a == c - b) cout << "YES" << endl;
      |                                        ^~~~
      |                                        std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:7:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   else cout << "NO" << endl;
      |        ^~~~
      |        std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   else cout << "NO" << endl;
      |                        ^~~~
      |                        std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> a >> b >> c;
      |     ^~~
a.cc:7:9: error: 'cout' was not declared in this scope
    7 |         cout << "YES";
      |         ^~~~
a.cc:10:9: error: 'cout' was not declared in this scope
   10 |         cout << "NO";
      |         ^~~~
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout<<endl;
      |     ^~~~
a.cc:12:11: error: 'endl' was not declared in this scope
   12 |     cout<<endl;
      |           ^~~~
Language: C++

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

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

#include <bits/stdc++.h>
using namespace std;
int a,b,c;
int main(){
    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:7:19: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 |     else cout<"NO"<<endl;
      |               ~~~~^~~~~~
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:5:6: error: 'a' undeclared (first use in this function)
    5 |   if(a+c==B<<1){
      |      ^
main.c:5:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:8: error: 'c' undeclared (first use in this function)
    5 |   if(a+c==B<<1){
      |        ^
Language: C++

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

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
//const ll mod = 1000000007;

int main() {
    //cout.precision(10);
    int a, b, c;
    cin >> a >> b >> c;
  string ans == "NO";
    if(b-a== c-b){
ans="YES";
}
cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: expected initializer before '==' token
   14 |   string ans == "NO";
      |              ^~
a.cc:16:1: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 | ans="YES";
      | ^~~
      | abs
a.cc:18:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 | cout << ans << endl;
      |         ^~~
      |         abs
Language: C

#include <stdio.h>
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");
	return 0;
}

Compiler output:
main.c:2:1: error: unknown type name 'using'
    2 | using namespace std;
      | ^~~~~
main.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    2 | using namespace std;
      |                 ^~~
Language: C++

#include "bits/stdc++.h"

using namespace std;

#define print(s) cout << (s) << endl;
#define sp(x) cout<<setprecision(x);
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n) 
#define all(a) (a).begin(), (a).end()
#define inf 10000000
 
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int a, b, c; int >> a>> b>> c;
    if (b-a==c-b){
        cout<<"YES"<<endl;
    } else{
        cou<<"NO"<<endl;
    }
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:22: error: expected unqualified-id before '>>' token
   15 |     int a, b, c; int >> a>> b>> c;
      |                      ^~
a.cc:19:9: error: 'cou' was not declared in this scope; did you mean 'cos'?
   19 |         cou<<"NO"<<endl;
      |         ^~~
      |         cos
Language: C++

#include<bits/stdc++.h>
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")
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: expected ';' before '}' token
   13 |         printf("NO\n")
      |                       ^
      |                       ;
   14 |     }
      |     ~
Language: C++

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'in' was not declared in this scope; did you mean 'int'?
    6 |   in>>a>>b>>c;
      |   ^~
      |   int
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a,b;
int main()
{
	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:20: error: 'c' was not declared in this scope
    6 |         cin>>a>>b>>c;
      |                    ^
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\n";
  else cout << "NO\n
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   if(a-b==b-c)cout<<"YES"<<std::endl;
      |               ^~~~
      |               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:6:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   else cout<<"NO"<<endl;
      |        ^~~~
      |        std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:6:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   else cout<<"NO"<<endl;
      |                    ^~~~
      |                    std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main() {
int A,B,C;
cin >> A >> B >> C;
if (A-B==B-C){
  cout << "YES" << endl;
} else {
  cout << "NO" << endkl;}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: 'endkl' was not declared in this scope
   10 |   cout << "NO" << endkl;}
      |                   ^~~~~