TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
#A
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

ant = [a,b,c,d,e]
flg = True
for i in range(5):
    for j in range(i,5):
        if i != j:
            dist = abs(ant[i]-ant[j])
            if dist > k:
                flg = False
                break
if flg:
    print('Yey!')
else:
    print(':(')

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

ant = [a,b,c,d,e]
flg = True
for i in range(5):
    for j in range(5):
        if i != j:
            #print(dist)
            dist = abs(ant[i]-ant[j])
            if dist > k:
                flg = False
                break
if flg:
    print('Yey!')
else:
    print(':(')

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

ant = [a,b,c,d,e]
flg = True
for i in range(5):
    for j in range(5):
        if i != j:
            #print(dist)
            dist = abs(ant[i]-ant[j])
            if dist > k:
                flg = False
                break
if flg:
    print('Yay!')
else:
    print(':(')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
a, e = map(int, input().split())

if e - a <= k:
  print('Yay!')
else:
  print(':(')

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

if e - a <= k:
  print('Yay!')
else:
  print(':(')

Verdicts: Runtime Error

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
A = [int(input()) for i in range(5)]
K = input()

lenge = 0

for i in range(A):
  for j in range(A):
    if A[i] - A[j] > K:
      s += 1
      
if s == 0:
  print(":(")
else :
  print("Yay!")

A = [int(input()) for _ in range(5)]
K = int(input())

lenge = 0

for i in range(5):
  for j in range(5):
    if A[i] - A[j] > K:
      lenge += 1
      
if lenge == 0:
  print(":(")
else :
  print("Yay!")



A = [int(input()) for i in range(5)]
K = input()

lenge = 0

for i in range(A):
  for j in range(A):
    if A[i] - A[j] > K:
      lenge += 1
      
if lenge == 0:
  print(":(")
else :
  print("Yay!")


A = [int(input()) for _ in range(5)]
K = int(input())

lenge = 0

for i in range(5):
  for j in range(5):
    if A[i] - A[j] > K:
      lenge += 1
      
if lenge > 0:
  print(":(")
else :
  print("Yay!")


Verdicts: Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
a=int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e - a > k:
  print("Yay!")
else:
  print(":(")

a=int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e - a > k:
  print("Yay!")
else:
  print(":(")
  

a=input()
b = input()
c = input()
d = input()
e = input()
k = input()
if e - a > k:
  print("Yay!")
else:
  print(":(")
  


a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e - a > k:
  print(":(")
else:
  print("Yay!")

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
a=input()
b=input()
c=input()
d=input()
e=input()
k=input()
inp=[a,b,c,d,e]
i=0;
j=0;
kek=true
while i<5:
  j=i
  while j<5:
    if inp[j]-inp[i]>k:
      kek=false
      
print("Yay!") if kek else print(":(")      


a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
s = [a,b,c,d,e]
kk = "Yay!"
for z in range(lan(s)):
  ss = s[(z+1):]
  for y in ss:
    if s[z] - y > k :
      kk=":("
      
print(kk)

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if (e-a)> k:
  print(":(")
else:
  print("Yay!")
  

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
# -*- coding: utf-8 -*-
from heapq import merge
from bisect import bisect
def inpl(): return list(map(int, input().split()))

X, Y, Z, K = inpl()
A = inpl()
B = inpl()
C = sorted(inpl(), reverse=True)

AB = sorted([a+b for a in A for b in B])[-K:]
ans = [-1] * K

for c in C:
    if ans[0] > AB[-1] * c:
        break
    tmp = [ab + c for ab in AB][-K:]
    ans = list(merge(ans, tmp))[-K:]

print(*ans[::-1], sep="\n")


# -*- coding: utf-8 -*-
from itertools import product
from collections import defaultdict
def inpl(): return list(map(int, input().split()))

X = [0]*6
for i in range(6):
    X[i] = int(input())
a, b, c, d, e, k = X

for l, r in product(X[:5], repeat=2):
    if abs(l-r) > k:
        print(":(")
        break
else:
    print("Yay!")


