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

#include<iostream>
#include<algorithm>
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(min(x,min(y,z))<=d);
cout<<“Yes”<<endl;
else
cout<<“No”<<endl;
system(“pause”);
return 0;
}


Compiler output:
a.cc:11:7: error: extended character “ is not valid in an identifier
   11 | cout<<“Yes”<<endl;
      |       ^
a.cc:11:7: error: extended character ” is not valid in an identifier
a.cc:13:7: error: extended character “ is not valid in an identifier
   13 | cout<<“No”<<endl;
      |       ^
a.cc:13:7: error: extended character ” is not valid in an identifier
a.cc:14:8: error: extended character “ is not valid in an identifier
   14 | system(“pause”);
      |        ^
a.cc:14:8: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:11:7: error: '\U0000201cYes\U0000201d' was not declared in this scope
   11 | cout<<“Yes”<<endl;
      |       ^~~~~
a.cc:12:1: error: 'else' without a previous 'if'
   12 | else
      | ^~~~
a.cc:13:7: error: '\U0000201cNo\U0000201d' was not declared in this scope
   13 | cout<<“No”<<endl;
      |       ^~~~
a.cc:14:8: error: '\U0000201cpause\U0000201d' was not declared in this scope
   14 | system(“pause”);
      |        ^~~~~~~
Language: C++

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

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<stdio.h>
      | ^~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
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(min(x,min(y,z))<=d;
cout<<“Yes”<<endl;
else
cout<<“No”<<endl;
system(“pause”);
return 0;
}


Compiler output:
a.cc:11:7: error: extended character “ is not valid in an identifier
   11 | cout<<“Yes”<<endl;
      |       ^
a.cc:11:7: error: extended character ” is not valid in an identifier
a.cc:13:7: error: extended character “ is not valid in an identifier
   13 | cout<<“No”<<endl;
      |       ^
a.cc:13:7: error: extended character ” is not valid in an identifier
a.cc:14:8: error: extended character “ is not valid in an identifier
   14 | system(“pause”);
      |        ^
a.cc:14:8: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:11:7: error: '\U0000201cYes\U0000201d' was not declared in this scope
   11 | cout<<“Yes”<<endl;
      |       ^~~~~
a.cc:11:18: error: expected ')' before ';' token
   11 | cout<<“Yes”<<endl;
      |                  ^
      |                  )
a.cc:10:3: note: to match this '('
   10 | if(min(x,min(y,z))<=d;
      |   ^
a.cc:13:7: error: '\U0000201cNo\U0000201d' was not declared in this scope
   13 | cout<<“No”<<endl;
      |       ^~~~
a.cc:14:8: error: '\U0000201cpause\U0000201d' was not declared in this scope
   14 | system(“pause”);
      |        ^~~~~~~
Language: C++

#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <sstream>
#include <algorithm>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <list>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <climits>
#include <bitset>
#include <functional>
#include <numeric>
#include <ctime>
#include <cassert>
#include <cstring>
#include <fstream>
 
using namespace std;
int main(){
int a,b,c,d;
cin>>a>>b>>c>>d;
if(|c-a|<=2*d) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:4: error: expected primary-expression before '|' token
   29 | if(|c-a|<=2*d) cout<<"Yes"<<endl;
      |    ^
a.cc:29:9: error: expected primary-expression before '<=' token
   29 | if(|c-a|<=2*d) cout<<"Yes"<<endl;
      |         ^~
Language: Java

import java.util.Scanner;

public class atcoder_20180512 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int input[] = new int[4];
		for (int i = 0; i < 4; i++) {
			input[i] = sc.nextInt();
		}

		int distance = input[3];
		if (Math.abs(input[0] - input[2]) <= distance) {
			System.out.println("Yes");
			return;
		}
		if ((Math.abs(input[0] - input[1]) <= distance) && (Math.abs(input[1] - input[2]) <= distance)) {
			System.out.println("Yes");
			return;
		}
		System.out.println("No");
	}
}

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

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

