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

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in);) {
            solve(sc);
        }
    }

    public static void solve(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();
        if (Math.abs(a - c) <= d) {
            System.out.println("Yes");
        } else if (Math.abs(a - b) <= d && MAth.abs(b - c) <= d) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}

Compiler output:
Main.java:17: error: cannot find symbol
        } else if (Math.abs(a - b) <= d && MAth.abs(b - c) <= d) {
                                           ^
  symbol:   variable MAth
  location: class Main
1 error
Language: C++

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

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

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

Compiler output:
main.c: In function 'main':
main.c:6:32: error: expected ')' before 'printf'
    6 |     if(a-c<=d||(a-b<=d&&b-c<=d)printf("Yes\n");
      |       ~                        ^~~~~~
      |                                )
main.c:8:8: error: expected expression before '}' token
    8 |        }
      |        ^
main.c:10:32: error: expected ')' before 'printf'
   10 |     if(c-a<=d||(c-b<=d&&b-a<=d)printf("Yes\n");
      |       ~                        ^~~~~~
      |                                )
main.c:12:8: error: expected expression before '}' token
   12 |        }
      |        ^
Language: C

#include<stdio.h>

int main(){
  int a, b, c, d, disa_b, disb_c, disa_c;
  
  scanf("%d %d %d %d", &a, &b, &c, &d);
  
  (a > b) ? (disa_b = a - b) : (disa_b = b - a);
  (a > c) ? (disa_c = a - c) : (disa_c = c - a);
  (c > b) ? (disb_c = c - b) : (disb_c = b - c);
  if((disa_b <= d && disb_c <= d) || dis_a_c <= d){
    printf("Yes\n");
  } else {
    printf("No\n");
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:38: error: 'dis_a_c' undeclared (first use in this function); did you mean 'disa_c'?
   11 |   if((disa_b <= d && disb_c <= d) || dis_a_c <= d){
      |                                      ^~~~~~~
      |                                      disa_c
main.c:11:38: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(){
  int a, b, c, d, disa_b, disb_c, disa_c;
  
  scanf("%d %d %d %d", &a, &b, &c, &d);
  
  disa_b = (a > b) ? (a - b) : (b - a);
  disa_c = (a > c) ? (a - c) : (c - a);
  disb_c = (c > b) ? (c - b) : (b - c);
  if((disa_b <= d && disb_c <= d) || dis_a_c <= d){
    printf("Yes\n");
  } else {
    printf("No\n");
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:38: error: 'dis_a_c' undeclared (first use in this function); did you mean 'disa_c'?
   11 |   if((disa_b <= d && disb_c <= d) || dis_a_c <= d){
      |                                      ^~~~~~~
      |                                      disa_c
main.c:11:38: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: 'ensl' was not declared in this scope
   11 |     cout << "Yes" << ensl;
      |                      ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
   10 |                 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){
    cout<<"Yes"<<endl;
  }else 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:6: error: expected primary-expression before '|' token
    8 |   if(|c-a|<=d){
      |      ^
a.cc:8:11: error: expected primary-expression before '<=' token
    8 |   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:22: error: expected primary-expression before '|' token
   10 |   }else if(|b-a|<=d&&|c-b|<=d){
      |                      ^
a.cc:10:27: error: expected primary-expression before '<=' token
   10 |   }else if(|b-a|<=d&&|c-b|<=d){
      |                           ^~
Language: C++

#include <iostream>

using namespace std;

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:18:33: error: 'emdl' was not declared in this scope
   18 |                 cout << "No" << emdl;
      |                                 ^~~~
Language: C

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

Compiler output:
main.c:1:27: error: missing terminating > character
    1 |         #include <stdlib.h
      |                           ^
main.c:2:1: error: expected identifier or '(' before '>' token
    2 | >
      | ^
Language: C++

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

int main(int argc, char *argv[])
{
	int a, b, c;
	int distance;

	cin >> a >> b >> c >> distance;

	if (abs(c - a) <= distcance ||
		(abs(a - b) <= distance && abc(c - b) <= distance)) {
		cout << "Yes\n";
	} else {
		cout << "No\n";
	}
	
	return 0;
}


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

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

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

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


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

import java.util.Scanner;

public class A {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int a = scanner.nextInt();
    int b = scanner.nextInt();
    int c = scanner.nextInt();
    int ac = Math.abs(c-a);
    int abc = Math.abs(b-a) + Math.abs(c-b);
    int d = scanner.nextInt();

    if ( abc <= d*2 || ac <= d) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
}

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

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

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

  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected initializer before '.' token
    7 |   int a.b.c.d;
      |        ^
a.cc:8:10: error: 'a' was not declared in this scope
    8 |   cin >> a.b.c.d;
      |          ^
a.cc:10:16: error: 'b' was not declared in this scope
   10 |   int dis1 = a-b;
      |                ^
a.cc:11:16: error: 'c' was not declared in this scope
   11 |   int dis2 = b-c;
      |                ^
a.cc:14:8: error: 'd' was not declared in this scope
   14 |   if ( d >= abs(dis3) )
      |        ^
Language: C++

#include<iostream>
using namespace std;

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


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

#include<stdio.h>

int main(){
  int a;
  scanf("%d",&a);
  if(a<=3){
    puts("1");
    return 0;
  }if(a<=7){
    puts("4");
    return 0;
  }if(a<=8){
    puts("8");
    return 0;
  }if(a<=15){
    puts("9");
    return 0;
  }if(a<=24){
    puts("16");
    return 0;
  }if(a<=26){
    puts("25");
    return 0;
  }if(a<=31){
    puts("27");
    return 0;
  }if(a<=35){
    puts("32");
    return 0;
  }if(a<=48){
    puts("36");
    return 0;
  }if(a<=63){
    puts("49");
    return 0;
  }if(a<=80){
    puts("64");
    return 0;
  }if(a<=99){
    puts("81");
    return 0;
  }if(a<=120){
    puts("100");
    return 0;
  }if(a<=124){
    puts("121");
    return 0;
  }if(a<=127){
    puts("125");
    return 0;
  }if(a<=143){
  	puts("128);
    return 0;
  }if(a<=168){
    puts("144");
    return 0;
  }if(a<=195){
    puts("169");
    return 0;
  }if(a<=215){
    puts("196");
    return 0;
  }if(a<=224){
    puts("216");
    return 0;
  }if(a<=242){
    puts("225");
    return 0;
  }if(a<=255){
    puts("243");
    return 0;
  }if(a<=288){
    puts("256");
    return 0;
  }if(a<=323){
    puts("289");
    return 0;
  }if(a<=342){
    puts("324");
    return 0;
  }if(a<=360){
    puts("343");
    return 0;
  }if(a<=399){
    puts("361");
    return 0;
  }if(a<=440){
    puts("400");
    return 0;
  }if(a<=483){
    puts("441");
    return 0;
  }if(a<=511){
    puts("484");
    return 0;
  }if(a<=528){
    puts("512");
    return 0;
  }if(a<=575){
    puts("529");
    return 0;
  }if(a<=624){
    puts("576");
    return 0;
  }if(a<=675){
    puts("625");
    return 0;
  }if(a<=728){
    puts("676");
    return 0;
  }if(a<=783){
    puts("729");
    return 0;
  }if(a<=840){
    puts("784");
    return 0;
  }if(a<=899){
    puts("841");
    return 0;
  }if(a<=960){
    puts("900");
    return 0;
  }
  puts("961");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:52:14: warning: missing terminating " character
   52 |         puts("128);
      |              ^
main.c:52:14: error: missing terminating " character
   52 |         puts("128);
      |              ^~~~~~
main.c:53:5: error: expected expression before 'return'
   53 |     return 0;
      |     ^~~~~~
main.c:53:14: error: expected ';' before '}' token
   53 |     return 0;
      |              ^
      |              ;
   54 |   }if(a<=168){
      |   ~
Language: C

#include<stdio.h>

int main(){
  int a;
  scanf("%d",&a);
  int ans=1;i=1;
  while(ans<=a){
    if(ans+2*i+1<=a)ans+=2*i+1;
    else break;
    i++;
  }
  printf("%d",ans);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:13: error: 'i' undeclared (first use in this function)
    6 |   int ans=1;i=1;
      |             ^
main.c:6:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
    9 |     return;
      |     ^~~~~~
a.cc:12:6: error: return-statement with no value, in function returning 'int' [-fpermissive]
   12 |      return;
      |      ^~~~~~
Language: C++

a, b, c, d = [int(c) for c in input().split()]

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

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

#include<stdio.h>

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


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

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

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


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

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

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

#include <iostream>
using namespace std;
int a, s,d,f;
  cin >> a >> s >>d>>f;
 main()
{
  int j, k,l = 0;
  if(a-d<0)
    j = d - a;
    else
      j = a - d;
  if(a-s<0)
    k = s - a;
    else
      j = a - s;
  if(s-d<0)
    l = d - s;
    else
      l = s - d;
  if(j<=f){
    cout << "Yes" << endl;
    return 0;
  }
  if(k<=f&&l<=f)
    cout << "Yes" << endl;
    else
      cout << "No" << endl;

}


Compiler output:
a.cc:4:3: error: 'cin' does not name a type
    4 |   cin >> a >> s >>d>>f;
      |   ^~~
a.cc:5:2: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 |  main()
      |  ^~~~
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-c) <=d){
    printf("Yes");
      return 0;
   }

   if( abs(a-b)<=d && abs(b-c)<=d){
    printf("Yes");
      return 0;
   }
   printf("No");
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    6 |    scanf("%d %d %d %d",&a,&b,&c,&d);
      |    ^~~~~
main.c:8:19: error: 'd' undeclared (first use in this function)
    8 |    if( abs(a-c) <=d){
      |                   ^
main.c:8:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C++


#include <cstdio>

int main(){
    int a,b,c,d;
    scanf("%d %d %d %d",&a,&b,&c,&d);
    if((a - C) * (a - C) <= d * d){
        printf("Yes");
    }else if((a - b) * (a - b) <= d * d && (b - c) * (b - c) <= d * d){
        printf("Yes");
    }else{
        printf("No");
    }
    printf("\n");

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'C' was not declared in this scope
    7 |     if((a - C) * (a - C) <= d * d){
      |             ^
Language: C++

#include<iostream>
using namespace std;

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

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


Compiler output:
a.cc:15:7: error: 'cout' does not name a type
   15 |       cout << "Yes" << endl;
      |       ^~~~
a.cc:16:4: error: expected declaration before '}' token
   16 |    }
      |    ^
a.cc:17:4: error: expected unqualified-id before 'else'
   17 |    else{
      |    ^~~~
a.cc:20:4: error: expected unqualified-id before 'return'
   20 |    return 0;
      |    ^~~~~~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

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

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


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: lvalue required as left operand of assignment
   11 |         if(a-b>=d&&b-c>a=d)cout<<"Yes"<<endl;
      |            ~~~~~~^~~~~~~
Language: C++

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

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

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <functional>
#include <queue>
#include <set>
#include <cmath>
#include <map>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)

using namespace std;
typedef long long int lli;
//const int MAX=;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: 'inf' was not declared in this scope; did you mean 'ynf'?
   22 |         inf g=abs(a-c);
      |         ^~~
      |         ynf
a.cc:23:27: error: 'g' was not declared in this scope
   23 |         if((e<=d &&f<=d)||g<=d)cout<<"Yes";
      |                           ^
Language: C

#include<stdio.h>
#include<math.h>

int nain(void){
    int X,n,i,j,max=1;
    scanf("%d",&X);
    for(n=1;n<=X;n++){
        for(i=2;i<X;i++){
            j=pow(n,i);
            if(j<=X){
                if(max<j){
                    max=j;
                }
            }
            else{
                break;
            }
        }
    }
    printf("%d\n",max);

    return 0;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
/usr/bin/ld: /tmp/ccL8OYbX.o: in function `nain':
main.c:(.text+0x5d): undefined reference to `pow'
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h>
#include<math.h>

int nain(void){
    int X,n,i,j,max=1;
    scanf("%d",&X);
    for(n=1;n<=X;n++){
        for(i=2;i<X;i++){
            j=pow(n,i);
            if(j<=X){
                if(max<j){
                    max=j;
                }
            }
            else{
                break;
            }
        }
    }
    printf("%d\n",max);

    return 0;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
/usr/bin/ld: /tmp/cccLzJam.o: in function `nain':
main.c:(.text+0x5d): undefined reference to `pow'
collect2: error: ld returned 1 exit status
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 )) puts (" Yes ");
else puts (" No ");
}

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

# include < 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 )) puts (" Yes ");
else puts (" No ");
}

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

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

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

#include <iostream>
#include <cstdio>
#include <queue>
#include <cstring>
#include <map>
#include <cmath>
#include <algorithm>
#include <stack>
using namespace std;


int main()
{
    long long a,b,c,d;
    while(~scanf("%lld%lld%lld%lld",&a,&b,&c,&d)){
    if(abs(a-c) <= d || (abs(a-b) <= d && abs(b-c) <= d)){
        cout << "YES" << endl;
    }
    else cout << "NO" << endl;
    return 0;
}


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

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( c-a > 0 && c-a <= d ) {
 System.out.println("Yes");
 System.exit(0);

}else if(b-a > 0 && c-b > 0 && b-a <= d && c-b <= d) {
	System.out.println("Yes");
        System.exit(0);

} else {
	System.out.println("No");
}

}
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
    2 | public class Main {
      | ^~~~~~
Language: C++

a,b,c,d = map(int, raw_input().split())
if(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, raw_input().split())
      | ^
Language: C++

#include <iostream>
#include<cmath>
int main (){
    int a,b,c,d;
    std::cin>>a>>b>>c>>d;
    int s=0;
    if(a==c){s=1;}
    else if(a>c){
        if(((a-c<=2*d)&&c<b&&a>b)||a-c<=d)
            s=1;
        }
    }else{
        if(((c-a<=2*d)&&a<b&&c>b)||a-c<=d)
            s=1;
        }
    }
    if(s==0){
        std::cout<<"No"<<std::endl;
    }else{
        std::cout<<"Yes"<<std::endl;
    }
}


Compiler output:
a.cc:12:6: error: expected unqualified-id before 'else'
   12 |     }else{
      |      ^~~~
a.cc:16:5: error: expected declaration before '}' token
   16 |     }
      |     ^
a.cc:17:5: error: expected unqualified-id before 'if'
   17 |     if(s==0){
      |     ^~
a.cc:19:6: error: expected unqualified-id before 'else'
   19 |     }else{
      |      ^~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C

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

Compiler output:
main.c:4:15: error: expected declaration specifiers or '...' before string constant
    4 |         scanf("%d %d %d %d",&a,&b,&c,&d);
      |               ^~~~~~~~~~~~~
main.c:4:29: error: expected declaration specifiers or '...' before '&' token
    4 |         scanf("%d %d %d %d",&a,&b,&c,&d);
      |                             ^
main.c:4:32: error: expected declaration specifiers or '...' before '&' token
    4 |         scanf("%d %d %d %d",&a,&b,&c,&d);
      |                                ^
main.c:4:35: error: expected declaration specifiers or '...' before '&' token
    4 |         scanf("%d %d %d %d",&a,&b,&c,&d);
      |                                   ^
main.c:4:38: error: expected declaration specifiers or '...' before '&' token
    4 |         scanf("%d %d %d %d",&a,&b,&c,&d);
      |                                      ^
main.c:6:9: error: expected identifier or '(' before 'if'
    6 |         if(-d<=a-c){
      |         ^~
main.c:23:10: error: expected identifier or '(' before 'else'
   23 |         }else{
      |          ^~~~
main.c:37:9: error: expected identifier or '(' before 'return'
   37 |         return 0;
      |         ^~~~~~
main.c:38:1: error: expected identifier or '(' before '}' token
   38 | }
      | ^
Language: C

	int a,b,c,d;
	
	scanf("%d %d %d %d",&a,&b,&c,&d);
	
	if(-d<=a-c){
		if(a-c<=d){
			printf("Yes");
		}else{
			if(-d<=b-c){
				if(b-c<=d){
					if(-d<=a-b){
						if(a-b<=d){
							printf("Yes");
						}
					}else{printf("No");
					}
				}else{printf("No");
				}
			}else{printf("No");
			}
		}
	}else{
			if(-d<=b-c){
				if(b-c<=d){
					if(-d<=a-b){
						if(a-b<=d){
							printf("Yes");
						}
					}else{printf("No");
					}
				}else{printf("No");
				}
			}else{printf("No");
			}
		}
	return 0;
}

Compiler output:
main.c:3:15: error: expected declaration specifiers or '...' before string constant
    3 |         scanf("%d %d %d %d",&a,&b,&c,&d);
      |               ^~~~~~~~~~~~~
main.c:3:29: error: expected declaration specifiers or '...' before '&' token
    3 |         scanf("%d %d %d %d",&a,&b,&c,&d);
      |                             ^
main.c:3:32: error: expected declaration specifiers or '...' before '&' token
    3 |         scanf("%d %d %d %d",&a,&b,&c,&d);
      |                                ^
main.c:3:35: error: expected declaration specifiers or '...' before '&' token
    3 |         scanf("%d %d %d %d",&a,&b,&c,&d);
      |                                   ^
main.c:3:38: error: expected declaration specifiers or '...' before '&' token
    3 |         scanf("%d %d %d %d",&a,&b,&c,&d);
      |                                      ^
main.c:5:9: error: expected identifier or '(' before 'if'
    5 |         if(-d<=a-c){
      |         ^~
main.c:22:10: error: expected identifier or '(' before 'else'
   22 |         }else{
      |          ^~~~
main.c:36:9: error: expected identifier or '(' before 'return'
   36 |         return 0;
      |         ^~~~~~
main.c:37:1: error: expected identifier or '(' before '}' token
   37 | }
      | ^
Language: C++

#include<iostream>
#include<cmath>
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(a - c)　<= d)
		cout << "Yes";
	else
		cout << "No";

	return 0;

}

Compiler output:
a.cc:12:47: error: extended character 　 is not valid in an identifier
   12 |         else if (abs(a - b) <= d && abs(a - c)　<= d)
      |                                               ^
a.cc: In function 'int main()':
a.cc:12:47: error: expected ')' before '\U00003000'
   12 |         else if (abs(a - b) <= d && abs(a - c)　<= d)
      |                 ~                             ^~
      |                                               )
Language: C++

#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int a,b,c,d,ab,bc,ac;
int main()
{
	scanf("%d%d%d%d",&a,&b,&c,&d);
	if (a>c) ac=a-c
		else ac=c-a;
	if (a>b) ab=a-b
		else ab=b-a;
	if (b>c) bc=b-c
		else bc=c-b;
	if ((ac<d) || ((ab<d) && (ac<d)))
		printf("Yes");
	else printf("No");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: expected ';' before 'else'
   11 |         if (a>c) ac=a-c
      |                        ^
      |                        ;
   12 |                 else ac=c-a;
      |                 ~~~~    
a.cc:13:24: error: expected ';' before 'else'
   13 |         if (a>b) ab=a-b
      |                        ^
      |                        ;
   14 |                 else ab=b-a;
      |                 ~~~~    
a.cc:15:24: error: expected ';' before 'else'
   15 |         if (b>c) bc=b-c
      |                        ^
      |                        ;
   16 |                 else bc=c-b;
      |                 ~~~~
Language: C++

#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int a,b,c,d,ab,bc,ac;
int main()
{
	scanf("%d%d%d%d",&a,&b,&c,&d)
	if (a>c) ac=a-c;
		else ac=c-a;
	if (a>b) ab=a-b;
		else ab=b-a;
	if (b>c) bc=b-c;
		else bc=c-b;
	if ((ac<d) || ((ab<d) && (ac<d)))
		printf("Yes")
	else printf("No");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:38: error: expected ';' before 'if'
   10 |         scanf("%d%d%d%d",&a,&b,&c,&d)
      |                                      ^
      |                                      ;
   11 |         if (a>c) ac=a-c;
      |         ~~                            
a.cc:12:17: error: 'else' without a previous 'if'
   12 |                 else ac=c-a;
      |                 ^~~~
a.cc:18:30: error: expected ';' before 'else'
   18 |                 printf("Yes")
      |                              ^
      |                              ;
   19 |         else printf("No");
      |         ~~~~
Language: C++

#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int ab,bc,ac;
int main()
{
	scanf("%d%d%d%d",&a,&b,&c,&d)
	if (a>c) ac=a-c;
		else ac=c-a;
	if (a>b) ab=a-b;
		else ab=b-a;
	if (b>c) bc=b-c;
		else bc=c-b;
	if ((ac<d) || ((ab<d) && (ac<d)))
		printf("Yes")
	else printf("No");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:27: error: 'a' was not declared in this scope; did you mean 'ac'?
   10 |         scanf("%d%d%d%d",&a,&b,&c,&d)
      |                           ^
      |                           ac
a.cc:10:30: error: 'b' was not declared in this scope; did you mean 'bc'?
   10 |         scanf("%d%d%d%d",&a,&b,&c,&d)
      |                              ^
      |                              bc
a.cc:10:33: error: 'c' was not declared in this scope; did you mean 'bc'?
   10 |         scanf("%d%d%d%d",&a,&b,&c,&d)
      |                                 ^
      |                                 bc
a.cc:10:36: error: 'd' was not declared in this scope
   10 |         scanf("%d%d%d%d",&a,&b,&c,&d)
      |                                    ^
a.cc:12:17: error: 'else' without a previous 'if'
   12 |                 else ac=c-a;
      |                 ^~~~
a.cc:18:30: error: expected ';' before 'else'
   18 |                 printf("Yes")
      |                              ^
      |                              ;
   19 |         else printf("No");
      |         ~~~~
Language: Java

import java.util.Scanner;
public class main{

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

	}



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

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

void main(){
  int X;
  cin >> X;
  //X以下のべき乗数を探す.
  //調べる整数の最大値.
  int threthold = floor(sqrt(X));
  int ans = 0;
  for(int i=2; i<threthold; ++i){
    for(int j=2; j<11; ++j){
        int power = pow(i,j);
      	//越えてたら次の数にする.
      	if(power > X){
           break;
        }
      	//答え更新.
    	if(X-ans > X-power){
          ans = power;
        }
    }
  }
  cout << ans << endl;
}



Compiler output:
a.cc:3:22: error: expected identifier before ';' token
    3 | using namespace std::;
      |                      ^
a.cc:5:1: error: '::main' must return 'int'
    5 | void main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> X;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:25:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   25 |   cout << ans << 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:25:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   25 |   cout << ans << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
#include <math.h>

int bekky[31];

void main(){
  int X;
  cin >> X;
  //X以下のべき乗数を探す.
  //調べる整数の最大値.
  int threthold = floor(sqrt(X));
  int ans = 0;
  for(int i=2; i<threthold; ++i){
    for(int j=1; j<11; ++j){
        int power = pow(i,j);
      	if(power > X){
           break;
        }
      	//答え更新.
    	if(X-ans > X-power){
          ans = power;
        }
    }
  }
  cout << ans << endl;
}



Compiler output:
a.cc:6:1: error: '::main' must return 'int'
    6 | void main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |   cin >> X;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:25:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   25 |   cout << ans << 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:25:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   25 |   cout << ans << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

puts proc{ |a,b,c,d| (a-b).abs <= d && (b-c).abs <= d ? 'Yes' : 'No'}.(gets.split.map(&:to_i))


Compiler output:
a.cc:1:57: warning: multi-character character constant [-Wmultichar]
    1 | puts proc{ |a,b,c,d| (a-b).abs <= d && (b-c).abs <= d ? 'Yes' : 'No'}.(gets.split.map(&:to_i))
      |                                                         ^~~~~
a.cc:1:65: warning: multi-character character constant [-Wmultichar]
    1 | puts proc{ |a,b,c,d| (a-b).abs <= d && (b-c).abs <= d ? 'Yes' : 'No'}.(gets.split.map(&:to_i))
      |                                                                 ^~~~
a.cc:1:1: error: 'puts' does not name a type
    1 | puts proc{ |a,b,c,d| (a-b).abs <= d && (b-c).abs <= d ? 'Yes' : 'No'}.(gets.split.map(&:to_i))
      | ^~~~
a.cc:1:70: error: expected unqualified-id before '.' token
    1 | puts proc{ |a,b,c,d| (a-b).abs <= d && (b-c).abs <= d ? 'Yes' : 'No'}.(gets.split.map(&:to_i))
      |                                                                      ^
Language: C++

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

public class Main{
	public static InputReader scn = new InputReader();
	public static PrintWriter out = new PrintWriter(System.out);

	public static void main(String[] args) throws Exception {
		//System.out.println("GO");
		
		int a = scn.nextInt(), b = scn.nextInt(), c = scn.nextInt(), d = scn.nextInt();
		
		if(Math.abs(a - c) <= d || (Math.abs(a - b) <= d && Math.abs(b - c) <= d)) {
			out.println("Yes");
		} else {
			out.println("No");
		}
	}

	public static class InputReader {
		InputStream is;

		public InputReader() {
			is = System.in;
		}

		byte[] inbuf = new byte[1024];
		public int lenbuf = 0, ptrbuf = 0;

		int readByte() {
			if (lenbuf == -1)
				throw new InputMismatchException();
			if (ptrbuf >= lenbuf) {
				ptrbuf = 0;
				try {
					lenbuf = is.read(inbuf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (lenbuf <= 0)
					return -1;
			}
			return inbuf[ptrbuf++];
		}

		boolean isSpaceChar(int c) {
			return !(c >= 33 && c <= 126);
		}

		int skip() {
			int b;
			while ((b = readByte()) != -1 && isSpaceChar(b))
				;
			return b;
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		char nextChar() {
			return (char) skip();
		}

		String next() {
			int b = skip();
			StringBuilder sb = new StringBuilder();
			while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')
				sb.appendCodePoint(b);
				b = readByte();
			}
			return sb.toString();
		}

		char[] next(int n) {
			char[] buf = new char[n];
			int b = skip(), p = 0;
			while (p < n && !(isSpaceChar(b))) {
				buf[p++] = (char) b;
				b = readByte();
			}
			return n == p ? buf : Arrays.copyOf(buf, p);
		}

		char[][] nextMatrix(int n, int m) {
			char[][] map = new char[n][];
			for (int i = 0; i < n; i++)
				map[i] = next(m);
			return map;
		}

		int[] nextArray(int n) {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		int nextInt() {
			int num = 0, b;
			boolean minus = false;
			while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
				;
			if (b == '-') {
				minus = true;
				b = readByte();
			}

			while (true) {
				if (b >= '0' && b <= '9') {
					num = num * 10 + (b - '0');
				} else {
					return minus ? -num : num;
				}
				b = readByte();
			}
		}

		long nextLong() {
			long num = 0;
			int b;
			boolean minus = false;
			while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
				;
			if (b == '-') {
				minus = true;
				b = readByte();
			}

			while (true) {
				if (b >= '0' && b <= '9') {
					num = num * 10 + (b - '0');
				} else {
					return minus ? -num : num;
				}
				b = readByte();
			}
		}
	}
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Main{
      | ^~~~~~
Language: C

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

int main()
{
	int a, b, c, d;
	int sum1 = 0, sum2 = 0;
	scanf_s("%d%d%d%d", &a, &b, &c, &d);

	if (abs(a - c) <= d || (abs(a - b <= d) && abs(b - c) <= d))
	{
		printf("Yes\n");
	}

	else
		printf("No\n");



	
}



Compiler output:
main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    8 |         scanf_s("%d%d%d%d", &a, &b, &c, &d);
      |         ^~~~~~~
      |         scanf
Language: C

#include <stdio.h>
#include <math.h>

int main()
{
	int a, b, c, d;
	int sum1 = 0, sum2 = 0;
	scanf_s("%d%d%d%d", &a, &b, &c, &d);

	sum1 = a - b;
	sum2 = b - c;

	if (fabs(sum1) <=d && fabs(sum2) <= d)
	{
		printf("Yes\n");
	}

	else
		printf("No\n");



	
}

Compiler output:
main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    8 |         scanf_s("%d%d%d%d", &a, &b, &c, &d);
      |         ^~~~~~~
      |         scanf
Language: C++

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


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

#include<iostream>
#include<time.h>

using namespace std;

int powI(int b, int p) {
	int r = 1;
	for (int i = 0; i < p; i++) {
		r *= b;
	}
	return r;
}


int main() {
	
	int X, max = 0;
	cin >> X;
	for (int i = 1; i < sqrt(double(X)); i++) {
		for (int j = 1;; j++) {
			int tmp = powI(i, j);
			if (tmp == X) {
				max = tmp;
				cout << max << endl;
				return 0;
			}

			if (tmp > X) {
				break;
			}
			if (tmp >= max) {
				max = tmp;
			}
		}
	}
	cout << max << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:29: error: 'sqrt' was not declared in this scope
   19 |         for (int i = 1; i < sqrt(double(X)); i++) {
      |                             ^~~~
Language: C++

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

int main(){
  int a, b,c,d;
  cin >> a >> b >> c >> d;
  int s,t u;
  s = a - c ;
  t = a - b;
  u = c - b;
  string ans = "No";
  if(s <= d){
    ans = "Yes";
  }
  if((u <= d) && (t <= d) ){
    ans = "Yes";
  }
  cout << ans <<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected initializer before 'u'
    8 |   int s,t u;
      |           ^
a.cc:10:3: error: 't' was not declared in this scope
   10 |   t = a - b;
      |   ^
a.cc:11:3: error: 'u' was not declared in this scope
   11 |   u = c - b;
      |   ^
Language: C++

import java.util.Scanner;

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


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

#include <iostream>
#include <math>
using namespace std;
 
int main(){
 int a, b, c, d;
 cin >> a >> b >> c >> d;
 int dist_ab = abs(a-b);
 int dist_bc = abs(b-c);
 if (dist_ab<=d && dist_bc<=d) return true;
 else return false;
}

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

#include <iostream>
#include <math.h>
using namespace std;
 
int main(){
 cin >> a >> b >> c >> d;
 int dist_ab = abs(a-b);
 int dist_bc = abs(b-c);
 if (dist_ab<=d && dist_bc<=d) return true;
 else return false;
}

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

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

int main(){
 cin >> a >> b >> c >> d;
 int dist_ab = abs(a-b);
 int dist_bc = abs(b-c);
 if (dist_ab<=d && dist_bc<=d) return true;
 else return false;
}


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

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <math>

using namespace std;

#define rep(i,n) for(int i = 0; i != n; ++i)

const double EPS = 1e-10;
const int INF = 1e7;

vector <int> a;

int main(){
  int a, b, c, d;
  scanf("%d%d%d%d", &a, &b, &c, &d);
  if (fabs(c - a) <= d) {
    std::cout << "Yes\n";
  } else if (fabs(b - a) <= d && fabs(c - b) <= d) {
    std::cout << "Yes\n";
  } else {
    std::cout << "No\n";
  }
  return 0;
}


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

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>

using namespace std;

#define rep(i,n) for(int i = 0; i != n; ++i)

const double EPS = 1e-10;
const int INF = 1e7;

vector <int> a;

int main(){
  int a, b, c, d;
  scanf("%d%d%d%d", &a, &b, &c, &d);
  if (fabs(c - a) <= d) {
    std::cout << "Yes\n";
  } else if (fabs(b - a) <= d && fabs(c - b) <= d) {
    std::cout << "Yes\n";
  } else {
    std::cout << "No\n";
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:7: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   25 |   if (fabs(c - a) <= d) {
      |       ^~~~
      |       labs