Verdicts: Runtime Error

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):

xs = [int(input()) for _ in range(5)]
k = int(input())

ok = True
for x in xs:
    for y in ys:
        if abs(x-y) > k:
            ok = False

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


xs = [int(input()) for _ in range(5)]
k = int(input())

ok = True
for x in xs:
    for y in xs:
        if abs(x-y) > k:
            ok = False

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

Verdicts: Runtime Error

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
A = []
for i in range(6):
    A.append(int(input()))
st = 4 
s = 'Yay!'
for i in range(4): 
    for j in range(st):
        print(A[st-i], A[st-1-j], A[5])
        if A[st-i] - A[st-1-j] > A[5]:
            s = ':('
    if s == ':(':
        break
print(s)


A = []
for i in range(6):
    A.append(int(input()))
st = 4 
s = 'Yay!'
for i in range(4): 
    for j in range(st):
        print(A[st], A[st-1-j], A[5])
        if A[st] - A[st-1-j] > A[5]:
            s = ':('
    if s == ':(':
        print(':(になった')
        break
    st -= 1
print(s)


A = []
for i in range(6):
    A.append(int(input()))
st = 4 
s = 'Yay!'
for i in range(4): 
    for j in range(st):
        if A[st] - A[st-1-j] > A[5]:
            s = ':('
    if s == ':(':
        break
    st -= 1
print(s)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
lists=[]
for i n range(5):
  nums=int(input())
  lists.append(nums)
dis=int(input())
lists=sorted(lists)
if lists[-1]-lists[0]<=dis:
  print("Yay!")
else:
  print(":(")

lists=[]
for i in range(5):
  nums=int(input())
  lists.append(nums)
dis=int(input())
lists=sorted(lists)
if lists[-1]-lists[0]<=dis:
  print("Yay!")
else:
  print(":(")


Verdicts: Runtime Error

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
import itertools
import sys

input = sys.stdin.readline

maxn = 10000000000

X, Y, Z, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

A.append(-maxn)
B.append(-maxn)
C.append(-maxn)

A.sort(reverse=True)
B.sort(reverse=True)
C.sort(reverse=True)

apos, bpos, cpos = 0, 0, 0

while (apos + 1) * (bpos + 1) * (cpos + 1) < min(10 ** 7, X * Y * Z):
    if (
        apos < len(A) - 2
        and abs(A[apos] - A[apos + 1]) < abs(B[bpos] - B[bpos + 1])
        and abs(A[apos] - A[apos + 1]) < abs(C[cpos] - C[cpos + 1])
    ):
        apos += 1
    elif bpos < len(B) - 2 and B[bpos] - B[bpos + 1] < C[cpos] - C[cpos + 1]:
        bpos += 1
    else:
        cpos += 1

res = []
for a in list(itertools.product(A[: apos + 1], B[: bpos + 1], C[: cpos + 1])):
    res.append(a[0] + a[1] + a[2])

res.sort(reverse=True)
for k in range(K):
    print(res[k])


A = [int(input()) for _ in range(5)]
A.sort()

k = int(input())

if A[-1] - A[0] > k:
    print(":(")
else:
    print("Yay!")


Verdicts: Runtime Error

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
import itertools
import sys

def main():
    n = []
    for i in range(5):
        n.append(int(input()))
    k = int(input())
    for c in itertools.combinations(n, 2):
        if abs(c[0] - c[1]) <= k:
            print(':(')
            sys.exit()
    else:
        print('Yay!')

if __name__ == '__main__':
    main()



import itertools
import sys

def main():
    n = []
    for i in range(5):
        n.append(int(input()))
    k = int(input())
    for c in itertools.combinations(n, 2):
        if abs(c[0] - c[1]) > k:
            print(':(')
            sys.exit()
    else:
        print('Yay!')

if __name__ == '__main__':
    main()



Verdicts: Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
antena=[]
for i in range(0, 5):
    antena.append(int(input()))
k = int(input())
flag = 0
for i in range(0, 4):
    for j in range(i+1, 5):
        if antena[j]-antena[i]>k:
            flag = 1
