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

# include <climits>

int main() {
  int lo = INT_MAX, hi = INT_MIN;
  int n;
  for (int i = 0; i < 5; ++i) {
    scanf("%3d", &n);
    if (n > hi) { hi = n; }
    if (n < lo) { lo = n; }
  }
  int k;
  scanf("%3d", &n);
  if (hi - lo <= n) { printf("Yay!"); fflush(stdout); }
  else { printf(":("); fflush(stdout); }
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'scanf' was not declared in this scope
    7 |     scanf("%3d", &n);
      |     ^~~~~
a.cc:12:3: error: 'scanf' was not declared in this scope
   12 |   scanf("%3d", &n);
      |   ^~~~~
a.cc:13:23: error: 'printf' was not declared in this scope
   13 |   if (hi - lo <= n) { printf("Yay!"); fflush(stdout); }
      |                       ^~~~~~
a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    1 | # include <climits>
  +++ |+#include <cstdio>
    2 | 
a.cc:13:46: error: 'stdout' was not declared in this scope
   13 |   if (hi - lo <= n) { printf("Yay!"); fflush(stdout); }
      |                                              ^~~~~~
a.cc:13:46: note: 'stdout' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:13:39: error: 'fflush' was not declared in this scope
   13 |   if (hi - lo <= n) { printf("Yay!"); fflush(stdout); }
      |                                       ^~~~~~
a.cc:14:10: error: 'printf' was not declared in this scope
   14 |   else { printf(":("); fflush(stdout); }
      |          ^~~~~~
a.cc:14:10: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:14:31: error: 'stdout' was not declared in this scope
   14 |   else { printf(":("); fflush(stdout); }
      |                               ^~~~~~
a.cc:14:31: note: 'stdout' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:14:24: error: 'fflush' was not declared in this scope
   14 |   else { printf(":("); fflush(stdout); }
      |                        ^~~~~~
Language: C++

# include <climits>

class Solution {
public:

};

int main() {
  int lo = INT_MAX, hi = INT_MIN;
  int n;
  for (int i = 0; i < 5; ++i) {
    scanf("%3d", &n);
    if (n > hi) { hi = n; }
    if (n < lo) { lo = n; }
  }
  int k;
  scanf("%3d", &n);
  if (hi - lo <= n) { printf("Yay!"); fflush(stdout); }
  else { printf(":("); fflush(stdout); }
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'scanf' was not declared in this scope
   12 |     scanf("%3d", &n);
      |     ^~~~~
a.cc:17:3: error: 'scanf' was not declared in this scope
   17 |   scanf("%3d", &n);
      |   ^~~~~
a.cc:18:23: error: 'printf' was not declared in this scope
   18 |   if (hi - lo <= n) { printf("Yay!"); fflush(stdout); }
      |                       ^~~~~~
a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    1 | # include <climits>
  +++ |+#include <cstdio>
    2 | 
a.cc:18:46: error: 'stdout' was not declared in this scope
   18 |   if (hi - lo <= n) { printf("Yay!"); fflush(stdout); }
      |                                              ^~~~~~
a.cc:18:46: note: 'stdout' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:18:39: error: 'fflush' was not declared in this scope
   18 |   if (hi - lo <= n) { printf("Yay!"); fflush(stdout); }
      |                                       ^~~~~~
a.cc:19:10: error: 'printf' was not declared in this scope
   19 |   else { printf(":("); fflush(stdout); }
      |          ^~~~~~
a.cc:19:10: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:19:31: error: 'stdout' was not declared in this scope
   19 |   else { printf(":("); fflush(stdout); }
      |                               ^~~~~~
a.cc:19:31: note: 'stdout' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:19:24: error: 'fflush' was not declared in this scope
   19 |   else { printf(":("); fflush(stdout); }
      |                        ^~~~~~
Language: C++

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

int main(){
  int a,b,c,d,e;
  bool conn = true;
  cin >> a >> b >> c >> d >> e;
  if (e - d > k) conn = false;
  if (d - c > k) conn = false;
  if (c - b > k) conn = false;
  if (b - a > k) conn = false;

  if (conn){
    cout << "Yay!";
    
  }else{
    cout << ":(";
    
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'k' was not declared in this scope
   10 |   if (e - d > k) conn = false;
      |               ^
a.cc:11:15: error: 'k' was not declared in this scope
   11 |   if (d - c > k) conn = false;
      |               ^
a.cc:12:15: error: 'k' was not declared in this scope
   12 |   if (c - b > k) conn = false;
      |               ^
a.cc:13:15: error: 'k' was not declared in this scope
   13 |   if (b - a > k) conn = false;
      |               ^
Language: C++

#include <iostream>
using namespace std;
 
int main()
{
  int a, b, c, d, e, k;
  
  cin >> a >> b >> c >> d >> e >> k;
  
  if (e-a>k){
    printf(":(\n");
  }else {
    printf("Yay!\n");
  }
 

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

#include <iostream>

int main()
{
  int a, b, c, d, e, k;
  
  cin >> a >> b >> c >> d >> e >> k;
  
  if (e-a>k){
    printf(":(\n");
  }else {
    printf("Yay!\n");
  }

  return 0;
}

Compiler output:
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 >> a >> b >> c >> d >> e >> k;
      |   ^~~
      |   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
      |                  ^~~
Language: C++

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

ans = (e - a) > k

print(":(" if ans else "Yay!")


Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a = int(input())
      | ^
Language: C++


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

int main(){
  int a, b, c, d, e, k;
  cin >> a >> b >> c >> d >> e >> k;
  if(e-a =< k){
    cout << "Yay!" << endl;
  }else{
    cout << ":(" << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: expected primary-expression before '<' token
   10 |   if(e-a =< k){
      |           ^
Language: C++

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

int main(){
	vector<int> a(5);
  	sort(a.begin(),a.end());
  	bool flag = true;
  	for(int i=0;i<4;++i){
		if(a[i+1]-a[i]>k){
          	flag = false;
        }
    }
  	if(flag){
      	cout << "Yay!" << endl;
    }else{
      	cout << ":(" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:32: error: 'k' was not declared in this scope
    9 |                 if(a[i+1]-a[i]>k){
      |                                ^
Language: C++

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

int main(){
	vector<int> a(5);
  	sort(a.begin(),a.end());
  	bool flag = true;
  	for(int i=0;i<4;++i){
		if(a[i+1]-a[i]>k){
          	flag = false;
        }
    }
  	if(flag){
      	cout << "Yay!" << endl;
    else{
      	cout << ":(" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:32: error: 'k' was not declared in this scope
    9 |                 if(a[i+1]-a[i]>k){
      |                                ^
a.cc:15:5: error: expected '}' before 'else'
   15 |     else{
      |     ^~~~
a.cc:13:17: note: to match this '{'
   13 |         if(flag){
      |                 ^
Language: Java

import java.util.*;

public class test {
    public static void main(String[] args) {
        Scanner reader = new Scanner(System.in);
        int[] array = new int[6];
        for (int i = 0; i < array.length; i++) {
            array[i] = reader.nextInt();
        }
        if (array[4] - array[0] <= array[5])
            System.out.println("Yay!");
        else {
            System.out.println(":(");
        }
    }
}

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

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

int main(){
  int k;
  vector<int> a(5);
  REP(i,5){
    cin >> a[i];
  }
  cin >> k;
  sort(a.begin(),a.end());
  REP(i,4){
    if(a[i+1]-a[i]>k){
		cout << ":(" << endl;
      	return 0;
    }
  }
  cout << "Yay!" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   REP(i,5){
      |       ^
a.cc:7:3: error: 'REP' was not declared in this scope
    7 |   REP(i,5){
      |   ^~~
Language: C++

#include<iostream> 
using namespace std;

int main(){
  int k;
  vector<int> a(5);
  REP(i,5){
    cin >> a[i];
  }
  cin >> k;
  sort(a.begin(),a.end());
  REP(i,4){
    if(a[i+1]-a[i]>k){
		cout << ":(" << endl;
      	return 0;
    }
  }
  cout << "Yay!" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<int> a(5);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   vector<int> a(5);
      |          ^~~
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   REP(i,5){
      |       ^
a.cc:7:3: error: 'REP' was not declared in this scope
    7 |   REP(i,5){
      |   ^~~
a.cc:11:8: error: 'a' was not declared in this scope
   11 |   sort(a.begin(),a.end());
      |        ^
a.cc:11:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |   sort(a.begin(),a.end());
      |   ^~~~
      |   short
Language: C++

#include <iostream>
using namespace std;

int main(){
	int a[6];
	a[0]=10;
	cin >> a[1];
	cin >> a[2];
	cin >> a[3];
	cin >> a[4];
	cin >> a[5];
	int c=0;
	int b[5];
	for(int i=1;i<5;i++){
		if(a[c]%10!=0){
			if(a[c]%10>a[i]%10){
				a[c]=(a/10)*10+10;
				c=i;
				
			}
		}
	}
	cout << a[1]+a[2]+a[3]+a[4]+a[5];
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:40: error: invalid operands of types 'int [6]' and 'int' to binary 'operator/'
   17 |                                 a[c]=(a/10)*10+10;
      |                                       ~^~~
      |                                       | |
      |                                       | int
      |                                       int [6]
Language: C++

#include "bits/stdc++.h"
#define ed cout<<"\n";
#define speed ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);

using namespace std;

int main() {
	speed;
	int a, b, k;
	cin >> a >> b >> b >> b >> b >> k;
	if (b - a >= k)cout<<":(";ed;
	else cout<<"Yay!";ed;
	ed;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'else' without a previous 'if'
   12 |         else cout<<"Yay!";ed;
      |         ^~~~
Language: C++

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

int main(){
  int a,b,c,d,e,k;
  cin>>a>>b>>c>>d>>e>>k;
  if(e-a<=k){
    cout<<"yay"<<endl;
  }
  else
    cout<<":("<<endl;
}

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

#include <iostream>

int main() {
  	int a, b, c, d, e, dis;
	std::cin >> v[0] >> v[1] >> v[2] >> v[3] >> v[4] >> dis;
    for (int i = 0; i < 5; ++i) {
    	for (int j = i + 1; j < 5; ++j) {
        	if std::abs(v[i] - v[j]) > dis) {
            	std::cout << ":(" << std::endl;
                return 0;
            }
        } 
    }
  
  	std::cout << "Yay!" << std:endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:21: error: 'v' was not declared in this scope
    5 |         std::cin >> v[0] >> v[1] >> v[2] >> v[3] >> v[4] >> dis;
      |                     ^
a.cc:8:20: error: expected '(' before 'std'
    8 |                 if std::abs(v[i] - v[j]) > dis) {
      |                    ^~~
      |                    (
a.cc:15:35: error: found ':' in nested-name-specifier, expected '::'
   15 |         std::cout << "Yay!" << std:endl;
      |                                   ^
      |                                   ::
Language: C++

*a, = map(int, open(0).read().split())
k = a.pop()
#print(a,k)
c = 'Yay!'
for i in a:
    for j in a:
        if j-i > k:
            c = ''
            break
print(c)
    
        

Compiler output:
a.cc:3:2: error: invalid preprocessing directive #print
    3 | #print(a,k)
      |  ^~~~~
a.cc:4:5: warning: multi-character character constant [-Wmultichar]
    4 | c = 'Yay!'
      |     ^~~~~~
a.cc:8:17: error: empty character constant
    8 |             c = ''
      |                 ^~
a.cc:1:3: error: expected constructor, destructor, or type conversion before ',' token
    1 | *a, = map(int, open(0).read().split())
      |   ^
a.cc:1:5: error: expected unqualified-id before '=' token
    1 | *a, = map(int, open(0).read().split())
      |     ^
Language: C++

#include<iostream>
using namespace std;
int a[7];
int main(){
  a[0]=0;
  int n,i;
  for(i=1;i<=5;i++)
  {
    cin>>a[i];
  }
  cin>>n;
  if(a[5]-a[1]>n)
  {
    cout<<":(";
  }
  else
  {
    cout<<"Yay!";
  }
  return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:11: error: expected ';' before '}' token
   20 |   return 0
      |           ^
      |           ;
   21 | }
      | ~
Language: Java

import java.ulti.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int current = sc.nextInt();
    int mini = current,maxi = current,distance = 0;
    do{
      int res = Math.max(Math.abs(current - mini), Math.abs(current - maxi));
      if(res > distance){distance = res;}
      current = sc.nextInt();
    }while(sc.next()!=null);
    if(distance > current){System.out.println("Yay!");}
    else{System.out.println("Yay!");}
  }
}

Compiler output:
Main.java:1: error: package java.ulti does not exist
import java.ulti.*;
^
Main.java:4: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
3 errors
Language: C++

#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <regex>
#include <math.h>
#include <bits/stdc++.h>
#define ull unsigned long long
#define REP(i,n) for(int i = 0; i < n; i++)
#define FOR(i,j,n) for(int i = j; i < n; i++)
#define RFOR(i,j,n) for(int i = j-1; i >= n; i--)
#define PREC(n) fixed << setprecision(n)
#define print_array(v) REP(__k, v.size()) { cout << v[__k]; if(__k != v.size()-1) cout << " "; else cout << endl; }
using namespace std;

int main() {
	int a,b,c,d.e,k;
	cin >> a >> b >> c >> d >> e >> k;
	if(e-a<k){
		cout << "Yay!" << endl;
	}else{
		cout << ":(" << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:60:20: error: expected initializer before '.' token
   60 |         int a,b,c,d.e,k;
      |                    ^
a.cc:61:31: error: 'd' was not declared in this scope
   61 |         cin >> a >> b >> c >> d >> e >> k;
      |                               ^
a.cc:61:36: error: 'e' was not declared in this scope
   61 |         cin >> a >> b >> c >> d >> e >> k;
      |                                    ^
a.cc:61:41: error: 'k' was not declared in this scope
   61 |         cin >> a >> b >> c >> d >> e >> k;
      |                                         ^
Language: C

#include <stdio.h>
int main(void)
{
        int a[4],b,j,k,i;
        for(i=0;i<5;i++){
                scanf("%d",&a[i]);}
        scanf("%d",&k);

        if(0<=a[0]&&a[0]<a[1]&&a[1]<a[2]&&a[2]<a[3]&&a[3]<a[4]&&a[4]<=123){
                for(i=0;i<4;i++){
                        for(j=i+1;j<5;j++){
                                b = a[j] - a[i];
                                if(b>k)
                                        break;
                        }
                        break;
                }
        else
                printf("正しい値を入力してください\n");
        }
        if(b>k)
        printf(":(\n");
        else
        printf("Yay!\n");
        return 0;
}


Compiler output:
main.c: In function 'main':
main.c:18:9: error: expected '}' before 'else'
   18 |         else
      |         ^~~~
main.c: At top level:
main.c:21:9: error: expected identifier or '(' before 'if'
   21 |         if(b>k)
      |         ^~
main.c:23:9: error: expected identifier or '(' before 'else'
   23 |         else
      |         ^~~~
main.c:25:9: error: expected identifier or '(' before 'return'
   25 |         return 0;
      |         ^~~~~~
main.c:26:1: error: expected identifier or '(' before '}' token
   26 | }
      | ^
Language: C++

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

int main() {
  int A, B;
  cin >> a >> b >> c >> d >> e >> k;
  if(b - a <= k && c - b <= k && d - c <= k && e - d <= k){
    cout << "Yay!" << endl;
  }
  else{
    cout << ":(" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'a' was not declared in this scope
    6 |   cin >> a >> b >> c >> d >> e >> k;
      |          ^
a.cc:6:15: error: 'b' was not declared in this scope
    6 |   cin >> a >> b >> c >> d >> e >> k;
      |               ^
a.cc:6:20: error: 'c' was not declared in this scope
    6 |   cin >> a >> b >> c >> d >> e >> k;
      |                    ^
a.cc:6:25: error: 'd' was not declared in this scope
    6 |   cin >> a >> b >> c >> d >> e >> k;
      |                         ^
a.cc:6:30: error: 'e' was not declared in this scope
    6 |   cin >> a >> b >> c >> d >> e >> k;
      |                              ^
a.cc:6:35: error: 'k' was not declared in this scope
    6 |   cin >> a >> b >> c >> d >> e >> k;
      |                                   ^
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int [] A =new int[5];
    int s,o,k,flag;
    
    for(s=0;s<5;s++){
      A[s]=sc.nextInt();
      flag=0;
      for(s=0;s<4;s++){
        for(o=s+1;o<5;o++){
          if(k<sum(A[s],A[o])){
            flag=1;
            break;
          }
        }
        if(flag==1){
          break;
       }
      }
      if(flag==0){
        System.out.println("Yay!");
      }else{
        System.out.println(":(");
      }
    }
    public static int sum(a,b){
      if(a>b){
        return a-b;
      }else{
        return b-a;
      }
    }
      

Compiler output:
Main.java:28: error: illegal start of expression
    public static int sum(a,b){
    ^
Main.java:28: error: <identifier> expected
    public static int sum(a,b){
                           ^
Main.java:28: error: <identifier> expected
    public static int sum(a,b){
                             ^
Main.java:34: error: reached end of file while parsing
    }
     ^
4 errors
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {

    // int a, b, c, d, e;
    vector<int> A;
    int k;

    for (int i = 0; i < 5; ++i) {
        cin >> A.at(i);
        // cin >> a >> b >> c >> d >> e >> k;
    }
    cin >> k;
    int diff;
    bool can = false;
    for (int i = 0; i < 5; ++i) {
        for (int j = 0; j < 5; ++j) {
            for (int k = 0; k < 5; ++k) {
                for (int l = 0; l < 5; ++l) {
                    for (int m = 0; m < 5; ++m) {
                        j = i + 1;
                        k = j + 1;
                        l = k + 1;
                        m = l + 1;
                        diff =abs(A.(i) - A.(m));

                        if (diff <= k){
                        can = true;
                            break;
                        }
                    }break;
                }break;
            }break;
        }break;
    }
    string s;
    if (can){
        s = "Yay!";
    }
    if (!can){
        s =":(";

    }


    cout << s << endl;
    




}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:37: error: expected unqualified-id before '(' token
   27 |                         diff =abs(A.(i) - A.(m));
      |                                     ^
a.cc:27:45: error: expected unqualified-id before '(' token
   27 |                         diff =abs(A.(i) - A.(m));
      |                                             ^
Language: C++

include<cstdio>

int main(){
        int a;
        int e;
        int k;
        scanf("%d",&a);
        for ( int i = 0; i< 4; i++ ){
                scanf("%d",&e);
        }
        scanf("%d",&k);
        if( e-a>k){
                printf(":(");
        } else {
                printf("Yay!");
        }

        return 0;
}


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

#include <stdio.h>
int main(){
	int a[5],k;
	scanf("%d%d%d%d%d%d",&a[0],&a[1],&a[2],&a[3],&a[4],&k);
	int min = a[0];
	int max = a[0];
	for(int i=0;i<5;i++){
		if(max<=a[i]){
			max=a[i];
		}
		if(min>=a[i]){
			min=a[i];
		}
	}
	if(max-min>k){
		printf(":(")
	}
	else{
		printf("Yay!")
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:29: error: expected ';' before '}' token
   16 |                 printf(":(")
      |                             ^
      |                             ;
   17 |         }
      |         ~                    
main.c:19:31: error: expected ';' before '}' token
   19 |                 printf("Yay!")
      |                               ^
      |                               ;
   20 |         }
      |         ~
Language: C++

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

int main() {
  int a, b, c, d, e, k;
  string answer="";
  cin >> a >> b >> c >> d >> e >> k;
  if(e-a>k){
	answer=":("
  }else{
    answer="Yay!"
  }
  cout << answer << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: expected ';' before '}' token
    9 |         answer=":("
      |                    ^
      |                    ;
   10 |   }else{
      |   ~                 
a.cc:11:18: error: expected ';' before '}' token
   11 |     answer="Yay!"
      |                  ^
      |                  ;
   12 |   }
      |   ~
Language: Java


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

public class A {

	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();
		int e = sc.nextInt();
		int k = sc.nextInt();
		
		boolean flag = false;
		if(k < Math.abs(a-b) ) flag = true;
		if(k < Math.abs(a-c) ) flag = true;
		if(k < Math.abs(a-d) ) flag = true;
		if(k < Math.abs(a-e) ) flag = true;
		if(k < Math.abs(b-c) ) flag = true;
		if(k < Math.abs(b-d) ) flag = true;
		if(k < Math.abs(b-e) ) flag = true;
		if(k < Math.abs(c-d) ) flag = true;
		if(k < Math.abs(c-e) ) flag = true;
		if(k < Math.abs(d-e) ) flag = true;
		
		if(flag==false) System.out.println("Yay!");
		else System.out.println(":(");
	}
}


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

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

int main(){
	int a,b,c,d,e,k;
	cin >>a >>b>>c>>d>>e>>k;
	cout << (e-a<=k ? "Yay!":":(")
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:39: error: expected ';' before '}' token
    9 |         cout << (e-a<=k ? "Yay!":":(")
      |                                       ^
      |                                       ;
   10 | }
      | ~
Language: C++

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

int main(){
	int a,b,c,d,e,k;
	cin >>a >>b>>c>>d>>e>>k;
	cout << (e-a<= ? "Yay!":":(")
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: expected primary-expression before '?' token
    9 |         cout << (e-a<= ? "Yay!":":(")
      |                        ^
Language: C++

def Antennas(a,b,c,d,e,k):
    if (b-a)>k or (c-a)>k or (d-a)>k or (e-a)>k:
        return ':('
    else:
        return 'Yay!'

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
print(Antennas(a,b,c,d,e,k))

Compiler output:
a.cc:3:16: warning: multi-character character constant [-Wmultichar]
    3 |         return ':('
      |                ^~~~
a.cc:5:16: warning: multi-character character constant [-Wmultichar]
    5 |         return 'Yay!'
      |                ^~~~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def Antennas(a,b,c,d,e,k):
      | ^~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<list>
#include<cmath>
#include<algorithm>
#include<cstdio>
#include<set>
#include<map>
#include<queue>
#include<cstring>
#include<sstream>
using namespace std;

typedef long long ll;

int main() {
  int a[5]; int k;
  for ( int i = 0; i < 5; i++ ) {
    cin >> a[i];
  }
  cin >> k;
  for ( int i = 0; i < 5; i++ ) {
    for ( int j = i+1; j < 5; j++ ) {
      if ( abs(a[i]-a[j]) > k ) {
	cout << ":(" << endl;
	return 0;
      }
    }
  }
  cout << "Yay!" << endl;

  return 0;
}
#include<iostream>
#include<string>
#include<vector>
#include<list>
#include<cmath>
#include<algorithm>
#include<cstdio>
#include<set>
#include<map>
#include<queue>
#include<cstring>
#include<sstream>
using namespace std;

typedef long long ll;

int main() {
  int a[5]; int k;
  for ( int i = 0; i < 5; i++ ) {
    cin >> a[i];
  }
  cin >> k;
  for ( int i = 0; i < 5; i++ ) {
    for ( int j = i+1; j < 5; j++ ) {
      if ( abs(a[i]-a[j]) > k ) {
	cout << ":(" << endl;
	return 0;
      }
    }
  }
  cout << "Yay!" << endl;

  return 0;
}


Compiler output:
a.cc:51:5: error: redefinition of 'int main()'
   51 | int main() {
      |     ^~~~
a.cc:17:5: note: 'int main()' previously defined here
   17 | int main() {
      |     ^~~~
Language: C++

#include <iostream>

int main(){
  int a, b, c, d, e, k;
  cin >> a, b, c, d, e, k;
  cout >> a, b, c, d, e, k;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> a, b, c, d, e, k;
      |   ^~~
      |   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:6:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   cout >> a, b, c, d, e, k;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
int main(){
  int a,b,c,d,e;
  cin>>a>>b>>c>>d>>e;
  int k;
  cin>>k;
  if(abs(a-b)>k)
    cout<<":("<<endl;
  else if(abs(a-c)>k)
    cout<<":("<<endl;
  else if(abs(a-d)>k)
    cout<<":("<<endl;
  else if(abs(a-e)>k)
    cout<<":("<<endl;
  else if(abs(b-c)>k)
    cout<<":("<<endl;
  else if(abs(b-d)>k)
    cout<<":("<<endl;
  else if(abs(b-e)>k)
    cout<<":("<<endl;
  else if(abs(c-d)>k)
    cout<<":("<<endl;
  else if(abs(c-e)>k)
    cout<<":("<<endl;
  else if(abs(d-e)>k)
    cout<<":("<<Endl;
  else
    cout<<"Yay!"<<endl;
}

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

#include<iostream>
#include<cmath>
using namespace std;
int main(){
  int a,b,c,d,e;
  cin>>a>>b>>c>>d>>e;
  int k;
  cin>>k
  if(abs(a-b)>k)
    cout<<":("<<endl;
  else if(abs(a-c)>k)
    cout<<":("<<endl;
  else if(abs(a-d)>k)
    cout<<":("<<endl;
  else if(abs(a-e)>k)
    cout<<":("<<endl;
  else if(abs(b-c)>k)
    cout<<":("<<endl;
  else if(abs(b-d)>k)
    cout<<":("<<endl;
  else if(abs(b-e)>k)
    cout<<":("<<endl;
  else if(abs(c-d)>k)
    cout<<":("<<endl;
  else if(abs(c-e)>k)
    cout<<":("<<endl;
  else if(abs(d-e)>k)
    cout<<":("<<Endl;
  else
    cout<<"Yay!"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected ';' before 'if'
    8 |   cin>>k
      |         ^
      |         ;
    9 |   if(abs(a-b)>k)
      |   ~~     
a.cc:11:3: error: 'else' without a previous 'if'
   11 |   else if(abs(a-c)>k)
      |   ^~~~
a.cc:28:17: error: 'Endl' was not declared in this scope
   28 |     cout<<":("<<Endl;
      |                 ^~~~
Language: C++

#include(iostream)
using namespace std;
 
int main(){
  int a,b,c,d,e,k;
  cin >> a >> b >> c >> d >> e >> k;
if(e-a > k){
  cout <<"Yey!"<< endl;}
  else {
    cout<<":("<< endl;}
}

Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include(iostream)
      |         ^
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> a >> b >> c >> d >> e >> k;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include(iostream)
a.cc:8:3: error: 'cout' was not declared in this scope
    8 |   cout <<"Yey!"<< endl;}
      |   ^~~~
a.cc:8:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:19: error: 'endl' was not declared in this scope
    8 |   cout <<"Yey!"<< endl;}
      |                   ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include(iostream)
a.cc:10:5: error: 'cout' was not declared in this scope
   10 |     cout<<":("<< endl;}
      |     ^~~~
a.cc:10:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:18: error: 'endl' was not declared in this scope
   10 |     cout<<":("<< endl;}
      |                  ^~~~
a.cc:10:18: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <iostream>

int main(){
  int k,a,e;
  std::cin>>a>>*nullptr>>*nullptr>>*nullptr>>e>>k;
  if(e-a<=k){
    std::cout<<"Yay!";
  }else{
    std::cout<<":(";
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: invalid type argument of unary '*' (have 'std::nullptr_t')
    5 |   std::cin>>a>>*nullptr>>*nullptr>>*nullptr>>e>>k;
      |                ^~~~~~~~
a.cc:5:26: error: invalid type argument of unary '*' (have 'std::nullptr_t')
    5 |   std::cin>>a>>*nullptr>>*nullptr>>*nullptr>>e>>k;
      |                          ^~~~~~~~
a.cc:5:36: error: invalid type argument of unary '*' (have 'std::nullptr_t')
    5 |   std::cin>>a>>*nullptr>>*nullptr>>*nullptr>>e>>k;
      |                                    ^~~~~~~~
Language: Java


public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		String str;
		String str1;
		String str2;
		String str3;
		String str4;
		String str5;
		
		int a,b,c,d,e,k;
		
		System.out.println("aの値を入力してください");
		str = scanner.next();
		System.out.println("bの値を入力してください");
		str1 = scanner.next();
		System.out.println("cの値を入力してください");
		str2 = scanner.next();
		System.out.println("dの値を入力してください");
		str3 = scanner.next();
		System.out.println("eの値を入力してください");
		str4 = scanner.next();
		System.out.println("kの値を入力してください");
		str5 = scanner.next();
		
		
		a = Integer.parseInt(str);
		b = Integer.parseInt(str1);
		c = Integer.parseInt(str2);
		d = Integer.parseInt(str3);
		e = Integer.parseInt(str4);
		k = Integer.parseInt(str5);
		
		if (e-a  <= k) {
			System.out.println("Yay!");
		}else {
			System.out.println(":(");
		}
		
		
		
		
 
	}

}


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

import java.util.ArrayList;
import java.util.Scanner;

public class FiveAntennas{
    public static void main(String[] args){
        Scanner s = new Scanner(System.in);
        int[] antennas = new int[5];
        int k = 0;
        for(int i = 0; i < 6 && s.hasNextLine(); i++){
            if(i < 5){
                antennas[i] = Integer.parseInt(s.nextLine());
            }else if (i == 5){
                k = Integer.parseInt(s.nextLine());
            }else{
                System.exit(-1);
            }
        }

        if (available(antennas, k)){
            System.out.print("Yay!");
        }else{
            System.out.print(":(");
        }
    }

    public static boolean available(int[] antennas ,int k){
        for(int i = 0; i < antennas.length; i++){
            for(int j = i + 1; j < antennas.length; j++){
                int distance = Math.abs(antennas[i] - antennas[j]);
                if(distance > k){
                    return false;
                }
            }
        }
        return true;
    }
}


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

#include<stdio.h>

int maxmin(int max, int min)
{
	int n;
	scanf_s("%d", &n, sizeof(int));
	max = n > max ? n : max;
	min = n < min ? n : min;
}

int main()
{
	int n;
	int max, min;
	scanf_s("%d", &n, sizeof(int));
	max = n; min = n;
	maxmin(max, min);
	maxmin(max, min);
	maxmin(max, min);
	maxmin(max, min);
	scanf_s("%d", &n, sizeof(int));
	if (n > max - min)
	{
		printf("yeh!");
		scanf_s("%d", &n, sizeof(int));
		return 0;
	}
	printf("nope");
	scanf_s("%d", &n, sizeof(int));
}

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

#include <iostream>

using namespace std;

int main() {
	int p[5], k;
	for(int i=0;i<5;i++)
		cin >> p[i];
	cin >> k;
	int f = 0;
	for (int i = 0; i < 4; i++)
		if (p[i + 1] - p[i] > k) f++;

	if (f > 0)cout << ":(";
	else cout << "Yay!";


Compiler output:
a.cc: In function 'int main()':
a.cc:15:29: error: expected '}' at end of input
   15 |         else cout << "Yay!";
      |                             ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

#import<iostream>
int a,d,e;main(){std::cin>>a>>d>>d>>d>>d>>e;puts(d-a>e?":(":"Yay!"));}


Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<iostream>
      |  ^~~~~~
a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | int a,d,e;main(){std::cin>>a>>d>>d>>d>>d>>e;puts(d-a>e?":(":"Yay!"));}
      |           ^~~~
a.cc: In function 'int main()':
a.cc:2:68: error: expected ';' before ')' token
    2 | int a,d,e;main(){std::cin>>a>>d>>d>>d>>d>>e;puts(d-a>e?":(":"Yay!"));}
      |                                                                    ^
      |                                                                    ;
Language: C++

#import<iostream>
int a,d,e;
main(){cin>>a>>d>>d>>d>>d>>e;cout<<(d-a>e?":(":"Yay!")<<endl;}


Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<iostream>
      |  ^~~~~~
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){cin>>a>>d>>d>>d>>d>>e;cout<<(d-a>e?":(":"Yay!")<<endl;}
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:8: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    3 | main(){cin>>a>>d>>d>>d>>d>>e;cout<<(d-a>e?":(":"Yay!")<<endl;}
      |        ^~~
      |        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:3:30: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    3 | main(){cin>>a>>d>>d>>d>>d>>e;cout<<(d-a>e?":(":"Yay!")<<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:3:57: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    3 | main(){cin>>a>>d>>d>>d>>d>>e;cout<<(d-a>e?":(":"Yay!")<<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 <bits/stdc++.h>
using namespace std;

int main(){
  int a,b,c,d,e,k;
  cin>>a>>b>>C>>d>>e>>k;
  
  if(b-a<=k||c-b<=k||d-c<=k||e-d<=k){
    cout<<'Yay!'<<endl;
  }
  else{
    cout<<':('<<endl;
  }
}

Compiler output:
a.cc:9:11: warning: multi-character character constant [-Wmultichar]
    9 |     cout<<'Yay!'<<endl;
      |           ^~~~~~
a.cc:12:11: warning: multi-character character constant [-Wmultichar]
   12 |     cout<<':('<<endl;
      |           ^~~~
a.cc: In function 'int main()':
a.cc:6:14: error: 'C' was not declared in this scope
    6 |   cin>>a>>b>>C>>d>>e>>k;
      |              ^
Language: C++

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int max=0;
        int min=100000;
        for(int i=0;i<5;i++) { 
            int x = sc.nextInt(); 
            max=Math.max(max, x);
            min=Math.min(min, x);
        }
        int k=sc.nextInt();
        if(max-min>k){
        System.out.println(":)");
        }
        else{
            System.out.println("Yay!");
        }
    }  
}


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:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: Java

import java.util.Scanner;
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();
  int e = sc.nextInt();
  int k = sc.nextInt();
  System.out.println(e-a <= k ? "Yay!":":(");
}}

Compiler output:
Main.java:7: error: ';' expected
  int c - sc.nextInt();
       ^
1 error
Language: C

#include<stdio.h>
int main(void)
{
   int a,b,c,d,e,k;
   scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);

   if(e-a=<k){
                        printf("Yay!\n");}
   else printf(":(\n");                                              

   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:11: error: expected expression before '<' token
    7 |    if(e-a=<k){
      |           ^
Language: C

#include<stdio.h>
int main(void)
{
   int a,b,c,d,e,k;
   scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);

   if(e-a=<k){                                                       
                        printf("Yay!\n");}
   else {
             printf(":(\n");}

   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:11: error: expected expression before '<' token
    7 |    if(e-a=<k){
      |           ^
Language: C

#include<stdio.h>
int main(void)
{
   int a,b,c,d,e,k;
   scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);

   if(k>=e-a){                                                       
                        printf("Yay!\n");}
   else printf(":(\n");

   return 0;
}
~                                                                    
~                      

Compiler output:
main.c:13:1: error: expected identifier or '(' before '~' token
   13 | ~
      | ^
Language: C

#include<stdio.h>
int main(void){
int a,b,c,d,e,k;
scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&k);
if(e-a<=k)
printf("Yay!");
else
printf(":(");
return 0;
;

Compiler output:
main.c: In function 'main':
main.c:10:1: error: expected declaration or statement at end of input
   10 | ;
      | ^
Language: C

#include<stdio.h>
int main(void){
int a,b,c,d,e,k;
scanf("%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&k);
if(e-a<=k)
printf("Yay!");
else
printf(":(");
return 0;
;

Compiler output:
main.c: In function 'main':
main.c:10:1: error: expected declaration or statement at end of input
   10 | ;
      | ^
Language: C++

#include <stdio.h>
int main(void)
{
  int a,b,c,d,e,k,x,y;
  scanf("%d",&a);
  scanf("%d",&b);
  scanf("%d",&c);
  scanf("%d",&d);
  scanf("%d",&k);
  
  y = a+b+c+d+e;
  x = 5*k
  
  if(y<=x)
    printf("Yay!");
  else
    printf(":(");
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: expected ';' before 'if'
   12 |   x = 5*k
      |          ^
      |          ;
   13 | 
   14 |   if(y<=x)
      |   ~~      
a.cc:16:3: error: 'else' without a previous 'if'
   16 |   else
      |   ^~~~
Language: C++

https://my.vmware.com/jp/web/vmware/free#desktop_end_user_computing/vmware_workstation_player/15_0

Compiler output:
a.cc:1:1: error: 'https' does not name a type
    1 | https://my.vmware.com/jp/web/vmware/free#desktop_end_user_computing/vmware_workstation_player/15_0
      | ^~~~~
Language: C

#include <stdio.h>

int main(void){
  int a,b,c,d,e,k;
  scanf_s("%d\n",&a);
  scanf_s("%d\n",&b);
  scanf_s("%d\n",&c);
  scanf_s("%d\n",&d);
  scanf_s("%d\n",&e);
  scanf_s("%d\n",&k);
  
  if (e- a >k)
      printf(":(\n");
  else
    printf("Yay!\n");
  
  return 0;
}


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

#include <stdio.h>

int main(void){
  int a,b,c,d,e,k;
  scanf_s("%d\n,&a);
  scanf_s("%d\n,&b);
  scanf_s("%d\n,&c);
  scanf_s("%d\n,&d);
  scanf_s("%d\n,&e);
  scanf_s("%d\n,&k);
  
  if (e- a >k)
      printf(":(\n");
  else
    printf("Yay!\n");
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:3: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 |   scanf_s("%d\n,&a);
      |   ^~~~~~~
      |   scanf
main.c:5:11: warning: missing terminating " character
    5 |   scanf_s("%d\n,&a);
      |           ^
main.c:5:11: error: missing terminating " character
    5 |   scanf_s("%d\n,&a);
      |           ^~~~~~~~~~
main.c:6:11: warning: missing terminating " character
    6 |   scanf_s("%d\n,&b);
      |           ^
main.c:6:11: error: missing terminating " character
    6 |   scanf_s("%d\n,&b);
      |           ^~~~~~~~~~
main.c:7:11: warning: missing terminating " character
    7 |   scanf_s("%d\n,&c);
      |           ^
main.c:7:11: error: missing terminating " character
    7 |   scanf_s("%d\n,&c);
      |           ^~~~~~~~~~
main.c:8:11: warning: missing terminating " character
    8 |   scanf_s("%d\n,&d);
      |           ^
main.c:8:11: error: missing terminating " character
    8 |   scanf_s("%d\n,&d);
      |           ^~~~~~~~~~
main.c:9:11: warning: missing terminating " character
    9 |   scanf_s("%d\n,&e);
      |           ^
main.c:9:11: error: missing terminating " character
    9 |   scanf_s("%d\n,&e);
      |           ^~~~~~~~~~
main.c:10:11: warning: missing terminating " character
   10 |   scanf_s("%d\n,&k);
      |           ^
main.c:10:11: error: missing terminating " character
   10 |   scanf_s("%d\n,&k);
      |           ^~~~~~~~~~
main.c:12:3: error: expected expression before 'if'
   12 |   if (e- a >k)
      |   ^~
main.c:17:12: error: expected ')' before '}' token
   17 |   return 0;
      |            ^
      |            )
   18 | }
      | ~           
main.c:9:10: note: to match this '('
    9 |   scanf_s("%d\n,&e);
      |          ^
main.c:17:12: error: expected ')' before '}' token
   17 |   return 0;
      |            ^
      |            )
   18 | }
      | ~           
main.c:8:10: note: to match this '('
    8 |   scanf_s("%d\n,&d);
      |          ^
main.c:17:12: error: expected ')' before '}' token
   17 |   return 0;
      |            ^
      |            )
   18 | }
      | ~           
main.c:7:10: note: to match this '('
    7 |   scanf_s("%d\n,&c);
      |          ^
main.c:17:12: error: expected ')' before '}' token
   17 |   return 0;
      |            ^
      |            )
   18 | }
      | ~           
main.c:6:10: note: to match this '('
    6 |   scanf_s("%d\n,&b);
      |          ^
main.c:17:12: error: expected ')' before '}' token
   17 |   return 0;
      |            ^
      |            )
   18 | }
      | ~           
main.c:5:10: note: to match this '('
    5 |   scanf_s("%d\n,&a);
      |          ^
main.c:17:12: error: expected ';' before '}' token
   17 |   return 0;
      |            ^
      |            ;
   18 | }
      | ~
Language: Java

import java.util.Scanner;

public class A {
    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int min = 124;
        int max = -1;

        for (int i = 0; i < 5; i++) {
            int n = in.nextInt();
            if (n < min)
                min = n;
            if(n > max)
                max = n;
        }
        int k = in.nextInt();
        System.out.println((max - min <= k) ? "Yay!" : ":(");
        in.close();
    }
}

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++

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/* 
 * File:   main.cpp
 * Author: takat
 *
 * Created on 2019/04/11, 18:59
 */

#include <cstdlib>

using namespace std;

/*
 * 
 */
int main(int argc, char** argv) {
    int a,b,c,d,e;
    int k;
    cin<<a<<b<<c<<d<<;
    if(0<=e-a<=k){
        cout(":(");
    } else{
        cout("Yay");
        
    }
    

    return 0;
}



Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:24:5: error: 'cin' was not declared in this scope
   24 |     cin<<a<<b<<c<<d<<;
      |     ^~~
a.cc:15:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
   14 | #include <cstdlib>
  +++ |+#include <iostream>
   15 | 
a.cc:24:22: error: expected primary-expression before ';' token
   24 |     cin<<a<<b<<c<<d<<;
      |                      ^
a.cc:26:9: error: 'cout' was not declared in this scope
   26 |         cout(":(");
      |         ^~~~
a.cc:26:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:28:9: error: 'cout' was not declared in this scope
   28 |         cout("Yay");
      |         ^~~~
a.cc:28:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'