TnT/Multi_CodeNet4Repair huggingface dataset:
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 =  list(map(int, input().split()))
a_total = sum(a_list)
ld = sorted(a_list, reverse = True)
for i inld[:M]:
    i < (1/(4*M))*a_total:
        print("No")
else:
    print("Yes")

N, M = map(int, input().split())
a_list =  list(map(int, input().split()))
a_list.sort(reverse = True)
a_total = sum(a_list)
count = 0
for voted in a_list[:M]:
  if count == M:
      print("Yes")
      break
  if voted >= (1/(4*M))*a_total:
      count +=1
else:
    print("No")

N, M = map(int, input().split())
a_list =  list(map(int, input().split()))
a_total = sum(a_list)
ld = sorted(a_list, reverse = True)
for i in ld[:M]:
    if i < (1/(4*M))*a_total:
    	print("No")
        break
else:
    print("Yes")

N, M = map(int, input().split())
a_list =  list(map(int, input().split()))
a_list.sort(reverse = True)
a_total = sum(a_list)
count = 0
for voted in a_list[:M]:
  if voted < (1/(4*M))*a_total:
    print("No")
    break
else:
  print("Yes")

Verdicts: Runtime Error

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()))
count=0
sum=0
for i in range(n):
  sum = sum + a[i]
for i in range(n):
  if a[i] >= sum*(1/(4*m)):
    count +=1
  else:
    pass

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

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

if count>=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())
l = x = [int(i) for i in input().split()]
l_sum = sum(l)
cnt = 0

for i in range(N):
    if l[i] >= (1/(4*M))*l_sum:
        cnt += 1

if cnt == M:
    print("Yes")
else:
    print("No") 

N,M = map(int,input().split())
l = x = [int(i) for i in input().split()]
l_sum = sum(l)
cnt = 0

for i in range(N):
    if l[i] > (1/(4*M))*l_sum:
        cnt += 1

if cnt == M:
    print("Yes")
else:
    print("No") 

import math
N,M = map(int,input().split())
l = [int(i) for i in input().split()]
l.sort(reverse = True)
l_sum = sum(l)
d = (1/(4*M))*l_sum
cnt = 0
 
for i in range(N):
    if l[i] >= d:
        cnt += 1
    else:
        break
 
if cnt >= 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()))
c=sum(a)/(4*m)
ans=0
for i in range(n):
    if a[n]>=c:
        ans+=1
if ans>=m:
    print('Yes')
else:
    print('No')

n,m=map(int,input().split())
a=list(map(int,input().split()))
c=sum(a)/(4*m)
ans=0
for i in range(n):
    if a[i]>=c:
        ans+=1
if ans>=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):
import math
n, m = map(int,input().split())
a = list(map(int,input().split()))
sum = sum(a)
print(sum)
x = 0
for i in a:
    if i * 4 * m >= sum:
        x += 1

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


import math
n, m = map(int,input().split())
a = list(map(int,input().split()))
sum = sum(a)
print(sum)
x = 0
for i in a:
    if i >= (math.ceil(sum / 4 * m)):
        x += 1

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


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

x = 0
for i in a:
    if i * 4 * m >= sum:
        x += 1


if x >= 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=int(input().split())

number=0
for i in range(N):
  v=int(input())
  if v < 1/(4*M):
    number=number
  else:
    number = number+1
if number >= M:
  print("Yes")
else:
  print("No")

N=input()
M=input()
number=0
for i in range(N):
  v=input()
  if v < 1/(4*M):
    number=number
  else:
    number = number+1
if number >= M:
  print("Yes")
else:
  print("No")

N,M=int(input().split())

a = list(map(int,input().strip().split()))[:n] 
  
number=0
total=0
for i in range(N):
  v=a[i]
  total=total+v
for i in range(N):
  v=a[i]
  if v < (1/(4*M))*total:
    number=number
  else:
    number = number+1
if number >= M:
  print("Yes")
else:
  print("No")