if flag==0:
    print("Yey!")
else:
    print(":(")


antena=[]
for i in range(0, 5):
    antena.append(int(input()))
k = int(input())
flag = 0
for i in range(0, 4):
    for j in range(i+1, 5):
        if antena[j]-antena[i]>k:
            flag = 1
if flag==0:
    print("Yay!")
else:
    print(":(")


Verdicts: Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
li = list(map(int,input().split()))
a = li[0]
e = li[4]
k = li[5]

if e - a <= k:
    print("Yay!")
else:
    print(":(")

li = list(map(int,input().split()))
li[0] = a
li[4] = e
li[5] = k

if e - a <= 15:
    print("Yay!")
else:
    print(":(")

li = list(map(int,input().split()))
a = li[0]
e = li[4]
k = li[5]

if e - a < k:
    print("Yay!")
else:
    print(":(")

li = list(map(int,input().split()))
li[0] = a
li[4] = e
li[5] = k

if e - a < k:
    print("Yay!")
else:
    print(":(")

li = list(map(int,input().split()))
li[0] = a
li[4] = e
li[5] = k

if e - a <= k:
    print("Yay!")
else:
    print(":(")

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

if e - a <= k:
    print("Yay!")
else:
    print(":(")

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
lis = [a,b,c,d,e,k] 
for i in lis:
  i = input()
if e-a<=k:
  print('Yay!')
else:
  print(':(')

lis 

lists = [0,0,0,0,0,0]
for i in range(len(lists)):
        lists[i] = int(input())

if lists[4]-lists[0]<=lists[5]:
        print("Yay!")
else:
        print(":(")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
a,b,c,d,e=[int(input()) for i in range(5)]
a1=a//10
a2=a%10
if a2==0:
    a1-=1
    a2=10
b1=b//10
b2=b%10
if b2==0:
    b1-=1
    b2=10
c1=c//10
c2=c%10
if c2==0:
    c1-=1
    c2=10
d1=d//10
d2=d%10
if d2==0:
    d1-=1
    d2=10
n=e//10
m=e%10
if m==0:
    n-=1
    m=10
min1=min(a2,b2,c2,d2,m)
if a2==10 or b2==10 or c2==10 or d2==10 or m==10:
    ans=(a1+b1+c1+d1+n+5)*10+min1
else:
    ans=(a1+b1+c1+d1+n+4)*10+min1
print(ans)


A=[int(input()) for i in range(5)]
k=int(input())
#print(A)
#print(k)
if A[4]-A[0]>k:
    print(":(")
else:
    print("Yay!")


Verdicts: Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e - a < k:
    print(":(")
    exit()
if d - a < k:
    print(":(")
    exit()
if c - a < k:
    print(":(")
    exit()
if b - a < k:
    print(":(")
    exit()

print("Yay!")

li = [int(input()) for i in range(6)]
print("Yay!" if li[4]-li[0] <= li[5] else ":(")

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
num_list = []
while True:
    element = input()
    if element is None:
        break

    if element == '':
        break

    num_list.append(int(element))

limit = num_list[-1]

ans_string = "Yay!"

#     print(num_list[i + 1] - num_list[i])
#     if num_list[i + 1] - num_list[i] > limit:
#         ans_string = ":("

for i in range(len(num_list) - 1):
    for j in range(i, len(num_list) - 1):
        if num_list[j] - num_list[i] > limit:
            ans_string = ":("

print(ans_string)


num_list = []
while True:
    try:
        element = input()
    except EOFError:
        break

    num_list.append(int(element))

limit = num_list[-1]

ans_string = "Yay!"

#     print(num_list[i + 1] - num_list[i])
#     if num_list[i + 1] - num_list[i] > limit:
#         ans_string = ":("

for i in range(len(num_list) - 1):
    for j in range(i, len(num_list) - 1):
        if num_list[j] - num_list[i] > limit:
            ans_string = ":("

print(ans_string)


