TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
a, b, c = map(int, input().split())
temp = a
a = b
b = a
temp = c
c = a
a = temp
print(str(a) + " " + str(b) + "" + str(c))

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

Verdicts: Wrong Answer

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
x,y,z=map(int,input().split())
li=[z,x,y]
print(" ".join(li))

x,y,z=map(int,input().split())
li=[z,x,y]
print(" ".join(map(str,li)))

Verdicts: Runtime Error

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
A = input().split()
A[0], A[1] = A[1], A[0]
A[1], A[2] = A[2], A[1]
print(*A)

A = input().split()
A[0], A[1] = A[1], A[0]
A[0], A[2] = A[2], A[0]
print(*A)

Verdicts: Wrong Answer

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
x,y,z=map(int,input().split())
temp=x
y=x
x=temp
 
temp2=z
z=x
x=temp2
print(x,y,z)

x,y,z=map(int,input().split()):
print(z,x,y)

x,y,z=map(int,input().split()):
temp=x
y=x
x=temp

temp2=z
z=x
x=temp2
print(x,y,z)

x,y,z=map(int,input().split()):
print(z+" "+x+" "+y)

x,y,z=map(int,input().split())
print(str(z)+" "+str(x)+" "+str(y))

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
x, y, z = map(int, input().split(" "))
print(y, x, z)

x, y, z = map(int, input().split(" "))
print(z, x, y)

Verdicts: Wrong Answer

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
a,b,c=map(int,input().split())
print(b,c,a)

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

Verdicts: Wrong Answer

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
b = []
for i in range(3): 
    a= int(input())
    b.append(a)
print(b[::-1])

x , y, z = map(int,input().split())
print('{} {} {}'.format(z,x,y))

Verdicts: Runtime Error

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
x, y, z = map(int, input()split())
print(z, x, y)

x, y, z = map(int, input().split())
print(z, x, y)


Verdicts: Runtime Error

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
base = input().split()
print(base[2],base[1],base[0])

base = input().split()
print(int(base[2]),int(base[1]),int(base[0]))

base = input().split()
print(int(base[2]),int(base[0]),int(base[1]))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
nm = input().split(" ")
n = int(nm[0])
m = int(nm[1])

a = input().split(" ")

total = 0
for v in a:
  total += int(a)
  
mv = total / (4 * m)
q = 0
for e in a:
  e = int(e)
  if e >= mv:
    q += 1
    
if q >= m:
  print("Yes")
else:
  print("No")
 

nk = input().split(" ")
n = int(nk[0])
k = int(nk[1])

t = n % k
print(min(t, k-t))

string = input().split(" ")
print(string[2], string[0], string[1])


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
l = list(input().split())
l[0] = int(l[0])
l[1] = int(l[1])
l[2] = int(l[2])
l[0], l[1]=l[1], l[0]
l[0], l[2]=l[2], l[0]
print(l)

l = list(input().split())
l[0] = int(l[0])
l[1] = int(l[1])
l[2] = int(l[2])
l[0], l[1]=l[1], l[0]
l[0], l[2]=l[2], l[0]
print(l[0], l[1], l[2])

Verdicts: Wrong Answer

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
a,b,c=int(input())

print(c,a,b)

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

Verdicts: Runtime Error

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
X, Y, Z = map(int, input().split())
print(Z, Y, X)

X, Y, Z = int(input())
X, Z = Z, X
print(X, Y, Z)

X, Y, Z = map(int, input().split())
print(Z, X, Y)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
from collections import deque

K = int(input()) 
a = deque([1, 2, 3, 4, 5, 6, 7, 8, 9])

for i in range(K):
    j = a.popleft()
    print(j)
    if j%10 != 0:
        a.append((10*j) + ((j%10) -1))
        
    a.append((10*j)+j%10)
    
    if j%10 != 9:
        a.append((10*j) +((j%10)+1))

from collections import deque

K = int(input()) 
a = deque([1, 2, 3, 4, 5, 6, 7, 8, 9])

for i in range(K-1):
    j = a.popleft()
    if j%10 != 0:
        a.append((10*j) + ((j%10) -1))
        
    a.append((10*j)+j%10)
    
    if j%10 != 9:
        a.append((10*j) +((j%10)+1))
    