N=int(input())
M=int(input())
number=0
for i in range(N):
  v=int(input())
  if v < 1/(4*M):
    number=number
  else:
    number = number+1
if number >= M:
  print("Yes")
else:
  print("No")

N,M=input().split()
N,M=[int(N),int(M)]
 
a = list(map(int,input().strip().split()))[:N]
  
number=0
total=0
for i in range(N):
  v=a[i]
  total=total+v
for i in range(N):
  v=a[i]
  if v < (1/(4*M))*total:
    number=number
  else:
    number = number+1
if number >= M:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

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

s = sum(a)

a.sort()

if a[m - 1] * a * m >= s:
    print("Yes")
else:
    print("No")


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

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

s = sum(a)

a.sort(reverse=True)

if a[m - 1] >= s / (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=map(int,input().split())
a=sorted(list(map(int,input().split())),reverse=True)
print(a)
total=sum(a)
import math
border=math.ceil(total/(4*m))
cnt=0
for i in a:
    if i>=border:
        cnt+=1
print('Yes' if cnt>=m else 'No')

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

total=sum(a)
import math
border=math.ceil(total/(4*m))
cnt=0
for i in a:
    if i>=border:
        cnt+=1
print('Yes' if cnt>=m else '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 bisect,collections,copy,itertools,math,numpy,string
def I(): return int(input())
def S(): return input()
def LI(): return list(map(int,input().split()))
def LS(): return list(input().split())
##################################################
N,M = LI()
A = LI()
kijun = sum(A)//(4*M)
print(kijun)
count = 0
for x in A:
    if x>=kijun:
        count += 1
print('Yes' if M<=count else 'No')


import bisect,collections,copy,itertools,math,numpy,string
def I(): return int(input())
def S(): return input()
def LI(): return list(map(int,input().split()))
def LS(): return list(input().split())
##################################################
N,M = LI()
A = LI()
kijun = sum(A)/(4*M)
count = 0
for x in A:
    if x>=kijun:
        count += 1
print('Yes' if M<=count else '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()))

b = sum(a) / 4
count = 0
for i in range(n):
    if a[i] >= b:
      ans += 1
      
if ans >= m:
    print('Yes')
else:
    print('No')

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

b = sum(a) / (4 * m)
ans = 0
for i in range(n):
    if a[i] >= b:
      ans += 1

if ans >= 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=(int(x) for x in input().split())
A=[int(x) for x in input().split()]
num=0
for i in range(N):
    if A[i]>=sum(A)*0.25/M:
        num+=1
if num>=M:
    print("yes")
else:
    print("no")


N,M=(int(x) for x in input().split())
A=[int(x) for x in input().split()]
tot=0
S=sum(A)
for i in range(N):
    if A[i]>=S*0.25/M:
        tot+=1
if tot>=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):
from math import ceil
n,m = map(int,input().split())
l = list(map(int,input().split()))
l.sort(reverse=True)
val = sum(l)
f = 1
for i in range(m):
  if l[i] < ceil(val/4*m):
    f = 0
    break
else:
  print('No')
if f:
  print("Yes")

from math import ceil
n,m = map(int,input().split())
l = list(map(int,input().split()))
l.sort(reverse=True)
val = sum(l)
f = 1
for i in range(m):
  if l[i] < ceil(val/(4*m)):
    f = 0
    break
if f:
  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(input().split())
B = sum(A)
a = 0
for i in range(n):
    if A[i] >= B/(4*m):
        a += 1
if a >= m:
    print("Yes")
else:
    print("No")

n,m = map(int,input().split())
A = [int(x) for x in input().split()]
B = sum(A)
a = 0
for i in range(n):
    if A[i] >= B/(4*m):
        a += 1
if a >= 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())
Alist = list(map(int, input().split()))
Alist.sort(reverse=True)
sumnation = sum(Alist)
bordernum = sumnation / (4*M)
for i in Alist[:M]:
    judlist = []
    temp = True if i >= bordernum else False
    judlist.append(temp)
    judged =  all(judlist)
if judged:
    print('yes')
else :
    print('no')

N,M=map(int, input().split())
Alist = list(map(int, input().split()))
Alist.sort(reverse=True)
sumnation = sum(Alist)
bordernum = sumnation / (4*M)
for i in Alist[:M]:
    judlist = []
    temp = True if i >= bordernum else False
    judlist.append(temp)
    judged =  all(judlist)
if judged:
    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())