Verdicts: Runtime Error

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
line2 = []
for i in range(5):
    line = int(input())
    line2.append(line)
long = int(input())
if line2[4] - line2[0] <= long:
    print("Yey!")
else:
    print(": (")

line2 = []
for i in range(5):
    line = int(input())
    line2.append(line)
long = int(input())
if line2[4] - line2[0] <= long:
    print("Yay!")
else:
    print(":(")

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e-a <= k:
  ans = 'Yay!'
else:
  ans = ':('

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e-a <= k:
  ans = 'Yay!'
else:
  ans = ':('
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())

a_b=abs(a-b)
a_c=abs(a-c)
a_d=abs(a-d)
a_e=abs(a-e)

b_c=abs(b-c)
b_d=abs(b-d)
b_e=abs(b-e)

c_d=abs(c-d)
c_e=abs(c-e)

d_e=abs(d-e)
print(k)
print(a_e)

if a_e > k:
    print(":(")
else:
    print("Yey!")


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

a_b=abs(a-b)
a_c=abs(a-c)
a_d=abs(a-d)
a_e=abs(a-e)

b_c=abs(b-c)
b_d=abs(b-d)
b_e=abs(b-e)

c_d=abs(c-d)
c_e=abs(c-e)

d_e=abs(d-e)
if a_e > k:
    print(":(")
else:
    print("Yey!")


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

a_b=abs(a-b)
a_c=abs(a-c)
a_d=abs(a-d)
a_e=abs(a-e)

b_c=abs(b-c)
b_d=abs(b-d)
b_e=abs(b-e)

c_d=abs(c-d)
c_e=abs(c-e)

d_e=abs(d-e)
if a_e > k:
    print(":(")
else:
    print("Yay!")


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
a = [int(input()) for i in range(5)]
k = int(input())
print("Yey!" if e-a<= k else ":(")

a = [int(input()) for i in range(5)]
k = int(input())
print("Yay!" if e-a<= k else ":(")

a,b,c,d,e = map(int,input().split())
k = int(input())
print("Yay!" if e-a<= k else ":(")

a,b,c,d,e,k= int(input()),int(input()),int(input()),int(input()),int(input()),int(input())
print("Yay!" if e-a<= k else ":(")

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):

args = {}

l = ["a", "b", "c", "d", "e", "k"]
for i in range(len(l)):
    args[l[i]] = int(input())


# 5-4
# 5-3
# 5-2
# 5-1

# 4-3
# 4-2
# 4-1

# 3-2
# 3-1

# 2-1

for i in range(len(l) - 1):
    j = 5-i
    for m in range(len(l) - 2):
        n = j - (m+1)
        if n <= 0:
            continue
        if l[j] - l[n] > l["k"]:
            print(':(')
            exit()
print("Yay!")


args = {}
l = ["a", "b", "c", "d", "e", "k"]
for i in range(len(l)):
    args[l[i]] = int(input())
for i in range(len(l) - 1):
    j = 5-i
    for m in range(len(l) - 2):
        n = j - (m+1)
        if n <= 0:
            continue
        if args[l[j-1]] - args[l[n-1]] > args["k"]:
            print(':(')
            exit()
print("Yay!")


Verdicts: Runtime Error

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
a,b,k = 0
for i in range(6):
  t = int(input())
  if(i == 0):
    a = t
  elif(i == 4):
    b = t
  elif(i == 5):
    k = t

if(b - a > k):
  print(':(')
else:
  print('Yay!')


a,b,k = 0
for i in range(6):
  t = int(input())
  if(i == 0):
    a = t
  elif(i == 4):
    b = t
  elif(i == 6):
    k = t

if(b - a > k):
  print(':(')
else:
  print('Yay!')

A = [int(input()) for i in range(6)]
print('Yay!' if A[4] - A[0] <= A[5] else ':(')

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
import math
N = int(input())
city = []
for i in range(5):
    city.append(int(input()))
gate = min(city)
print(4 + math.ceil(N/gate))

antenna = []
for i in range(5):
    antenna.append(int(input()))