a.popleft()

i = list(map(int, input().split())) 
X = i[0]
Y = i[1]
Z = i[2]

print(Z, X, Y)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
x,y,z=list(map(int,input().split()))

ans=[]

ans.append(z)
ans.append(x)
ans.append(y)

print(ans)

x,y,z=map(int,input().split())
 
ans=[]
 
ans.append(z)
ans.append(x)
ans.append(y)
 
print(ans)

x,y,z=map(int,input().split())
print(z,x,y)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
X,Y,Z = int(input().split())
print('{} {} {}'.format(Z,X,Y))

X,Y,Z = map(int, input().split())
print('{} {} {}'.format(Z,X,Y))

Verdicts: Runtime Error

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
a, b, c = map(int, input().split())
print(c,b,a)


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


Verdicts: Wrong Answer

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):

input_list = input().split( )
input_list = input_list.sort()
print(input_list[0],input_list[1],input_list[2])



input_list = input().split( )
print(input_list[1],input_list[2],input_list[0])


input_list = input().split( )
input_list = sorted(input_list)
print(input_list[0],input_list[1],input_list[2])


input_list = input().split( )
input_list = input_list.sort
print(input_list[0],input_list[1],input_list[2])


input_list = input().split( )
print(input_list[2],input_list[0],input_list[1])

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
num = list(map(int, input().split()))

num.reverse()

print(num[0], num[1], num[2])

num = list(map(int, input().split()))

print(num[2], num[0], num[1])

Verdicts: Wrong Answer

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
s = list(map(int, input().split()))
c = s[-1]
s.pop(-1)
s.insert(0,c)
print(s)

s = list(map(int, input().split()))
c = s[-1]
s.pop(-1)
s.insert(0,c)
print(*s)

Verdicts: Wrong Answer

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
# coding: utf-8
boxes = list(map(int, input().split()))
tmp_a, tmp_b = boxes[1], boxes[0]
boxes[0], boxes[1] = tmp_a, tmp_b
tmp_a, tmp_c = boxes[2], boxes[0]
boxes[0], boxes[2] = tmp_a, tmp_c
print(boxes)

# coding: utf-8
boxes = list(map(int, input().split()))
tmp_a, tmp_b = boxes[1], boxes[0]
boxes[0], boxes[1] = tmp_a, tmp_b
tmp_a, tmp_c = boxes[2], boxes[0]
boxes[0], boxes[2] = tmp_a, tmp_c
print(boxes[0], boxes[1], boxes[2])

Verdicts: Wrong Answer

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
x,y,z=map(int,input().split())
print(z x y)

x,y,z=map(int,input().split())
print(z, x, y)

Verdicts: Runtime Error

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
a, b, c = map(int, input().split())
print(c a b)

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

Verdicts: Runtime Error

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
x,y,z = (int(x) for x in input().split())
print(" ".join([z,x,y]))

x,y,z = (str(x) for x in input().split())
print(" ".join([z,x,y]))

Verdicts: Runtime Error

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
X, Y, Z = map(int, input().split())
print(Z, Y, X)

X, Y, Z = map(int, input().split())
print(Z, X, Y)

Verdicts: Wrong Answer

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
temp=A
A=B
B=temp

temp=A
A=C
C=temp

print(A,B,C)

A,B,C=input().split()
temp=A
A=B
B=temp

temp=A
A=C
C=temp

print(A,B,C)

Verdicts: Runtime Error

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
print(0)

N,K = map(int, input().split(' '))
x = N % K
x1 = K - x
if x > x1:
  print(x1)
else:
  print(x)

N,K = map(int, input().split(' '))
x = N % K
x1 = K - x
if x > x1:
  print(x1)
else:
  print(x)

X, Y, Z = map(int, input().split(' '))
print(Z,X,Y)

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
n,m=map(int,input().split())
a=list(map(int,input().split()))
count=0
for i in range(int(n)):
    if a[i]<sum(a)//(4*int(m)):
        count=count
    else:
        count+=1