list = sorted(list(map(int, input().split())))
print("Yes" if list[-1*M] >= sum(list)/4M else("No"))

def resolve():
    N, M = map(int, input().split())
    vote = list(map(int, input().split()))
    bot = sorted(vote)[M*-1:]
    print("Yes" if min(bot) >= sum(vote)/(4*M) else "No")
resolve()

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 = list(map(int, input().split()))
vote_sum = sum(A)
cnt = 0
y = "Yes"
n = "no"

for i in range(N):
	if (A[i]*4*M) >= T:
		cnt += 1

if cnt >= M:
	print(y)
else:
	print(n)

N, M = map(int, input().split())
A = list(map(int, input().split()))
vote_sum = sum(A)
cnt = 0
y = "Yes"
n = "No"

for i in range(N):
	if (A[i]*4*M) >= vote_sum:
		cnt += 1

if cnt >= M:
	print(y)
else:
	print(n)

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 = list(map(int,input().split()))




total = sum(A)
A.sort(reverse = True)
print(A)

judge = True

for i in range(m):
    if (total / (4*m)) < A[i]:
        continue
    else:
        judge = not judge

if judge:
    print("Yes")
else:
    print("No")


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




total = sum(A)
A.sort(reverse = True)
print(A)

judge = True

for i in range(m):
    if (total / (4*m)) < A[i]:
        continue
    else:
        judge = not judge
        break

if judge:
    print("Yes")
else:
    print("No")


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




total = sum(A)
A.sort(reverse = True)


judge = True

for i in range(m):
    if (total / (4*m)) <= A[i]:
        continue
    else:
        judge = not judge
        break

if judge:
    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):
12 3
4 56 78 901 2 345 67 890 123 45 6 789

n, m = map(int,input().split())
ls = list(map(int,input().split()))
a = 0
s = sum(ls)

for i in range(n):
    if ls[i] * m * 4 >= s:
        a += 1

if a >= 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 = tuple(map(int, input().split(' ')))

total = sum(A)
border = total // (2 * M)

products = [a for a in A if a >= border]

if len(products) >= M:
    print('Yes')
else:
    print('No')


N, M = map(int, input().split(' '))
A = sorted(tuple(map(int, input().split(' '))), reverse=True)

total = sum(A)
border = total // (2 * M)

for i in range(M):
    if A[i] < border:
        print('No')
        break
else:
    print('Yes')


N, M = map(int, input().split(' '))
A = sorted(tuple(map(int, input().split(' '))), reverse=True)

total = sum(A)
border = total / (4 * M)

for i in range(M):
    if A[i] < border:
        print('No')
        break
else:
    print('Yes')


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

print([i for i in a if i >= sum(a)/(4*m)],sum(a)/(4*m))

if len([i for i in a if i >= sum(a)/(4*m)]) >= m:
    print("Yes")
else:
    print("No")

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

if len([i for i in a if i >= sum(a)/(4*m)]) >= 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 = map(int, input().split())
cnt = 0
for a in A:
  if a < M:
    cnt += 1
if M <= cnt:
  print('Yes')
else:
  print('No')




N, M = map(int, input().split())
A = list(map(int, input().split()))
s = sum(A)
min = s / (4 * M)
cnt = 0
for a in A:
  if a >= min:
    cnt += 1
if M <= cnt:
  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())
li=list(map(int,input().split()))
count=0

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

if count >= m: print("YES")
else:print("NO")

n,m=map(int,input().split())
li=list(map(int,input().split()))
count=0

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

if count >= 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 = map(int, input().split())
A.sort(reverse=True)
S = sum(A)
if A[M-1] >= S/(4*M):
  print("Yes")
else:
  print("No")

