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):
inputValues = [int(i) for i in input().split()]
n = inputValues[0]
m = inputValues[1]
votes = [int(i) for i in input().split()]
total = sum(votes)
cnt = 0
for i in votes:
    if i >= total*(1/(4*m)):
        cnt += 1
        print(i)
if cnt >= m:
    print("Yes")
else:
    print("No")


inputValues = [int(i) for i in input().split()]
n = inputValues[0]
m = inputValues[1]
votes = [int(i) for i in input().split()]
total = sum(votes)
cnt = 0
for i in votes:
    if i >= total*(1/(4*m)):
        cnt += 1
        # print(i)
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):
M,N = input().split()
A = list(input().split())mport numpy as np
N,M = map(int,input().split())
A = np.array(list(map(int,input().split())))

all_sum_a = np.sum(A)

if M<=np.sum(A>=all_sum_a/(4*M)):
    print('Yes')
else:
    print('No')


import numpy as np
N,M = map(int,input().split())
A = np.array(list(map(int,input().split())))

all_sum_a = np.sum(A)

if M<=np.sum(A>=all_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=[int(i) for i in input().split()]
list=[int(i) for i in input().split()]
x=1/(4*m)
count=0
for i in range(1,n+1):
  if list[i]>=x:
    count+=1

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

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

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

n,m=[int(i) for i in input().split()]
list=[int(i) for i in input().split()]
x=1/(4*m)
count=0
for i in range(1,n+1):
  if list[i-1]>=x:
    count+=1

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

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

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

Verdicts: Runtime Error

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

cnt = 0

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

if cnt >= m:
  print("True")
else:
  print("False")

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

cnt = 0

for i in range(n):
  if a[i] >= sum(a)/(4*m):
    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):
#!/usr/bin/env python3

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


#!/usr/bin/env python3

import numpy as np
N, M = map(int, input().split())
A = list(map(int, input().split()))

A = np.array(A)

num = np.sum(A >= np.sum(A)/(4*M))

if num >= 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 sys

nm=input().split()
a=input()
n=int(nm[0])
m=int(nm[1])
lista=[]
for i in a:
  lista.append(int(i))
count=0
suma=sum(lista)
thre=suma/4/m
for i in lista:
  if i >= thre:
    count+=1
  if count >= m:
    print('Yes')
    sys.exit()
print('No')

import sys
 
nm=input().split()
a=input().split()
n=int(nm[0])
m=int(nm[1])
lista=[]
for i in a:
  lista.append(int(i))
count=0
suma=sum(lista)
thre=suma/4/m
for i in lista:
  if i >= thre:
    count+=1
  if count >= m:
    print('Yes')
    sys.exit()
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 = [int(x) for x in input().split()]
s = sum(a)
l = a // (4 * m)

a = sorted(a, reverse = True)
f = 0
for i in a:
  i < l:
    f = i
    break
if(f < m):
  print('No')
else:
  print('Yes')

N, M = map(int, input().split())
vote_nums = sorted([float(i) for i in input().split()], reverse=True)
 
border_rate = 1 / (4 * M)
target = vote_nums[:M]
 
for vote_num in target:
  if vote_num < border_rate * sum(vote_nums):
    print('No')
    exit()
 
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())
votes = [int(i) for i in input().split()]
votes.sort()
if m > n:
    print('No')
else:
    for i in range(m):
        if votes[i] < sum(votes) // 4*m:
            print('No')
            break
    else:
        print('Yes')










