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

#include <iostream>
#include <cmath>

using namespace std;

int main() {
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  if (abc(b - a) <= d && abc(c - b) <= d) cout << "Yes";
  else cout << "No";
  cout << '\n';
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'abc' was not declared in this scope; did you mean 'abs'?
    9 |   if (abc(b - a) <= d && abc(c - b) <= d) cout << "Yes";
      |       ^~~
      |       abs
Language: C++

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

int abs(int n) {
  if (n >= 0) return n:
  else return -n;
}

int main() {
  int a,b,c,d;
  cin >> a >> b >> c >> d;
  
  if ((abs(b-a) <= d) && (abs(b-c) <= d)) cout << "Yes" << endl;
  else if (abs(a-c) <= d) cout << "Yes" << endl;
  else cout << "No" << endl;
  
}


Compiler output:
a.cc: In function 'int abs(int)':
a.cc:5:23: error: expected ';' before ':' token
    5 |   if (n >= 0) return n:
      |                       ^
      |                       ;
a.cc:5:23: error: expected primary-expression before ':' token
a.cc:7:1: warning: control reaches end of non-void function [-Wreturn-type]
    7 | }
      | ^
Language: Java

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

int main(){
  int a,b,c,d;
  cin >> a >> b >> c >> d;
  if(abs(c-a)<=d){
    cout << "Yes";
  }else{
    if(abs(b-a)<=d&&abs(c-b)<=d&&((b<=a&&b>=c)||(b>=a&&b<=c))){
      cout << "Yes";
    }else{
      cout << "NO";
    }
  }

}


Compiler output:
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
         ^
Main.java:6: error: not a statement
  cin >> a >> b >> c >> d;
                     ^
Main.java:8: error: not a statement
    cout << "Yes";
         ^
Main.java:11: error: not a statement
      cout << "Yes";
           ^
Main.java:13: error: not a statement
      cout << "NO";
           ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