if count>=int(m):
    print("Yes")
else:
    print("No")
        

x,y,z=map(str,input().split())
print(z+" "+x+" "+y)


Verdicts: Runtime Error

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
#coding: utf-8
XYZ = input().split()
XYZ[0],XYZ[1],XYZ[2] = XYZ[1],XYZ[2],XYZ[0]
print(' '.join(map(str, XYZ)))


#coding: utf-8
XYZ = input().split()
XYZ[0],XYZ[1],XYZ[2] = XYZ[2],XYZ[0],XYZ[1]
print(' '.join(map(str, XYZ)))


Verdicts: Wrong Answer

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
a,b,c = map(int,input().split())
print("{} {} {}".format(b,c,a))


a,b,c = map(int,input().split(" "))
print("{} {} {}".format(b,a,c))
print("{} {} {}".format(c,b,a))

a,b,c = map(int,input().split())
print("{} {} {}".format(b,a,c))
print("{} {} {}".format(c,b,a))

A,B,C = map(int,input().split())

print(B,A,C)
print(C,B,A)

a,b,c = map(int,input().split())
print("{} {} {}".format(c,a,b))

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
x, y, z = input().split()
print(" ".join([y,z,x]))

x, y, z = input().split()
print(" ".join([z,x,y]))

Verdicts: Wrong Answer

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
from collections import deque

k = int(input())
q = deque(range(1, 10))
 
for i in range(k):
    x = q.popleft()
    if x % 10 != 0:
        q.append(10 * x + x % 10 - 1) 

    q.append(10 * x + x % 10) 

    if x % 10 != 9:
        q.append(10 * x + x % 10 + 1) 
 
print(x)

x,y,z = map(int,input().split())
print('{0} {1} {2}'.format(z,x,y))

Verdicts: Runtime Error

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
def main():
    x,y,z = map(int, input().split())
    print(z,y,y)


if __name__ == '__main__':
    main()


def main():
    x,y,z = map(int, input().split())
    print(z,y,x)


if __name__ == '__main__':
    main()


def main():
    x,y,z = map(int, input().split())
    print(z,x,y)


if __name__ == '__main__':
    main()


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
a,b,c = map(int,input().split())
a,b = b,c
a,c = c,a
print(a,b,c)

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

Verdicts: Wrong Answer

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
N, M = map(int, input().split())
A = list(map(int, input().split()))

totalVote = sum(A)
border = totalVote / (4 * M)
A.sort(reverse = True)

if A[M-1] >= border:
    print("Yes")
else:
    print("No")


X, Y, Z = map(int, input().split())

x = str(X)
y = str(Y)
z = str(Z)
print(Z + " " + X + " " + Y)

X, Y, Z = map(int, input().split())

print(Z + " " + X + " " + Y)

X, Y, Z = map(int, input().split())

x = str(X)
y = str(Y)
z = str(Z)
print(z + " " + x + " " + y)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have three boxes A, B, and C, each of which contains an integer.   Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.   We will now do the operations below in order. Find the content of each box afterward.    * Swap the contents of the boxes A and B   * Swap the contents of the boxes A and C

Submission attempts (in order):
n,k = map(int,input().split())