N,M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
S = sum(A)
if A[M-1] >= S/(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):
import math
N,M = (int(y) for y in input().split())
A = list(map(int, input().split()))
X = math.ceil(sum(A)/(4*M))
B = [i for i in A if i >= X]
print(sum(A))
print(X)
print(B)
if len(B) >= M:
  print("Yes")
else:
  print("No")

import math
N,M = (int(y) for y in input().split())
A = list(map(int, input().split()))
X = math.ceil(sum(A)/(4*M))
B = [i for i in A if i >= X]

if len(B) >= 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(list(map(int,input().split())))
a_list=[]
for i in a[:m]:
  if sum(a)/(a*m) > i:
    print('No')
    exit()
  else:
    a_list.append(i)
print('Yes')

n,m = map(int,input().split())
a = sorted(list(map(int,input().split())))
b = sum(a)/(4*m)
c=[]
for i in a[:m]:
  if i >= b:
    c.append(i)

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


n,m = map(int,input().split())
a = sorted(list(map(int,input().split())))
b = sum(a)/(4*m)
for i in a[:m]:
  if i >= b:
    continue
  else:
    print('No')
    exit()
print('Yes')

n,m = map(int,input().split())
a = sorted(list(map(int,input().split())),reverse=True)
b = sum(a)/(4*m)
c=[]
for i in a[:m]:
  if i >= b:
    c.append(i)

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


Verdicts: Runtime Error

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().strip().split())
A=list(map(int,input().strip().split()))

sumA=sum(A)

A.sort(reverse=True)

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

N,M=map(int,input().strip().split())
A=list(map(int,input().strip().split()))

sumA=sum(A)

A.sort(reverse=True)

if A[M-1]>=sumA/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())
A = [int(i) for i in input().split()]
A.sort()
B = sum(A)
if A[M-1] >= B/(4*M):
  print('Yes')
else:
  print('No')

N,M = map(int,input().split())
A = [int(i) for i in input().split()]
A.sort(reverse=True)
B = sum(A)
if A[M-1] >= B/(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())
a = list(map(int,input().split()))
count = 0
sm = sum(a)
for i in a:
    if( i >= sm/(4*m)):
        count += 1
if(count >= m):
    print("YES")
else:
    print("NO")

n,m = map(int,input().split())
a = list(map(int,input().split()))
count = 0
sm = sum(a)
for i in a:
    if( i >= sm/(4*m)):
        count += 1
if(count >= 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):
, M = map(int, input().split())
A = list(map(int, input().split()))

cnt = 0
th = sum(A)/(4*M)

for i in range(len(A)):
  if A[i] >= th:
    cnt += 1

ans = 'Yes' if cnt >= M else 'No'
print(ans)

N, M = map(int, input().split())
A = list(map(int, input().split()))

cnt = 0
th = sum(A)/(4*M)

for i in range(len(A)):
  if A[i] >= th:
    cnt += 1

ans = 'Yes' if cnt >= M else 'No'
print(ans)

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):
#B
n,m = map(int,input().split())
arr = list(map(int,input().split()))
c = 0
s = sum(arr)
a = (s/(4*m))
print(a)
for i in range(n):
    if arr[i]>a:
        c +=1
if c >= m:
    print('Yes')
else:
    print('No')