n, m = map(int, input().split())
votes = [int(i) for i in input().split()]
z = sum(votes)
if sum(map(lambda x: x >= z / (4*m), votes)) >= 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=sorted(list(map(int,input().split())))
print('Yes' if all([L[i]*m*4>=sum(L) for i in range(m)] else 'No')

n,m=map(int,input().split())
L=sorted(list(map(int,input().split())),reverse=True)
print('Yes' if all([L[i]*m*4>=sum(L) for i in range(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):
def main():
  n, m = (int(x) for x in input().split())
  a_list = list(map(int, input().split()))
  sum_num = 0
  sum_num = sum(a_list)
  count = 0
  for i in a_list:
    if(i >= sum_num/(4 * m)):
      count += 1

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

if __name__ == '__main__':
  main()


def main():
  n, m = (int(x) for x in input().split())
  a_list = list(map(int, input().split()))
  sum_num = 0
  sum_num = sum(a_list)
  count = 0
  for i in a_list:
    if(i >= sum_num/(4 * m)):
      count += 1

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

if __name__ == '__main__':
  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()))

s = a.sum()
min_num = s//(4*m)

res = "No"
count = 0
for x in a:
    if x >= min_num:
        count += 1
    if count >= m:
        res = "Yes"
        break
print(res)

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

s = sum(a)
min_num = float(s)/(4*m)

res = "No"
count = 0
for x in a:
    if x >= min_num:
        count += 1
    if count >= m:
        res = "Yes"
        break
print(res)

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

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

total_votes = sum(votes)
print(total_votes)
threshold = total_votes / (4*M)
print(threshold)
temp = 0
for v in votes:
    if v > threshold:
        temp += 1

if temp > M:
    print("Yes")
else:
    print("No")


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

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

total_votes = sum(votes)
threshold = total_votes / (4*M)
temp = 0
for v in votes:
    if v >= threshold:
        temp += 1

if temp >= 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):
str1 = input()
A = input()

list1 = str1.split()
list2 = A.split()
N = list1[0]
M = list1[1]

M_count = 0

all = 0
for i in range(len(list2)):
    all = all + int(list2[i])
#print("all" + str(all))

judge =  1/(4*int(M)) * all
#print("judge" + str(judge))

for i in list2:
    
    if int(i) >= judge:
        M_count = M_count + 1
        #print("M_count" + str(M_count))
    
if M_count >= int(M):
    print("yes")
else:
    print("no")

str1 = input()
A = input()

list1 = str1.split()
list2 = A.split()
N = list1[0]
M = list1[1]

M_count = 0

all = 0
for i in range(len(list2)):
    all = all + int(list2[i])
#print("all" + str(all))

judge =  1/(4*int(M)) * all
#print("judge" + str(judge))

for i in list2:
    
    if int(i) >= judge:
        M_count = M_count + 1
        #print("M_count" + str(M_count))
    
if M_count >= int(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()))
total = sum(A) / 4 * M
A.sort(reverse = False)
if A[M-1] >= total:
  print('Yes')
else:
  print('No')

N, M = map(int, input().split())
A = list(map(int, input().split()))
total = sum(A) / (4 * M)
A.sort(reverse = True)
if A[M-1] >= total:
  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 sys
input = lambda: sys.stdin.readline().rstrip()
yes = lambda boolean: print('Yes') if boolean else print('No')
input_ints = lambda: list(map(int, input().split()))

N, M = input_ints()
A = input_ints()
A.sort(reverse=1)
yes(A[M-1]*4*M>_1)

import sys
input = lambda: sys.stdin.readline().rstrip()
yes = lambda boolean: print('Yes') if boolean else print('No')
input_ints = lambda: list(map(int, input().split()))
 
N, M = input_ints()
A = input_ints()
A.sort(reverse=1)
yes(A[M-1]*4*M>=sum(A))

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(reverse = True)
ans = "Yes"
for i in range(n):
    if a[i] < sum(a)*(1/(4*m)):
        ans = "No"
        break
print(ans)

n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse = True)
ans = "Yes"
for i in range(n):
    if a[i] < sum(a)*(1/(4*m)):
        ans = "No"
        break
print(ans)

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

a.sort(reverse=True)

for i in range(m):
    if a[i] < sum(a)*(1/(4*m)):
        ans = "No"
        break

print(ans)

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

n,m = map(int,input().split())
A = input().split()
for i in range(n):
    A[i] = int(A[i])