x = [n-k*i for i in range(n//k+2)]
x[-1] = abs(x[-1])
print(min(x))

x,y,z = map(int,input().split())

print(z,x,y)

Verdicts: Runtime Error

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
a,b=map(int,input().split())
c=list(map(int,input().split()))
d=sum(c)/(4*b)
c=[i for i in c if i<d]
if len(c)>0:
  print("No")
else:
  print("Yes")

a,b=map(iNt,input().split())
c=list(map(int,input().split()))
c=[i for i in c if i>a/(4*b)]
if len(c)<b:
  print("No")
else:
  print("Yes")

a,b=map(int,input().split())
c=list(map(int,input().split()))
d=sum(c)/(4*b)
e=[i for i in c if i<d]
if len(e)>a-b:
  print("No")
else:
  print("Yes")

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
s=0
b=True
for i in a:
  s+=i
  
for i in range(0,m):
  if a[i]>=s/4/m:
    b=True
  else:
    b=False
    
if b:
  print('Yes')
else:
  print('No')

n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
s=0
b=True
for i in a:
  s+=a
  
for i in range(0,m):
  if a[i]>=s/4/m:
    b=True
  else:
    b=False
    
if b:
  print('Yes')
else:
  print('No')

n,m=map(int,input().split())

a=list(map(int,input().split()))

sum=0
count=0
for i in a:
  sum+=a
  
for i in a:
  if a>=(sum/4*m):
    count+=1
    
if(count>=m):
  print('Yes')
else:
  print('No')

n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
s=0
b=True
for i in a:
  s+=i
  
for i in range(0,m):
  if a[i]>=s/4/m:
    b=True
  else:
    b=False
    break
    
if b:
  print('Yes')
else:
  print('No')

n,m=map(int,input().split())
a=list(map(int,input().split()))

count=0
sum=0

for i in a:
  sum+=i
  
for i in a:
  if a>=(sum/4*m):
    count+=1

if count>=m:
  print('Yes')
else:
  print('No')

n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort(reverse=True)
s=0
b=True
for i in a:
  s+=i
  print(a)
  
for i in range(0,m):
  if a[i]>=s/4/m:
    b=True
  else:
    b=False
    
if b:
  print('Yes')
else:
  print('No')

n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort(reverse=True)
s=0
b=True
for i in a:
  s+=i

  
for i in range(0,m):
  if a[i]>=s/4/m:
    b=True
  else:
    b=False
    
if b:
  print('Yes')
else:
  print('No')

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)

ans = []
for i in range(m+1) :
  if a[i] < sum(a) / (4 * m) :
    continue
  else :
    ans.append(a[-1])

if len(ans) == m :
  print('Yes')
else :
  print('No')

n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
print(a)
ans = []
for i in range(m+1) :
  if a[i] < sum(a) / (4 * m) :
    continue
  else :
    ans.append(a[-1])

if len(ans) == m :
  print('Yes')
else :
  print('No')

n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)

ans = []
for i in range(m) :
  if a[i] < sum(a) / (4 * m) :
    continue
  else :
    ans.append(a[-1])

if len(ans) == m :
  print('Yes')
else :
  print('No')

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
category_number, popular_product_number = input().split()
product_list = input().split()
votes_number = sorted(product_list)[-popular_product_number]
border = sum(product_list)/4/popular_product_number
if votes_number < border:
  print('No')
else:
  print('Yes')

category_number, popular_product_number = input().split()
product = input().split()
product_list = [int(i) for i in product]
votes_number = sorted(product_list)[-int(popular_product_number)]
border = sum(product_list)/4/int(popular_product_number)
if votes_number < border:
  print('No')
else:
  print('Yes')

Verdicts: Runtime Error

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
import numpy as np
import math as mt
N,M=map(int, input().split())
A=list(map(int,input().split()))
boader=1/(4*M)
A.sort(reverse=True)
for i in range(0,M):
    print(i)
    if A[i]<sum(A)*(1/(4*M)):
        print("No")
        break
    elif i==M-1:
        print("Yes")
print(A)

import numpy as np
import math as mt
N,M=map(int, input().split())
A=list(map(int,input().split()))
boader=1/(4*M)
A.sort(reverse=True)
for i in range(0,M):
    if A[i]<sum(A)*(1/(4*M)):
        print("No")
        break
    elif i==M-1:
        print("Yes")
print(A)









import numpy as np
import math as mt
N,M=map(int, input().split())
A=list(map(int,input().split()))
boader=1/(4*M)
A.sort(reverse=True)
for i in range(0,M):
    if A[i]<(sum(A)*(1/(4*M))):
        print("No")
        break
    elif i==M-1:
        print("Yes")
print(A)

import numpy as np
import math as mt
N,M=map(int, input().split())
A=list(map(int,input().split()))
boader=1/(4*M)
A.sort(reverse=True)
for i in range(0,M):
    if A[i]<(sum(A)*(1/(4*M))):
        print("No")
        break
    elif i==M-1:
        print("Yes")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