int main(){
^
  (use --enable-preview to enable unnamed classes)
7 errors
Language: C

#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
int acs(const void *a, const void *b){return *(int*)a - *(int*)b;} /* 1,2,3,4.. */
int des(const void *a, const void *b){return *(int*)b - *(int*)a;} /* 8,7,6,5.. */
int cmp_char(const void *a, const void *b){return *(char*)a - *(char*)b;} /* a,b,c,d.. */
int cmp_str(const void *a, const void *b){return strcmp(*(const char **)a, *(const char **)b);} /* aaa,aab.. */
#define min(a,b) (a < b ? a: b)
#define max(a,b) (a > b ? a: b)
#define rep(i, l, r) for (int i = l; i < r; i++)
#define MAX 100001
#define MOD 1000000007

typedef long long int lli;

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

  if (abs(a - c) <= d || (abs(a - b) <= d && abs(b - c) <= d)) printf("Yes\n");
  else  printf("No\n")
  printf("%d\n", ans);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:25:23: error: expected ';' before 'printf'
   25 |   else  printf("No\n")
      |                       ^
      |                       ;
   26 |   printf("%d\n", ans);
      |   ~~~~~~
Language: C++

#pragma gcc optimize("Ofast")
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(V) (V).begin(),(V).end()
#define SORT(V) sort(ALL(V)) //小さい方からソート
#define REV(V) reverse(ALL(V)) //リバース
#define RSORT(V) SORT(V);REV(V) //大きい方からソート
#define NPN(V) next_permutation(ALL(V)) //順列
#define pb(n) push_back(n)
#define endl '\n'
#define Endl '\n'
#define DUMP(x)  cout << #x << " = " << (x) << endl
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define Yay(n) cout << ((n) ? "Yay!": ":(") << endl
#define RAPID cin.tie(0);ios::sync_with_stdio(false)
#define IN(n) cin >> n
#define IN2(a,b) cin >> a >> b
#define IN3(a,b,c) cin >> a >> b >> c 
#define VIN(V) for(int i = 0; i < (V).size(); i++) {cin >> (V).at(i);}
#define OUT(n) cout << n << endl
#define VOUT(V) REP(i, (V).size()) {cout << (V)[i] << endl;}
#define VOUT2(V) REP(i, (V).size()) {cout << (V)[i] << " ";} cout<<endl;

// 型マクロ定義
#define int long long
#define P pair<ll,ll>
#define Vi vector<ll>
#define Vd vector<double>
#define Vs vector<string>
#define Vc vector<char>
#define M map<ll,ll>
#define S set<ll>
#define PQ priority_queue<ll>
#define PQG priority_queue<ll,V,greater<ll>
//

const int MOD = 1000000007;
const int INF = 1061109567;
const double EPS = 1e-10;
const double PI  = acos(-1.0);

int gcd(int a,int b){return b?gcd(b,a%b):a;} //最小公倍数

// デフォルト変数定義
int n,m,a,b,c,x,y,z;
double d,e,f;
string s,t;
//

signed main() {
  RAPID;
  IN2(a,b,c);
  IN2(x);
  Yes((abs(c-a)<=x || (abs(a-b)<=x && abs(b-c)<=x)));
}

Compiler output:
a.cc:58:12: error: macro "IN2" passed 3 arguments, but takes just 2
   58 |   IN2(a,b,c);
      |            ^
a.cc:23:9: note: macro "IN2" defined here
   23 | #define IN2(a,b) cin >> a >> b
      |         ^~~
a.cc:59:8: error: macro "IN2" requires 2 arguments, but only 1 given
   59 |   IN2(x);
      |        ^
a.cc:23:9: note: macro "IN2" defined here
   23 | #define IN2(a,b) cin >> a >> b
      |         ^~~
a.cc: In function 'int main()':
a.cc:58:3: error: 'IN2' was not declared in this scope
   58 |   IN2(a,b,c);
      |   ^~~
Language: C++

#pragma gcc optimize("Ofast")
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(V) (V).begin(),(V).end()
#define SORT(V) sort(ALL(V)) //小さい方からソート
#define REV(V) reverse(ALL(V)) //リバース
#define RSORT(V) SORT(V);REV(V) //大きい方からソート
#define NPN(V) next_permutation(ALL(V)) //順列
#define pb(n) push_back(n)
#define endl '\n'
#define Endl '\n'
#define DUMP(x)  cout << #x << " = " << (x) << endl
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define Yay(n) cout << ((n) ? "Yay!": ":(") << endl
#define RAPID cin.tie(0);ios::sync_with_stdio(false)
#define IN(n) cin >> n
#define IN2(a,b) cin >> a >> b
#define IN3(a,b,c) cin >> a >> b >> c 
#define VIN(V) for(int i = 0; i < (V).size(); i++) {cin >> (V).at(i);}
#define OUT(n) cout << n << endl
#define VOUT(V) REP(i, (V).size()) {cout << (V)[i] << endl;}
#define VOUT2(V) REP(i, (V).size()) {cout << (V)[i] << " ";} cout<<endl;

// 型マクロ定義
#define int long long
#define P pair<ll,ll>
#define Vi vector<ll>
#define Vd vector<double>
#define Vs vector<string>
#define Vc vector<char>
#define M map<ll,ll>
#define S set<ll>
#define PQ priority_queue<ll>
#define PQG priority_queue<ll,V,greater<ll>
//

const int MOD = 1000000007;
const int INF = 1061109567;
const double EPS = 1e-10;
const double PI  = acos(-1.0);

int gcd(int a,int b){return b?gcd(b,a%b):a;} //最小公倍数

// デフォルト変数定義
int n,m,a,b,c,x,y,z;
double d,e,f;
string s,t;
//

signed main() {
  RAPID;
  IN2(a,b,c);
  IN2(x);
  Yes(abs(c-a)<=x || (abs(a-b)<=x && abs(b-c)<=x));
}

Compiler output:
a.cc:58:12: error: macro "IN2" passed 3 arguments, but takes just 2
   58 |   IN2(a,b,c);
      |            ^
a.cc:23:9: note: macro "IN2" defined here
   23 | #define IN2(a,b) cin >> a >> b
      |         ^~~
a.cc:59:8: error: macro "IN2" requires 2 arguments, but only 1 given
   59 |   IN2(x);
      |        ^
a.cc:23:9: note: macro "IN2" defined here
   23 | #define IN2(a,b) cin >> a >> b
      |         ^~~
a.cc: In function 'int main()':
a.cc:58:3: error: 'IN2' was not declared in this scope
   58 |   IN2(a,b,c);
      |   ^~~
Language: C++

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

int main() {

int a,b,c,d;
  cin>>a>>b>>c>>d;
  if(max(a,c)-min(a,c)<=d){cout<<"Yes"<<endl;}
  else if(max(a,b)-min(a,b)<=d&&max(a,c)-min(a,c)<=d)){cout<<"Yes"<<endl;}
    else if(max(b,c)-min(b,c)<=d&&max(a,c)-min(a,c)<=d)){cout<<"Yes"<<endl;}
    else if(max(a,b)-min(a,b)<=d&&max(b,c)-min(b,c)<=d)){cout<<"Yes"<<endl;}
  else{cout<<"No"<<endl;}

}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:54: error: expected primary-expression before ')' token
    9 |   else if(max(a,b)-min(a,b)<=d&&max(a,c)-min(a,c)<=d)){cout<<"Yes"<<endl;}
      |                                                      ^
a.cc:10:56: error: expected primary-expression before ')' token
   10 |     else if(max(b,c)-min(b,c)<=d&&max(a,c)-min(a,c)<=d)){cout<<"Yes"<<endl;}
      |                                                        ^
a.cc:11:56: error: expected primary-expression before ')' token
   11 |     else if(max(a,b)-min(a,b)<=d&&max(b,c)-min(b,c)<=d)){cout<<"Yes"<<endl;}
      |                                                        ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:30:15: error: expected '}' at end of input
   30 |     return 0;}
      |               ^
a.cc:3:15: note: to match this '{'
    3 |     int main(){
      |               ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:22: error: 'esle' was not declared in this scope
   16 |                     }esle if(c >= b && c - b <= d){
      |                      ^~~~
a.cc:30:15: error: expected '}' at end of input
   30 |     return 0;}
      |               ^