count = 0
sum = sum(A)
for i in range(n):
    if A[i] < sum/(4*m):
        pass
    else:
        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 = list(map(int,input().split()))
B = 0
C = 0

for i in range(list(A)):
  c += A[i]
  
for i in range(list(A)):
  if A[i] >= 1/(4*M):
    B += 1

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

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

for i in range(list(A)):
  if A[i] >= 1/(4*M):
    B += 1

if B >= M:
  print('Yes')
else B < M:
  print('No')
    

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

for i in range(len(A)):
  C += A[i]
  
for i in range(len(A)):
  if A[i] >= C/(4*M):
    B += 1

if B >= 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):
N, M = map(int, input().split())
A = list(map(int, input().split()))

//print(A)

cnt = 0
cnt1 = 0

for i in range(N):
    cnt = cnt + A[i]

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

//print(cnt1)

if cnt1 > M:
    print('Yes')
else:
    print('No')


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

cnt = 0
cnt1 = 0

for i in range(N):
    cnt = cnt + A[i]

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

if cnt1 > M:
    print('Yes')
else:
    print('No')


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

cnt = 0
cnt1 = 0

for i in range(N):
  	cnt = cnt + A[N]

for i in range(N):
  	if  A[i]/cnt > 1/4/M:
		cnt1 =cnt1 + 1
      
if cnt1 > M:
	print('Yes')
elif
	print('No')
 

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



cnt = 0
cnt1 = 0

for i in range(N):
    cnt = cnt + A[i]

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



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

res = 0
for i in range(N):
    if arr[i] < (1/(4*M)*sum(arr)):
        res = res
    else:
        res += 1
print(res)
if res >= M:
    print('Yes')
else:
    print('No')

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

res = 0
for i in range(N):
    if arr[i] < (1/(4*M)*sum(arr)):
        res = res
    else:
        res += 1
print(res)
if res == M:
    print('Yes')
else:
    print('No')

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

res = 0
for i in range(N):
    if arr[i] < (1/(4*M)*sum(arr)):
        res = res
    else:
        res += 1

if res >= 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()))
 
sum_A =0
for i in range(N):
    sum_A += A[i]
 
ans = 1
for i in range(N):
    if (4*M*A[i] > sum_A):
        ans= ans*1
    else:
    	ans =ans*0
 
if (ans != 0):
    print('Yes')
else:
    print('No')

N, M = map(int, input().split())
A = list(map(int, input().split()))
 
sum_A =0
for i in range(N):
    sum_A += A[i]
 
ans = 1
for i in range(M):
    if (4*M*A[i] < sum_A):
        ans= ans*1
    else:
    	ans =ans*0
 
if (ans == 1):
    print('Yes')
else:
    print('No')

N, M = map(int, input().split())
A = list(map(int, input().split()))
 
sum_A =0
for i in range(N):
    sum_A += A[i]
 
ans = 1
for i in range(N):
    if (4*M*A[i] < sum_A):
        ans= ans*1
    else:
    	ans =ans*0
 
if (ans != 0):
    print('Yes')
else:
    print('No')

N, M = map(int, input().split())
A = list(map(int, input().split()))
 
sum_A =0
for i in range(N):
    sum_A += A[i]

for i in range(N):
    if (4*M*A[M] < sum_A):
        print('No')
    else:
        print('Yes')

N, M = map(int, input().split())
A = list(map(int, input().split()))
 
sum_A =0
for i in range(N):
    sum_A += A[i]

ans = 1
for i in range(N):
    if (4*M*A[i] > sum_A):
        ans= ans*1
    else:
    	ans =ans*0
    	
if (ans != 0):
    print('Yes')
else:
    print('No')


N, M = map(int, input().split())
A = list(map(int, input().split()))
 
sum_A =0
for i in range(N):
    sum_A += A[i]
 
ans = 1
for i in range(N):
    if (4*M*A[i] < sum_A):
    	ans =ans*0
    else:
        ans= ans*1
 
if (ans != 0):
    print('Yes')