n, m = map(int, input().split())
A = list(map(int, input().split()))
b = sum(A)/(4*m)
a = 0
print(b)
for i in range(n):
  if A[i] >= b:
    a += 1

if a >= m:
  print("Yes")
else:
  print("No")

n, m = map(int, input().split())
A = list(map(int, input().split()))
b = sum(A)/(4*m)
a = 0
#print(b)
for i in range(n):
  if A[i] >= b:
    a += 1

if a >= m:
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
n,m=map(int,input().split());a=sorted(map(int,input().split()),reverse=True)
print('NYOE S'[all([1 if a[i]>=sum(a)/(4*m) else 0 for i in range(m)])::2])

n,m=map(int,input().split());a=sorted(map(int,input().split()),reverse=True)
print('NYoe s'[all([1 if i>=sum(a)/(4*m) else 0 for i in a[:m]])::2])

Verdicts: Wrong Answer

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
n, m = map(int, input().split())
a = list(map(int, input().split()))

a.sort(reversed=True)
if a[m - 1] >= sum(a) / (4 * m):
    print("Yes")
else:
    print("No")

n, m = map(int, input().split())
a = list(map(int, input().split()))

a.sort(reverse=True)
if a[m - 1] >= sum(a) / (4 * m):
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
sumA = sum(a)

sumBy4 = sumA/(4*m)

count = 0

for i in range(n):
    if(a[i] >= sumBy4):
        count += 1

if(count > m):
    print("YES")

else:
    print("NO")

n,m = map(int,input().split())
arr = list(map(int,input().split()))

arr.sort()
sum_arr = sum(arr)
flag = True

for i in range(m):
    if arr[i] < (sum_arr/(4*m)):
        flag = False
        break
if flag:
    print('Yes')
else:
    print('No')

n=list(map(int,input().split()))
a=list(map(int,input().split()))
s=sum(a)
c=s/(4*n[1])
x=0
for i in range(0,n[0]):
    if a[i]>=c:
        x=x+1
    else:
        continue
if x>=n[1]:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
#! env/bin/local python3
# -*- coding:utf-8 -*-

is_first = False
while True:
    try:
        if is_first:
            n, m  = (int(i) for i in input().split())
            is_first = False
        else:
            arr = (int(i) for i in input().split())
    except EOFError:
        break

total_vote = sum(arr)
sorted_arr = sorted(arr)

list_up_arr = sorted_arr[-1: -m]

flag = False
for l in list_up_arr:
    if l >= 1 / (4 * m):
        flag = True

print('Yes' if flag else 'No')

#! env/bin/local python3
# -*- coding:utf-8 -*-

is_first = True
while True:
    try:
        if is_first:
            n, m  = [int(i) for i in input().split()]
            is_first = False
        else:
            arr = [int(i) for i in input().split()]
    except EOFError:
        break

total_vote = sum(arr)
sorted_arr = sorted(arr, reverse=True)

list_up_arr = sorted_arr[: m]

flag = True
for l in list_up_arr:
    if l < 1 / (4 * m) * total_vote:
        flag = False

print('Yes' if flag else 'No')

Verdicts: Runtime Error

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
# -*- coding: utf-8 -*-
N, M = map(int, input().split())
A = list(map(int, input().split()))
cnt = 0
for Ai in A:
    if (sum(A))*(1/(4*M)) <= Ai:
        cnt += 1
if cnt == M:
    print("Yes")
else:
    print("No")

# -*- coding: utf-8 -*-
N, M = map(int, input().split())
A = list(map(int, input().split()))
cnt = 0
for Ai in A:
    k = 1/(4*M)
    if (sum(A))*k <= Ai:
        cnt += 1
if cnt >= M:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
n, m = map(int, input().split())
array=list(map(int, input().split()))
all = sum(array)
flag = 0
border = all/(4*m)
if array[n-1] >= border:
  print("Yes")
else:
  print("No")

n, m = map(int, input().split())
array=list(map(int, input().split()))
all = sum(array)
flag = 0
border = all/(4*m)
for i in range(n):
  if array[i-1] >= border:
    flag += 1
    