#B
n,m = map(int,input().split())
arr = list(map(int,input().split()))
c = 0
s = sum(arr)
a = (s//(4*m))
print(a)
for i in range(n):
    if arr[i]>a:
        c +=1
if c >= m:
    print('YES')
else:
    print('NO')

n,m = map(int,input().split())
arr = list(map(int,input().split()))
s = sum(arr)
a = (s//(4*M))
c = 0
for i in range(n):
    if arr[i]>a:
        c +=1
if c==m:
    print('YES')
else:
    print('NO')

N, M = map(int,input().split())
A = list(map(int,input().split()))
A.sort(reverse=True)
S = sum(A)
if A[M-1] >= S / (4*M):
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

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())
L=list(map(int,input().split()))
print(L)
S=sorted(L,reverse=True)
a=sum(L)
print(S)

if S[m-1] < a/(4*m):
    print("No")
else:
    print("Yes")

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

S=sorted(L,reverse=True)
a=sum(L)
if S[m-1] < 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=map(int,input().split())
List=list(map(int,input().split()))
count=0
total=0
for i in List:
    total=total+i

for i in List:
    if i>=total/m/4:
        count=count+1
    else:
        count=count+0

if count>=m:
    print("YES")
else:
    print("NO")

n,m=map(int,input().split())
List=list(map(int,input().split()))
count=0
total=0
for i in List:
    total=total+i

for i in List:
    if i>=total/m/4:
        count=count+1
    else:
        count=count+0

if count>=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=input().split()
n=int(n)
m=int(m)
a=[int(i) for i in input().split()]

sum=0
for i in range(n):
    sum+=a[i]

able=0
for ai in a:
    if ai>=sum*(1/(4*m)):
        able+=1

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


n,m=input().split()
n=int(n)
m=int(m)
a=[int(i) for i in input().split()]

sum=0
for i in range(n):
    sum+=a[i]

able=0
for ai in a:
    if ai>=sum*(1/(4*m)):
        able+=1

if able>=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())
lst = list(map(int,input().split()))
lst = sorted(lst)
lst = reversed(lst)
x = sum(lst)
if (lst[m] < x/4/m):
  print("No")
else:
  print("Yes")

n, m = map(int,input().split())
lst = list(map(int,input().split()))
lst.sort()
lst.reverse()
x = sum(lst)
if (lst[m - 1] < x/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):
N, M = map(int,input().split())
A = list(map(int,input().split()))
S = sum(A)
cnt = 0
for a in A:
  if a >= S / (4*M):
	cnt += 1
if cnt >= M:
  print("Yes")
else:
  print("No")

n,m = map(int,input().split())
a = list(map(int,input().split()))
asum = sum(a)
r = 0
for i in range(n):
  if a[i] >= asum/(4*m):
    r += 1
print("Yes" if r >= m 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):
N, M = map(int, input().split())
A = map(int, input().split())
m = sum(A)/(4*M)
n = sum(1 for i in A if i >= m)
print(["No", "Yes"][n >= M])

N, M = map(int, input().split())
A = list(map(int, input().split()))
m = sum(A)/(4*M)
n = sum([1 for i in A if i >= m])
print(["No", "Yes"][n >= M])

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()))
A = list(map(int, input().split()))
sum = sum(A)
for a in A:
  if a * 4 * m < sum:
    cnt += 1
if cnt >= m:
  print("Yes")
else:
  print("No")
  

n, m = list(map(int, input().split()))
A = list(map(int, input().split()))
sum = sum(A)
cnt = 0
for a in A:
  if a * 4 * m >= sum:
    cnt += 1
if cnt >= 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())
vote_result_list = sorted(list(map(int,input().split())))[::-1]
print(vote_result_list)
border = sum(vote_result_list)/(4*M)
print(border)
print("Yes" if vote_result_list[M-1] >= border else "No")

N, M = map(int, input().split())
vote_result_list = sorted(list(map(int,input().split())))[::-1]
border = sum(vote_result_list)/(4*M)
print("Yes" if vote_result_list[M-1] >= border else "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 = (int(x) for x in input().split())
a = list(map(int,input().split()))
x = sum(a)*1/(4*M)

pick = 0
for (a_i) in a:
    if (a_i) > x:
        pick += 1

if pick >= M:
    print("yes")
else:
    print("no")

N,M = (int(x) for x in input().split())
a = list(map(int,input().split()))
x = sum(a)*1/(4*M)

pick = 0
for (a_i) in a:
    if (a_i) >= x:
        pick += 1

if pick >= 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):
if __name__ == '__main__':
    n, m = map(int, input().split())
    a = [int(i) for i in input().split()]
    s = sum(a)
    a = sorted(a)[::-1]
    if a[m-1] >= (s / (4 * m)):
        print("yes")
    else:
        print("no")