else:
    print('No')

    N, M = map(int, input().split())
    A = list(map(int, input().split()))
     
    sum_A =0
    for i in range(N):
        sum_A += A[i]
     
    ans = 1
    for i in range(M):
        if (4*M*A[i] > sum_A):
            ans= ans*1
        else:
        	ans =ans*0
     
    if (ans == 1):
        print('Yes')
    else:
        print('No')

N, M = map(int, input().split())
A = list(map(int, input().split()))
 
sum_A =0
for i in range(N):
    sum_A += A[i]

ans = 0
for i in range(N):
    if (4*M*A[i] >= sum_A):
        ans+=1
    else:
    	ans+=0
    	
if (ans >= M):
    print('Yes')
else:
    print('No')


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

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

count = 0
sumA = sum(A)
board = sumA // (4*NM[1])


print(sumA)
print(board)

for i in range(len(A)):
    if A[i] >= board:
        count += 1
    else:
        continue


if count > NM[1]:
    print("Yes")
else:
    print("No")


NM = list(map(int, input().split()))
A = list(map(int, input().split()))

count = 0
sumA = sum(A)
board = sumA // (4*NM[1])


print(sumA)
print(board)

for i in range(len(A)):
    if A[i] > board:
        count += 1
    else:
        continue


if count >= NM[1]:
    print("Yes")
else:
    print("No")


NM = list(map(int, input().split()))
A = list(map(int, input().split()))

count = 0
sumA = sum(A)
board = sumA / (4*NM[1])


# print(sumA)
# print(board)

for i in range(len(A)):
    if float(A[i]) >= board:
        count += 1
    else:
        continue


if count >= NM[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):
nums1=[int(e) for e in input().split()]
nums2=[int(t) for t in input().split()]
all_vote = 0
sum = nums1[0]
for num in nums2:
  all_vote += num
for k in nums2:
  if (k/(all_vote) < 1/(4*nums1[1])):
    sum-=1
if(nums1[1]<=sum):
  print(Yes)
else:
  print(No)

nums1=[int(e) for e in input().split()]
nums2=[int(t) for t in input().split()]
all_vote = 0
sums = nums1[0]
for num in nums2:
  all_vote += num
for k in nums2:
  if (k/(all_vote) < 1/(4*nums1[1])):
    sums-=1
if(nums1[1]<=sums):
  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(reverse = True)

m = 4*M
c = 0 
for i  in range(0,M):
  if a[i] >=m:
    c +=1
   
  
  
if c = M:
  print('Yes')
else:
  print('No')

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

n,m = map(int,input().split())
a = input().split()
s = 0
for i in a:
  s += int(i)
c = 0
for i in a:
  if int(i) >= s/(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):
i1 = input()
i2 = input()

# i1 = "4 1"
# i2 = "5 4 2 1"
list1 = [int(s) for s in i1.split()]
list2 = [int(s) for s in i2.split()]

n = list1[0]
m = list1[1]


total = sum(list2)


count = 0

for a in range(m):
    if (list2[a]/total > 1/(4*m)):
        count += 1 

if count == m:
    print("yes")
else:
    print("no")



i1 = input()
i2 = input()

# i1 = "4 1"
# i2 = "5 4 2 1"
list1 = [int(s) for s in i1.split()]
list2 = [int(s) for s in i2.split()]

n = list1[0]
m = list1[1]


total = sum(list2)


count = 0

for a in range(n):
    if (list2[a]/total > 1/(4*m)):
        count += 1 

if count == m:
    print("Yes")
else:
    print("No")

i1 = input()
i2 = input()

# i1 = "4 1"
# i2 = "5 4 2 1"
list1 = [int(s) for s in i1.split()]
list2 = [int(s) for s in i2.split()]

n = list1[0]
m = list1[1]


total = sum(list2)


count = 0

for a in range(m):
    if (list2[a]/total > 1/(4*m)):
        count += 1 

if count == m:
    print("yes")
else:
    print("no")