if flag >= m:
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
#import math
n,m = map(int, input().split());
l = list(map(int, input().split()))
#print(m)
#print(n)
#print(l)
num = 0;
th = sum(l)/(4*m);
print(th);
for i in range(len(l)):
    if l[i] >= th:
        num += 1;
if num >= m:
    print('Yes');
else:
    print('No');

n,m = map(int, input().split());
l = list(map(int, input().split()))

num = 0;
th = sum(l)/(4*m);
for i in range(len(l)):
    if l[i] >= th:
        num += 1;
if num >= m:
    print('Yes');
else:
    print('No');


Verdicts: Wrong Answer

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
# coding: utf-8
# Your code here!

input_line = input()
Line = input_line.split()
Line = [int(s) for s in Line]

input_line = input()
Line2 = input_line.split()
Line2 = [int(s) for s in Line2]

tokuhyou = sum(Line2) / 4 / Line[1]

Line2.sort(reverse=True)

print(Line2[Line[1]-1],tokuhyou)


if Line2[Line[1]-1] >= tokuhyou:
    print("Yes")
else:
    print("No")

# coding: utf-8
# Your code here!

input_line = input()
Line = input_line.split()
Line = [int(s) for s in Line]

input_line = input()
Line2 = input_line.split()
Line2 = [int(s) for s in Line2]

tokuhyou = sum(Line2) / 4 / Line[1]

Line2.sort(reverse=True)




if Line2[Line[1]-1] >= tokuhyou:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
import numpy as np

tmp = list(map(int, input().split()))

N = tmp[0]
M = tmp[1]

i = list(map(int, input().split()))

i = np.array(i)

i.reverse()

souwa = sum(i)

if i[M] < (souwa * (1/(4*M))):
    print("Yes")
else:
    print("No")





import numpy as np

tmp = list(map(int, input().split()))

N = tmp[0]
M = tmp[1]

i = list(map(int, input().split()))

i = np.array(i)

i = np.sort(i)[::-1]

souwa = np.sum(i)

if i[M-1] < (souwa * (1/(4*M))):
    print("No")
else:
    print("Yes")





Verdicts: Runtime Error

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
def readInts():
  return list(map(int, input(), split()))

n, m = readInts()
a = readInts()
s = sum(a)
cnt = 0
for i in range(n):
  if a[i]*4*m >=s:
    cnt +=1
    
if cnt >= m: print("Yes")
  else: print("No")
  

def readInts():
  return list(map(int, input(), split()))

n, m = readInts()
a = readInts()
s = sum(a)
cnt = 0
for i in range(n):
  if a[i]*4*m >=s:
    cnt +=1
    
if cnt >= m:
  print("Yes")
else:
  print("No")
  


def readInts():
  return list(map(int, input().split()))

n, m = readInts()
a = readInts()
s = sum(a)
cnt = 0
for i in range(n):
  if a[i]*4*m >=s:
    cnt +=1
    
if cnt >= m:
  print("Yes")
else:
  print("No")
  


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
s = input().split()
i = s[0]
m = s[1]
j = 0
el = input().split()
for p in el:
  if int(p) < 1 / (4 * m):
    j = 1
     
if j == 0:
  print("Yes")
else:
  print("No")

s = input().split()
i = s[0]
m = s[1]
j = 0
el = input().split()
for p in el:
  if p < 1 / (4 * m):
    j = 1

if j == 0:
  print("Yes")
else:
  print("No")

s = input().split()
i = s[0]
m = s[1]
j = 0
el = input().split()
for p in el:
    if int(p) < 1 / (4 * m):
      j = 1 
if j == 0:
    print("Yes")
else:
    print("No")

s = input().split()
i = s[0]
m = int(s[1])
count = 0
sun = 0
el = input().split()
for p in el:
    sun += int(p)
for k in el:
    if int(k) >= sun / (4 * m):
        count += 1
if count >= m:
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
n, m = map(int, input().split())
A = list(map(int, input().split()))

A.sort(reverse=True)