k = int(input())
if antenna[4] - antenna[0] <= k:
    print('Yay!')
else:
    print(':(')

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if e-a > k:
    print(":(")
else:
    print("Yey!")



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

if e-a > k:
    print(":(")
else:
    print("Yay!")



Verdicts: Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if e-a<=k:
	print("Yay")
else:
	print(":(")

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if e-a<=k:
	print('Yay')
else:
	print(':(')

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if e-a<=k:
	print('Yay!')
else:
	print(':(')
	

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
import math

a = list(map(int, [input() for i in range(5)]))
b = [math.ceil(b / 10) * 10 for b in a]

c1 = b[0] + b[1] + b[2] + b[3] + a[4]
c2 = b[0] + b[1] + b[2] + a[3] + b[4]
c3 = b[0] + b[1] + a[2] + b[3] + b[4]
c4 = b[0] + a[1] + b[2] + b[3] + b[4]
c5 = a[0] + b[1] + b[2] + b[3] + b[4]

print(min([c1, c2, c3, c4, c5]))

l = list(map(int, [input() for i in range(5)]))
k = int(input())

print('Yay!' if max(l) - min(l) <= k else ':(')

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
a,b,c,d,e,k = [int(input()) for _ in range(6)]

if e-a > k:
	print(":(")
else
	print("Yey!")

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

println(e - a <= k ? "Yay!" : ":(")


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

if e - a <= k:
    print("Yey!")
else:
    print(":(")
          


x,y,z,k = [int(num) for num in input().split()]

a_cake,b_cake,c_cake = [sorted([int(num) for num in input().split()],reverse=True)[:k] for _ in range(3)]


diff_list = list()
for cake in [a_cake,b_cake,c_cake]:
        diff_list.extend(list(map(lambda x:cake[0]-x,cake)))

diff_list.sort()
cake_max = a_cake[0]+b_cake[0]+c_cake[0]
for diff in diff_list[:k]:
    print(cake_max-diff)

    


a,b,c,d,e,k = [int(input()) for _ in range(6)]

result = "Yey!" if e-a<=k else ":("
print(result)


a,b,c,d,e,k = [int(input()) for _ in range(6)]
 
result = "Yey!" if e-a<=k else ":("
println(result)

a,b,c,d,e,k = [int(input()) for _ in range(6)]

result = "Yey!" if e-a<=k else ":("
print(result)

x,y,z,k = [int(num) for num in input().split()]
a_cake,b_cake,c_cake = [sorted([int(num) for num in input().split()],reverse=True) for _ in range(3)]

sum_cake = sorted([a+b+c for a in a_cake for b in b_cake for c in c_cake],reverse=True)[:k]
print(sum_cake)

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

if e - a <= k:
    print("Yey!")
else:
    print(":(")
          


a,b,c,d,e,k = [int(input()) for _ in range(6)]

result = "Yay!" if e-a<=k else ":("
print(result)

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
from itertools import combinations

line = input()
ant = [int(n) for n in line.split()]
comb = tuple(combinations(ant[:5], 2))

for i,j in comb:
    if j-i > ant[5]:
        a = -1
        print(":(")
        break
    else:
        pass
if a != -1:
    print("Yay!")



while True:
    try:
        line = input()
        res = ""
        for i in range(len(line)-2):
            if line[i+1]-line[i]<= line[-1]:
                res = "Yay!"
            else:
                res = ":("
                break
        print(res)
    except EOFError:
        break

numbers = []
for _ in range(6):
    numbers.append(int(input()))
predicted_value = "Yay!"
k_distance = numbers[-1]
antenas = numbers[:-1]
antenas.sort()
if antenas[-1] - antenas[0] > k_distance:
    predicted_value = ":("
print(predicted_value)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
a = [int(input()) for i in range(5)]
k = int(input())

ans = 0
for i in range(5):
    for j in range(i+1,5):
        print(a[i],a[j])
        if abs(a[i]-a[j]) <= k:
            ans += 1
if ans == 10:
    print("Yay!")
else:
    print(":(")