if __name__ == '__main__':
    n, m = map(int, input().split())
    a = [int(i) for i in input().split()]
    s = sum(a)
    a = sorted(a)[::-1]
    if a[m-1] >= (s / (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())
A = list(map(int, input().split()))
check = ((1 / (4 * M)) * sum(A))
x = 0
for item in A:
    if item < check:
        x += 1
ans = N - x
if ans >= M :
    print('Yes')
else:
    print('No')N, M = map(int, input().split())
A = list(map(int, input().split()))
check = ((1 / (4 * M)) * sum(A))
x = 0
for item in A:
    if item < check:
        x += 1
ans = N - x
if ans >= M :
    print('Yes')
else:
    print('No')

N, M = map(int, input().split())
A = list(map(int, input().split()))
check = ((1 / (4 * M)) * sum(A))
x = 0
for item in A:
    if item < check:
        x += 1
ans = N - x
if ans >= 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 = list(map(int, input().split()))
total = sum(A)
cutoff = total/4N

over=[]
for i in A:
    if i>=cutoff:
        over.append(i)

if len(over)>=M:
    print('Yes')
else:
    print('No')

N,M = map(int,input().split())
A = list(map(int, input().split()))
total = sum(A)
cutoff = total/(4*M)

over=[]
for i in A:
    if i>=cutoff:
        over.append(i)

if len(over)>=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 = list(map(int, input().split()))
b = sum(list(map(lambda x: x >= sum(a)/(4*m), a)))
print(n,m,a,b)
print('Yes' if m<=b else 'No')


n, m = map(int, input().split())
a = list(map(int, input().split()))
b = sum(list(map(lambda x: x >= sum(a)/(4*m), a)))
print('Yes' if m<=b else '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 = input().split()
print(a)
ans = 0
for i in a:
    if int(i) >= sum(map(int , a)) * 1/(4*m):
        ans += 1
if ans >= m:
    print("Yes")
else:
    print("No")

n , m = map(int , input().split())
a = input().split()
ans = 0
for i in a:
    if int(i) >= sum(map(int , a)) * 1/(4*m):
        ans += 1
if ans >= 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()))
border = sum(a) / (4 * m)
a.sort(reverse=True)

for i in range(m):
    if border >= a[i]:
        pass
    else:
        print('No')
        exit(0)

print('Yes')


n, m = map(int, input().split())
a = list(map(int, input().split()))
border = sum(a) / (4 * m)
a.sort(reverse=True)

for i in range(m):
    if border <= a[i]:
        pass
    else:
        print('No')
        exit(0)

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=map(int,input().split())
a=list(map(int,input().split()))
a=sorted(a, reversed =True)
if sum(a)/(4*M)<=a[M-1]:
  print("Yes")
else:
  print("No")

N,M=map(int,input().split())
a=[int(input()) for i in range(N)]
a=sorted(a,reverse=True)
if sum(a)/(4*M)<=a[M-1]:
  print("Yes")
else:
  print("No")

N,M=map(int,input().split())
a=[int(input()) for i in range(N)]
a=sorted(a) reversed=True
if sum(a)/(4*M)<=a[M-1]:
  print("Yes")
else:
  print("No")

N,M=map(int,input().split())
a=[map(int,input().split()) for i in range(N)]
a=sorted(a, reversed =True)
if sum(a)/(4*M)<=a[M-1]:
  print("Yes")
else:
  print("No")

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

Verdicts: Runtime Error

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 = list(map(int, input().split()))

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

total_item_votes = sum(item_votes)

item_vote_percentages = [item_votes/total_item_votes for item_votes in item_votes]

required_vote_percentage = 1/(4*m)

can_select = 0
for vote_percentage in item_vote_percentages:
  if vote_percentage > required_vote_percentage:
    can_select += 1

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

# number of items, number of popular items to select
n, m = list(map(int, input().split()))

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

total_item_votes = sum(item_votes)

item_vote_percentages = [item_votes/total_item_votes for item_votes in item_votes]