i1 = input()
i2 = input()

# i1 = "4 1"
# i2 = "5 4 2 1"
list1 = [int(s) for s in i1.split()]
list2 = [int(s) for s in i2.split()]

n = list1[0]
m = list1[1]


total = sum(list2)


count = 0

for a in range(n):
    if (list2[a]/total >= 1/(4*m)):
        count += 1 

if count == m:
    print("Yes")
else:
    print("No")

i1 = input()
i2 = input()

# i1 = "4 1"
# i2 = "5 4 2 1"
list1 = [int(s) for s in i1.split()]
list2 = [int(s) for s in i2.split()]

n = list1[0]
m = list1[1]


total = sum(list2)


count = 0

for a in range(m):
    if (list2[a]/total > 1/(4*m)):
        count += 1 

if count == m:
    print("yes")
else:
    print("no")



i1 = input()
i2 = input()

# i1 = "4 1"
# i2 = "5 4 2 1"
list1 = [int(s) for s in i1.split()]
list2 = [int(s) for s in i2.split()]

n = list1[0]
m = list1[1]


total = sum(list2)


count = 0

for a in range(n):
    if (list2[a]/total >= 1/(4*m)):
        count += 1 

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


Verdicts: Wrong Answer

Wrong Answer

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())
l = sorted(list(map(int,input().split())))[::-1]
s = float(sum(l)/4*m)
t = "Yes"
for i in range(m):
  if l[i]>=s:
     t = "No"
print(t)


n,m = map(int,input().split())
l = sorted(list(map(int,input().split())))[::-1]
s = float(sum(l)/(4*m))
t = "Yes"
for i in range(m):
  if l[i]<s:
    t = "No"
    break
print(t)

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()))
sum = 0
ans = 0
for i in range(N):
  sum += A[i]
print(sum)
for i in range(N):
  if A[i] >= sum*(1/(4*M)):
    ans += 1
print("Yes" if ans >= M else "No")

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

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

list.sort(A,reverse = True)
print(A)

s=float(sum(A)/(4*M))
check=0
for i in range(0, M):
    if A[i]<=s:
        check=1

if check ==1:
    print('No')
else:
    print('Yes')

N,M=(int(x) for x in input().split())

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

list.sort(A,reverse = True)

s=float(sum(A)/(4*M))
check=0
for i in range(0, M):
    if A[i]<s:
        check=1

if check ==1:
    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())
a_list = list(map(int, input().split()))

border = sum(a_list) * (1/(4*m))
print(sum(a_list))
print(1/(4*m))
print(border)

cnt = 0
for i in a_list:
    if cnt == m:
        print('Yes')
        exit()

    if i >= border:
        cnt += 1

print('No')


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

border = sum(a_list) * (1/(4*m))

cnt = 0
for i in a_list:
    if cnt == m:
        print('Yes')
        exit()

    if i >= border:
        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):
def main():
  n,m = [int(x) for x in input().split()]
  a = [int(x) for x in input().split()]
  total = sum(a)
  
  can_be_selected = list(filter(lambda x: x >= total/4/m, a))
  return len(can_be_selected) >= m

main()

def main():
  n,m = [int(x) for x in input().split()]
  a = [int(x) for x in input().split()]
  
  can_be_selected = list(filter(lambda x: x > 1/4/m, a))
  return len(can_be_selected) >= m

main()

def main():
  n,m = [int(x) for x in input().split()]
  a = [int(x) for x in input().split()]
  total = sum(a)
  
  can_be_selected = list(filter(lambda x: x >= total/4/m, a))
  if len(can_be_selected) >= m:
    print("Yes")
  else:
    print("No")

main()

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 = [int(a) for a in input().split(' ')]
S = sum(A)
thre = S / (4 * M)
print(thre)

cnt = 0
for a in A:
    if a >= thre:
        cnt += 1

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


N, M = map(int, input().split(' '))
A = [int(a) for a in input().split(' ')]
S = sum(A)
thre = S / (4 * M)

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


