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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:35: error: expected primary-expression before '<' token
    9 |  if((vec.at(1)==b)&&(a-c>=-d&&a-c=<d)){
      |                                   ^
a.cc:12:42: error: expected primary-expression before '<' token
   12 |   else if((vec.at(1)==b)&&((a-b>=-d&&a-b=<d)&&(b-c>=-d)&&(b-c=<d)){
      |                                          ^
a.cc:12:63: error: expected primary-expression before '<' token
   12 |   else if((vec.at(1)==b)&&((a-b>=-d&&a-b=<d)&&(b-c>=-d)&&(b-c=<d)){
      |                                                               ^
a.cc:12:67: error: expected ')' before '{' token
   12 |   else if((vec.at(1)==b)&&((a-b>=-d&&a-b=<d)&&(b-c>=-d)&&(b-c=<d)){
      |          ~                                                        ^
      |                                                                   )
a.cc:18:11: error: expected primary-expression before '}' token
   18 |           }
      |           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: missing template arguments before '(' token
    6 |   vector(int)vec{a.c.b};
      |         ^
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   vector(int)vec{a.c.b};
      |          ^~~
a.cc:7:8: error: 'vec' was not declared in this scope
    7 |   sort(vec.begin(),vec.end());
      |        ^~~
a.cc:9:26: error: expected primary-expression before '>' token
    9 |  if((vec.at(1)==b)&&(a-c=>-d&&a-c=<d)){
      |                          ^
a.cc:9:35: error: expected primary-expression before '<' token
    9 |  if((vec.at(1)==b)&&(a-c=>-d&&a-c=<d)){
      |                                   ^
a.cc:12:33: error: expected primary-expression before '>' token
   12 |   else if((vec.at(1)==b)&&((a-b=>-d&&a-b=<d)&&(b-c=>-d)&&(b-c=<d)){
      |                                 ^
a.cc:12:42: error: expected primary-expression before '<' token
   12 |   else if((vec.at(1)==b)&&((a-b=>-d&&a-b=<d)&&(b-c=>-d)&&(b-c=<d)){
      |                                          ^
a.cc:12:52: error: expected primary-expression before '>' token
   12 |   else if((vec.at(1)==b)&&((a-b=>-d&&a-b=<d)&&(b-c=>-d)&&(b-c=<d)){
      |                                                    ^
a.cc:12:63: error: expected primary-expression before '<' token
   12 |   else if((vec.at(1)==b)&&((a-b=>-d&&a-b=<d)&&(b-c=>-d)&&(b-c=<d)){
      |                                                               ^
a.cc:12:67: error: expected ')' before '{' token
   12 |   else if((vec.at(1)==b)&&((a-b=>-d&&a-b=<d)&&(b-c=>-d)&&(b-c=<d)){
      |          ~                                                        ^
      |                                                                   )
a.cc:18:11: error: expected primary-expression before '}' token
   18 |           }
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c,d;
  cin>>a>>b>>c>>d;

  if(((a>=b&&b>=c)||(c>=b&&b>=a))&&((a-b>=-d&&a-b=<d)||(b-c>=-d&&b-c<=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(((a>=b&&b>=c)||(c>=b&&b>=a))&&((a-b>=-d&&a-b=<d)||(b-c>=-d&&b-c<=d))){
      |                                                   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c,d;
  cin>>a>>b>>c>>d;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected primary-expression before '>' token
    7 |   if(((a=>b&&b>=c)||(c=>b&&b>=a))&&((a-b>=-d&&a-b<=d)||(b-c>=-d&&b-c<=d))){
      |          ^
a.cc:7:24: error: expected primary-expression before '>' token
    7 |   if(((a=>b&&b>=c)||(c=>b&&b>=a))&&((a-b>=-d&&a-b<=d)||(b-c>=-d&&b-c<=d))){
      |                        ^
a.cc:9:5: error: expected primary-expression before ']' token
    9 |     ]
      |     ^
a.cc:13:4: error: expected '}' at end of input
   13 |   }
      |    ^
a.cc:3:11: 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;
  vector<int>vec={a,b,c};
  sort(vec,begin(),vec.end());
  
  if(vec.at(1)==b&&a-b>=-d&&a-b<=d&&b-c>=-d&&b-c<=d){
    cout<<"Yay!"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}

   
    

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: no matching function for call to 'begin()'
    7 |   sort(vec,begin(),vec.end());
      |            ~~~~~^~
In file included from /usr/include/c++/14/bits/algorithmfwd.h:39,
                 from /usr/include/c++/14/bits/stl_algo.h:59,
                 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/initializer_list:88:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::begin(initializer_list<_Tp>)'
   88 |     begin(initializer_list<_Tp> __ils) noexcept
      |     ^~~~~
/usr/include/c++/14/initializer_list:88:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/range_access.h:52:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(_Container&)'
   52 |     begin(_Container& __cont) -> decltype(__cont.begin())
      |     ^~~~~
/usr/include/c++/14/bits/range_access.h:52:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:63:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(const _Container&)'
   63 |     begin(const _Container& __cont) -> decltype(__cont.begin())
      |     ^~~~~
/usr/include/c++/14/bits/range_access.h:63:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:95:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::begin(_Tp (&)[_Nm])'
   95 |     begin(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~~~
/usr/include/c++/14/bits/range_access.h:95:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/valarray:1227:5: note: candidate: 'template<class _Tp> _Tp* std::begin(valarray<_Tp>&)'
 1227 |     begin(valarray<_Tp>& __va) noexcept
      |     ^~~~~
/usr/include/c++/14/valarray:1227:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/valarray:1238:5: note: candidate: 'template<class _Tp> const _Tp* std::begin(const valarray<_Tp>&)'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
/usr/include/c++/14/valarray:1238:5: note:   candidate expects 1 argument, 0 provided
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c,d;
  cin>>a>>b>>c>>d;
  vector<int>vec={a,b,c};
  sort(vec,begin(),vec.end());
  
  if(vec.at(1)==b&&a-b>-d&&a-b<d&&b-c>-d&&b-c<d){
    cout<<"Yay!"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}

   
    

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: no matching function for call to 'begin()'
    7 |   sort(vec,begin(),vec.end());
      |            ~~~~~^~
In file included from /usr/include/c++/14/bits/algorithmfwd.h:39,
                 from /usr/include/c++/14/bits/stl_algo.h:59,
                 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/initializer_list:88:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::begin(initializer_list<_Tp>)'
   88 |     begin(initializer_list<_Tp> __ils) noexcept
      |     ^~~~~
/usr/include/c++/14/initializer_list:88:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/range_access.h:52:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(_Container&)'
   52 |     begin(_Container& __cont) -> decltype(__cont.begin())
      |     ^~~~~
/usr/include/c++/14/bits/range_access.h:52:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:63:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(const _Container&)'
   63 |     begin(const _Container& __cont) -> decltype(__cont.begin())
      |     ^~~~~
/usr/include/c++/14/bits/range_access.h:63:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:95:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::begin(_Tp (&)[_Nm])'
   95 |     begin(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~~~
/usr/include/c++/14/bits/range_access.h:95:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/valarray:1227:5: note: candidate: 'template<class _Tp> _Tp* std::begin(valarray<_Tp>&)'
 1227 |     begin(valarray<_Tp>& __va) noexcept
      |     ^~~~~
/usr/include/c++/14/valarray:1227:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/valarray:1238:5: note: candidate: 'template<class _Tp> const _Tp* std::begin(const valarray<_Tp>&)'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
/usr/include/c++/14/valarray:1238:5: note:   candidate expects 1 argument, 0 provided
Language: C++

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

   
    

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'if'
    8 |   if(vec.at(1)==b&&a-c<d&&a-c>-d){
      |   ^~
a.cc:11:3: error: 'else' without a previous 'if'
   11 |   else{
      |   ^~~~
Language: C++

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


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> a >> b >> c >> d;
      |     ^~~
a.cc:4:7: error: 'abs' was not declared in this scope
    4 |    if(abs(a-b) <= d){
      |       ^~~
a.cc:5:8: error: 'cout' was not declared in this scope
    5 |        cout << "Yes" << endl;
      |        ^~~~
a.cc:5:25: error: 'endl' was not declared in this scope
    5 |        cout << "Yes" << endl;
      |                         ^~~~
a.cc:8:8: error: 'cout' was not declared in this scope
    8 |        cout << "Yes" << endl;
      |        ^~~~
a.cc:8:25: error: 'endl' was not declared in this scope
    8 |        cout << "Yes" << endl;
      |                         ^~~~
a.cc:11:8: error: 'cout' was not declared in this scope
   11 |        cout << "Yes" << endl;
      |        ^~~~
a.cc:11:25: error: 'endl' was not declared in this scope
   11 |        cout << "Yes" << endl;
      |                         ^~~~
a.cc:14:8: error: 'cout' was not declared in this scope
   14 |        cout << "No" << endl;
      |        ^~~~
a.cc:14:24: error: 'endl' was not declared in this scope
   14 |        cout << "No" << endl;
      |                        ^~~~
Language: C++

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

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

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

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

int main(){
    int n;
    cin>>n;
    int i, j;
    int ans = 1;
    int ret;
    for(i=2; i<=n; i++){
        ret = n;
        while(ret*i<=n){
            ret *= i;
        }
        if(ans<=ret){
            ans=ret
        }
    }

    cout<<ans<<endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:20: error: expected ';' before '}' token
   19 |             ans=ret
      |                    ^
      |                    ;
   20 |         }
      |         ~
Language: C++

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

int main(){
    int a, b, c, d;
    if(abs(a-c)<=d || (abs(b-a)<=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:51: error: expected ';' before '{' token
    9 |     if(abs(a-c)<=d || (abs(b-a)<=d && abs(c-b)<=d){
      |                                                   ^
      |                                                   ;
a.cc:12:5: error: expected primary-expression before 'else'
   12 |     else{
      |     ^~~~
a.cc:11:6: error: expected ')' before 'else'
   11 |     }
      |      ^
      |      )
   12 |     else{
      |     ~~~~
a.cc:9:7: note: to match this '('
    9 |     if(abs(a-c)<=d || (abs(b-a)<=d && abs(c-b)<=d){
      |       ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int a, b, c;
int main(){
  cin >> a >> b >> c >> d;
  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:6:25: error: 'd' was not declared in this scope
    6 |   cin >> a >> b >> c >> d;
      |                         ^
Language: C

#include<stdlib.h>
#include<stdio.h>
int main(){
  int a, b, c, d;
  scanf("%d%d%d%d", &a, &b, &c, &d);
  print((abs(b - a) <= d || (abs(b - a) <= d && abs(c - b) <= d)) ? "Yes" : "No");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
    6 |   print((abs(b - a) <= d || (abs(b - a) <= d && abs(c - b) <= d)) ? "Yes" : "No");
      |   ^~~~~
      |   printf
Language: C

int main(){
  int a, b, c, d;
  scanf("%d%d%d%d", &a, &b, &c, &d);
  print((abs(b - a) <= d || (abs(b - a) <= d && abs(c - b) <= d)) ? "Yes" : "No");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |   scanf("%d%d%d%d", &a, &b, &c, &d);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:3:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |   scanf("%d%d%d%d", &a, &b, &c, &d);
      |   ^~~~~
main.c:3:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:3: error: implicit declaration of function 'print' [-Wimplicit-function-declaration]
    4 |   print((abs(b - a) <= d || (abs(b - a) <= d && abs(c - b) <= d)) ? "Yes" : "No");
      |   ^~~~~
main.c:4:10: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
    4 |   print((abs(b - a) <= d || (abs(b - a) <= d && abs(c - b) <= d)) ? "Yes" : "No");
      |          ^~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
  +++ |+#include <stdlib.h>
    1 | int main(){
Language: C++

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 if(c-a<=d) cout <<"Yes";
  else cout<<"No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>a>>b>>c>>d;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:6:24: error: 'cout' was not declared in this scope
    6 |   if(b-a<=d && c-b<=d) cout<<"Yes";
      |                        ^~~~
a.cc:6:24: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:19: error: 'cout' was not declared in this scope
    7 |   else if(c-a<=d) cout <<"Yes";
      |                   ^~~~
a.cc:7:19: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:8: error: 'cout' was not declared in this scope
    8 |   else cout<<"No";
      |        ^~~~
a.cc:8:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c,d;
cin>>a>>b>>c>>d;
vector<int> vec={a,b,c};
Max=max(a,c);
Min=min(a,c);
sort(vec.begin(), vec.end());
int sum1=vec.at(1)-vec.at(0);
int sum2=vec.at(2)-vec.at(1);
if( sum1<=d&&sum2<=d||Max-Min<=d  ) {
        cout<<"Yes"<<endl;
}else{cout<<"No"<<endl;
}
  }
               
            
     




Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'Max' was not declared in this scope
    7 | Max=max(a,c);
      | ^~~
a.cc:8:1: error: 'Min' was not declared in this scope; did you mean 'sin'?
    8 | Min=min(a,c);
      | ^~~
      | sin
Language: C++

#include<iostream>
#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<iomanip>



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

using namespace std;
int a,b,c,d;
int k1,k2;

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



Compiler output:
a.cc: In function 'int main()':
a.cc:25:3: error: 'k3' was not declared in this scope; did you mean 'k2'?
   25 |   k3 = max(a-c,c-a);
      |   ^~
      |   k2
Language: C++

#include<iostream>
#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<iomanip>



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

using namespace std;
int a,b,c,d;
int k1,k2,k3;

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



Compiler output:
a.cc: In function 'int main()':
a.cc:27:42: error: expected ';' before 'endl'
   27 |   if((k1<=d&&k2<=d)||k3<=d) cout << "Yes" endl;
      |                                          ^~~~~
      |                                          ;
Language: C++

#include<iostream>
#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<iomanip>



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

using namespace std;
int a,b,c,d;
int k1,k2;

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



Compiler output:
a.cc: In function 'int main()':
a.cc:25:3: error: 'k3' was not declared in this scope; did you mean 'k2'?
   25 |   k3 = max(a-c,c-a);
      |   ^~
      |   k2
a.cc:27:42: error: expected ';' before 'endl'
   27 |   if((k1<=d&&k2<=d)||k3<=d) cout << "Yes" endl;
      |                                          ^~~~~
      |                                          ;
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:27: error: 'a' was not declared in this scope
    7 |   if (abs(N-b)<=c||(abs(N-a)<=c&&abs(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(|a-c|<=d||(|a-b|<=d&&|b-c|<=d))
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: expected primary-expression before '|' token
    7 |   if(|a-c|<=d||(|a-b|<=d&&|b-c|<=d))
      |      ^
a.cc:7:11: error: expected primary-expression before '<=' token
    7 |   if(|a-c|<=d||(|a-b|<=d&&|b-c|<=d))
      |           ^~
a.cc:7:17: error: expected primary-expression before '|' token
    7 |   if(|a-c|<=d||(|a-b|<=d&&|b-c|<=d))
      |                 ^
a.cc:7:22: error: expected primary-expression before '<=' token
    7 |   if(|a-c|<=d||(|a-b|<=d&&|b-c|<=d))
      |                      ^~
a.cc:7:27: error: expected primary-expression before '|' token
    7 |   if(|a-c|<=d||(|a-b|<=d&&|b-c|<=d))
      |                           ^
a.cc:7:32: error: expected primary-expression before '<=' token
    7 |   if(|a-c|<=d||(|a-b|<=d&&|b-c|<=d))
      |                                ^~
Language: C++

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

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

	return 0;
}

Compiler output:
a.cc:3:18: error: missing terminating > character
    3 | #include <cstdlib
      |                  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;  
typedef long long ll;
typedef vector<ll> vint;
int main() {
  ll a,b,c,d;
  cin >> a >> b >> c >>d;
  ll a3=max({a,b,c}), a1=min({a,b,c}), a2=a+b+c-M-m;
  if (a3-a2<=d && a2-a1<=d) cout << "Yes";
  else cout << "No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:49: error: 'M' was not declared in this scope
    8 |   ll a3=max({a,b,c}), a1=min({a,b,c}), a2=a+b+c-M-m;
      |                                                 ^
a.cc:8:51: error: 'm' was not declared in this scope
    8 |   ll a3=max({a,b,c}), a1=min({a,b,c}), a2=a+b+c-M-m;
      |                                                   ^
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(c-b)<=d)){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:7:35: error: expected primary-expression before '%' token
    7 |   if(abs(c-a) <= d ||(abs(b-a)<=d%%abs(c-b)<=d)){
      |                                   ^
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(c-b)<d)){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}
    

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: expected primary-expression before '|' token
    7 |   if(|c-a|<=d){
      |      ^
a.cc:7:11: error: expected primary-expression before '<=' token
    7 |   if(|c-a|<=d){
      |           ^~
a.cc:10:12: error: expected primary-expression before '|' token
   10 |   else if (|b-a|<=d && |c-b| <=d){
      |            ^
a.cc:10:17: error: expected primary-expression before '<=' token
   10 |   else if (|b-a|<=d && |c-b| <=d){
      |                 ^~
a.cc:10:24: error: expected primary-expression before '|' token
   10 |   else if (|b-a|<=d && |c-b| <=d){
      |                        ^
a.cc:10:30: error: expected primary-expression before '<=' token
   10 |   else if (|b-a|<=d && |c-b| <=d){
      |                              ^~
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";
    }
  	else{
      cout << "No"
    }
}

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

import java.util.*;

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

	}
}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: 'z' was not declared in this scope
    9 |   if((x<=d && y<=d) || z<=d) cout<<"Yes"<<endl;
      |                        ^
Language: C++

#include <iosetrem>
using namespace std;

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

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

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

#define TLong long long 

// abs(n)
int abs(int n){
	if(n < 0)	n *= -1;
	return n;
}


// gcd(a,b)
int gcd(int a,int b){
	(b == 0) ? (return a) : gcd(b, a % b);
}

// lcm(a.b)
int lcm(int a,int b){
	return (a * b) / gcd(a,b);
}

// qsort(array, size, sizeof(int),comp);
int comp(const int *a,const int *b){
	return (*a - *b);
}

// append(array,*size,addNum)
void append(int *array,int *size,int num){
	realloc(array, sizeof(int) * (*size + 1));
	array[(*size)] = num;
	++(*size);
	return;
}

int main(int argc, char const *argv[])
{
	int a,b,c,d;
	scanf("%d%d%d%d",&a,&b,&c,&d);
	if(abs(c - a) <= d || (abs(b - a) <= d && abs(c - b) <- d))	printf("Yes\n");
	else printf("No\n");
	return 0;
}


Compiler output:
main.c: In function 'gcd':
main.c:18:21: error: expected expression before 'return'
   18 |         (b == 0) ? (return a) : gcd(b, a % b);
      |                     ^~~~~~
main.c: In function 'append':
main.c:33:9: warning: ignoring return value of 'realloc' declared with attribute 'warn_unused_result' [-Wunused-result]
   33 |         realloc(array, sizeof(int) * (*size + 1));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C

#include <stdio.h>
#include <stdlib.h>
int main(){
int a,b,c,d,e,g;
scanf("%d%d%d%d",&a,&b,&c,&d);
e=abs(b-a);
f=abs(c-a);
g=abs(c-b);

if(g<=d&&e<=d&&f<=d) printf("Yes");
else printf("No");

return 0;
}

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

#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif


using namespace std;

// #define int long long
struct Fast {Fast(){std::cin.tie(0);ios::sync_with_stdio(false);}} fast;

inline bool inside(int y, int x, int H, int W) {return y >= 0 && x >= 0 && y < H && x < W;}
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

const int MOD = 1e9 + 7;
const int INF = INT_MAX;

signed main() {
    Fast();

    int a, b, c, d;
    cin >> a >> b >> c >> d;

    if(abs(a - c) <= d || ( abc(a - b) <= d && abc(b - c) <= d ))
        cout << "Yes";
    else
        cout << "No";
    cout << endl;        

    return 0;
}



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

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

ans = 'No'

if abs(c-a)<=d:
    ans = 'Yes'
elif abs(b-a)<=d and abs(c-b)<=d:
    ans = 'Yes'

print(ans)

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

#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdlib>
using namespace std;

int main(){
  int A,B,C,D,AB_far,BC_far,Ahantei,Bhantei;
  string ans;
  cin >> A >> B >> C >> D;
  AB_far = abs(A-B);
  BC_far = abs(B-C);
  if (AB_far<=d)
    A_hantei = 1;
  else
    A_hantei = 0;
  if (BC_far<=d)
    B_hantei = 1;
  else
    B_hantei = 0;
  if (A_hantei + B_hantei == 2)
    ans = Yes;
  else
    ans = No;
  cout << ans <<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: 'd' was not declared in this scope
   14 |   if (AB_far<=d)
      |               ^
a.cc:15:5: error: 'A_hantei' was not declared in this scope; did you mean 'Ahantei'?
   15 |     A_hantei = 1;
      |     ^~~~~~~~
      |     Ahantei
a.cc:17:5: error: 'A_hantei' was not declared in this scope; did you mean 'Ahantei'?
   17 |     A_hantei = 0;
      |     ^~~~~~~~
      |     Ahantei
a.cc:18:15: error: 'd' was not declared in this scope
   18 |   if (BC_far<=d)
      |               ^
a.cc:19:5: error: 'B_hantei' was not declared in this scope; did you mean 'Bhantei'?
   19 |     B_hantei = 1;
      |     ^~~~~~~~
      |     Bhantei
a.cc:21:5: error: 'B_hantei' was not declared in this scope; did you mean 'Bhantei'?
   21 |     B_hantei = 0;
      |     ^~~~~~~~
      |     Bhantei
a.cc:22:7: error: 'A_hantei' was not declared in this scope; did you mean 'Ahantei'?
   22 |   if (A_hantei + B_hantei == 2)
      |       ^~~~~~~~
      |       Ahantei
a.cc:22:18: error: 'B_hantei' was not declared in this scope; did you mean 'Bhantei'?
   22 |   if (A_hantei + B_hantei == 2)
      |                  ^~~~~~~~
      |                  Bhantei
a.cc:23:11: error: 'Yes' was not declared in this scope
   23 |     ans = Yes;
      |           ^~~
a.cc:25:11: error: 'No' was not declared in this scope
   25 |     ans = No;
      |           ^~
Language: C++

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:86: error: expected ')' before '{' token
    7 |   if ((((max(a,b)-min(a,b))<=d)+((max(b,c)-min(b,c))<=d)+((max(c,a)-min(c,a))<=d)>=2){
      |      ~                                                                               ^
      |                                                                                      )
a.cc:12:1: error: expected primary-expression before '}' token
   12 | }
      | ^
Language: Java

import java.util.*;
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(b-a<=d&&c-b<=d){System.out.println("Yes");}
      	else if(c-a<=d){System.out.println("Yes");}
      	else if{System.out.println("No");}
    }
}

Compiler output:
Main.java:12: error: '(' expected
      	else if{System.out.println("No");}
      	       ^
1 error
Language: C++

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

int main(){
	int X; cin >> X;
	int ans = 1;
	for(int i = 2; i < X; i++)
	{
		for(int j = i*i; j <= X; j*=i)
		{	
			if j
			ans = max(ans, j);
		}
		
	}
	
	cout << ans << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: expected '(' before 'j'
   11 |                         if j
      |                            ^
      |                            (
Language: C++

#include"bits/stdc++.h"

using namespace std;

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

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

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

#include<iostream>
using namespace std;

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

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

#incdlue<iostream>
using namespace std;

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incdlue; did you mean #include?
    1 | #incdlue<iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> a >> b >> c >> d;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incdlue<iostream>
a.cc:9:6: error: 'abs' was not declared in this scope
    9 |   if(abs(a - b) <= d && abs(b - c) <= d){
      |      ^~~
a.cc:10:5: error: 'cout' was not declared in this scope
   10 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:10:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:22: error: 'endl' was not declared in this scope
   10 |     cout << "Yes" << endl;
      |                      ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incdlue<iostream>
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout << "No" << endl;
      |     ^~~~
a.cc:12:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:21: error: 'endl' was not declared in this scope
   12 |     cout << "No" << endl;
      |                     ^~~~
a.cc:12:21: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:14:3: error: 'reutrn' was not declared in this scope
   14 |   reutrn 0;
      |   ^~~~~~
Language: C++

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

int are(int a){
  if(a<0)a*=-1;
}
 
int main() {
  int a,b,c,d;
  cin >>a>>b>>c>>d;
  
  if(are(a-c)<=d||are(b-c)+are(a-b)<=2d)cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}
  
  

Compiler output:
a.cc: In function 'int are(int)':
a.cc:6:1: warning: no return statement in function returning non-void [-Wreturn-type]
    6 | }
      | ^
a.cc: In function 'int main()':
a.cc:12:38: error: unable to find numeric literal operator 'operator""d'
   12 |   if(are(a-c)<=d||are(b-c)+are(a-b)<=2d)cout<<"Yes"<<endl;
      |                                      ^~
Language: C++

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

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

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

#include<iostram>
using namespace std;

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

    return 0;
}


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

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

int main(){
  int A,B,C,D;
  cin >> A >> B >> C >> D;
  bool can=false;
  if(abs(A-C)<=D || (abs(A-B)<=D && aba(B-C)<=D )) can=true;
  if(can) cout << "Yes" << endl;
  else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:37: error: 'aba' was not declared in this scope; did you mean 'abs'?
    9 |   if(abs(A-C)<=D || (abs(A-B)<=D && aba(B-C)<=D )) can=true;
      |                                     ^~~
      |                                     abs
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:6:22: error: expected identifier before '(' token
    6 |     if(abs(a-b)<=d)&&(abs(b-c)<=d) printf("Yes");
      |                      ^
Language: C++

#include <iostream>
#include <string>
#include <utility>
#include <algorithm>
#include <map>
#include <vector>
#include <cmath>
#include <cstdlib>
#include <queue>
#include <stack>

using namespace std;

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = n;i >= m;i--)
#define REPO(i, n) for(int i = 1;i <= n;i++)
#define ll long long
#define INF 1999999999
#define MINF -1999999999
#define ALL(n) n.begin(),n.end()

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

Compiler output:
a.cc: In function 'int main()':
a.cc:27:97: error: expected ';' before 'cout'
   27 |         if(max(a,c)-min(a,c) <= d or (max(a, b) - min(a, b) <= d and max(b, c) - min(b, c) <= d)cout<<"Yes"<<endl;
      |                                                                                                 ^~~~
      |                                                                                                 ;
a.cc:28:9: error: expected primary-expression before 'else'
   28 |         else cout <<"No"<<endl;
      |         ^~~~
a.cc:27:115: error: expected ')' before 'else'
   27 |         if(max(a,c)-min(a,c) <= d or (max(a, b) - min(a, b) <= d and max(b, c) - min(b, c) <= d)cout<<"Yes"<<endl;
      |           ~                                                                                                       ^
      |                                                                                                                   )
   28 |         else cout <<"No"<<endl;
      |         ~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:4: error: 'lse' was not declared in this scope
   10 |   }lse{
      |    ^~~
Language: C++

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

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define ci cin >>
#define co cout <<

int main() {
	bool B = true;
	int A, B, C, D;
	ci A >> B >> C >> D;
	if (B - A > D || C - B > D) B = false;
	if (B)co "Yes";
	else co"No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: conflicting declaration 'int B'
   14 |         int A, B, C, D;
      |                ^
a.cc:13:14: note: previous declaration as 'bool B'
   13 |         bool B = true;
      |              ^
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&&abc(c-b)<=d) cout << "Yes" << endl;
  else cout << "No" << endl;
}

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


import java.util.*;

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(c-a=<d){
        System.out.println("Yes");
      } else if(b-a=<d && c-b=<d){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
      
    }
}

Compiler output:
Main.java:12: error: > or ',' expected
      if(c-a=<d){
               ^
Main.java:14: error: > or ',' expected
      } else if(b-a=<d && c-b=<d){
                       ^
Main.java:14: error: > or ',' expected
      } else if(b-a=<d && c-b=<d){
                                ^
3 errors