a = [int(input()) for i in range(5)]
k = int(input())

ans = 0
for i in range(5):
    for j in range(i+1,5):
        if abs(a[i]-a[j]) <= k:
            ans += 1
if ans == 10:
    print("Yay!")
else:
    print(":(")

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
antenna = [int(input()) for _ in range(N)]
k = int(input())

print("Yay!" if max(antenna) - min(antenna) <= k else ":(")

antenna = [int(input()) for _ in range(5)]
k = int(input())

print("Yay!" if max(antenna) - min(antenna) <= k else ":(")

Verdicts: Runtime Error

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
from sys import stdin

i = [int(x) for x in stdin.readlines()]
j = i[-1]
i.pop()

if max(i)-min(i) > j:
  print(':(')
else:
  print('yay!')

from sys import stdin

i = [int(x) for x in stdin.readlines()]
j = i[-1]
i.pop()

if max(i)-min(i) > j:
  print(':(')
else:
  print('Yay!')

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
li = []
for i in range(6):
    li.append(int(input()))

flag = "Yay!"
for i in range(len(li)-1):
    if li[i+1] - li[i] > li[5]:
        flag = ":("

return flag


li = []
for i in range(6):
    li.append(int(input()))

flag = "Yay!"
if li[4] - li[0] > li[5]:
    flag = ":("

print(flag)


Verdicts: Runtime Error

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
import itertools

aList = []

for i in range(5):
  aList.append(int(input()))

k = int(input())

aiList = list(itertools.combinations(aList,2))

for j in aiList:
  if j[1] - j[0] >k:  
    print(":(")
    exit(0)

print("Yay")


import itertools

aList = []

for i in range(5):
  aList.append(int(input()))

k = int(input())

aiList = list(itertools.combinations(aList,2))

for j in aiList:
  if j[1] - j[0] >k:  
    print(":(")
    exit(0)

print("Yap")


import itertools

aList = []

for i in range(5):
  aList.append(int(input()))

k = int(input())

aiList = list(itertools.combinations(aList,2))

for j in aiList:
  if j[1] - j[0] >k:  
    print(":(")
    exit(0)

print("Yay!")


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):

n = int(input())
li = []
for i in range(5):
    li.append(int(input()))
m = min(li)
if n % m != 0:
    t = n // m
else:
    t = n // m - 1

print(t + 5)


# -*- coding: utf-8 -*-

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

if (e - a) < k:
    print(":(")
else:
    print("Yay!")



# -*- coding: utf-8 -*-

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

if (e - a) > k:
    print(":(")
else:
    print("Yay!")



Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
q = int(input())
 
f = [a,b,c,d,e]

 
g=f[4]-f[3]
h=f[4]-f[2]
i=f[4]-f[1]
j=f[4]-f[0]
k=f[3]-f[2]
l=f[3]-f[1]
m=f[3]-f[0]
n=f[2]-f[1]
o=f[2]-f[0]
p=f[1]-f[0]

 
if g<q and h<q and i<q and j<q and k<q and l<q and m<q and m<q and n<q and o<q p<q:
  print("Yay!")
 
else:
  print(":(")

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

f = [a,b,c,d,e]
f.sort()

g = f[1]-f[0]
h = f[2]-f[0]
i = f[3]-f[0]
j = f[4]-f[0]
k = f[2]-f[1]
l = f[3]-f[1]
m = f[4]-f[1]
n = f[3]-f[2]
o = f[4]-f[2]
p = f[4]-f[3]

if g<q and h<q and i<q and j<q and k<q and l<q and m<q and m<q and n<q and o<q p<q:
  print("Yay!")

else:
  print(":(")
  
  













a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
q = int(input())
 
f=e-d
g=e-c
h=e-b
i=e-a
j=d-c
k=d-b
l=d-a
m=c-b
n=c-a
o=b-a

 
 
if f<=q and g<=q and h<=q and i<=q and j<=q and k<=q and l<=q and m<=q and n<=q and o<=q:
  print("Yay!")
 
else:
  print(":(")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