n, m = map(int, input().split())
aa = map(int, input().split())
thre = sum(aa) / (4*m)
cnt = 0
for a in aa:
  if a >= thre
  cnt  +=1
if cnt >= m:
  print('Yes')
else:
  print('No')


n, m = map(int, input().split())
aa = list(map(int, input().split()))
thre = sum(aa) / (4*m)
cnt = 0
for a in aa:
  if a >= thre:
    cnt +=1
if cnt >= m:
  print('Yes')
else:
  print('No')


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):
from sys import stdin

input = stdin.readline

n, k = map(int, input().split())
a = [int(x) for x in input().split()]
vote = sum(a) / 4 / m

a.sort()
a.reverse()

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

from sys import stdin
 
input = stdin.readline
 
n, m = map(int, input().split())
a = [int(x) for x in input().split()]
vote = sum(a) / 4 / m
 
a.sort()
a.reverse()
 
print("Yes" if a[m - 1] >= vote 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 = [int(i) for i in input().split()]
s = sum(a)
c=0

for i in range(n):

   if a[i]*4*m >= s:
       c+=1

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

n,m = map(int,input().split())
a = [int(i) for i in input().split()]
s = sum(a)
c=0

for i in range(n):

   if a[i]*4*m >= s:
       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()))
for x in a:
  if x >= sum(a)/(4*m):
  	res += x

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

n,m=map(int,input().split())
a=list(map(int,input().split()))
if sum(x >= sum(a)/(4*m) for x in 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 = []
for i in range(N):
  a = int(input()) 
  if a >= 1/(4*M):
    A.append(a)

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

N,M = map(int,input().split())
A = map(int,input().split())
new_A = []
for i in range(N):
  if A[a] >= 1/(4*M):
    new_A.append(a)
 
if len(new_A)>=M:
  print("Yes")
else:
  print("No")

N,M = map(int,input().split())
A = list(map(int,input().split()))
new_A = []
for i in range(N):
  if A[i] >= sum(A)/(4*M):
    new_A.append(A[i])

if len(new_A)>=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):
N, M = map(int, input().split())
A = list(map(int, input().split()))

s = sum(A)
A = sorted(A)
ans = 'Yes'
for i in M:
  if A[i] < s/(4*M): 
    ans = 'No'
    break
    
print(ans)

N, M = map(int, input().split())
A = list(map(int, input().split()))
 
s = sum(A)
A = sorted(A, reverse=True)
print(A)
ans = 'Yes'
for i in range(M):
  if A[i] < s/(4*M): 
    ans = 'No'
    break

print(ans)

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

s = sum(A)
A = sorted(A, reverse=True)


if A[M-1]*(4*M) >= s: print('Yes')
else: print('No')

Verdicts: 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())
hoge=list(ap,int,input.split())
total_vote=sum(hoge)
if sorted(hoge)[-M]>total_vote/(4*M):
  print('Yes')
else:
  print('No')


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

if sorted(hoge)[-M] >= sum(hoge)/(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()))
num=sum(a)
tmp=float(num)/float(4.0*m)
count=0
for i in range(n):
  if a[i]>=tmp:
    count+=1
if count==m:
  print("Yes")
else:
  print("No")

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

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

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

n,m=map(int,input().split())
a=list(map(int, input().split()))
num=sum(a)
tmp=float(num)/float(4.0*m)
count=0
for i in range(n):
  if a[i]>=tmp:
    count+=1
if count>=m:
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

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 = input().split()
n, m = int(n), int(m)
a = input().split()
a = [int(i) for i in a]
a.sort()
a.reverse()
for i in range(n):
  if a[i] < 1/4m:
    print("No")
    break
  if i == m:
    print("Yes")
    break

n, m = input().split()
n, m = int(n), int(m)
a = input().split()
a = [int(i) for i in a]
a.sort()
a.reverse()
for i in range(n):
  if a[i] < 1/4m:
    print("No")
    break
  if i == m-1:
    print("Yes")
    break


