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

#include <iostream>

int main()
{
    int a[10];
    for(int i = 0;i < 6;i++)
    {
        cin >> a[i];
    }
    for(int i = 0;i < 5;i++)
    {
        if(a[i + 1] - a[i] > a[6])
        {
            cout << ":(" << endl;
            return 0;
        }
    }

    cout << "Yay!" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         cin >> a[i];
      |         ^~~
      |         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:14:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |             cout << ":(" << 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:14:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |             cout << ":(" << 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)
      |     ^~~~
a.cc:19:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |     cout << "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:19:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   19 |     cout << "Yay!" << endl;
      |                       ^~~~
      |                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: expected ';' before 'std'
    7 |     std::cout << ":(" std::endl;
      |                      ^~~~
      |                      ;
a.cc:9:24: error: expected ';' before 'std'
    9 |     std::cout << "Yay!" std::endl;
      |                        ^~~~
      |                        ;
Language: C++

#include<stdio.h>

int main(void) {
	int max=0, min=123,k, t=0,y=-1,i;
	for (i = 0; i < 5; i++) {

		do {
			scanf_s("%d", &t);
		} while ((t<=y) || (123 < t));
		y = t;
		if (t >= max) {
			max=t;
		}

		if (t <= min) {
			min=t;
		}
	}
	do {
		scanf_s("%d", &k);
	} while ((k < 0) || (123 < k));

	if (max - min <= k) {
		printf("Yay!");
	}
	else printf(":(");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    8 |                         scanf_s("%d", &t);
      |                         ^~~~~~~
      |                         scanf
a.cc:20:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   20 |                 scanf_s("%d", &k);
      |                 ^~~~~~~
      |                 scanf
Language: C++

/*---------------------------------

 @Author:   Dicer
 @DateTime: 2019-05-12 15:25:25

---------------------------------*/

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
inline ll qpow(ll a,ll b,ll mod){ll res=1;while(b){if(b&1)res = (res*a)%mod;a=(a*a)%mod;b>>=1;}return res;}
const double eps = 1e-8;
const int INF = 0x3f3f3f3f;
const int mod = 1e9+7;
const int MAXN = 2e5 + 7;

int main(int argc, char const *argv[])
{
	int a[10], k;
	for(int i = 1; i <= 5; ++i)	cin >> a[i];
	cin >> k;
	bool flag = 1;
	for(int i = 1; i <= 5; ++i){
		for(int j = 1; j <= 5; ++j){
			if(abs(a[i]-a[j]) > k)	flag = 0;
		}
	}		
	if(flag)	cout << "Yay!" << endl;
	else	cocut << ":(" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:30:17: error: 'cocut' was not declared in this scope
   30 |         else    cocut << ":(" << endl;
      |                 ^~~~~
Language: C++

#include <iostream>
using namespace std;

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

	int d1 = b-a;
	int d2 = c-b;
	int d3 = d-c;
	int d4 = e-c;

	if(d1>k||d2>k||d3>k||d4>k){
	cout << ":(" << endl;
	}else if{
	cout << "Yay!" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: expected '(' before '{' token
   15 |         }else if{
      |                 ^
      |                 (
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];
        for(int i=0;i<5;i++){
            a[i]=sc.nextInt();
        }
        int k = sc.nextInt();
        int maxDist =0;
        for (i=0;i<4;i++){
            if(maxDist<a[i+1]-a[i]) {
                maxDist = a[i + 1] - a[i];
            }
        }
        if(maxDist>k){
            System.out.println(":(");
        }else{
            System.out.println("Yay!");
        }
    }
}


Compiler output:
Main.java:13: error: cannot find symbol
        for (i=0;i<4;i++){
             ^
  symbol:   variable i
  location: class Main
Main.java:13: error: cannot find symbol
        for (i=0;i<4;i++){
                 ^
  symbol:   variable i
  location: class Main
Main.java:13: error: cannot find symbol
        for (i=0;i<4;i++){
                     ^
  symbol:   variable i
  location: class Main
Main.java:14: error: cannot find symbol
            if(maxDist<a[i+1]-a[i]) {
                         ^
  symbol:   variable i
  location: class Main
Main.java:14: error: cannot find symbol
            if(maxDist<a[i+1]-a[i]) {
                                ^
  symbol:   variable i
  location: class Main
Main.java:15: error: cannot find symbol
                maxDist = a[i + 1] - a[i];
                            ^
  symbol:   variable i
  location: class Main
Main.java:15: error: cannot find symbol
                maxDist = a[i + 1] - a[i];
                                       ^
  symbol:   variable i
  location: class Main
7 errors
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];
        for(int i=0;i<5;i++){
            a[i]=sc.nextInt();
        }
        int k = sc.nextInt();
        int maxDist =0;
        for (i=0;i<4;i++){
            if(maxDist<a[i+1]-a[i]) {
                maxDist = a[i + 1] - a[i];
            }
        }
        if(maxDist>k){
            System.out.println(":(");
        }else{
            System.out.println("Yay!");
        }
    }
}


Compiler output:
Main.java:7: error: incompatible types: int[] cannot be converted to int
        int a = new int[5];
                ^
Main.java:9: error: array required, but int found
            a[i]=sc.nextInt();
             ^
Main.java:13: error: cannot find symbol
        for (i=0;i<4;i++){
             ^
  symbol:   variable i
  location: class Main
Main.java:13: error: cannot find symbol
        for (i=0;i<4;i++){
                 ^
  symbol:   variable i
  location: class Main
Main.java:13: error: cannot find symbol
        for (i=0;i<4;i++){
                     ^
  symbol:   variable i
  location: class Main
Main.java:14: error: cannot find symbol
            if(maxDist<a[i+1]-a[i]) {
                         ^
  symbol:   variable i
  location: class Main
Main.java:14: error: array required, but int found
            if(maxDist<a[i+1]-a[i]) {
                        ^
Main.java:14: error: cannot find symbol
            if(maxDist<a[i+1]-a[i]) {
                                ^
  symbol:   variable i
  location: class Main
Main.java:14: error: array required, but int found
            if(maxDist<a[i+1]-a[i]) {
                               ^
Main.java:15: error: cannot find symbol
                maxDist = a[i + 1] - a[i];
                            ^
  symbol:   variable i
  location: class Main
Main.java:15: error: array required, but int found
                maxDist = a[i + 1] - a[i];
                           ^
Main.java:15: error: cannot find symbol
                maxDist = a[i + 1] - a[i];
                                       ^
  symbol:   variable i
  location: class Main
Main.java:15: error: array required, but int found
                maxDist = a[i + 1] - a[i];
                                      ^
13 errors
Language: C++

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

int main(){
  vector<int> vec(5);
  int k;
  int ans = 0;
  for(int i=0;i<5;i++){
    cin>>vec.at(i);
  }
  cin >>k;
  for(int i = 0;i <4;i++){
    for(intj=i+1;j<4;j++){
      if(vec.at(j)-vec.at(i)>k){
        ans++;
      }
    }
  }
  if(ans > 0){
    cout<<":("<<endl;
  }else{
    cout<<"Yay!"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'intj' was not declared in this scope; did you mean 'int'?
   13 |     for(intj=i+1;j<4;j++){
      |         ^~~~
      |         int
a.cc:13:18: error: 'j' was not declared in this scope
   13 |     for(intj=i+1;j<4;j++){
      |                  ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:7:15: error: expected ';' at end of input
    7 |     printf("")
      |               ^
      |               ;
main.c:7:5: error: expected declaration or statement at end of input
    7 |     printf("")
      |     ^~~~~~
main.c:7:5: error: expected declaration or statement at end of input
Language: C++

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

Compiler output:
a.cc:17:2: error: "1nclude" after # is not a positive integer
   17 | #1nclude <iostream>
      |  ^~~~~~~
a.cc:19:5: error: redefinition of 'int main()'
   19 | int main()
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main()
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;
int main()
{
	int a, b, c, d, e, k = 0;
	cin >> a >> b >> c >> d >> e >> k;
	if ((e - a) > k )
	{
		cout << ":(" << endl;
	}
	else
	{
		cout << "Yay!" << endl;
	}
	return 0;
}
#1nclude <iostream>
using namespace std;
int main()
{
	int a, b, c, d, e, k = 0;
	cin >> a >> b >> c >> d >> e >> k;
	if ((e - a) > k )
	{
		cout << ":(" << endl;
	}
	else
	{
		cout << "Yay!" << endl;
	}
	return 0;
}
提出情報
提出日時	2019-05-11 06:31:44
問題	A - Five Antennas
ユーザ

Compiler output:
a.cc:17:2: error: "1nclude" after # is not a positive integer
   17 | #1nclude <iostream>
      |  ^~~~~~~
a.cc:19:5: error: redefinition of 'int main()'
   19 | int main()
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main()
      |     ^~~~
a.cc:33:1: error: '\U000063d0\U000051fa\U000060c5\U00005831' does not name a type
   33 | 提出情報
      | ^~~~~~~~
Language: C++

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

Compiler output:
a.cc:1:2: error: "1nclude" after # is not a positive integer
    1 | #1nclude <iostream>
      |  ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: 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 | #1nclude <iostream>
a.cc:9:17: error: 'cout' was not declared in this scope
    9 |                 cout << ":(" << endl;
      |                 ^~~~
a.cc:9:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:33: error: 'endl' was not declared in this scope
    9 |                 cout << ":(" << endl;
      |                                 ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #1nclude <iostream>
a.cc:13:17: error: 'cout' was not declared in this scope
   13 |                 cout << "Yay!" << endl;
      |                 ^~~~
a.cc:13:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:35: error: 'endl' was not declared in this scope
   13 |                 cout << "Yay!" << endl;
      |                                   ^~~~
a.cc:13:35: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

Compiler output:
a.cc:1:1: error: 'nclude' does not name a type
    1 | nclude <iostream>
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin >> a >> b >> c >> d >> e >> k;
      |         ^~~
a.cc:9:17: error: 'cout' was not declared in this scope
    9 |                 cout << ":(" << endl;
      |                 ^~~~
a.cc:9:33: error: 'endl' was not declared in this scope
    9 |                 cout << ":(" << endl;
      |                                 ^~~~
a.cc:13:17: error: 'cout' was not declared in this scope
   13 |                 cout << "Yay!" << endl;
      |                 ^~~~
a.cc:13:35: error: 'endl' was not declared in this scope
   13 |                 cout << "Yay!" << endl;
      |                                   ^~~~
Language: C++

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

Compiler output:
a.cc:1:1: error: 'nclude' does not name a type
    1 | nclude <iostream>
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin >> a >> b >> c >> d >> e >> k;
      |         ^~~
a.cc:9:17: error: 'cout' was not declared in this scope
    9 |                 cout << ":(" << endl;
      |                 ^~~~
a.cc:9:33: error: 'endl' was not declared in this scope
    9 |                 cout << ":(" << endl;
      |                                 ^~~~
a.cc:13:17: error: 'cout' was not declared in this scope
   13 |                 cout << "Yay!" << endl;
      |                 ^~~~
a.cc:13:35: error: 'endl' was not declared in this scope
   13 |                 cout << "Yay!" << endl;
      |                                   ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:173: error: expected primary-expression before ')' token
    7 |         if ((e - a) >= k || (e - b) >= k || (e - c) >= k || (e - d) >= k || (d - a) >= k || (d - b) >= k || (d - c) >= k || (c - a) >= k || (c - b) >= k || (b - a) >= k || )
      |                                                                                                                                                                             ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:4: error: expected '}' before 'else'
   10 |    else
      |    ^~~~
a.cc:8:3: note: to match this '{'
    8 |   {
      |   ^
a.cc:11:14: error: 'Yey' was not declared in this scope
   11 |      cout << Yey! << endl;
      |              ^~~
a.cc: At global scope:
a.cc:13:3: error: expected unqualified-id before 'return'
   13 |   return 0;
      |   ^~~~~~
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: expected primary-expression before ')' token
   14 |   for(int i=1 ; i<5 ; i+)
      |                         ^
Language: C++

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

int main() {
   int a,b,c,d,e,k;
   cin >>a>>b>>c>>d>>e>>k;
   int diff=e-a;
   if(diff<=k){
      cout<<"Yay!"<<enld;

   }else{
      cout<<":("<<enld;
   }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: 'enld' was not declared in this scope
   10 |       cout<<"Yay!"<<enld;
      |                     ^~~~
a.cc:13:19: error: 'enld' was not declared in this scope
   13 |       cout<<":("<<enld;
      |                   ^~~~
Language: C

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

	if (abs(a-e) <=k)
	{
		printf("Yay!");
	}
	else
	{
		printf(":(");
	}
	return 0;
}

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

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

	if (abs(a-e) < k)
	{
		printf("Yay!");
	}
	else
	{
		printf(":(");
	}
	return 0;
}

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

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

int i;




int main (){
  int a[5];
  int k;
  int mami[2];
  for (i = 0;i<5;i++)
    cin >> a[i];

  cin >> k;

  int maxv = INT_MIN;
  int minv = INT_MAX;
  int ans[2];

  for (i=0;i<5;i++){
    if (a[i] > maxv)
      maxv = a[i];
    if (a[i] < minv)
      minv = a[i];
  }
  ans[0] = maxv;
  ans[1] = minv;

  if ((ans[0] - ans[1]) > k)
    cout << ":(" <<endl;
  else if((ans[0] - ans[1]) =< k)
    cout << "Yay!" <<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:33:30: error: expected primary-expression before '<' token
   33 |   else if((ans[0] - ans[1]) =< k)
      |                              ^
Language: C++

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

int main(){
  vector<int> A.(5);
  int k;
  for(int i=0;i<5;i++){
    cin >> A.at(i);
  }
  cin >> k;
  if(A.at(4)-A.at(0)>k){
    cout << ":(" << endl;
  }else{
    cout << "Yay!" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: expected initializer before '.' token
    5 |   vector<int> A.(5);
      |                ^
a.cc:8:12: error: 'A' was not declared in this scope
    8 |     cin >> A.at(i);
      |            ^
a.cc:11:6: error: 'A' was not declared in this scope
   11 |   if(A.at(4)-A.at(0)>k){
      |      ^
Language: C

#include<stdio.h>

int main(){
  int a[];
  int i, max = 0, min =0;
  for(i=0;i<6;i++){
    scanf("%d",&a[i]);
  }
  for(i=0;i<5;i++){
    if(a[i]> max){
      max = a[i];
    }
    if(a[i] < min){
      min = a[i];
    }
  }
  if(max -min >= a[5]) printf("Yay!\n");
  else printf(":(\n");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:7: error: array size missing in 'a'
    4 |   int a[];
      |       ^
Language: C

#include<stdio.h>

int main(){
  int[] a;
  int i, max = 0, min =0;
  for(i=0;i<6;i++){
    scanf("%d",&a[i]);
  }
  for(i=0;i<5;i++){
    if(a[i]> max){
      max = a[i];
    }
    if(a[i] < min){
      min = a[i];
    }
  }
  if(max -min >= a[5]) print("Yay!\n");
  else print(":(\n");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:6: error: expected identifier or '(' before '[' token
    4 |   int[] a;
      |      ^
main.c:7:17: error: 'a' undeclared (first use in this function)
    7 |     scanf("%d",&a[i]);
      |                 ^
main.c:7:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:24: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   17 |   if(max -min >= a[5]) print("Yay!\n");
      |                        ^~~~~
      |                        printf
Language: C

use std::io::*;
use std::str::FromStr;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("faild to read char") as char)
        .take_while(|c| !c.is_whitespace())
        .collect();
    token
        .parse()
        .ok()
        .expect("faild to parse token")
}

fn main(){
    let mut v: Vec<i32> = Vec::with_capacity(5);
    for _ in 0..5 {
        v.push(read());
    }
    let k: i32 = read();
    println!("{}", if can_sock(v, k) { "Yay!" } else { ":(" });
}

fn can_sock(v: Vec<i32>, k: i32) -> bool {
    for a in &v {
        for b in &v {
            if (a - b).abs() > k {
                return false;
            }
        }
    }
    true
}


Compiler output:
main.c:1:1: error: unknown type name 'use'
    1 | use std::io::*;
      | ^~~
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '::' token
    1 | use std::io::*;
      |        ^~
main.c:2:1: error: unknown type name 'use'
    2 | use std::str::FromStr;
      | ^~~
main.c:2:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '::' token
    2 | use std::str::FromStr;
      |        ^~
main.c:4:1: error: unknown type name 'fn'
    4 | fn read<T: FromStr>() -> T {
      | ^~
main.c:4:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    4 | fn read<T: FromStr>() -> T {
      |        ^
main.c:18:1: error: unknown type name 'fn'
   18 | fn main(){
      | ^~
main.c: In function 'main':
main.c:19:5: error: unknown type name 'let'
   19 |     let mut v: Vec<i32> = Vec::with_capacity(5);
      |     ^~~
main.c:19:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'v'
   19 |     let mut v: Vec<i32> = Vec::with_capacity(5);
      |             ^
main.c:20:9: error: expected '(' before '_'
   20 |     for _ in 0..5 {
      |         ^
      |         (
main.c:20:9: error: '_' undeclared (first use in this function)
main.c:20:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:14: error: too many decimal points in number
   20 |     for _ in 0..5 {
      |              ^~~~
main.c:24:5: error: 'println' undeclared (first use in this function)
   24 |     println!("{}", if can_sock(v, k) { "Yay!" } else { ":(" });
      |     ^~~~~~~
main.c:24:12: error: expected ';' before '!' token
   24 |     println!("{}", if can_sock(v, k) { "Yay!" } else { ":(" });
      |            ^
      |            ;
main.c: At top level:
main.c:27:1: error: unknown type name 'fn'
   27 | fn can_sock(v: Vec<i32>, k: i32) -> bool {
      | ^~
main.c:27:14: error: expected ')' before ':' token
   27 | fn can_sock(v: Vec<i32>, k: i32) -> bool {
      |              ^
      |              )
Language: C

#include <bits/stdc++.h>

using namespace std;

int main(){
	int ant[5];
	int i, j, k;
	cin >> ant[0] >> ant[1] >> ant[2] >> ant[3] >> ant[4] >> k;
	for(i = 0; i < 4; i++){
		for(j = i + 1; j < 5; j++){
			if(ant[j] - ant[i] > k) {
				cout << ":(";
				exit(0);
			}
		}
	}
	cout << "Yay!";
	return 0;
}

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

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:26: error: expected unqualified-id before ';' token
    5 |     int a, b, c, d, e, k,;
      |                          ^
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:26: error: expected unqualified-id before ';' token
    5 |     int a, b, c, d, e, k,;
      |                          ^
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;
  vector<int> vec = {a, b, c, d, e};
  sort( vec.begin(), vec.end());
  reverse( vec.begin(), vec.end());
  
  for (int i = 0; i < 4; i++) {
    
    if (vec.at(i) - vec.at(i+1) =< k) {
      cout << "Yay!" << endl;
    }
  }
}
    
    


Compiler output:
a.cc: In function 'int main()':
a.cc:13:34: error: expected primary-expression before '<' token
   13 |     if (vec.at(i) - vec.at(i+1) =< k) {
      |                                  ^
Language: C++

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

int main() {
  int k;
  cin >> k;
  vector<int> vec = {a, b, c d};
  sort( vec.begin(), vec.end());
  reverse( vec.begin(), vec.end());
  
  for (int i = 0; i < 3; i++) {
    
    if (vec(i) - vec(i+1) =< k) {
      cout << "Yay!" << endl;
    }
  }
}
    
    

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: 'a' was not declared in this scope
    7 |   vector<int> vec = {a, b, c d};
      |                      ^
a.cc:7:25: error: 'b' was not declared in this scope
    7 |   vector<int> vec = {a, b, c d};
      |                         ^
a.cc:7:28: error: 'c' was not declared in this scope
    7 |   vector<int> vec = {a, b, c d};
      |                            ^
a.cc:7:30: error: expected '}' before 'd'
    7 |   vector<int> vec = {a, b, c d};
      |                     ~        ^
a.cc:7:30: error: could not convert '{<expression error>, <expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
    7 |   vector<int> vec = {a, b, c d};
      |                              ^
      |                              |
      |                              <brace-enclosed initializer list>
a.cc:7:30: error: expected ',' or ';' before 'd'
a.cc: At global scope:
a.cc:8:7: error: expected constructor, destructor, or type conversion before '(' token
    8 |   sort( vec.begin(), vec.end());
      |       ^
a.cc:9:10: error: expected constructor, destructor, or type conversion before '(' token
    9 |   reverse( vec.begin(), vec.end());
      |          ^
a.cc:11:3: error: expected unqualified-id before 'for'
   11 |   for (int i = 0; i < 3; i++) {
      |   ^~~
a.cc:11:19: error: 'i' does not name a type
   11 |   for (int i = 0; i < 3; i++) {
      |                   ^
a.cc:11:26: error: 'i' does not name a type
   11 |   for (int i = 0; i < 3; i++) {
      |                          ^
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: expected initializer before 'cin'
   10 |     cin >> a >> b >> c >> d >> e >> k;
      |     ^~~
a.cc:11:18: error: 'k' was not declared in this scope
   11 |     cout << (e-a>k?":(":"Yay!") << endl;
      |                  ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: expected initializer before 'cin'
   10 |     cin >> a >> b >> c >> d >> e >> k;
      |     ^~~
a.cc:11:19: error: 'k' was not declared in this scope
   11 |     cout << (e-a<=k?"Yay!":":(") << endl;
      |                   ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: expected initializer before 'cin'
   10 |     cin >> a >> b >> c >> d >> e >> k;
      |     ^~~
a.cc:11:18: error: 'k' was not declared in this scope
   11 |     cout << (e-a>k?":(":"Yay!") << 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 (b-a<=k&&c-a<=k&&d-a<=k&&e-a<=k&&c-b<=k&&d-b<=k&&e-b<=k&&d-c<=k&&e-c<=k&&e-d<=k)
	   cout << "Yay";
	else
	   cout << ":("<<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> 
using namespace std;

int main ()
{
	int a,b,c,d,e,k;
	
	cin >> a >> b >> c >> d >> e >> k;
	
	if (b-a<=k&&c-a<=k&&d-a<=k&&e-a<=k&&c-b<=k&&d-b<=k&&e-b<=k&&d-c<=k&&e-c<=k&&e-d<=k)
	   cout << "Yay";
	else
	   cout << ":("<<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>
using namespace std;
int main(){
  int a,b,c,d,e,k,p,o,i,u,y;
  cin>>a>>b>>c>>d>>e>>k;
  p=b-a;
  o=c-b;
  i=d-c;
  u=e-d;
  if(p<k&&o<k&&i<k&&u<k){
    cout<<"Yay!"<<endl;
  }
  else{
    cout<<":("<<endl;

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

#include<iostream>
using namespace std ;

int main()
{
  int a ;
  cin>>a ;
  int b ;
  cin>>b ;
  int c ;
  cin>>c ;
  int d ;
  cin>>d ;
  int e ;
  cin>>e ;
  int k ;
  cin>>k ;
  
  int i ;
  int K[5]={a,b,c,d,e} ;
  for(i=0;i<4;i++){
    if((K[i+1]-K[i])>K) break ;
  }
  if(i!=4) cout<<":("<<endl ;
  else cout<<"Yay!"<<endl ;

  
  return 0 ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |     if((K[i+1]-K[i])>K) break ;
      |        ~~~~~~~~~~~~~^~
Language: C++

#include<iostream>
using namespace std ;

int main()
{
  int a ;
  cin>>a ;
  int b ;
  cin>>b ;
  int c ;
  cin>>c ;
  int d ;
  cin>>d ;
  int e ;
  cin>>e ;
  int k ;
  cin>>k ;
  
  int K[5]={a,b,c,d,e} ;
  for(int i=0;i<5;i++){
    if((K[i+1]-K[i])>K) break ;
  }
  if(i!=5) cout<<":("<<endl ;
  else cout<<"Yay!"<<endl ;

  
  return 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |     if((K[i+1]-K[i])>K) break ;
      |        ~~~~~~~~~~~~~^~
a.cc:23:6: error: 'i' was not declared in this scope
   23 |   if(i!=5) cout<<":("<<endl ;
      |      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
<<endl<<endlint main(){
	int a,b,c,d,e;
	int k;
	cin>>a>>b>>c>>d>>e>>k;
	int sum=0;
	if(a-b<k)sum++;
	else{ 
		cout<<":("<<endl;
		return 0;
	} 
	if(a-c<k)sum++;
	else{ 
		cout<<":("<<endl;
		return 0;
	} 
	if(a-d<k)sum++;
	else{ 
		cout<<":("<<endl;
		return 0;
	} 
	if(a-e<k)sum++;
	else{ 
		cout<<":("<<endl;
		return 0;
	} 
	if(b-c<k)sum++;
	else{
		cout<<":("<<endl;
		return 0;
	} 
	if(b-d<k)sum++;
	else{ 
		cout<<":("<<endl;
		return 0;
	} 
	if(b-e<k)sum++;
	else{ 
		cout<<":("<<endl;
		return 0;
	} 
	if(c-d<k)sum++;
	else{ 
		cout<<":("<<endl;
		return 0;
	} 
	if(c-e<k)sum++;
	else{ 
		cout<<":("<<endl;
		return 0;
	} 
	if(d-e<k)sum++;
	else{ 
		cout<<":("<<endl;
		return 0;
	} 
	cout<<"Yay!"<<endl;
	return 0;
}

Compiler output:
a.cc:3:1: error: expected unqualified-id before '<<' token
    3 | <<endl<<endlint main(){
      | ^~
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(e - a =< k){
    cout << "Yay!" << endl;
 }
 else {
    cout << ":(" << endl;
 }
}

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

#include <iostream>
using namespace std;

int main()
{
	int  a,b,c,d,e,k;
	
	cin >> a >> b >> c >> d >> e >>x;
	
	if (b-a<k||c-a<k||c-a<k||d-a<k||e-a<k||c-b<k||d-b<k||e-b<k||d-c<k||e-c<k||e-d<k)
	   cout << "Yay";
	else
	cout << ":(";
	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>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:40: error: 'x' was not declared in this scope
    8 |         cin >> a >> b >> c >> d >> e >>x;
      |                                        ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> a, b, c, d ,e, k ;
      |         ^~~
a.cc:7:9: error: 'cout' was not declared in this scope
    7 |         cout << " Yay! " ;
      |         ^~~~
a.cc:11:9: error: 'cout' was not declared in this scope
   11 |         cout << " :( " ;
      |         ^~~~
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 ( ( ( e - d ) > k )&&( (d - c ) > k )  && ( (c - b) > k ) && ( (b - a ) > k ) )
	{
	cout << " Yay! " ;
	}
	else
	{
	cout << " :( " ;
	}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: expected ';' before '}' token
   10 |         cout << " Yay! "
      |                         ^
      |                         ;
   11 |         }
      |         ~                
a.cc:14:23: error: expected ';' before '}' token
   14 |         cout << " :( "
      |                       ^
      |                       ;
   15 |         }
      |         ~              
a.cc:15:10: error: expected '}' at end of input
   15 |         }
      |          ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:28: error: 'k' was not declared in this scope
    8 |         if ( ( ( e - d ) > k )&&( (d - c ) > k )  && ( (c - b) > k ) && ( (b - a ) > k ) )
      |                            ^
a.cc:10:17: error: 'Yay' was not declared in this scope
   10 |         cout << Yay!
      |                 ^~~
a.cc:14:17: error: expected primary-expression before ':' token
   14 |         cout << :(
      |                 ^
a.cc:15:10: error: expected '}' at end of input
   15 |         }
      |          ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: 'k' was not declared in this scope
    8 |         if ( ( e - d ) > k )&&( (d - c ) > k)  && ( (c - b) > k) && ( (b - a ) > k))
      |                          ^
a.cc:8:31: error: expected identifier before '(' token
    8 |         if ( ( e - d ) > k )&&( (d - c ) > k)  && ( (c - b) > k) && ( (b - a ) > k))
      |                               ^
a.cc:14:17: error: expected primary-expression before ':' token
   14 |         cout << :(
      |                 ^
a.cc:15:10: error: expected '}' at end of input
   15 |         }
      |          ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main() {
  int a[5];
  for(int i=0;i<5;i++){
    cin >>a[i];
  }
  int k;
  cin >>k;
  bool flg=true;
  for(int i=0;i<4;i++){
    if(a[i+1]-a[i]>k){
      flg=false
      break;
    }
  }
  if(flg){
    cout<<"Yay!"<<endl;
  }
  else{
    cout <<":("<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: expected ';' before 'break'
   14 |       flg=false
      |                ^
      |                ;
   15 |       break;
      |       ~~~~~
Language: C++

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

int main() {
  int a[5];
  for(int i=0;i<5;i++){
    cin >>a[i];
  }
  int k;
  cin >>k;
  bool flg=true;
  for(int i=0;i<4;i++){
    if(a[i+1]-a[i]>k){
      flg=false
      break;
    }
  }
  if(flg){
    cout<<"Yay"<<endl;
  }
  else{
    cout <<":("<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: expected ';' before 'break'
   14 |       flg=false
      |                ^
      |                ;
   15 |       break;
      |       ~~~~~
Language: C++

#include<iostream> 
using namespace std;

int main () {

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'k' was not declared in this scope
    8 |   if ( b-a<=k && c-b<=k && d-c<=k && e-d<=k ) {
      |             ^
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 ( ( e - d > k )&&( d - c > k)  && ( c - b > k) && ( b - a > k) )
	{
	cout << "Yay!"
	}
	else
	{
	cout << ":("
	}
}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: expected ';' before '}' token
   10 |         cout << "Yay!"
      |                       ^
      |                       ;
   11 |         }
      |         ~              
a.cc:14:21: error: expected ';' before '}' token
   14 |         cout << ":("
      |                     ^
      |                     ;
   15 |         }
      |         ~
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 ( ( e - d > k )&&( d - c > k)  && ( c - b > k) && ( b - a > k) )
	{
	cout << "Yay!"
	}
	else
	{
	cout << ":("
	}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: expected ';' before '}' token
   10 |         cout << "Yay!"
      |                       ^
      |                       ;
   11 |         }
      |         ~              
a.cc:14:21: error: expected ';' before '}' token
   14 |         cout << ":("
      |                     ^
      |                     ;
   15 |         }
      |         ~            
a.cc:15:10: error: expected '}' at end of input
   15 |         }
      |          ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: 'k' was not declared in this scope
    8 |         if ( ( e - d > k )&&( d - c > k)  && ( c - b > k) && ( b - a > k) )
      |                        ^
a.cc:10:17: error: 'Yay' was not declared in this scope
   10 |         cout << Yay!
      |                 ^~~
a.cc:14:17: error: expected primary-expression before ':' token
   14 |         cout << :(
      |                 ^
a.cc:15:10: error: expected '}' at end of input
   15 |         }
      |          ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

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

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

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

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    int a[5];
    for (int i = 0; i < 5; ++i) cin >> a[i];
    int k;
    cin >> k;

    for (int i = 0; i < 5; ++i) {
       for (int j = i; j < 5; ++j) {
          if (a[j] - a[i] > k) {
            cout << “:(“;
            return 0;
          }
       }
    }

    cout << “Yay!”;
}


Compiler output:
a.cc:19:21: error: extended character “ is not valid in an identifier
   19 |             cout << “:(“;
      |                     ^
a.cc:19:24: error: extended character “ is not valid in an identifier
   19 |             cout << “:(“;
      |                        ^
a.cc:25:13: error: extended character “ is not valid in an identifier
   25 |     cout << “Yay!”;
      |             ^
a.cc:25:18: error: extended character ” is not valid in an identifier
   25 |     cout << “Yay!”;
      |                  ^
a.cc: In function 'int main()':
a.cc:19:21: error: '\U0000201c' was not declared in this scope
   19 |             cout << “:(“;
      |                     ^
a.cc:25:13: error: '\U0000201cYay' was not declared in this scope
   25 |     cout << “Yay!”;
      |             ^~~~
Language: C++

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

int main() {
  int a,b,c,d,e,k;
  int s;
  cin >> a >> b >> c >> d >> e >> k;
  
 vector<int> t(5);
  t={a,b,c,d,e}
  sort(t.begin(),t.end());
  if(t.at(4)-t.at(0)<=k) cout << "Yay!" << endl;
  else cout << ":(" << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: expected ';' before 'sort'
   10 |   t={a,b,c,d,e}
      |                ^
      |                ;
   11 |   sort(t.begin(),t.end());
      |   ~~~~
Language: C++

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:23: error: 'f' was not declared in this scope
    5 |   cin>>a>>b>>c>>d>>e>>f;
      |                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  vector<int> a(5);
  for (int i=0; i<5; i++){
    cin >> a[i];
  }
  int k;
  cin >> k;
  sort(a.begin(),a,end());
  if (a[5]-a[0] <= k){
    cout << "Yay!" << endl;
  }
  else {
    cout << ":(" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: no matching function for call to 'end()'
   10 |   sort(a.begin(),a,end());
      |                    ~~~^~
In file included from /usr/include/c++/14/bits/algorithmfwd.h:39,
                 from /usr/include/c++/14/bits/stl_algo.h:59,
                 from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/initializer_list:99:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
   99 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
/usr/include/c++/14/initializer_list:99:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/range_access.h:74:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/bits/range_access.h:74:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:85:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/bits/range_access.h:85:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:106:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/usr/include/c++/14/bits/range_access.h:106:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/valarray:1249:5: note: candidate: 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1249 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/valarray:1249:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/valarray:1265:5: note: candidate: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/valarray:1265:5: note:   candidate expects 1 argument, 0 provided