for i in range(6):
  box[i]=int(input())
flag=0
for i in range(4):
  if (box[i]-box[i+1]) > box[5]:
    flag = 1 
  	break
if flag==1:
  print(':(')
else:
  print('Yay!')


box=[]
for i in range(6):
  box.append(int(input()))
flag=0
if box[4]-box[0]>box[5]:
    print(':(')
else:
    print('Yay!')

Verdicts: Runtime Error

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
n = 0
if e-a > k or e-b > k or d-a > k or e-c > k or d-b > k or c-a > k or e-d > k or d-c > k or c-b > k or b-a > k:
    n = 1

if n = 1:
    print(":(")
if n = 0:
    print("Yay!")

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
int n = 0
if e-a > k or e-b > k or d-a > k or e-c > k or d-b > k or c-a > k or e-d > k or d-c > k or c-b > k or b-a > k:
    n = 1

if n = 1:
    print(":(")
if n = 0:
    print("Yay!")

N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
F = min([A,B,C,D,E])
T = int(N/F) + 4
print(T)

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
n = 0
if e-a > k or e-b > k or d-a > k or e-c > k or d-b > k or c-a > k or e-d > k or d-c > k or c-b > k or b-a > k:
    n = 1

if n == 1:
    print(":(")
if n == 0:
    print("Yay!")

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
aaa = [int(input()) for i in range(6)]
 
ans = "Yay!"
 
a = aaa[0]
for i in range(1,5):
    if aaa[5] >= a - aaa[i]:
        ans = ":("
        break
print(ans)

aaa = [int(input()) for i in range(6)]
 
ans = ":("
 
a = aaa[0]
for i in range(1,5):
    if aaa[5] <= abs(a - aaa[i]):
        ans = "Yay"
        break
    a = aaa[i]
print(ans)

aaa = [int(input(i)) for i in range(6)]

ans = "Yay!"

a = aaa[0]
for i in range(1,5):
	if aaa[5] >= a - aaa[i]:
    	ans = ":("
      	break
   
 print(ans)

aaa = [int(input()) for i in range(6)]
 
ans = "Yay!"
 
a = aaa[0]
for i in range(1,5):
    if aaa[5] >= a - aaa[i]:
        ans = ":("
        break
    a = aaa[i]
print(ans)

aaa = [int(input()) for i in range(6)]
 
ans = "Yay!"
 
a = aaa[0]
for i in range(1,5):
    if aaa[5] >= abs(a - aaa[i]):
        ans = ":("
        break
    a = aaa[i]
print(ans)

aaa = [int(input()) for i in range(6)]
 
ans = "Yay!"

j = aaa[4] - aaa[0]

if j > aaa[5]:
  ans = ":(" 

print(ans)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
ds = []
for i in range(5):
    ds.append(int(input()))
k = int(input())

cnt = 0
for i in range(5):
    for j in range(i + 1, 5):
        if abs(ds[i] - ds[j]) <= k:
            cnt += 1
if cnt > 0:
    print(':(')
else:
    print("Yay!")


ds = []
for i in range(5):
    ds.append(int(input()))
k = int(input())

cnt = 0
for i in range(5):
    for j in range(i + 1, 5):
        if abs(ds[i] - ds[j]) > k:
            cnt += 1
if cnt > 0:
    print(':(')
else:
    print("Yay!")


Verdicts: Wrong Answer

Accepted
Problem: In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.   Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.   Determine if there exists a pair of antennas that cannot communicate **directly**.   Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.

Submission attempts (in order):
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
 
x = min(a, b, c, d, e)
if x != 1:
    print(5 + n // x)
else:
    print(4 + n)

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

x = min(a, b, c, d, e)
y = max(a, b, c, d, e)
if (y - x) <= k:
  print('Yay!')
else:
  print(':(')

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

x = min(a, b, c, d, e)
y = max(a, b, c, d, e)
if (y - x) <= k:
    print('Yay!')
else:
    print(':(')

Verdicts: Wrong Answer

Runtime Error

Accepted