n, m = input().split()
n, m = int(n), int(m)
a = input().split()
a = [int(i) for i in a]
a.sort()
a.reverse()
s = 1/(4*m)*sum(i for i in a)
for i in range(n):
    if a[i] < s:
        print("No")
        break
    if i == m-1:
        print("Yes")
        break


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):
#!/usr/bin/env python3


N, M = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]

A = sorted(A)[::-1]
total = sum(A)
print(A[M-1])
if A[M] < total * (1 / (4 * M)):
    print('No')
else:
    print('Yes')


N, M = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]


A = sorted(A)[::-1]
total = sum(A)

if A[M-1] < total:
    print('No')
else:
    print('Yes')



#!/usr/bin/env python3


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

A = sorted(A)[::-1]
total = sum(A)
print(A[M-1])
if A[M] < total * (1 / (4 * M)):
    print('No')
else:
    print('Yes')


# A = [int(x) for x in line2.split()]

N, M = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]


A = sorted(A)[::-1]
total = sum(A)
thre = total * (1 / (4*M))
if A[M-1] < thre:
    print('No')
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())
in_list = input().split
vote_list = [int(i) for i in in_list]

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

if ans < m :
    print('no')
else:
    print('yes')

n, m = map(int, input().split())
in_list = input().split()
vote_list = [int(i) for i in in_list]

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

if ans < 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):
a,b = map(int, input().split())
c = input().split()
m = 0
for i in range(len(c)):
    c[i] = int(c[i])
    m += c[i]
c.sort(reverse=True)
if c[b-1] >= m * (1 / (4*b)):
    print('Yes')
else:
    print('No')
print(m*(1/(4*b)))

a,b = map(int, input().split())
c = input().split()
m = 0
for i in range(len(c)):
    c[i] = int(c[i])
    m += c[i]
c.sort(reverse=True)
if c[b-1] >= m * (1 / (4*b)):
    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 = a.sort(reverse = True)
b = sum(a)
c = 0
d = "Yes"
l = 1 / (4 * m)
b = b * l
while c < m:
  if a[c] < b:
    d = "No"
  c += 1
print(d)

n, m = map(int, input().split())
a = list(map(int, input().split()))
a = sort(a)
b = sum(a)
c = 0
d = "Yes"
l = 1 / (4 * m)
b = b * l
while c < m:
  if a[c] < b:
    d = "No"
  c += 1
print(d)

n, m = map(int, input().split())
a = list(map(int, input().split()))
b = 0
c = 0
d = "Yes"
l = 1 / (4 * m)
for i in a:
  b += i
b = b * l
while c < m:
  if a[c] < b:
    d = "No"

print(d)


n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse = True)
b = 0
c = 0
d = ""
l = 1 / (4 * m)
for i in a:
    b += i
b = b * l
while c < m:
  if a[c] < b:
    d = "No"
  else:
    d = "Yes"
  c += 1
print(d)

Verdicts: Runtime Error

Runtime Error

Time Limit Exceeded

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 actual(n, m, a_list):
    threshold = sum(a_list) / (4 * m)

    count_can_be_popular = 0

    for vote in a_list:
        if vote >= threshold:
            count_can_be_popular += 1

    if count_can_be_popular >= m:
        return 'Yes'

    return 'No'

n, m = map(int, input().split())
a_list = map(int, input().split())
  
print(actual(n, m, a_list))


def actual(n, m, a_list):
    popular_threshold = sum(a_list) / (4 * m)

    count_can_be_popular = 0

    for vote in a_list:
        if vote >= popular_threshold:
            count_can_be_popular += 1

    if count_can_be_popular >= m:
        return 'Yes'

    return 'No'

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

print(actual(n, m, a_list))

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()))
print(A)
B = 0
for i in range(N):
  if(A[i] >= sum(A)/(4*M)):
    B += 1
if(B >= M):
  print('Yes')
else:
  print('No')

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

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


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

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted