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

import org.omg.PortableInterceptor.SYSTEM_EXCEPTION;

import java.io.CharArrayReader;
import java.lang.reflect.Array;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt(), d = sc.nextInt();
        boolean ab = false, ac = false, bc = false;
        if(((Math.abs(b-c)<=d)&&(Math.abs(a-b)<=d))||(Math.abs(a-c)<=d))System.out.println("Yes");
        else System.out.println("No");
    }
}


Compiler output:
Main.java:1: error: package org.omg.PortableInterceptor does not exist
import org.omg.PortableInterceptor.SYSTEM_EXCEPTION;
                                  ^
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(c - a) <= d || (abs(b - a) <=d && abs(b - c) <= d){
    cout << "Yes" << endl;
    return 0;
  }
  cout << "No" << endl;
  return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:9:60: error: expected ';' before '{' token
    9 |   if(abs(c - a) <= d || (abs(b - a) <=d && abs(b - c) <= d){
      |                                                            ^
      |                                                            ;
a.cc:13:23: error: expected ')' before ';' token
   13 |   cout << "No" << endl;
      |                       ^
      |                       )
a.cc:9:5: note: to match this '('
    9 |   if(abs(c - a) <= d || (abs(b - a) <=d && abs(b - c) <= d){
      |     ^
Language: C++

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

signed main() {
	int a, b, c, d;
	cin >> a >> b >> c >> d;
	
	if(abs(c-a) <=d||(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:12:9: error: expected '}' before 'else'
   12 |         else cout << "No" << endl;
      |         ^~~~
a.cc:10:53: note: to match this '{'
   10 |         if(abs(c-a) <=d||(abs(a-b)<=d||abs(b-c)<=d)){
      |                                                     ^
Language: C++

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

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a, b, c, d = map(int, input().split())
      | ^
Language: C

 #include<stdio.h>
 int main(void)
 {
     int a,b,c,d,e=0,f=0;

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

     if(a==c) { printf("Yes\n"); return 0; }
     if((a>c)&&(a-c<=d)) { printf("Yes\n"); return 0; }
     if((a<c)&&(c-a<=d)) { printf("Yes\n"); return 0; }

     if(a<b) e=1;
     if(a>b) e=2;
     if(a==b) e=3;

     if(b<c) f=1;
     if(b>c) f=2;
     if(b==c) f=3;

     if((e==1)&&(f==1)){
       if((b-a<=d)&&(c-b<=d))
         printf("Yes\n");
         return 0;
     }

     if((e==1)&&(f==2)){
       if((b-a<=d)&&(b-c<=d))
         printf("Yes\n");
         return 0;
     }

     if((e==2)&&(f==1)){
       if((a-b<=d)&&(c-b<=d))
         printf("Yes\n");
         return 0;
     }
   
     if((e==2)&&(f==2)){
       if((a-b<=d)&&(b-c<=d))
         printf("Yes\n");
         return 0;
     }

     if((e==3)&&(f==1)){
       if(c-b<=d) printf("Yes\n");
       return 0;
     }

     if((e==3)&&(f==2)){
       if(b-c<=d) printf("Yes\n");
       return 0;
     }

     if((e==3)&&(f==2)){
       if(b-c<=d) printf("Yes\n");
       return 0;
     }

     if((e==1)&&(f==3)){
       if(b-a<=d) printf("Yes\n");
       return 0;
     }

     if((e==2)&&(f==3)){
       if(a-b<=d) printf("Yes\n");
       return 0;
     if((e==3)&&(f==3)) { printf("Yes\n"); return 0; }

     printf("No\n");

     return 0;
 }


Compiler output:
main.c: In function 'main':
main.c:72:2: error: expected declaration or statement at end of input
   72 |  }
      |  ^
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 || (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:7:50: error: expected ';' before 'cout'
    7 |    if(abs(a-c)<=d || (abs(a-b)<=d && abs(b-c)<=d)cout<<"Yes"<<endl;
      |                                                  ^~~~
      |                                                  ;
a.cc:8:7: error: expected primary-expression before 'else'
    8 |       else cout<<"No"<<endl;
      |       ^~~~
a.cc:7:68: error: expected ')' before 'else'
    7 |    if(abs(a-c)<=d || (abs(a-b)<=d && abs(b-c)<=d)cout<<"Yes"<<endl;
      |      ~                                                             ^
      |                                                                    )
    8 |       else cout<<"No"<<endl;
      |       ~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#include<map>
#include<set>
#include<string>
#include<queue>
#include<stack>
#include<iomanip>

#define fast_io ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

using namespace std;

#define debug(x) cout<<(#x)<<"="<<(x)<<", ";
#define debug1(x) debug(x) cout<<'\n';
#define debug2(x1, x2) debug(x1) debug(x2) cout<<'\n';
#define debug3(x1, x2, x3) debug(x1) debug(x2) debug(x3) cout<<'\n';
#define debug4(x1, x2, x3, x4) debug(x1) debug(x2) debug(x3) debug(x4) cout<<'\n';
#define debug5(x1, x2, x3, x4, x5) debug(x1) debug(x2) debug(x3) debug(x4) debug(x5) cout<<'\n';

#define fcout cout<<fixed<<setprecision(15)
#define repp(i,j,k) for(int i=j; i<k; ++i)
#define rep(i,j) repp(i,0,j)
#define rrep(i,j,k) for(int i=j; i>=k; --i)
#define all(x) (x).begin(), (x).end()
#define sort(x) sort(x.begin(), x.end())
#define lb(x,val) lower_bound(x.begin(), x.end(), val)
#define ub(x,val) upper_bound(x.begin(), x.end(), val)
#define pb(x) emplace_back(x);

typedef long long int lli;
typedef pair<int,int> pii;
typedef pair<lli,lli> pll;
typedef vector<int> vi;
typedef vector<lli> vl;
typedef tuple<int, int, lli> tiil;

//const lli M=998244353ll;
const lli M=1000000007ll;
const double D=1.0;

int main(){
	fast_io
	vi a(3);
	for(int& i: a) cin>>i:
	int d; cin>>d;
	int m=min(c-a, b-a+c-b);
	//int m=min(abs(a-c), abs(b-a)+abs(c-b));
	if(m<=d) cout<<"Yes";
	else cout<<"No";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:30: error: expected ';' before ':' token
   47 |         for(int& i: a) cin>>i:
      |                              ^
      |                              ;
a.cc:48:21: error: 'd' was not declared in this scope
   48 |         int d; cin>>d;
      |                     ^
a.cc:49:19: error: 'c' was not declared in this scope
   49 |         int m=min(c-a, b-a+c-b);
      |                   ^
a.cc:49:24: error: 'b' was not declared in this scope
   49 |         int m=min(c-a, b-a+c-b);
      |                        ^
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#include<map>
#include<set>
#include<string>
#include<queue>
#include<stack>
#include<iomanip>

#define fast_io ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

using namespace std;

#define debug(x) cout<<(#x)<<"="<<(x)<<", ";
#define debug1(x) debug(x) cout<<'\n';
#define debug2(x1, x2) debug(x1) debug(x2) cout<<'\n';
#define debug3(x1, x2, x3) debug(x1) debug(x2) debug(x3) cout<<'\n';
#define debug4(x1, x2, x3, x4) debug(x1) debug(x2) debug(x3) debug(x4) cout<<'\n';
#define debug5(x1, x2, x3, x4, x5) debug(x1) debug(x2) debug(x3) debug(x4) debug(x5) cout<<'\n';

#define fcout cout<<fixed<<setprecision(15)
#define repp(i,j,k) for(int i=j; i<k; ++i)
#define rep(i,j) repp(i,0,j)
#define rrep(i,j,k) for(int i=j; i>=k; --i)
#define all(x) (x).begin(), (x).end()
#define sort(x) sort(x.begin(), x.end())
#define lb(x,val) lower_bound(x.begin(), x.end(), val)
#define ub(x,val) upper_bound(x.begin(), x.end(), val)
#define pb(x) emplace_back(x);

typedef long long int lli;
typedef pair<int,int> pii;
typedef pair<lli,lli> pll;
typedef vector<int> vi;
typedef vector<lli> vl;
typedef tuple<int, int, lli> tiil;

//const lli M=998244353ll;
const lli M=1000000007ll;
const double D=1.0;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:48:15: error: 'd' was not declared in this scope
   48 |         if(m<=d) cout<<"Yes";
      |               ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'aabs' was not declared in this scope; did you mean 'labs'?
   11 | if(abs(a-b)<=d&&aabs(b-c)<=d) cout <<"Yes" << endl;
      |                 ^~~~
      |                 labs
Language: Java

import java.util.*;
 
public class Main {
 	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
      	int b = sc.nextInt();
      	int c = sc.nextInt();
      	int d = sc.nextInt();
      
      	if((abs(a-c)<=d)||((abs(a-b)<=d)&&(abs(b-c)))){
          	System.out.println("Yes");
        }else {
            System.out.println("No");
        }
   }
}
      	

Compiler output:
Main.java:11: error: cannot find symbol
      	if((abs(a-c)<=d)||((abs(a-b)<=d)&&(abs(b-c)))){
      	    ^
  symbol:   method abs(int)
  location: class Main
Main.java:11: error: cannot find symbol
      	if((abs(a-c)<=d)||((abs(a-b)<=d)&&(abs(b-c)))){
      	                    ^
  symbol:   method abs(int)
  location: class Main
Main.java:11: error: cannot find symbol
      	if((abs(a-c)<=d)||((abs(a-b)<=d)&&(abs(b-c)))){
      	                                   ^
  symbol:   method abs(int)
  location: class Main
3 errors
Language: C++

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

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

}

  else if( (0 <= b-a && b-a <= d) && ( (0 <= b-c && b-c <= d) || (0 <= c-b && c-b <= d) ){
     
  cout << "Yes" << endl;  
    
  }
  
  else if( (0 <= a-b && a-b <= d) && ( (0 <= c-b && c-b <= d) || (0 <= b-c && b-c <= d) ){
    
  cout << "Yes" << endl;  
    
  }
  
  else{
    
  cout << "No" << endl;
    
  }
  
}
  

    


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

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

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

}

  else if((0 <= b-a && b-a <= d) && ( (0 <= b-c && b-c <= d) || (0 <= c-b && c-b <= d) )){
     
  cout << "Yes" << endl;  
    
  }
  
  else if( (0 <= a-b && a-b <= d) && ( (0 <= c-b && c-b <= d) || (0 <= b-c && b-c <= d) ){
    
  cout << "Yes" << endl;  
    
  }
  
  else{
    
  cout << "No" << endl;
    
  }
  
}
  

    


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

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

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

}

  else if( (0 <= b-a && b-a <= d) && ( (0 <= b-c && b-c <= d) || (0 <= c-b && c-b <= d) ){
     
  cout << "Yes" << endl;  
    
  }
  
  else if( (0 <= a-b && a-b <= d) && ( (0 <= c-b && c-b <= d) || (0 <= b-c && b-c <= d) ){
    
  cout << "Yes" << endl;  
    
  }
  
  else{
    
  cout << "No" << endl;
    
  }
  
}
  
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:15:90: error: expected ')' before '{' token
   15 |   else if( (0 <= b-a && b-a <= d) && ( (0 <= b-c && b-c <= d) || (0 <= c-b && c-b <= d) ){
      |          ~                                                                               ^
      |                                                                                          )
a.cc:33:1: error: expected primary-expression before '}' token
   33 | }
      | ^
a.cc: At global scope:
a.cc:35:1: error: expected declaration before '}' token
   35 | }
      | ^
Language: C++

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

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

}

  else if( (0 <= b-a && b-a <= d) && (0 <= b-c && b-c <= d) ){
     
  cout << "Yes" << endl;  
    
  }
  
  else if( (0 <= a-b && a-b <= d) && (0 <= c-b && c-b <= d) ){
    
  cout << "Yes" << endl;  
    
  }
  
  else{
    
  cout << "No" << endl;
    
  }
  
}
  
}
    


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

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

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

}

  else if( 0 <= b-a && b-a <= d ) && (0 <= b-c && b-c <= d ){
     
  cout << "Yes" << endl;  
    
  }
  
  else if( 0 <= a-b && a-b <= d ) && (0 <= c-b && c-b <= d ){
    
  cout << "Yes" << endl;  
    
  }
  
}
    

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

#include <bits/stdc++.h>

using namespace std;

int main(int argc, const char *argv[]) {
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  if (abs(a - c) <= d) {
    cout << "Yes\n";
    return 0;
  }
  
  if (abs(a - b) <= k && abs(b - c) <= k) {
    cout << "Yes\n";
    return 0;
  }

  cout << "No\n";
  return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:13:21: error: 'k' was not declared in this scope
   13 |   if (abs(a - b) <= k && abs(b - c) <= k) {
      |                     ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
    6 |   ans="No";
      |   ^~~
      |   abs
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";
  }else{
   	if(abs(a-b)<=d && abs(b-c)<=d){
      cout << "Yes"; 
    }else{
      cout << "No";
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
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";
  }else{
   	if(abs(a-b)<=d && abs(b-c)<=d){
      cout << "Yes"; 
    }else{
      cout << "No";
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:15:4: error: expected '}' at end of input
   15 |   }
      |    ^
a.cc:10:8: note: to match this '{'
   10 |   }else{
      |        ^
a.cc:15:4: error: expected '}' at end of input
   15 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
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";
  }else{
   	if(abs(a-b)<=d && abs(b-c)<=d){
      cout << "Yes"; 
    }else{
      cout << "No;
  }
  return 0;
}

Compiler output:
a.cc:14:15: warning: missing terminating " character
   14 |       cout << "No;
      |               ^
a.cc:14:15: error: missing terminating " character
   14 |       cout << "No;
      |               ^~~~
a.cc: In function 'int main()':
a.cc:15:3: error: expected primary-expression before '}' token
   15 |   }
      |   ^
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define GET_ARRAY_SIZE(a)   (sizeof(a)/sizeof(a[0]))
#define LL long long
int main(){
    LL a,b,c,d,ans;
    cin >> a >> b >> c >> d;
    if (abs(a-b) <= d && abs(b-c) <= d ){
        cout <<"Yes" << endl;
    }esleif(abs(a-c) <= d){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: 'esleif' was not declared in this scope
   11 |     }esleif(abs(a-c) <= d){
      |      ^~~~~~
a.cc:13:6: error: 'else' without a previous 'if'
   13 |     }else{
      |      ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define GET_ARRAY_SIZE(a)   (sizeof(a)/sizeof(a[0]))
#define LL long long
int main(){
    LL a,b,c,d,ans;
    cin >> a >> b >> c >> d;
    if (abs(a-b) <= d && abs(b-c) <= d ){
        cout <<"Yes" << endl;
    }esleif(abs(a-c) <= d){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
}
    return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: 'esleif' was not declared in this scope
   11 |     }esleif(abs(a-c) <= d){
      |      ^~~~~~
a.cc:13:6: error: 'else' without a previous 'if'
   13 |     }else{
      |      ^~~~
a.cc: At global scope:
a.cc:17:5: error: expected unqualified-id before 'return'
   17 |     return 0;
      |     ^~~~~~
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*2) {
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: expected ')' before '{' token
    7 |     if((abs(a-c) <= d*2) {
      |       ~                 ^~
      |                         )
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

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

    cin>>a>>b>>c>>d;

    if(a-c>2d){
        cout<<"No"<<endl;
    }else{
        cout<<"Yes"<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: unable to find numeric literal operator 'operator""d'
   10 |     if(a-c>2d){
      |            ^~
Language: Java

import java.util.*;

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

Compiler output:
Main.java:6: error: incompatible types: String cannot be converted to int
            int a = sc.next();
                           ^
Main.java:7: error: incompatible types: String cannot be converted to int
            int b = sc.next();
                           ^
Main.java:8: error: incompatible types: String cannot be converted to int
            int c = sc.next();
                           ^
Main.java:9: error: incompatible types: String cannot be converted to int
            int d = sc.next();
                           ^
4 errors
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 &&max(a,b)-min(a,b)>d ||max(b,c)-min(b,c)){
    cout<<"No"<<endl;
  }
  else{
    cout<<"Yes"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: request for member 'c' in 'a', which is of non-class type 'int'
    7 |   if(max(a,c)-min(a.c)>d &&max(a,b)-min(a,b)>d ||max(b,c)-min(b,c)){
      |                     ^
Language: C++

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

if abs(c-a)<=d:
    print("Yes")
elif abs(b-a)<=d and abs(c-b)<=d:
    print("Yes")
else: print("No")


Compiler output:
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 a,b,c,d;

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


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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define INF 1e9
#define PI 3.14159265359
#define MOD 1000000007
#define ALL(v) v.begin(),v.end()
#define ALLR(v) v.rbegin(),v.rend()
typedef long long ll;
const int dx[4] = {1,0,-1,0};
const int dy[4] = {0,1,0,-1};
//isPrime
//modpow modinv
//getDigit
int main() {
  cout << fixed << setprecision(10);
  int a,b,c,d;
  cin >> a >> b >> c >> d;
  bool a = (abs(a-b)<=d)&&(abs(b-c)<=d);
  bool b = abs(a-c)<=d;
  if(a||b){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:8: error: conflicting declaration 'bool a'
   19 |   bool a = (abs(a-b)<=d)&&(abs(b-c)<=d);
      |        ^
a.cc:17:7: note: previous declaration as 'int a'
   17 |   int a,b,c,d;
      |       ^
a.cc:20:8: error: conflicting declaration 'bool b'
   20 |   bool b = abs(a-c)<=d;
      |        ^
a.cc:17:9: note: previous declaration as 'int b'
   17 |   int a,b,c,d;
      |         ^
Language: C++

#include<stdio.h>
int abs(int,int);
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");
  }else{
    printf("No");
  }
  return 0;
}
int abs(int x,int y){
  int sub=x-y;
  if(sub<=0){
    sub=-1*sub;
  }
  return sub;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:25: error: too few arguments to function 'int abs(int, int)'
    6 |   if(abs(a,c)<=d || (abs(a-b)<=d && abs(b-c)<=d)){
      |                      ~~~^~~~~
a.cc:2:5: note: declared here
    2 | int abs(int,int);
      |     ^~~
a.cc:6:40: error: too few arguments to function 'int abs(int, int)'
    6 |   if(abs(a,c)<=d || (abs(a-b)<=d && abs(b-c)<=d)){
      |                                     ~~~^~~~~
a.cc:2:5: note: declared here
    2 | int abs(int,int);
      |     ^~~
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(c-b)<=D)
    cout<<"Yes"<<endl;
    else
      cout<<"No"<<endl;
  
  }
 return 0;
}

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

#include <stdio.h>
int main (void)
{
    int a,b,c,d,AB,BC;
    scanf("%d%d%d%d",&a,&b,&c,&d);
    AB=b-a;
    BC=c-b;
    if((AB<=d)&&(BC<=D))
        printf("yes\n");
    else
        printf("\n");
    return 0 ;
}


Compiler output:
main.c: In function 'main':
main.c:8:22: error: 'D' undeclared (first use in this function)
    8 |     if((AB<=d)&&(BC<=D))
      |                      ^
main.c:8:22: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

using ll = long long;
#define int long long

#define LOG(variable) cout << #variable":\t" << (variable) << endl
#define LOGCON(i, container) for(int (i) = 0; (i) < (container).size(); ++(i)) cout << (i) << ":\t" << (container)[(i)] << endl
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPS(i, r, n) for (int i = (r); i < (n); ++i)
#define REPR(i, n) for(int i = (n); i >= 0; --i) // from n to 0
#define REPRS(i, n, r) for(int i = (n); i >= (r); --i) // from n to r
#define REPOBJ(itr, obj) for(auto itr = (obj).begin(); itr != (obj).end() ; ++itr)
#define REPROBJ(itr, obj) for(auto itr = (obj).rbegin(), e = (obj).rend(); itr != e; ++itr)
#define COUTB(x) cout << (x) << "\n"
#define COUTS(x) cout << (x) << " "
#define PB push_back
#define SORT(obj) sort((obj).begin(), (obj).end())
#define SORTR(obj) sort((obj).begin(), (obj).end(), greater<>())
#define ALL(obj) (obj).begin(), (obj).end()
#define MOD 1000000007
#define PI (acos(-1))
struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x((x%MOD+MOD)%MOD){}
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= MOD) x -= MOD;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += MOD-a.x) >= MOD) x -= MOD;
    return *this;
  }
  mint& operator*=(const mint a) { (x *= a.x) %= MOD; return *this;}
  mint operator+(const mint a) const { return mint(*this) += a;}
  mint operator-(const mint a) const { return mint(*this) -= a;}
  mint operator*(const mint a) const { return mint(*this) *= a;}
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }

  // for prime MOD
  mint inv() const { return pow(MOD-2);}
  mint& operator/=(const mint a) { return *this *= a.inv();}
  mint operator/(const mint a) const { return mint(*this) /= a;}
};
istream& operator>>(istream& is, const mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}
int in() {int x; cin>>x; return x;}
string stin() {string s; cin>>s; return s;}
/***** MAIN *****/
signed main() {
  int a, b, c, distance;
  cin >> a >> b >> c >> distance;
  if(abs(a-c) <= d) {
   	cout << "Yes" << endl;
    return 0;
  }
  if(abs(a-b) <= d && abs(b-c) <= d) {
    cout << "Yes";
  } else {
    cout << "No";
  }
  cout << "\n";
  return 0;
}
/***** MAIN *****/


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

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


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


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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(begin, i, end) for (int i = begin; i < (int)(end); i++)
#define all(v) v.begin(), v.end()
const int MOD = 1000000007;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: 'd' was not declared in this scope
   13 |     if (abs(a - c) > d)
      |                      ^
Language: C++

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

Compiler output:
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;
  cin >> a >> b >> c >> d;
  if(abs(a-c) <= d or (abs(a-b) <= d and abs(b-c) <= d)){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }


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

#include <stdio.h>
 
int main()
{
  int a,b,c,d,e,f,g;
  scanf("%d %d %d %d",&a,&b,&c,&d);
  e = b-a;
  f = c-b;
  if (b - a <= 0)
    e = (b-a)*-1;
  if (c-b <= 0)
    f = (c-b)*-1;
  if (c-a < =0)
    g = (c-a)*-1;
  if (g <= d || (e <= d && f <= d))
    printf("Yes");
  else
    printf("No");
}

Compiler output:
main.c: In function 'main':
main.c:13:13: error: expected expression before '=' token
   13 |   if (c-a < =0)
      |             ^
Language: C++

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

int distance (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;
  
  int a_b = distance (a,b);
  int a_c = distance (a,c);
  int b_c = distance (b,c);
  
  if (a_c <= d) cout << "Yes" << endl;
  else if ((((a < b) && (b < c)) || ((a > c) && (b < c))) && ((a_b <= d) && (b_c <= d))
    cout << "Yes" << endl;
  else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:88: error: expected ';' before 'cout'
   18 |   else if ((((a < b) && (b < c)) || ((a > c) && (b < c))) && ((a_b <= d) && (b_c <= d))
      |                                                                                        ^
      |                                                                                        ;
   19 |     cout << "Yes" << endl;
      |     ~~~~                                                                                
a.cc:20:3: error: expected primary-expression before 'else'
   20 |   else cout << "No" << endl;
      |   ^~~~
a.cc:19:27: error: expected ')' before 'else'
   19 |     cout << "Yes" << endl;
      |                           ^
      |                           )
   20 |   else cout << "No" << endl;
      |   ~~~~                     
a.cc:18:11: note: to match this '('
   18 |   else if ((((a < b) && (b < c)) || ((a > c) && (b < c))) && ((a_b <= d) && (b_c <= d))
      |           ^
Language: C++

#include <iostream>
#include <string>
#include <math.h>
#include <vector>
#include <algorithm>
#include <set>


using namespace std;

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

  bool b = true;
  if (abs(a - b) > d) b = false;
  if (abs(b - c) > d) b = false;

  if (b) cout << "Yes" << endl;
  else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:8: error: conflicting declaration 'bool b'
   16 |   bool b = true;
      |        ^
a.cc:13:10: note: previous declaration as 'int b'
   13 |   int a, b, c, d;
      |          ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:57: error: expected ';' before 'cout'
    9 |     if(abs(c-a) <= d || (abs(b-a) <= d && abs(c-b) <= d) cout << "Yes" << endl;
      |                                                         ^~~~~
      |                                                         ;
a.cc:10:5: error: expected primary-expression before 'else'
   10 |     else cout << "No" << endl;
      |     ^~~~
a.cc:9:80: error: expected ')' before 'else'
    9 |     if(abs(c-a) <= d || (abs(b-a) <= d && abs(c-b) <= d) cout << "Yes" << endl;
      |       ~                                                                        ^
      |                                                                                )
   10 |     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;
  int X = b - a;
  int Y = b - c;
  if(X + Y = d || (X >= d && Y <= d)){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: lvalue required as left operand of assignment
    9 |   if(X + Y = d || (X >= d && Y <= d)){
      |      ~~^~~
Language: C++

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

}

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

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

}

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

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

int main(){
	ll a,b,c,d;
  	cin >> a >> b >> c >> d;
    cout << (
    abs(a-b)<=d ? "Yes":
    abs(b-c)<=d ? "Yes":
    abs(a-c)<=d ? "Yes":"No"
    );
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'll' was not declared in this scope
    5 |         ll a,b,c,d;
      |         ^~
a.cc:6:16: error: 'a' was not declared in this scope
    6 |         cin >> a >> b >> c >> d;
      |                ^
a.cc:6:21: error: 'b' was not declared in this scope
    6 |         cin >> a >> b >> c >> d;
      |                     ^
a.cc:6:26: error: 'c' was not declared in this scope
    6 |         cin >> a >> b >> c >> d;
      |                          ^
a.cc:6:31: error: 'd' was not declared in this scope
    6 |         cin >> a >> b >> c >> d;
      |                               ^
Language: C++

a, b, c, d = gets().split().map(&:to_i)
if (a-c).abs <= d || ((a-b).abs <= d && (b-c).abs <= d) then
	print("Yes")
else
	print("No")
end

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a, b, c, d = gets().split().map(&:to_i)
      | ^
Language: C++

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

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

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

Compiler output:
a.cc:4:13: error: stray '#' in program
    4 | int main() {#include <bits/stdc++.h>
      |             ^
a.cc: In function 'int main()':
a.cc:4:14: error: 'include' was not declared in this scope
    4 | int main() {#include <bits/stdc++.h>
      |              ^~~~~~~
a.cc:4:23: error: 'bits' was not declared in this scope
    4 | int main() {#include <bits/stdc++.h>
      |                       ^~~~
a.cc:4:28: error: 'stdc' was not declared in this scope; did you mean 'std'?
    4 | int main() {#include <bits/stdc++.h>
      |                            ^~~~
      |                            std
a.cc:5:1: error: expected primary-expression before 'using'
    5 | using namespace std;
      | ^~~~~
a.cc:7:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    7 | int main() {
      |         ^~
a.cc:7:9: note: remove parentheses to default-initialize a variable
    7 | int main() {
      |         ^~
      |         --
a.cc:7:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:7:12: error: a function-definition is not allowed here before '{' token
    7 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <iomanip>
#include <utility>
#include <cmath>
#include <random>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <algorithm>
using namespace std;

#define rep(i,n) for(int i = 0; i<n; ++i)
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
typedef long long ll;

int main(){
    int a,b,c,d; cin >> a >> b >> c >>d ;
    cout << (max(a,max(b,c))-min(a,min(b,c)) <= 2*d)? "Yes":"No") << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:65: error: expected ';' before ')' token
   22 |     cout << (max(a,max(b,c))-min(a,min(b,c)) <= 2*d)? "Yes":"No") << endl;
      |                                                                 ^
      |                                                                 ;
Language: C++

#include <iostream>
#include <iomanip>
#include <utility>
#include <cmath>
#include <random>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <algorithm>
using namespace std;

#define rep(i,n) for(int i = 0; i<n; ++i)
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
typedef long long ll;

int main(){
    int a,b,c,d; cin >> a >> b >> c >>d ;
    cout << (max(a,max(b,c))-min(a,min(b,c) <= 2*d)? "Yes":"No") << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:33: error: no matching function for call to 'min(int&, bool)'
   22 |     cout << (max(a,max(b,c))-min(a,min(b,c) <= 2*d)? "Yes":"No") << endl;
      |                              ~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:22:33: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'bool')
   22 |     cout << (max(a,max(b,c))-min(a,min(b,c) <= 2*d)? "Yes":"No") << endl;
      |                              ~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:12:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:22:33: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   22 |     cout << (max(a,max(b,c))-min(a,min(b,c) <= 2*d)? "Yes":"No") << endl;
      |                              ~~~^~~~~~~~~~~~~~~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: expected primary-expression before '>' token
   12 |   else if(a-b <= key && a-b =>-1*key){
      |                              ^
a.cc:13:27: error: expected primary-expression before '>' token
   13 |     if(b-c <= key && b-c => -1*key)
      |                           ^
Language: C++


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

Compiler output:
a.cc:2:3: error: 'll' does not name a type
    2 |   ll a,b,c,d;
      |   ^~
a.cc:3:3: error: 'cin' does not name a type
    3 |   cin >> a >> b >> c >> d;
      |   ^~~
a.cc:4:3: error: expected unqualified-id before 'if'
    4 |   if(abs(c-a)<=d)
      |   ^~
a.cc:6:3: error: expected unqualified-id before 'else'
    6 |   else
      |   ^~~~
a.cc:16:1: error: expected declaration before '}' token
   16 | }
      | ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected ';' before 'else'
    9 |     cout <<"Yes"
      |                 ^
      |                 ;
   10 |   else
      |   ~~~~
Language: C++

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

int main(){
    int d , res = 0;
    vector<int> vec(3);
    for(int i = 0;i < 3;i++){
        cin >> vec.at(i);
    }
    cin >> d;
    if(vec.at(2) >= vec.at(0) || (vec.at(2)-vec.at(0)) <= d){
        cout << "Yes" << endl;
    }
    else{
        sort(vec.begin(),vec.end());
        else if(((vec.at(2)-vec.at(1))　+ (vec.at(1)-vec.at(0))) <= 2*d){
            cout << "Yes" << endl;
        }
        else{
            cout << "No" << endl;
        }
    }
}

Compiler output:
a.cc:18:39: error: extended character 　 is not valid in an identifier
   18 |         else if(((vec.at(2)-vec.at(1))　+ (vec.at(1)-vec.at(0))) <= 2*d){
      |                                       ^
a.cc: In function 'int main()':
a.cc:18:9: error: 'else' without a previous 'if'
   18 |         else if(((vec.at(2)-vec.at(1))　+ (vec.at(1)-vec.at(0))) <= 2*d){
      |         ^~~~
a.cc:18:39: error: expected ')' before '\U00003000'
   18 |         else if(((vec.at(2)-vec.at(1))　+ (vec.at(1)-vec.at(0))) <= 2*d){
      |                 ~                     ^~
      |                                       )
a.cc:20:10: error: expected ')' before 'else'
   20 |         }
      |          ^
      |          )
   21 |         else{
      |         ~~~~
a.cc:18:16: note: to match this '('
   18 |         else if(((vec.at(2)-vec.at(1))　+ (vec.at(1)-vec.at(0))) <= 2*d){
      |                ^
a.cc:24:5: error: expected primary-expression before '}' token
   24 |     }
      |     ^
Language: C++

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

int main(){
    int d , res = 0;
    vector<int> vec(3);
    for(int i = 0;i < 3;i++){
        cin >> vec.at(i);
    }
    cin >> d;
    if(vec.at(2) >= vec.at(0) || (vec.at(2)-vec.at(0)) <= d){
        cout << "Yes" << endl;
    }
    else{
        sort(vec.begin(),vec.end());
        if(((vec.at(2)-vec.at(1))　+ (vec.at(1)-vec.at(0))) <= 2*d){
            cout << "Yes" << endl;
        }
        else{
            cout << "No" << endl;
        }
    }
}

Compiler output:
a.cc:18:34: error: extended character 　 is not valid in an identifier
   18 |         if(((vec.at(2)-vec.at(1))　+ (vec.at(1)-vec.at(0))) <= 2*d){
      |                                  ^
a.cc: In function 'int main()':
a.cc:18:34: error: expected ')' before '\U00003000'
   18 |         if(((vec.at(2)-vec.at(1))　+ (vec.at(1)-vec.at(0))) <= 2*d){
      |            ~                     ^~
      |                                  )
a.cc:20:10: error: expected ')' before 'else'
   20 |         }
      |          ^
      |          )
   21 |         else{
      |         ~~~~
a.cc:18:11: note: to match this '('
   18 |         if(((vec.at(2)-vec.at(1))　+ (vec.at(1)-vec.at(0))) <= 2*d){
      |           ^
a.cc:24:5: error: expected primary-expression before '}' token
   24 |     }
      |     ^
Language: C++

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

int main(){
    int d , res = 0;
    vector<int> vec(3);
    for(int i = 0;i < 3;i++){
        cin >> vec.at(i);
    }
    cin >> d;
    if(vec.at(2) >= vec.at(0) || (vec.at(2)-vec.at(0)) <= d){
        cout << "Yes" << endl;
    }
    else{
        sort(vec.begin(),vec.end());
        if(vec.at(2)-vec.at(1)　+ vec.at(1)-vec.at(0) <= 2*d){
            cout << "Yes" << endl;
        }
        else{
            cout << "No" << endl;
        }
    }
}

Compiler output:
a.cc:18:31: error: extended character 　 is not valid in an identifier
   18 |         if(vec.at(2)-vec.at(1)　+ vec.at(1)-vec.at(0) <= 2*d){
      |                               ^
a.cc: In function 'int main()':
a.cc:18:31: error: expected ')' before '\U00003000'
   18 |         if(vec.at(2)-vec.at(1)　+ vec.at(1)-vec.at(0) <= 2*d){
      |           ~                   ^~
      |                               )
Language: C++

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

int main(){
    int d , res = 0;
    vector<int> vec(3);
    for(int i = 0;i < 3;i++){
        cin >> vec.at(i);
    }
    cin >> d;
    if(vec.at(2) >= vec.at(0) || vec.at(2)-vec.at(0) <= d{
        cout << "Yes" << endl;
    }
    else{
        sort(vec.begin(),vec.end());
        if(vec.at(2)-vec.at(1)　+ vec.at(1)-vec.at(0) <= 2*d){
            cout << "Yes" << endl;
        }
        else{
            cout << "No" << endl;
        }
    }
}

Compiler output:
a.cc:18:31: error: extended character 　 is not valid in an identifier
   18 |         if(vec.at(2)-vec.at(1)　+ vec.at(1)-vec.at(0) <= 2*d){
      |                               ^
a.cc: In function 'int main()':
a.cc:13:58: error: expected ')' before '{' token
   13 |     if(vec.at(2) >= vec.at(0) || vec.at(2)-vec.at(0) <= d{
      |       ~                                                  ^
      |                                                          )
a.cc:25:1: error: expected primary-expression before '}' token
   25 | }
      | ^
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) {
    if(abs(c-b) <= d) cout << "Yes" << endl;
    else cout << "No" << endl;
  }
  else cout << "No" << endl;
}

Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.