if A[m+1] >= (sum(A) // (4 * m)):
    print("Yes")
else:
    print("No")

n, m = map(int, input().split())
A = list(map(int, input().split()))

A.sort(reverse=True)

if A[m-1] >= (sum(A)/(4*m)):
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
def main():
    N,M = map(int,input().split())
    A = list(map(int,input().split()))
    G = sum(A)
    list.sort(A, reverse=True)
    i = 0
    while i < M:
        if A[i] / G > 1 / 4 * M:
            return "No"
            break
        i += 1
    return "Yes"
print(main())

def main():
    N,M = map(int,input().split())
    A = list(map(int,input().split()))
    G = sum(A)
    list.sort(A, reverse=True)
    i = 0
    while i < M:
        if A[i] / G < 1 / (4 * M):
            return "No"
            break
        i += 1
    return "Yes"
print(main())

Verdicts: Wrong Answer

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
if a[-m+1]<(sum(a)/(4*m)):
    print("No")
else:
    print("Yes")

n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
if a[-m]<(sum(a)/(4*m)):
    print("No")
else:
    print("Yes")

Verdicts: Wrong Answer

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
n, m = list(map(int, input().split()))
v = list(map(int, input().split()))
t = sum(v)/(4*m)

ct = 0
for i in v:
    if v>t:
        ct += 1
        
if ct >= m:
    print("Yes")
else:
    print("No")

n, m = list(map(int, input().split()))
v = list(map(int, input().split()))
t = sum(v)/(4*m)

ct = 0
for i in v:
    if i>=t:
        ct += 1
        
if ct >= m:
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
n, m = map(int, input().split())
a = sorted(list(map(int, input().split())), reverse=True)
print(a)
if a[m-1] >= sum(a) / (4 * m):
    print("Yes")
else:
    print("No")


n, m = map(int, input().split())
a = sorted(list(map(int, input().split())), reverse=True)
if a[m-1] >= sum(a) / (4 * m):
    print("Yes")
else:
    print("No")


Verdicts: Wrong Answer

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):


n, m = map(int, input().split())

arr = list(map(int, input().split()))

votes = sum(arr)

c = n

for i in arr:
    if i < votes / (4 * m):
        c -= 1

if c >= m:
    print ('YES')
else:
    print ('NO')



n, m = map(int, input().split())

arr = list(map(int, input().split()))

votes = sum(arr)

c = n

for i in arr:
    if i < votes / (4 * m):
        c -= 1

if c >= m:
    print ('Yes')
else:
    print ('No')

Verdicts: Wrong Answer

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
n,m=map(int,input().split())
a = list(map(int,input().split()))
cnt_border = 0

for i in range(len(a)):
    if a[i] > sum(a)/(4*m):
        cnt_border +=1
        
print(cnt_border)

if cnt_border >= m:
    print("Yes")
else:
    print("No")

n,m=map(int,input().split())
a = list(map(int,input().split()))
cnt_border = 0

for i in range(len(a)):
    if a[i] > sum(a)/(4*m):
        cnt_border +=1
        
print(cnt_border)

if cnt_border >= m:
    print("Yes")
else:
    print("No")

n,m=map(int,input().split())
a = list(map(int,input().split()))
cnt_border = 0

for i in range(len(a)):
    if a[i] >= sum(a)/(4*m):
        cnt_border +=1

if cnt_border >= m:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
N, M = map(int, input().split())
A = list(map(int, input().split()))
F = 0
trigger = 1 / (4 * M)
 
for i in range(len(A)):
    if A[i]/sum(A) < trigger:
        F = F + 1
        
if F < M:
    print('Yes')
else:
    print('No')

N, M = map(int, input().split())
A = list(map(int, input().split()))
F = 0
trigger = 1 / (4 * M)
 
for i in range(len(A)):
    if A[i]/sum(A) < trigger:
        F = F + 1
        
if N - F >= M:
    print('Yes')
else:
    print('No')

Verdicts: Wrong Answer

Accepted
Problem: We have held a popularity poll for N items on sale. Item i received A_i votes.  From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.  If M popular items can be selected, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse = True)
print('Yes' if a[m-1] >= 1/4M else 'No')


n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse = True)
print('Yes' if a[m-1] >= sum(a)/4/m else 'No')

Verdicts: Runtime Error

Accepted