a.cc:3:15: note: to match this '{'
    3 |     int main(){
      |               ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:22: error: 'esle' was not declared in this scope
   16 |                     }esle if(c >= b && c - b <= d){
      |                      ^~~~
a.cc:24:22: error: 'esle' was not declared in this scope
   24 |                     }esle if(c >= b && c - b <= d){
      |                      ^~~~
a.cc:27:18: error: expected '}' before 'else'
   27 |                 }else{
      |                  ^~~~
a.cc:20:47: note: to match this '{'
   20 |                 }else if(b >= a && b - a <= d){
      |                                               ^
Language: C++

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

int abs(int x, int y){
  if(x >= y){
    return x-y;
  }else{
    return y-x;
  }
}
int main() {
  int a,b,c,d;
  cin >> a >> b >> c >> d;
  if(abs(a, c)<=d)){
    cout << "Yes" << endl;
  }else if(abs(a,b)<=d && abs(b,c)<=d){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: expected primary-expression before ')' token
   14 |   if(abs(a, c)<=d)){
      |                   ^
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
using namespace std;
typedef long long ll;
//max=({});


int main() {
	int a, b, c, d;
	cin >> a >> b >> c >> d;
	if (abs(a - c) <= d)puts("Yes");
	else if (abs(a - b) <= d && abs(b - c) <= d))puts("Yes");
	else puts("No");
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:53: error: expected primary-expression before ')' token
   13 |         else if (abs(a - b) <= d && abs(b - c) <= d))puts("Yes");
      |                                                     ^
Language: C++

#include<iostream>
using namespace std;
int main() {
	int a, b, c, d;
	cin >> a >> b >> c >> d;
	if (a - b < d && b - c < d) {
		cout << "Yes" << endl;
	}
	else if (a - b < d && c - b < d) {
		cout << "Yes" << endl;
	}
	else if (b - a < d && b - c < d) {
		cout << "Yes" << endl;
	}
	else if (b - a < d && c - b < da) {
		cout << "Yes" << endl;
	}
	else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:39: error: 'da' was not declared in this scope; did you mean 'd'?
   15 |         else if (b - a < d && c - b < da) {
      |                                       ^~
      |                                       d
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
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; }
const long long INF = 1LL << 60;
 
typedef pair<ll,ll> pairs;
vector<pairs> p;
bool pairCompare(const pair<double,ll>& firstElof, const pair<double,ll>& secondElof){
    return firstElof.first < secondElof.first;
}
#define MAX_N 1000100
bool x[MAX_N];
ll num[MAX_N];
ll fibl[MAX_N]={0};
 
ll fib(ll a){
    if (fibl[a]!=0)return fibl[a];
    if (a==0){
        return 0;
    }else if (a==1){
        return 1;
    }
    return fibl[a]=fib(a-1)+fib(a-2);
}
 
ll eratosthenes(ll n) {
    int p = 0;
    for (ll i=0; i<=n; ++i) x[i] = true;
    x[0] = x[1] = false;
    for(int i=2; i<=n; ++i) {
        if(x[i]) {
            p++;
            for(int j=2*i; j<=n; j+=i) x[j] = false;
        }
        
        num[i] = p;
    }
    return p;
}
 
ll gcd(ll a,ll b){
    if (a%b==0)return(b);
    else return(gcd(b,a%b));
}
 
ll keta(ll N){
    int tmp{};
    while( N > 0 ){
        tmp += ( N % 10 );
        N /= 10;
    }
    N = tmp;
    return N;
}

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



Compiler output:
a.cc: In function 'int main()':
a.cc:63:13: error: expected primary-expression before '<' token
   63 |     if(a-b =< d && b-c =< d)cout << "Yes" << endl;
      |             ^
a.cc:63:25: error: expected primary-expression before '<' token
   63 |     if(a-b =< d && b-c =< d)cout << "Yes" << endl;
      |                         ^
Language: C++

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

int main(){
int a,b,c,d;
cin>>a>>b>>c>>d;
int x=fabs(a-b);
int y=fabs(b-c);
int z=fabs(a-c);
if(z<=d||(x<=d&&y<=d)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: expected ';' before 'cout'
   11 | if(z<=d||(x<=d&&y<=d)cout<<"Yes"<<endl;
      |                      ^~~~
      |                      ;
a.cc:12:1: error: expected primary-expression before 'else'
   12 | else cout<<"No"<<endl;
      | ^~~~
a.cc:11:40: error: expected ')' before 'else'
   11 | if(z<=d||(x<=d&&y<=d)cout<<"Yes"<<endl;
      |   ~                                    ^
      |                                        )
   12 | else cout<<"No"<<endl;
      | ~~~~
Language: C++

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

int main() {
  int a,b,c,d;
  cin >>a,b,c,d;
  if(((a-c)<=d) || ((c-a)<=d)){
    cout << "Yes";
  }else if(a<b && b<c){
    if(((b-a)<=d) && ((c-b)<=d){
      cout << "Yes";
    }else{
      cout << "No";
    }
  }else if(c<b && b<a){
    if(((a-b)<=d) && ((b-c)<=d){
      cout << "Yes";
    }else{
      cout << "No";
    }
  }else{
    cout << "No";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:32: error: expected ')' before '{' token
   10 |     if(((b-a)<=d) && ((c-b)<=d){
      |       ~                        ^
      |                                )
a.cc:15:3: error: expected primary-expression before '}' token
   15 |   }else if(c<b && b<a){
      |   ^
a.cc:16:32: error: expected ')' before '{' token
   16 |     if(((a-b)<=d) && ((b-c)<=d){
      |       ~                        ^
      |                                )
a.cc:21:3: error: expected primary-expression before '}' token
   21 |   }else{
      |   ^
Language: C++

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

int main() {
  int a,b,c,d;
  cin >>a >>b >>c >>d;
  if(c-a<=d || a-c<=d){
  cout << "Yes";
  }
  if(b-a<=d || a-b<=d) && (b-c<=d || c-b<=d){
  cout << "No";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:27: error: expected identifier before '(' token
   10 |   if(b-a<=d || a-b<=d) && (b-c<=d || c-b<=d){
      |                           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'X' was not declared in this scope
    9 |   if((X(b-a)<=d&&X(c-b)<=d)||X(c-a)<=d)
      |       ^
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>

using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
typedef long long ll;

int main(){
  int a,b,c,d;
  cin >> a >> b >> c >> d;
  if(abs(a-c)<=d)cout << "Yes" << ednl;
  else cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:35: error: 'ednl' was not declared in this scope
   13 |   if(abs(a-c)<=d)cout << "Yes" << ednl;
      |                                   ^~~~
Language: C++

#include <bits/stdc++>
using namespace std;
int main() {
int a,b,c,d;
cin >> a >> b >> c >> d;
if(abs(a-c)< d+1)
cout<<"Yes"<<endl;
else if(abs(a-b)<d+1 && abs(c-b)<d+1)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}


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

#include<iostream>
using namespace std;
int main()
{
    int a,b,c,d;
    cin>>a>>b>>c>>d;
   
    
    else if(b-a<=d&&c-b<=d||c-a<=d)
    {
        cout<<"Yes";
    }

    else
    cout<<"No";
 
 
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'else' without a previous 'if'
    9 |     else if(b-a<=d&&c-b<=d||c-a<=d)
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int a,b,c,d;
    cin>>a>>b>>c>>d;
  
    
    else if((b-a<=d&&c-b<=d)||c-a<=d)
    {
        cout<<"Yes";
    }

    else
    cout<<"No";
 
 
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'else' without a previous 'if'
    9 |     else if((b-a<=d&&c-b<=d)||c-a<=d)
      |     ^~~~
Language: C++

int a,b,c,d;
    cin>>a>>b>>c>>d;
    if(b-a<0&&c-b<0&&c-a<0)
    cout<<"No";
    else if(b-a<=d&&c-b<=d||c-a<=d)
    cout<<"Yes";
    else
    cout<<"No";

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:42: error: expected ')' before '{' token
    9 |   }else if((abs(a-b)<=d)&&(abs(b-c) <= d){
      |           ~                              ^
      |                                          )
a.cc:15:1: error: expected primary-expression before '}' token
   15 | }
      | ^
Language: C++

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

int main(){
  int a,b,c,d;
  cin>>a>>b>>c>>d;
  if(((b-a)<d && (a-b)<d)&&((c-b)<d && (b-c)<d)))cout <<"Yes";
  else cout <<"No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:49: error: expected primary-expression before ')' token
    7 |   if(((b-a)<d && (a-b)<d)&&((c-b)<d && (b-c)<d)))cout <<"Yes";
      |                                                 ^
Language: C++

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

int main(){
  int a,b,c,d;
  cin>>a>>b>>c>>d;
  if(((b-a)<d && (a-b)<d)&&((c-b)<d && (b-c)<d)))cout "Yes";
  else cout "No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:49: error: expected primary-expression before ')' token
    7 |   if(((b-a)<d && (a-b)<d)&&((c-b)<d && (b-c)<d)))cout "Yes";
      |                                                 ^
a.cc:8:12: error: expected ';' before string constant
    8 |   else cout "No";
      |            ^~~~~
      |            ;
Language: C++

#include<bits/stdc++.h>

#define rep(i,n) for(int i = 0; i < (n); i++)
#define ll long long

using namespace std;

int main(){
  int d;
  vector<int> abc;
  cin>>abc[0]>>abc[1]>>abc[2]>>d;
  
  sort(abc.begin(), abc.end());
  if(abc.max()-abc.min()<=d){
    cout<<"Yes";
  }else{
    cout<<"No";
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: 'class std::vector<int>' has no member named 'max'
   14 |   if(abc.max()-abc.min()<=d){
      |          ^~~
a.cc:14:20: error: 'class std::vector<int>' has no member named 'min'
   14 |   if(abc.max()-abc.min()<=d){
      |                    ^~~
Language: C++

#include<bits/stdc++.h>

#define rep(i,n) for(int i = 0; i < (n); i++)
#define ll long long

using namespace std;

int main(){
  int d;
  vector<int, 3> abc;
  cin>>abc[0]>>abc[1]>>abc[2]>>d;
  
  sort(abc.begin(), abc.end());
  if(abc.max()-abc.min()<=d){
    cout<<"Yes";
  }else{
    cout<<"No";
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: type/value mismatch at argument 2 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
   10 |   vector<int, 3> abc;
      |                ^
a.cc:10:16: note:   expected a type, got '3'
a.cc:11:11: error: invalid types 'int[int]' for array subscript
   11 |   cin>>abc[0]>>abc[1]>>abc[2]>>d;
      |           ^
a.cc:11:19: error: invalid types 'int[int]' for array subscript
   11 |   cin>>abc[0]>>abc[1]>>abc[2]>>d;
      |                   ^
a.cc:11:27: error: invalid types 'int[int]' for array subscript
   11 |   cin>>abc[0]>>abc[1]>>abc[2]>>d;
      |                           ^
a.cc:13:12: error: request for member 'begin' in 'abc', which is of non-class type 'int'
   13 |   sort(abc.begin(), abc.end());
      |            ^~~~~
a.cc:13:25: error: request for member 'end' in 'abc', which is of non-class type 'int'
   13 |   sort(abc.begin(), abc.end());
      |                         ^~~
a.cc:14:10: error: request for member 'max' in 'abc', which is of non-class type 'int'
   14 |   if(abc.max()-abc.min()<=d){
      |          ^~~
a.cc:14:20: error: request for member 'min' in 'abc', which is of non-class type 'int'
   14 |   if(abc.max()-abc.min()<=d){
      |                    ^~~
Language: C++

#include<bits/stdc++.h>

#define rep(i,n) for(int i = 0; i < (n); i++)
#define ll long long

using namespace std;

int main(){
  int d;
  valarray<int> abc(3);
  cin>>abc[0]>>abc[1]>>abc[2]>>d;
  
  sort(abc.begin(), abc.end());
  if(abc.max()-abc.min()<=d){
    cout<<"Yes";
  }else{
    cout<<"No";
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: 'class std::valarray<int>' has no member named 'begin'
   13 |   sort(abc.begin(), abc.end());
      |            ^~~~~
a.cc:13:25: error: 'class std::valarray<int>' has no member named 'end'
   13 |   sort(abc.begin(), abc.end());
      |                         ^~~
Language: C++

#include<bits/stdc++.h>

#define rep(i,n) for(int i = 0; i < (n); i++)
#define ll long long

using namespace std;

int main(){
  int d;
  valarray<int> abc(3);
  cin>>abc[0]>>abc[1]>>abc[2]>>d;
  
  sort(abc);
  if(abc.max()-abc.min()<=d){
    cout<<"Yes";
  }else{
    cout<<"No";
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: no matching function for call to 'sort(std::valarray<int>&)'
   13 |   sort(abc);
      |   ~~~~^~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 1 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 1 provided
Language: C++

a,b,c,d = map(int,input().split())
if abs(a-b)<=d and abs(c-b)<=d:
    print('Yes')
else:
    print('No')

Compiler output:
a.cc:3:11: warning: multi-character character constant [-Wmultichar]
    3 |     print('Yes')
      |           ^~~~~
a.cc:5:11: warning: multi-character character constant [-Wmultichar]
    5 |     print('No')
      |           ^~~~
a.cc:1:1: error: 'a' does not name a type
    1 | a,b,c,d = map(int,input().split())
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int a,b,c,d;
  //string a, b, c, d;
  cin >> a >> b >> c >> d;
  //cin >> s;
  if(abs(a-c)<=d)cout << "Yes" << endl;
  else if(abs(a-b)<=d&&abs(b-c)<=d)cout << "Yes" << endl;
  else cout << "NO" << endl;
  //int x, y;
  //x = min(a,b);
  //y = min(c,d);
  //cout << x+y << endl;
  retu

Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: 'retu' was not declared in this scope
   16 |   retu
      |   ^~~~
a.cc:16:7: error: expected '}' at end of input
   16 |   retu
      |       ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long                                    // long long省略
#define pb push_back                                    // push_back省略
#define mp make_pair                                    // make_pair省略
#define fi first                                        // first省略
#define se second                                       // second省略
#define itn int                                         // int誤字保険
#define count cout                                      // cout誤字保険
#define vecotr vector                                   // vector誤字保険
#define ednl endl                                       // endl誤字保険
#define opt() cin.tie(0); ios::sync_with_stdio(false)   // 入出力速度改善

#define rep(i,l,r) for(ll i=(l);i<(r);i++)               // 範囲[l, r)で刻み1のfor文(順方向)
#define repp(i,l,r,k) for(ll i=(l);i<(r);i+=(k))         // 範囲[l, r)で刻みkのfor文(順方向)
#define rrep(i,l,r) for(ll i=(r-1);i>=(l);i--)           // 範囲[l, r)で刻み1のfor文(逆方向)
#define rrepp(i,l,r,k) for(ll i=(r-1);i>=(l);i-=(k))     // 範囲[l, r)で刻みkのfor文(逆方向)
#define all(x) (x).begin(), (x).end()                   // vectorのポインタ位置指定用
#define max(p,q)((p)>(q)?(p):(q))                       // max拡張
#define min(p,q)((p)<(q)?(p):(q))                       // min拡張
#define bit(n,m)(((n)>>(m))&1)                          // 変数nのm番目のbitを取り出す

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int dy[]={0, 1, 0, -1};                                 // 4方向近傍
int dx[]={1, 0, -1, 0};                                 // 4方向近傍

int main(){
    ll a,b,c,d;cin>>a>>b>>c>>d;
  	vector<ll> v={a,b,c};
  	sort(all(v));
    if(abs(a-c) <= d || (abs(a-b) <= d && abs(b-c) <= d) cout << "Yes" << ednl;
    else cout << "No" << ednl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:57: error: expected ';' before 'cout'
   33 |     if(abs(a-c) <= d || (abs(a-b) <= d && abs(b-c) <= d) cout << "Yes" << ednl;
      |                                                         ^~~~~
      |                                                         ;
a.cc:34:5: error: expected primary-expression before 'else'
   34 |     else cout << "No" << ednl;
      |     ^~~~
a.cc:33:80: error: expected ')' before 'else'
   33 |     if(abs(a-c) <= d || (abs(a-b) <= d && abs(b-c) <= d) cout << "Yes" << ednl;
      |       ~                                                                        ^
      |                                                                                )
   34 |     else cout << "No" << ednl;
      |     ~~~~
Language: C++

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

int main() {
  int a,b,c,d; cin >>a >>b >>c >>d;
  int e = b-a, f = c-b; g = c-a;
  bool ok = false;
  if (g*g <= d*d) ok = true;
  else if (e*e <= d*d && f*f <= d*d) ok = true;
  
  if (ok) cout <<"Yes" <<endl;
  else cout <<"No" <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:25: error: 'g' was not declared in this scope
    6 |   int e = b-a, f = c-b; g = c-a;
      |                         ^
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main() {
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    if ((abs(a - b) <= d && abs(b - c) <= d) || abs(a - c) <= d)cout << "Yes" << endl;
    court << "No" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'court' was not declared in this scope
   10 |     court << "No" << endl;
      |     ^~~~~
Language: C++

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

int main() {
  
  int a,b,c,d;
  cin >> a >> b >> c >> d;
  
  if (abs(a-c)<=d) cout << "Yes" << endl;
  else if (abs(a-b)<=d && abs(b-c)<=d) cout << "Yes" << endl;
  else cout << "No" << endl;
}

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

#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <numeric>

using namespace std;
#define repp(i,a,b) for(int i = (int)(a) ; i < (int)(b) ; ++i)
#define reppe(i,a,b) for(int i = (int)(a) ; i <= (int)(b) ; ++i)
#define repm(i,a,b) for(int i = (int)(a) ; i > (int)(b) ; --i)
#define repme(i,a,b) for(int i = (int)(a) ; i >= (int)(b) ; --i)

typedef long long ll;

long long GCD(long long a, long long b){if(b==0)return a;return GCD(b,a%b);}

int main() {
    int a, b, c, d; cin >> a >> b >> c >> d;
    if (abs(a - c) <= d || (abs(a-b) && abs(c-b))) cout << "Yes" << endl; 
    else cout << "No" << endl;
}
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <numeric>

using namespace std;
#define repp(i,a,b) for(int i = (int)(a) ; i < (int)(b) ; ++i)
#define reppe(i,a,b) for(int i = (int)(a) ; i <= (int)(b) ; ++i)
#define repm(i,a,b) for(int i = (int)(a) ; i > (int)(b) ; --i)
#define repme(i,a,b) for(int i = (int)(a) ; i >= (int)(b) ; --i)

typedef long long ll;

long long GCD(long long a, long long b){if(b==0)return a;return GCD(b,a%b);}

int main() {
    int a, b, c, d; cin >> a >> b >> c >> d;
    if (abs(a - c) <= d || (abs(a-b) && abs(c-b))) cout << "Yes" << endl; 
    else cout << "No" << endl;
}


Compiler output:
a.cc:42:11: error: redefinition of 'long long int GCD(long long int, long long int)'
   42 | long long GCD(long long a, long long b){if(b==0)return a;return GCD(b,a%b);}
      |           ^~~
a.cc:18:11: note: 'long long int GCD(long long int, long long int)' previously defined here
   18 | long long GCD(long long a, long long b){if(b==0)return a;return GCD(b,a%b);}
      |           ^~~
a.cc:44:5: error: redefinition of 'int main()'
   44 | int main() {
      |     ^~~~
a.cc:20:5: note: 'int main()' previously defined here
   20 | int main() {
      |     ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string.h>
#include <iomanip>
#include <map>
using namespace std;
int main()
{
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    if (d - a <= d)
    {
        cout << "Yes" << endl;
    }
    else if (a - b <= d || b - c <=)
    {
        cout << "Yes" << endl;
    }
    else
    {
        cout << "No" << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:36: error: expected primary-expression before ')' token
   16 |     else if (a - b <= d || b - c <=)
      |                                    ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <utility>
#include <tuple>
#include <string>
#include <cctype>
#include <cstdio>
#include <math.h>
using i8 = int8_t;
using u8 = uint8_t;
using i16 = int16_t;
using u16 = uint16_t;
using i32 = int32_t;
using u32 = uint32_t;
using i64 = int64_t;
using u64 = uint64_t;
using f32 = float;
using f64 = double;
constexpr i64 INF = 1'010'000'000'000'000'017LL;
constexpr i64 MOD = 1'000'000'007LL;
constexpr f64 EPS = 1e-12;
constexpr f64 PI = 3.14159265358979323846;
const int AMAX = 100000; 
using namespace std;
#define rep(i, n) for (i64 i = 0; i < (int)(n); i++)
#define FOR(i, m, n) for (i64 i = m; i < n; i++)
#define SORT(x) sort(x.begin(), x.end())
#define REVE(x) reverse(x.begin(), x.end())
#define all(x) (x).begin(), (x).end()
#define fst first
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define pob pop_back
#define sw swap
#define UP(x) transform(x.begin(), x.end(), x.begin(), ::toupper);
#define down(x) transform(x.begin(), x.end(), x.begin(), ::tolower);
using LL = long long;
using ULL = unsigned long long;
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;
}

int main()
{
LL a, b, c,d;
cin >> a >> b >> c >> d;
if(b-a<=d&&(c-b)<=d||(a-c)<=d)
{
cout << ans;
}
 return 0;
}

Compiler output:
a.cc:13:12: error: 'uint8_t' does not name a type
   13 | using u8 = uint8_t;
      |            ^~~~~~~
a.cc:12:1: note: 'uint8_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
   11 | #include <math.h>
  +++ |+#include <cstdint>
   12 | using i8 = int8_t;
a.cc:15:13: error: 'uint16_t' does not name a type
   15 | using u16 = uint16_t;
      |             ^~~~~~~~
a.cc:15:13: note: 'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:17:13: error: 'uint32_t' does not name a type
   17 | using u32 = uint32_t;
      |             ^~~~~~~~
a.cc:17:13: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:19:13: error: 'uint64_t' does not name a type
   19 | using u64 = uint64_t;
      |             ^~~~~~~~
a.cc:19:13: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc: In function 'int main()':
a.cc:70:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   70 | cout << ans;
      |         ^~~
      |         abs
Language: C++

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

int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
if(max(a,c)-min(a,c)>=d) cout << "Yes" << endl;
else if (max(a,b) - min(a,b)>=d && max(b,c) -min(b,c)>=d) cout << "Yes" << endl;
  else if(max(b,c) - min(b,c) >= d 
else cout << "No" << endl;

  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:35: error: expected ';' before 'else'
   12 |   else if(max(b,c) - min(b,c) >= d
      |                                   ^
      |                                   ;
   13 | else cout << "No" << endl;
      | ~~~~                               
a.cc:16:1: error: expected primary-expression before '}' token
   16 | }
      | ^
a.cc:13:27: error: expected ')' before '}' token
   13 | else cout << "No" << endl;
      |                           ^
      |                           )
......
   16 | }
      | ~                          
a.cc:12:10: note: to match this '('
   12 |   else if(max(b,c) - min(b,c) >= d
      |          ^
a.cc:16:1: error: expected primary-expression before '}' token
   16 | }
      | ^
Language: Java

import java.util.Scanner;

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

        if (Math.abs(b - a) + Math.abs(c - b) <= d　 || Math.abs(c - a) <= d * 2) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
      sc.close();
    }
}

Compiler output:
Main.java:11: error: illegal character: '\u3000'
        if (Math.abs(b - a) + Math.abs(c - b) <= d? || Math.abs(c - a) <= d * 2) {
                                                  ^
Main.java:11: error: not a statement
        if (Math.abs(b - a) + Math.abs(c - b) <= d? || Math.abs(c - a) <= d * 2) {
                                                                       ^
Main.java:11: error: ';' expected
        if (Math.abs(b - a) + Math.abs(c - b) <= d? || Math.abs(c - a) <= d * 2) {
                                                                               ^
Main.java:13: error: 'else' without 'if'
        } else {
          ^
4 errors
Language: Java

import java.util.Scanner;

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

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

		if ((b-a<=d && a-b<=d && c-b<=d && b-c<=d) || (c-a<=d && a-c<=d){
			System.out.print("Yes");
		}else{
			System.out.print("No");
		}
		
		return;
	}
}

Compiler output:
Main.java:13: error: ')' expected
		if ((b-a<=d && a-b<=d && c-b<=d && b-c<=d) || (c-a<=d && a-c<=d){
		                                                                ^
1 error
Language: C++

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

int main (){
    int a, b, c, d;
    cin>>a>>b>>c>>d;
    if(abs(a-c)<d+1){
        cout<<"Yes"<<endl;
    }
    else if(abs(a-b)<d+1&&abs(b-c)<d+1){
        cout<<"Yes"<<endl;
    }
    else{
        cout<<"No"<<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:6:5: error: 'cin' was not declared in this scope
    6 |     cin>>a>>b>>c>>d;
      |     ^~~
a.cc:7:8: error: 'abs' was not declared in this scope
    7 |     if(abs(a-c)<d+1){
      |        ^~~
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout<<"Yes"<<endl;
      |         ^~~~
a.cc:8:22: error: 'endl' was not declared in this scope
    8 |         cout<<"Yes"<<endl;
      |                      ^~~~
a.cc:11:9: error: 'cout' was not declared in this scope
   11 |         cout<<"Yes"<<endl;
      |         ^~~~
a.cc:11:22: error: 'endl' was not declared in this scope
   11 |         cout<<"Yes"<<endl;
      |                      ^~~~
a.cc:14:9: error: 'cout' was not declared in this scope
   14 |         cout<<"No"<<endl;
      |         ^~~~
a.cc:14:21: error: 'endl' was not declared in this scope
   14 |         cout<<"No"<<endl;
      |                     ^~~~
Language: C++

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

int main() {
  int a,b,c,d;
  cin >> a >> b  >> c >> d;
 if (((c-a) <= d) || ((c-b) <= d) && ((b-a) <= d))){
  cout << "Yes" << endl;
 }
   else {
  cout << "No" << endl;
  
}

}

  




Compiler output:
a.cc: In function 'int main()':
a.cc:7:51: error: expected primary-expression before ')' token
    7 |  if (((c-a) <= d) || ((c-b) <= d) && ((b-a) <= d))){
      |                                                   ^
Language: C++

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

int main(){
  int a,b,c,d; cin>>a>>b>>c>>d;
  if(abs(b-a)<=d && abs(c-b)<=d){
    cout<<"Yes";
  }else{ cout<<"No"
       }
  return 0;
}


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

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

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

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

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

int main(void)
{
  int a,b,c,talk_range,com_ab=0,com_bc=0,com_ca=0;
  char str[16];
  
  fgets(str,sizeof(str),stdin);
  sscanf(str,"%d %d %d %d",&a,&b,&c,&talk_range);
  
  if(abs(a-b) < talk_range)
    com_ab++;
  if(abs(b-c) < talk_range)
    com_bc++;
  if(abs(c-a) < talk_range)
    com_ca++;
  
  if(com_ca > 0)||(com_ab * com_bc > 0)
  {
    puts("Yes");
  }else
  {
    puts("No");
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:17: error: expected expression before '||' token
   19 |   if(com_ca > 0)||(com_ab * com_bc > 0)
      |                 ^~
Language: C++

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

int main() {
    int a, b, c, d;  cin >> a >> b >> c >> d;
    if (abs(a-b) <= d && abs(b-c) <= d) || abs(a-c) <= d)  cout << "Yes" << endl;
    else  cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:41: error: expected primary-expression before '||' token
    7 |     if (abs(a-b) <= d && abs(b-c) <= d) || abs(a-c) <= d)  cout << "Yes" << endl;
      |                                         ^~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int a, b, c, d;
  cin >> a, b, c, d;
    // 整数の入力
  string s;
  if (abs(b - a) < d && abs(c - b)) {
    s = "yes";
  } else if(abs(c - a) < d) {
   s = "yes"; 
  } else {
   s = "no" 
  }
   cout << s << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: expected ';' before '}' token
   14 |    s = "no"
      |            ^
      |            ;
   15 |   }
      |   ~
Language: C

#include<stdio.h>
#include <stdlib.h>
int main(void){
int a,b,c,d;
int d1,d2,d3;
//aはAさんがいる位置
//ｂはBさんがいる位置
//ｃはCさんがいる位置
//c-aがー２ｄ以上２ｄ以下の時に会話できる
scanf ("%d %d %d %d",&a,&b,&c,&d);
d1 = a-b;
d2 = b-c;
d3 = c-a;
if (abs(d3) <= d){
    printf("Yes\n");
 }
else if (abs(d3) > d && abs(d2) <= d && abs(d1) <= d)
    printf("Yes\n");
 }
else {
    printf ("No\n");
}

 return 0;
}

Compiler output:
main.c:20:1: error: expected identifier or '(' before 'else'
   20 | else {
      | ^~~~
main.c:24:2: error: expected identifier or '(' before 'return'
   24 |  return 0;
      |  ^~~~~~
main.c:25:1: error: expected identifier or '(' before '}' token
   25 | }
      | ^
Language: C

#include <stdio.h>

int dif(int *a,int *b){

	return a > b ? a-b : b-a;
}

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

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

	dif = dif(&a,&c);

	if(dif <= d) 
		printf("Yes");
	else if(dif > d && dif <=2*d){
		dif(&a,&b)<=d && dif(&a,&c)<=d ? printf("Yes") : printf("No");
	}
	else printf("No");


	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:15: error: called object 'dif' is not a function or function pointer
   13 |         dif = dif(&a,&c);
      |               ^~~
main.c:9:24: note: declared here
    9 |         int a, b, c, d,dif;
      |                        ^~~
main.c:18:17: error: called object 'dif' is not a function or function pointer
   18 |                 dif(&a,&b)<=d && dif(&a,&c)<=d ? printf("Yes") : printf("No");
      |                 ^~~
main.c:9:24: note: declared here
    9 |         int a, b, c, d,dif;
      |                        ^~~
main.c:18:34: error: called object 'dif' is not a function or function pointer
   18 |                 dif(&a,&b)<=d && dif(&a,&c)<=d ? printf("Yes") : printf("No");
      |                                  ^~~
main.c:9:24: note: declared here
    9 |         int a, b, c, d,dif;
      |                        ^~~