required_vote_percentage = 1/(4*m)

can_select = 0
for vote_percentage in item_vote_percentages:
    if vote_percentage >= required_vote_percentage:
        can_select += 1

if can_select >= 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 = list(map(int, input().split(" ")))
B = []


sum_vote = sum(A)
#print(sum_vote)


for i in range(len(A)):
    if A[i] => sum_vote * 1/(4 * M):
        B.append(A[i])
    else:
        pass


if len(B) >= M:
    print("Yes")
else:
    print("No")

N,M = map(int, input().split(" "))
A = list(map(int, input().split(" ")))
B = []


sum_vote = sum(A)
#print(sum_vote)


for i in range(len(A)):
    if A[i] >= sum_vote * 1/(4 * M):
        B.append(A[i])
    else:
        pass


if len(B) >= 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=list(map(int,input().split()))
a.sort()
a_sum=sum(a)
count=0
for i in range(m):
  if not a[i] <= 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)
a_sum=sum(a)
count=0
for i in range(m):
    if  a[i] >= a_sum/(4*m):
        count+=1

if count==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 = [int(i) for i in input().split()]
A.sort(reverse=True)
print(A)
if A[M - 1] * 4 * M >=  sum(A) :
    print('Yes')
else:
    print('No')

N, M = map(int, input().split())
A = [int(i) for i in input().split()]
A.sort(reverse=True)

if A[M - 1] *  4 * M >=  sum(A):
    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):
num=input().rstrip().split(" ")
N=int(num[0])
M=int(num[1])
date=input().rstrip().split(" ")
sum=0
for i in range(N):
  sum+=int(date[N])
date=sorted(date,reverse=True)
if (sum/4)/M<=date[M-1]:
  print("Yes")
else:
  print("No")

num=input().rstrip().split(" ")
N=int(num[0])
M=int(num[1])
date=input().rstrip().split(" ")
sum=0
for i in range(N):
  sum+=int(date[i])
for j in range(len(date)):
  date[j]=int(date[j])
date=sorted(date,reverse=True)
if (sum/4)/M<=int(date[M-1]):
  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
n,m = (int(x) for x in input().split())

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

a.sort(reverse=True)

sum = 0
for i in a:
    sum += i

print(str(a[m-1]),str(sum),str(1 / (4 * m)))

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


#n,m
n,m = (int(x) for x in input().split())

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

a.sort(reverse=True)

sum = 0
for i in a:
    sum += i

#print(str(a[m-1]),str(sum),str(1 / (4 * m)))

if a[m-1]/sum >= 1 / (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())
a = list(map(int,input().split()))
a.sorted(reverse=True)
K = 0
for i in range(N):
  K += a[i]
if(a[M-1]>=K/(4*M)):
  print("Yes")
else:
  print("No")

N, M = map(int,input().split())
a = list(map(int,input().split()))
a.sort(reverse=True)
K = 0
for i in range(N):
  K += a[i]
if(a[M-1]>=K/(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 = map(int, input().split())
a = list(map(int, input().split()))
counter = 0
a.sort(reverse=True)

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

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

n,m = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a)
counter = 0

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

if counter >= 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 = list(map(int,input().split()))
vote = list(map(int,input().split()))
a = sum(vote)/(4*n[1])
result = 0
for i in range(n[0]):
  if vote[i]=>a:
    result += 1
if result<n[1]:
  print('No')
else:
  print('Yes')

n = list(map(int,input().split()))
vote = list(map(int,input().split()))
a = sum(vote)/(4*n[1])
result = 0
for i in range(n[0]):
  if vote[i]>a:
    result += 1
if result<n[1]:
  print('No')
else:
  print('Yes')
print(result)

n = list(map(int,input().split()))
vote = list(map(int,input().split()))
a = sum(vote)/(4*n[1])
result = 0
for i in range(n[0]):
  if vote[i]>=a:
    result += 1
if result<n[1]:
  print('No')
else:
  print('Yes')

Verdicts: Runtime Error

Wrong Answer

Accepted