int main() {
	int i,j,d[4];

	scanf("%d %d %d %d", &d[0], &d[1], &d[2], &d[3]);

	/*for(i=0;i<2;i++)
		for (j = 2; j > 0; j--)
		{
			if (d[j] < d[j - 1])
			{
				int r;
				r = d[j];
				d[j] = d[j - 1];
				d[j - 1] = r;

			}
		}*/
	if (d[3] >= abs(d[2] - d[0]))
		printf("Yes\n");
	else
	{
		if ((d[3] >= abs(d[1] - d[2])) && (d[3] >= abs(d[1] - d[0]))
			printf("Yes\n");

		printf("No\n");

	}


	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:25:77: error: expected ')' before 'printf'
   25 |                 if ((d[3] >= abs(d[1] - d[2])) && (d[3] >= abs(d[1] - d[0]))
      |                    ~                                                        ^
      |                                                                             )
   26 |                         printf("Yes\n");
      |                         ~~~~~~                                               
main.c:30:9: error: expected expression before '}' token
   30 |         }
      |         ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int a, b, c, d;
  int a1, a2, b1, b2, c1, c2;

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

  a1 = a-d;
  a2 = a+d;
  b1 = b-d;
  b2 = b+d;
  c1 = c-d;
  c2 = c+d;

  if(a1<=c && c<=a2){
     cout << "YES";
   }else if(a1<=b && b<=a2){
     if(b1<=c && c<=b2){
       cout <<"YES";
     }
   }else{
     cout << "NO";
   }

   cout << "\n"

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:16: error: expected ';' before 'return'
   27 |    cout << "\n"
      |                ^
      |                ;
   28 | 
   29 |   return 0;
      |   ~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {

	int a = 0;

	cin >> a;

	for (int i = a; i >= 1; i--){
		if (std::pow(i, 2) <= a){
			std::cout << i << std::endl;
			return 0;
		}
		else if(a > 1000){
			return 0;
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: 'pow' is not a member of 'std'
   11 |                 if (std::pow(i, 2) <= a){
      |                          ^~~
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Test {

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

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

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}

	public static void main(String[] args) {
		FastReader sc = new FastReader();
		stones(sc);
		/*
		 * String str =sc.nextLine(); int q=sc.nextInt(); while(q-->0){ int
		 * len=sc.nextInt(); int[] ch=new int[26]; boolean chk=false; for(int
		 * i=0;i<str.length()-len+1;i++){ String sub=str.substring(i, i+len);
		 * System.out.println(sub); boolean p=method(sub); if(p){ chk=true; //
		 * break; } } System.out.println(chk?len:-1);
		 */
	}

	private static void stones(FastReader sc) {
		int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt(),d=sc.nextInt();
		System.out.println((Math.abs(a-c)<=d)||((Math.abs(a-b)<=d&&Math.abs(b-c)<=d))?"Yes":"No");
	}
}

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

#include <iostream>
using namespace std;

int main() {

	double a = 0;

	cin >> a;

	for (int i = a; i >= 1; i--){
		if (std::pow(i, 2) <= a){
			std::cout << i << std::endl;
			return 0;
		}
		else if(a > 1000){
			return 0;
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: 'pow' is not a member of 'std'
   11 |                 if (std::pow(i, 2) <= a){
      |                          ^~~
Language: C++

#include<stdio.h>

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

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

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

  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:6: error: expected primary-expression before '|' token
   12 |   if(|a - b| <= d && |b - c| <= d && |a - c| <= d){
      |      ^
a.cc:12:14: error: expected primary-expression before '<=' token
   12 |   if(|a - b| <= d && |b - c| <= d && |a - c| <= d){
      |              ^~
a.cc:12:22: error: expected primary-expression before '|' token
   12 |   if(|a - b| <= d && |b - c| <= d && |a - c| <= d){
      |                      ^
a.cc:12:30: error: expected primary-expression before '<=' token
   12 |   if(|a - b| <= d && |b - c| <= d && |a - c| <= d){
      |                              ^~
a.cc:12:38: error: expected primary-expression before '|' token
   12 |   if(|a - b| <= d && |b - c| <= d && |a - c| <= d){
      |                                      ^
a.cc:12:46: error: expected primary-expression before '<=' token
   12 |   if(|a - b| <= d && |b - c| <= d && |a - c| <= d){
      |                                              ^~
Language: C++

#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <sstream>
#include <algorithm>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <list>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <climits>
#include <bitset>
#include <functional>
#include <numeric>
#include <ctime>
#include <cassert>
#include <cstring>
#include <fstream>
 
using namespace std;
int main(){
int a,b,c,d;
cin>>a>>b>>c>>d;
if(c-a<=2d) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:9: error: unable to find numeric literal operator 'operator""d'
   29 | if(c-a<=2d) cout<<"Yes"<<endl;
      |         ^~
Language: C++

#include <iostream>
using namespace std;

int main() {

	int a = 0;

	cin >> a;

	for (int i = a; i >= 1; i--){
		if (pow(i, 2) <= a){
			std::cout << i << std::endl;
			return 0;
		}
		else if(a > 1000){
			return 0;
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: 'pow' was not declared in this scope
   11 |                 if (pow(i, 2) <= a){
      |                     ^~~
Language: Java

import java.util.Scanner;

public class atcoder_20180512 {

	public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		int input[]= new int[4];
		for(int i =0;i<4;i++) {
			input[i]=sc.nextInt();
		}

		int distance = input[3];
		if(Math.abs(input[0]-input[2]) <= distance) {
			System.out.println("Yes");
			return;
		}
		if(Math.abs(input[0]-input[1])<=distance) {
			System.out.println("Yes");
			return;
		}
		System.out.println("No");
	}
}


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

#include<iostream>
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(min(x,min(y,z))<=d;
cout<<“Yes”<<endl;
else
cout<<“No”<<endl;
system(“pause”);
return 0;
}

Compiler output:
a.cc:10:7: error: extended character “ is not valid in an identifier
   10 | cout<<“Yes”<<endl;
      |       ^
a.cc:10:7: error: extended character ” is not valid in an identifier
a.cc:12:7: error: extended character “ is not valid in an identifier
   12 | cout<<“No”<<endl;
      |       ^
a.cc:12:7: error: extended character ” is not valid in an identifier
a.cc:13:8: error: extended character “ is not valid in an identifier
   13 | system(“pause”);
      |        ^
a.cc:13:8: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:10:7: error: '\U0000201cYes\U0000201d' was not declared in this scope
   10 | cout<<“Yes”<<endl;
      |       ^~~~~
a.cc:10:18: error: expected ')' before ';' token
   10 | cout<<“Yes”<<endl;
      |                  ^
      |                  )
a.cc:9:3: note: to match this '('
    9 | if(min(x,min(y,z))<=d;
      |   ^
a.cc:12:7: error: '\U0000201cNo\U0000201d' was not declared in this scope
   12 | cout<<“No”<<endl;
      |       ^~~~
a.cc:13:8: error: '\U0000201cpause\U0000201d' was not declared in this scope
   13 | system(“pause”);
      |        ^~~~~~~
Language: C++

def main():
    
    inp = input()
    dat = inp.strip().split(" ")

    pa = int(dat[0])
    pb = int(dat[1])
    pc = int(dat[2])
    maxd = int(dat[3])

    if (abs(pa-pc) <= maxd):
        print("Yes")
    elif (abs(pa-pb) <= maxd) and (abs(pb-pc) <= maxd):
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()

Compiler output:
a.cc:18:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   18 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def main():
      | ^~~
Language: C++

//#include <bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<string>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
using namespace std;
typedef long long ll;//int64
typedef unsigned long long ull;
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};
//----------program from here----------



int main(){
  int a,b,c,d;
  cin >> a >> b >> c >> d;
  int ab,bc,ac;
  ab=max(a,b)-min(a,b);
  bc=max(b,c)-min(b,c);
  ca=max(a,c)-min(a,c);
  if(ab<=d&&bc<=d||ca<=d&&ab<=d||bc<=d&&ca<=d){
    cout << "Yes";
  }else{
    cout << "No";
  }
  return 0;
}


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

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

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

int solveA(){
	//入力機構
	int a,b,c,d;
	std::cin>>a>>b>>c>>d;
	//解答
	bool judge=(std::abs(a-c)<=d ||//直接連絡が取れる
		(std::abs(a-b)<=d && std::abs(b-c)<=d)//間接的に連絡できる
		);	
	//結果出力
	if(judge){
		std::cout<<"Yes"<<std::endl;
	} else{
		std::cout<<"No"<<std::endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int solveA()':
a.cc:4:14: error: 'cin' is not a member of 'std'
    4 |         std::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 | int solveA(){
a.cc:6:26: error: 'abs' is not a member of 'std'
    6 |         bool judge=(std::abs(a-c)<=d ||//直接連絡が取れる
      |                          ^~~
a.cc:7:23: error: 'abs' is not a member of 'std'
    7 |                 (std::abs(a-b)<=d && std::abs(b-c)<=d)//間接的に連絡できる
      |                       ^~~
a.cc:7:43: error: 'abs' is not a member of 'std'
    7 |                 (std::abs(a-b)<=d && std::abs(b-c)<=d)//間接的に連絡できる
      |                                           ^~~
a.cc:11:22: error: 'cout' is not a member of 'std'
   11 |                 std::cout<<"Yes"<<std::endl;
      |                      ^~~~
a.cc:11:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:40: error: 'endl' is not a member of 'std'
   11 |                 std::cout<<"Yes"<<std::endl;
      |                                        ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int solveA(){
a.cc:13:22: error: 'cout' is not a member of 'std'
   13 |                 std::cout<<"No"<<std::endl;
      |                      ^~~~
a.cc:13:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:39: error: 'endl' is not a member of 'std'
   13 |                 std::cout<<"No"<<std::endl;
      |                                       ^~~~
a.cc:13:39: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<iostream>

void main(){
	//入力機構
	int a,b,c,d;
	std::cin>>a>>b>>c>>d;
	//解答
	bool judge=(std::abs(a-c)<=d ||//直接連絡が取れる
		(std::abs(a-b)<=d && std::abs(b-c)<=d)//間接的に連絡できる
		);	
	//結果出力
	if(judge){
		std::cout<<"Yes"<<std::endl;
	} else{
		std::cout<<"No"<<std::endl;
	}
	return;
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:17:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   17 |         return;
      |         ^~~~~~
Language: Java

class Main {
    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 d = scanner.nextInt();
 
        if (Math.abs(a - c) <= d){
            System.out.print("Yes");
        } else if (Math.abs(a-b) <=d && Math.abs(b-c) <= d) {
            System.out.print("Yes");
        } else{
            System.out.print("No");
        }
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner scanner = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner scanner = new Scanner(System.in);
                              ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

int main(){
    int a=100,b=100,c=100,d=100;
    cin >> a >> b >> c >> d;
    if(c - a <= 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:5:9: error: 'cout' was not declared in this scope
    5 |         cout << "Yes" << endl;
      |         ^~~~
a.cc:5:26: error: 'endl' was not declared in this scope
    5 |         cout << "Yes" << endl;
      |                          ^~~~
a.cc:6:12: error: 'cout' was not declared in this scope
    6 |     }else{ cout << "No" << endl;
      |            ^~~~
a.cc:6:28: error: 'endl' was not declared in this scope
    6 |     }else{ cout << "No" << endl;
      |                            ^~~~
Language: Java

import java.util.Scanner;


    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 d = scanner.nextInt();

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


Compiler output:
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
    public static void main(String[] args) {
                  ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

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();

		String ans;

		if (c-a<=d || a-c<=d){
			ans = "Yes";
		} else if (a < b && b < c){
			if ((c+b)-a==d || a-(c+b)==d){
			ans = "Yes";
			} else {
				ans = "No";
			}
		} else {
			ans = "No";
		}

		// 出力
		System.out.println(ans);
	}
}


Compiler output:
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:31: error: lvalue required as left operand of assignment
    9 |         if(a-b<d||b-a<d&&b-c<d||c-b=d)
      |            ~~~~~~~~~~~~~~~~~~~^~~~~
Language: C

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:10:24: warning: missing terminating " character
   10 |                 printf("Yes\n);
      |                        ^
main.c:10:24: error: missing terminating " character
   10 |                 printf("Yes\n);
      |                        ^~~~~~~~
main.c:11:9: error: expected expression before '}' token
   11 |         }else{
      |         ^
main.c:10:24: error: expected ';' before '}' token
   10 |                 printf("Yes\n);
      |                        ^
      |                        ;
   11 |         }else{
      |         ~
Language: C

/*
AAtCoder Beginner Contest 097 A - Colorful Transceivers 結果:

*/

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

//#define DEBUG1
//#define DEBUG2
//#define DEBUGF
//
//#ifdef DEBUG1
//#ifdef DEBUG2
//#ifdef DEBUGF
//#endif
//#define int long long

#define DEBUG1
#define DEBUGF

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

int main(void) {
	int a, b,c,d, ngflg = 0;
	//int a[100], b[100];
	//scanf("%d %d", &t, &n);
	//for (int i = 0; i < n; i++) {
	//	scanf("%d", &a[i]);
	//}
	//scanf("%d", &m);
	//for (int i = 0; i < m; i++) {
	//	scanf("%d", &b[i]);
	//}
#ifdef DEBUG1
	//for (int i = 0; i < n; i++) {
	//	printf("%d\n", a[i]);
	//}
	//for (int i = 0; i < m; i++) {
	//	printf("%d\n", b[i]);
	//}
#endif
	//int i = 0, j = 0;
	scanf("%d %d %d %d", &a, &b, &c, &d);

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

	//if (a*a > b*b) { printf("%s\n", "Ant"); }
	//if (a*a < b*b) { printf("%s\n", "Bug"); }
	//if (a*a == b*b) { printf("%s\n", "Draw"); }



#ifdef DEBUGF
	getch();
#endif
	return 0;
}

//a = (int)sqrt((double)n) + 1;
//int ngflg = 0;
//scanf("%d", &n);
//scanf("%lld", &N);
//
//#define int long long
//signed main() {
//int *x = (int *)malloc(sizeof(int) * N);
//int *y = (int *)malloc(sizeof(int) * N);
//int desc(const void *a, const void *b) {return *(int *)b - *(int *)a;}
//qsort(num, 3, sizeof(int), desc);
//int d = pow(2, k);


Compiler output:
main.c: In function 'main':
main.c:60:9: error: implicit declaration of function 'getch'; did you mean 'getc'? [-Wimplicit-function-declaration]
   60 |         getch();
      |         ^~~~~
      |         getc
Language: C++

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

  return 0;
}

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:7:7: error: 'abs' was not declared in this scope
    7 |   if (abs(a-b) <= d && abs(b-c) <= d) cout << "Yes" << endl;
      |       ^~~
a.cc:7:39: error: 'cout' was not declared in this scope
    7 |   if (abs(a-b) <= d && abs(b-c) <= d) cout << "Yes" << endl;
      |                                       ^~~~
a.cc:7:56: error: 'endl' was not declared in this scope
    7 |   if (abs(a-b) <= d && abs(b-c) <= d) cout << "Yes" << endl;
      |                                                        ^~~~
a.cc:8:44: error: 'cout' was not declared in this scope
    8 |   else if (abs(a-c) <= d && abs(b-c) <= d) cout << "Yes" << endl;
      |                                            ^~~~
a.cc:8:61: error: 'endl' was not declared in this scope
    8 |   else if (abs(a-c) <= d && abs(b-c) <= d) cout << "Yes" << endl;
      |                                                             ^~~~
a.cc:9:44: error: 'cout' was not declared in this scope
    9 |   else if (abs(a-b) <= d && abs(a-c) <= d) cout << "Yes" << endl;
      |                                            ^~~~
a.cc:9:61: error: 'endl' was not declared in this scope
    9 |   else if (abs(a-b) <= d && abs(a-c) <= d) cout << "Yes" << endl;
      |                                                             ^~~~
a.cc:10:8: error: 'cout' was not declared in this scope
   10 |   else cout << "No" << endl;
      |        ^~~~
a.cc:10:24: error: 'endl' was not declared in this scope
   10 |   else cout << "No" << endl;
      |                        ^~~~
Language: C++

#include "A.h"
#include <assert.h>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;

int main() {
	int a, b, c, d;
	while(~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:
a.cc:1:10: fatal error: A.h: No such file or directory
    1 | #include "A.h"
      |          ^~~~~
compilation terminated.
Language: Java

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();

		String ans;

		if (c-a==d || a-c==d){
			ans = "Yes";
		} else if ((c+b)-a==d || a-(c+b)==d){
			ans = "Yes";
		} else {
			ans = "No";
		}

		// 出力
		System.out.println(ans);
	}
}


Compiler output:
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include<iostream>
#include<algorithm>
#include<iomanip>
#include<cstdlib>
#include<cstdio>

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"<<endl;
        else
            cout<<"No"<<endl;
    }
    return 0;
}


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'If' was not declared in this scope
    7 | If(p<0)
      | ^~
Language: C++

#include <cmath>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:31: error: expected ':' before ')' token
   16 |     printf(f==1?"Yes\n","No\n");
      |                               ^
      |                               :
a.cc:16:31: error: expected primary-expression before ')' token
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include <cstdlib>

using namespace std;

int main(){

	int a[3],d;
	cin >> a[0] >> a[1] >> a[2] >> d;
	if(max(a[0],a[1])-min(a[0],a[1])<=d && max(a[1],a[2])-min(a[1],a[2])<=d){
		cout <<"Yes" <<endl;
	}
	else if(ax(a[0],a[2])-min(a[0],a[2])<=d){
		cout <<"Yes" <<endl;
	}
	else{
		cout << "No" <<endl;
	}


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: 'ax' was not declared in this scope; did you mean 'a'?
   16 |         else if(ax(a[0],a[2])-min(a[0],a[2])<=d){
      |                 ^~
      |                 a
Language: C++

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

flag = 0

if((a-b)**2<d**2):
    flag += 1

if((b-c)**2<d**2):
    flag += 1

if((c-a)**2<d**2):
    flag += 1

if(flag=>2):
    print("Yes")
else:
    print("No")


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

#include <iostream>

using namespace std;

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

int main()
{
    _097a();

    return 0;

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

#include<iostream>
using namespace std;
int main()
{
int a,b,c,d;
cin>>a>>b>>c>>d;
int x,y;
if((a-b)>0)
x=a-b;
if((a-b)<0 or (a-b)==0)
x=b-a;
if((b-c)>0)
y=b-c;
if((b-c)<0 or (b-c)==0)
y=c-b;;
if(x>d or x==d)
if(y>d or y==d)
cout<<"Yes";
else
cout<<"No";
system ("pause"):
return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:21:17: error: expected ';' before ':' token
   21 | system ("pause"):
      |                 ^
      |                 ;
Language: C++

/************************************************
 *Author*        :skyNebula
 *Created Time*  : 六  5/12 20:03:29 2018

*********************************************/

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


using namespace std;
#define debug(x) cout << #x << " " << "=" << (x) << endl;
typedef pair<int, int> pii;
typedef long long LL;
const int mod = 1e9 + 7;
const int MaxN = 1e6;



int main()
{
    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;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:12: error: 'a' was not declared in this scope
   34 |     cin >> a >> b >> c >> d;
      |            ^
a.cc:34:17: error: 'b' was not declared in this scope
   34 |     cin >> a >> b >> c >> d;
      |                 ^
a.cc:34:22: error: 'c' was not declared in this scope
   34 |     cin >> a >> b >> c >> d;
      |                      ^
a.cc:34:27: error: 'd' was not declared in this scope
   34 |     cin >> a >> b >> c >> d;
      |                           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:57: error: expected ';' before 'printf'
   11 |         if(ABS((a-c)<=d || (ABS(a-b)<=d && ABS(c-b)<=d)) printf("Yes");
      |                                                         ^~~~~~~
      |                                                         ;
a.cc:12:9: error: expected primary-expression before 'else'
   12 |         else printf("No");
      |         ^~~~
a.cc:11:72: error: expected ')' before 'else'
   11 |         if(ABS((a-c)<=d || (ABS(a-b)<=d && ABS(c-b)<=d)) printf("Yes");
      |           ~                                                            ^
      |                                                                        )
   12 |         else printf("No");
      |         ~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
    std::ios::sync_with_stdio(false);
    cout.tie(0);
    cin.tie(0);
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    if ((abs(a-b)<=d&&abs(b-c)<=d)||abs(a-c)<=d) {
        cout<<"Yes"<<endl;
    } else {
        cout<<"No"<<endl;
    }
    return 0;

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

#include<bits/stdc++.h>

using namespace std;

int main(){
	string message = "No";
	int a,b,c,d;
	cin >> a >> b >> c >> d;
	if(abs(a-b) <= d && abs(b-c) <= d){
		message = "Yes";
	}
	if(abs(a-c) <= d){
		messag = "Yes";
	}

	cout << message << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: 'messag' was not declared in this scope; did you mean 'message'?
   13 |                 messag = "Yes";
      |                 ^~~~~~
      |                 message
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: expected ';' before string constant
    9 |         } else cout "No";
      |                    ^~~~~
      |                    ;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:15: error: redeclaration of 'int c'
    4 |     int a,b,c,c;
      |               ^
a.cc:4:13: note: 'int c' previously declared here
    4 |     int a,b,c,c;
      |             ^
a.cc:5:27: error: 'd' was not declared in this scope
    5 |     cin >> a >> b >> c >> d;
      |                           ^
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(){
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    bool flg=false;
    int ab,bc,ac;
    ab=b-a;
    if(ab<0)ab*=-1;
    bc=c-b;
    if(bc<0)bc*=-1;
    ac=c-a;
    if(ac<0)ac*=-1;

    if(ac<=d || (ab<=d && bc<=d ))flg=true;

    if(flg)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;



Compiler output:
a.cc: In function 'int main()':
a.cc:20:27: error: expected '}' at end of input
   20 |     else cout<<"No"<<endl;
      |                           ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

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

Compiler output:
a.cc:9:11: warning: multi-character character constant [-Wmultichar]
    9 |     print('Yes')
      |           ^~~~~
a.cc:11:11: warning: multi-character character constant [-Wmultichar]
   11 |     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>
#include <fstream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    //ifstream in("C:\\Users\\yossw\\Desktop\\<name>.txt");
    //cin.rdbuf(in.rdbuf());
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    if(abs(c-a)<=d || abs(b-a)+abs(c-b)<=d)cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

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

int main(int argc, const char * argv[]) {
    int a,b,c,d;
    cin >> a >> b >> c >> d;
    if(abs(a - b) < d && abs(b - c)){//間接
        cout << "Yes";
        return 0;
    }
    if(abs(a-c) < d){
        cout << "Yes";
        return 0;
    }
    cout << "No"
    return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:17:17: error: expected ';' before 'return'
   17 |     cout << "No"
      |                 ^
      |                 ;
   18 |     return 0;
      |     ~~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: 'c' was not declared in this scope; did you mean 'cd'?
    9 |         cin >> a >> b >> c >> d;
      |                          ^
      |                          cd
a.cc:9:31: error: 'd' was not declared in this scope; did you mean 'cd'?
    9 |         cin >> a >> b >> c >> d;
      |                               ^
      |                               cd
Language: C++

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

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

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: expected primary-expression before 'return'
   10 |     return 0;
      |     ^~~~~~
Language: C

#iclude<stdio.h>

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


Compiler output:
main.c:1:2: error: invalid preprocessing directive #iclude; did you mean #include?
    1 | #iclude<stdio.h>
      |  ^~~~~~
      |  include
main.c: In function 'main':
main.c:5:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |     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 | #iclude<stdio.h>
main.c:5:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |     scanf("%d %d %d %d", &a, &b, &c, &d);
      |     ^~~~~
main.c:5:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    7 |         printf("Yes");
      |         ^~~~~~
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    9 |         printf("Yes");
      |         ^~~~~~
main.c:9:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   11 |         printf("No");
      |         ^~~~~~
main.c:11:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include <iostream>
#include <math.h>
using namespace std;
int main(void){
    int a,b,c,d;
	cin >> a >> b >> c >> d;
	if((abs(b-a) <= d && abs(c-b) <= d) || abs(c-a) <= d)
		cout << "Yes\n";
	else
		cout << "No\n"
}


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

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

bool iSS(long double x) {
  long double sr = sqrt(x);
    return ((sr - floor(sr)) == 0);
}
int iCC(int N){
    int cube_root;
    cube_root = (int)round(pow(N, 1.0 / 3.0));
    if (cube_root * cube_root * cube_root == N)return 1;
    else return 0;
}
void solve(){
  int n;
  cin >> n;

  for(int i=n; i >= 1; i--){
    if(iSS(i)){
        cout << i << endl;
        return ;
    }else if(iCC(i))){
        cout << i << endl;
        return ;
    }
  }
}
int main(){
   solve();
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:22:21: error: expected primary-expression before ')' token
   22 |     }else if(iCC(i))){
      |                     ^
Language: C++

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

bool iSS(long double x) {
  long double sr = sqrt(x);
    return ((sr - floor(sr)) == 0);
}
int iCC(int N){
    int cube_root;
    cube_root = (int)round(pow(N, 1.0 / 3.0));
    if (cube_root * cube_root * cube_root == N)return 1;
    else return 0;
}
bool isPerfectSquare(long double x) {
  long double sr = cuberoot(x);
    return ((sr - floor(sr)) == 0);
}
void solve(){
  int n;
  cin >> n;

  for(int i=n; i >= 1; i--){
    if(iSS(i)){
        cout << i << endl;
        return ;
    }else if(iCC(i))){
        cout << i << endl;
        return ;
    }
  }
}
int main(){
   solve();
}


Compiler output:
a.cc: In function 'bool isPerfectSquare(long double)':
a.cc:15:20: error: 'cuberoot' was not declared in this scope; did you mean 'chroot'?
   15 |   long double sr = cuberoot(x);
      |                    ^~~~~~~~
      |                    chroot
a.cc: In function 'void solve()':
a.cc:26:21: error: expected primary-expression before ')' token
   26 |     }else if(iCC(i))){
      |                     ^
Language: C++

#include<iostream>
using namespace std;
int main (void)
{
  int x,i,j,k,n,ans;
  cin>>x;
  n=1;
  j=0;
  ans=0;
  if(x==1)
  {
    cout<<"1";
    return 0;
  }
  
  for(i=2;i<x;i++)
  {
    while(1)
    {
      if(n<=x)
      {
        n=n*i;
        j++;
      }
      else 
      {
        n=n/i;
      //  cout<<n<<endl;
        if(j>2&&n>ans)
        {
          ans=n;
        }
        n=1;
        j=0;
        break;
      }
    }
    
  }
  
  cout<<ans;



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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int x;
  cin >> x;
  
  for (int i = x; i > 0; i--) {
    for (int j = 2; j*j <= i; j++) {
      if (i%j != 0)
        continue;
      int temp = i; count = 0;
      while (temp%j == 0) {
        count ++;
        temp /= j;
      }
      if (temp && count >= 2) {
        cout << i << endl;
        return 0;
      }
    }
  }   
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:29: error: overloaded function with no contextual type information
   12 |       int temp = i; count = 0;
      |                             ^
a.cc:14:15: error: no post-increment operator for type
   14 |         count ++;
      |               ^~
a.cc:17:25: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>='
   17 |       if (temp && count >= 2) {
      |                   ~~~~~~^~~~
Language: C++

#include <iostream>
#include <map>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <sstream>
#include <cmath>
#include <math.h>
#include <string>
#include <set>
#include <queue>
#include <utility>
using namespace std;
typedef long long ll;
 
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int x;
    cin >> x;
  	ll c = 0;
  	for(ll i = 1; i <= 100; i++){
    	ll n = i;
  		for( int j = 2; j <= 10; j++){
    		n *= i;
      	    if( n <= x ) c = max( n , c );
        }
    }
    cout << ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   29 |     cout << ans;
      |             ^~~
      |             abs
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
      	int max = 1;
      	for(int i=2; i*i<=x; i++){
          int num = i;
          while (num <= x) {
				num *= i;
			}
			num /= i;
			max = Math.max(max, num);
        }
      	System.out.println(max);
	}
}


Compiler output:
Main.java:8: error: cannot find symbol
      	for(int i=2; i*i<=x; i++){
      	                  ^
  symbol:   variable x
  location: class Main
Main.java:10: error: cannot find symbol
          while (num <= x) {
                        ^
  symbol:   variable x
  location: class Main
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std ;
int main (){
int X ;
cin >>X;
vector < bool > expo (X +1);
expo [1] = 1;
for ( int b =2; b <= X; b ++){
int v = b*b ;
while (v <= X){
expo [v] = 1;
v *= b ;
}
}
for ( int i =X;i >=1; i - -) if ( expo [i ]){
cout <<i << endl ;
return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:28: error: expected primary-expression before ')' token
   15 | for ( int i =X;i >=1; i - -) if ( expo [i ]){
      |                            ^
a.cc:18:2: error: expected '}' at end of input
   18 | }
      |  ^
a.cc:3:12: note: to match this '{'
    3 | int main (){
      |            ^
Language: C++

# include < bits / stdc ++. h >
using namespace std ;
int main (){
int X ;
cin >>X;
vector < bool > expo (X +1);
expo [1] = 1;
for ( int b =2; b <= X; b ++){
int v = b*b ;
while (v <= X ){
expo [v] = 1;
v *= b ;
}
}
for ( int i =X;i >=1; i - -) if ( expo [i ]){
cout <<i << endl ;
return 0;
}
}


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