Problem:


Score : 200 points

Problem Statement

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.

Constraints

1 \leq M \leq N \leq 100

1 \leq A_i \leq 1000

A_i are distinct.

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N M
A_1 ... A_N

Output

If M popular items can be selected, print Yes; otherwise, print No.

Sample Input 1

4 1
5 4 2 1

Sample Output 1

Yes

There were 12 votes in total. The most popular item received 5 votes, and we can select it.

Sample Input 2

3 2
380 19 1

Sample Output 2

No

There were 400 votes in total. The second and third most popular items received less than \dfrac{1}{4\times 2} of the total number of votes, so we cannot select them. Thus, we cannot select two popular items.

Sample Input 3

12 3
4 56 78 901 2 345 67 890 123 45 6 789

Sample Output 3

Yes



Sample input:
4 1
5 4 2 1


Sample output:
Yes

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

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

limit=sum(a)/(4*m)
c=0
for aa in a:
  if aa >=limit:
    c+=1
  else:
    pass
if c>=m:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

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

limit=sum(a)/(4*m)
c=0
for aa in a:
  if aa >=limit:
    c+=1
  else:
    pass
if c==0:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,m =map(int,input().split())
a = map(int,input().split())
cnt=0

for i in a:
  if i >=sum(a)*(1/(4*m)): cnt +=1
  if cnt >= m:
    print("Yes")
    break
else:
  print("No")

Submission status: Wrong Answer

Solution code:

# ABC161
# B Popular Vote
N, M = map(int, input().split())  # N種類　M個選ぶ
a = sorted(list(map(int, input().split())),reverse=True)
x = sum(a)
q = x / 4 * M
b =[]
for i in range(M):
    b.append(a[i])
b = sorted(b)
for j in b:
    if j < q:
        print('No')
        exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
N, M = [int(i) for i in input().split(' ')]
A = [int(i) for i in input().split(' ')]
th = sum(A) / (4 * M)
print('Yes' if len([a for a in A if a >= th]) >= N else 'No')

Submission status: Wrong Answer

Solution code:
n,k = map(int,input().split())
A = list(map(int,input().split()))

allvote=0
allvote=sum(A)
# print( allvote )

c=0
for a in A:
    if a>=allvote/(4*k) :
        c+=1

if c>=k :
    ans = "Yes"
else:
    ans = "No"
print(ans,allvote,c)

Submission status: Wrong Answer

Solution code:
n,k = map(int,input().split())
A = list(map(int,input().split()))

allvote=0
allvote=sum(A)
# print( allvote )

c=0
for a in A:
    if a>=allvote/4 :
        c+=1
if c>=k-1 :
    ans = "Yes"
else:
    ans = "No"
print(ans)

Submission status: Wrong Answer

Solution code:
N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort()
if A[N - M - 1] * 4 * M < sum(A):
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
N, M = list(map(lambda x: int(x), input().split(" ")))
A = list(map(lambda y: int(y), input().split(" ")))
A.sort()
 
print("Yes") if 0.25 * sum(A) / M <= A[M - 1] else print("No")

Submission status: Wrong Answer

Solution code:
N, M = list(map(lambda x: int(x), input().split(" ")))
A = list(map(lambda y: int(y), input().split(" ")))
A.sort()

print("Yes") if 0.25 / M <= A[M - 1] else print("No")

Submission status: Wrong Answer

Solution code:
import sys

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

s = sum(a)
a.sort(reverse=True)
border = int(s / (4 * m))

ans = True

for i in range(m):
    if (a[i] > border):
        pass
    else:
        ans = False
        break

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

Submission status: Wrong Answer

Solution code:
import sys

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

s = sum(a)
a.sort(reverse=True)

ans = True
border = s / (4 * m)

for i in range(m):
    if (a[i] > border):
        pass
    else:
        ans = False
        break

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a.sort(reverse=True)
total = sum(a)
flg = True
for i in range(m):
    if a[i] * (4*(i+1)) < total:
        flg = False
        
print('Yes') if flg else print('No')

Submission status: Wrong Answer

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

a.sort(reverse=True)
total = sum(a)
flg = True
for i in range(m):
    if a[i] < total / (4*(i+1)):
        flg = False
print('Yes') if flg else print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,m = map(int,input().split())
x = list(map(int,input().split()))
x.sort(reverse = True)
sumx = sum(x)
limit = sumx/4/m
print(limit)
if x[m-1]>=limit:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n,m = map(int,input().split())
x = list(map(int,input().split()))
x.sort(reverse = True)
sumx = sum(x)
limit = int(sumx/4/m)
if x[m-1]>=limit:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
n,m = map(int,input().split())
a = sorted(list(map(int,input().split())),reverse=True)
v = sum(a)

for i in range(1,m+1):
    if a[i-1] < v/(4*i):
        print("No")
        exit(0)

print("Yes")

Submission status: Wrong Answer

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

min_limit = 1 / (4*m)
select_ok = 0

for i in A:
  if i >= min_limit:
    select_ok += 1

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

Submission status: Wrong Answer

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#l = list(map(int, input().split()))
n,m = map(int, input().split())
a = list(map(int, input().split()))

total = sum(a)
re = m
for i in range(n):
    if (a[i] >= total//(4*m)):
        re = re -1
        if (re == 0):
            print("Yes")
            exit()
print("No")

Submission status: Wrong Answer

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#l = list(map(int, input().split()))
n,m = map(int, input().split())
a = list(map(int, input().split()))

total = sum(a)


for i in range(n):
    if (a[i] >= total//(4*m)):
        m = m-1
        if (m == 0):
            print("Yes")
            exit()
print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a.sort(reverse=True)
sm = sum(a)
if len(list(filter(lambda v: v >= sm // (4 * m), a[:m]))) == m:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
A=list(map(int,input().split()))
print("NYoe s"[m<=len([i for i in A if i>sum(A)/(4*m)])::2])

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

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

total = sum(A)
count = 0

for a in A:
  if a >= total / (4*M):
    count += 1
if a >= M:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

votes = sum(A)
A.sort()
if A[m-1] < votes/4*m:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

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

votes = sum(A)

if max(A) < votes/4*m:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
n, m = M()
li = LI()
li.sort(reverse=True)
S = sum(li)
if li[m-1] > S / (4*m):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,M = map(int, input().split())
vote_list = [int(i) for i in input().split()]
vote_list.sort(reverse=True)

Mth_got_vote = vote_list[M - 1]
print(Mth_got_vote)
if Mth_got_vote < sum(vote_list) / (4 * M):
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
n,m = map(int,input().split())
a = list(map(int,input().split()))
sorted(a,reverse=True)
count = 0
for i in a:
    if i >=sum(a)//(4*m):
        count += 1
    else:
        pass

print(['No','Yes'][count >= m])

Submission status: Wrong Answer

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

sum_A = sum(A) / 4
cnt = 0

for i in A:
  if i >= sum_A:
    cnt += 1

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

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

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

s = sum(a)
t = s // (4 * m)

cnt = 0
for i in a:
    if t <= i:
        cnt += 1

if m <= cnt:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
cnt = 0
ttl = sum(a)
for i in a:
    if i >= ttl // (4 * m):
        cnt += 1
print("Yes") if cnt >= m else print("No")

Submission status: Wrong Answer

Solution code:
n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
cnt = 0
ttl = sum(a)
for i in a:
    if i >= ttl // (4 * m):
        cnt += 1
print("Yes") if cnt == m else print("No")

Submission status: Wrong Answer

Solution code:
n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
cnt = 0
ttl = sum(a)
for i in a:
    if i >= ttl // (4 * m):
        cnt += 1
        if cnt == m:
            print("Yes")
            break
if cnt != m:
    print("No")

Submission status: Wrong Answer

Solution code:
n,m = map(int, input().split())
a = list(map(int, input().split()))
s = 0
total = sum(a)
for i in a:
    if total*1/4*m <= i:
        s += 1

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

Submission status: Wrong Answer

Solution code:
n,m = map(int, input().split())
a = list(map(int, input().split()))
s = 0
total = sum(a)
for i in a:
    if total/4*m <= i:
        s += 1

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

Submission status: Wrong Answer

Solution code:
# ABC161 B
n,m = map(int, input().split())
a = list(map(int, input().split()))
s = 0
total = sum(a)
for i in a:
    if 1/total*4 <= i:
        s += 1

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

Submission status: Wrong Answer

Solution code:
# ABC161 B
n,m = map(int, input().split())
a = list(map(int, input().split()))
s = 0
total = sum(a)
for i in a:
    if total/4 <= i:
        s += 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,M=map(int,input().split())
A=list(map(int,input().split()))
A.sort(reverse=True)
total=0
for i in range(N):
  total+=A[i]
if A[M-1]>total/(4*M):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N,M=map(int,input().split())
A=list(map(int,input().split()))
A.sort(reverse=True)
total=0
for i in range(M):
  total+=A[i]
if A[M-1]>total/(4*M):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,m = map(int,input().split())
li = list(map(int,input().split()))
sum_vote = sum(li)
kijun = sum_vote // (4 * m)
sum_above = len([i for i in li if i >= kijun])
if sum_above >= m:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n,m = map(int,input().split())
li = list(map(int,input().split()))
sum_vote = sum(li)
kijun = sum_vote / 4 * m
sum_above = len([i for i in li if i > kijun])
if sum_above >= m:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
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')

Submission status: Wrong Answer

Solution code:
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')

Submission status: Wrong Answer

Solution code:
N,M = map(int,input().split())
A = list(map(int,input().split()))
sum = 0
ans = "Yes"
cnt = 0
for i in range(len(A)):
  sum += A[i]
judge = sum / (4*M)
for i in range(len(A)):
  if A[i] < judge:
    cnt += 1
if cnt < M:
  ans = "No"
else:
  ans = "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
N,M = map(int,input().split())
A = list(map(int,input().split()))
sum = 0
ans = "Yes"
cnt = 0
for i in range(len(A)):
  sum += A[i]
judge = sum / (4*M)
for i in range(len(A)):
  if A[i] < judge:
    cnt += 1
if cnt < M:
  ans = "No"
print(ans)

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
a=list(map(int,input().split()))
ave=sum(a)/len(a)/4
cnt=0
for i in range(n):
    if a[i]>=ave:
        cnt+=1
if cnt<m:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
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')

Submission status: Wrong Answer

Solution code:
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')

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
c = list(map(int,input().split()))

d = sum(c)
e = sorted(c,reverse=True)

for i in range(a):
  if(e[i]<d/4*b):
    print("No")
    exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
N, M = map(int, input().split())
a = sorted(list(map(int, input().split())), reverse=True)
b = 0
c = int(sum(a)/(M*4))

for i in range(M):
    if a[i] == c:
        b += 1 
    if a[i] > c:
        b += 1 
if b == M:
    print('Yes')
elif b < M:
    print('No')

Submission status: Wrong Answer

Solution code:
N, M = map(int, input().split())
a = sorted(list(map(int, input().split())), reverse=True)
b = 0

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

if b == M:
    print('Yes')
elif b < M:
    print('No')

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
a=list(map(int,input().split()))
cnt=0
for v in a:
    if v>=1/(4*m): cnt+=1
if cnt>=m: print("Yes")
else: print("No")

Submission status: Wrong Answer

Solution code:
n, m = input().split()
a = list(map(int, input().split()))
b = []
s = 0

for i in a:
    s += i

for i in a:
    if int(i) >= int(int(s)//(4*int(m))):
        b.append(i)
        if len(b) == int(m):
            break

if len(b) == int(m):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n, m = map(int, input().split())
an = [int(num) for num in input().split()]

check = sum(an)//(4*m)
count = 0

for a in an :
  if a >= check:
    count += 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
a=list(map(int,input().split()))
a_sort=[]
a_sort=sorted(a,reverse=True)
sum=0
for i in a:
  sum+=i
b_sort=a_sort[0:m-1]
for j in b_sort:
 if j<int(sum/(4*m)):
    print("No")
    exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
a=list(map(int,input().split()))
a_sort=[]
a_sort=sorted(a,reverse=True)
sum=0
for i in a:
  sum+=i
b_sort=a_sort[0:m-1]
for j in b_sort:
 if j<sum/(4*m):
    print("No")
    exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
a=list(map(int,input().split()))
a_sort=[]
a_sort=sorted(a,reverse=True)
sum=0
for i in a:
  sum+=i
b_sort=a_sort[0:m]
for j in b_sort:
 if j<=sum/(4*m):
    print("No")
    exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
a=list(map(int,input().split()))
a_sort=[]
a_sort=sorted(a,reverse=True)
sum=0
for i in a:
  sum+=i
b_sort=a_sort[0:m-1]
for j in b_sort:
 if j<=sum/(4*m):
    print("No")
    exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
a=list(map(int,input().split()))
a_sort=[]
a_sort=sorted(a,reverse=True)
sum=0
for i in a:
  sum+=i

for j in range(0,m-1):
 if j<=sum/(4*m):
    print("No")
    exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
a=list(map(int,input().split()))
a_sort=[]
a_sort=sorted(a,reverse=True)
sum=0
for i in a:
  sum+=i

for j in range(1,m+1):
 if j<=sum/(4*m):
    print("No")
    exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
a=list(map(int,input().split()))
a_sort=[]
a_sort=sorted(a,reverse=True)
sum=0
for i in a:
  sum+=i

for j in range(1,m):
 if j<=sum/(4*m):
    print("No")
    exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
N, M=map(int, input().split())
x=list(map(int, input().split()))
d=sum(x)/(4*M)
t=0
for i in x:
  if i>d:
    t+=1
print('Yes' if t>=M else 'No')

Submission status: Wrong Answer

Solution code:
# Nこの商品の中からM個選ぶ
N, M = list(map(int, input().split()))
# 商品iの得票数はA_i
A = list(map(int, input().split()))

A = sorted(A, reverse=True)

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

Submission status: Wrong Answer

Solution code:
import numpy as np

# Nこの商品の中からM個選ぶ
N, M = list(map(int, input().split()))
# 商品iの得票数はA_i
A = list(map(int, input().split()))

A = np.array(A)
A = np.sort(A)[::-1]

flag = True

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

Submission status: Wrong Answer

Solution code:
import numpy as np

# Nこの商品の中からM個選ぶ
N, M = list(map(int, input().split()))
# 商品iの得票数はA_i
A = list(map(int, input().split()))

A = np.array(A)
A = np.sort(A)[::-1]

flag = True

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

Submission status: Wrong Answer

Solution code:
import numpy as np

# Nこの商品の中からM個選ぶ
N, M = list(map(int, input().split()))
# 商品iの得票数はA_i
A = list(map(int, input().split()))

A = np.array(A)
A = np.sort(A)[::-1]

flag = True

for i in range(M):
    if (A[i] < 1/4/M):
        flag = False
        break

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

Submission status: Wrong Answer

Solution code:
import numpy as np

# Nこの商品の中からM個選ぶ
N, M = list(map(int, input().split()))
# 商品iの得票数はA_i
A = list(map(int, input().split()))

A = np.array(A)
A = np.sort(A)[::-1]

B = (A >= 1/4/M)

flag = True

for i in range(M):
    if not B[i]:
        flag = False
        break

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

Submission status: Wrong Answer

Solution code:
import numpy as np

# Nこの商品の中からM個選ぶ
N, M = list(map(int, input().split()))
# 商品iの得票数はA_i
A = list(map(int, input().split()))

A = np.array(A)
A = np.sort(A)[::-1]

B = (A >= 1/4/M)

flag = True

for i in range(M):
    if not B[i]:
        flag = False

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

Submission status: Wrong Answer

Solution code:
import numpy as np

# Nこの商品の中からM個選ぶ
N, M = list(map(int, input().split()))
# 商品iの得票数はA_i
A = list(map(int, input().split()))

A = np.array(A)
A = np.sort(A)[::-1]

B = (A > 1/4/M)

flag = True

for i in range(M):
    if not B[i]:
        flag = False

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

sum_a = sum(A)
ans = 0
for i,a in enumerate(A):
    if a > sum_a / (4 * M):
        ans += 1

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

Submission status: Wrong Answer

Solution code:
m, n = input().split()
s = list(map(int, input().split()))
k = int(n)
x = max(s)
t = 100 * x
l = 4 * k
if t >= l:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

B = [1 for a in A if a >= sum(A)//(4*M)]

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

Submission status: Wrong Answer

Solution code:
n, m = map(int, input().split())
l = list(map(int, input().split()))
sum = 0

for i in l:
  if i >= 1 / (4 * m):
    sum += 1
if sum >= m:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n, m = map(int, input().split())
l = list(map(int, input().split()))
sum = 0
div = 4 * m

for i in range(n):
  if l[i] >= 1 / div:
    sum += 1
if sum >= m:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n, m = map(int, input().split())
arr = list(map(int, input().split()))
p = sum(arr)
c = 0
for i in arr:
    if i >= int(p/(4*m)):
        c += 1
if c>= m:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n, m = map(int, input().split())
arr = list(map(int, input().split()))
p = sum(arr)
c = 0
for i in arr:
    if i >= p//(4*m):
        c += 1
if c>= m:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
N,M = map(int,input().split())
A = list(map(int,input().split()))
SUM = sum(A)
ans = 0
for i in range(N):
	if A[i] >= math.ceil(SUM/4):
		ans +=1
if ans >= M:
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
A=list(map(int,input().split()))
s=sorted(A,reverse=True)[m-1]
t=sum(A)//(4*m)+1
if s>=t:
    ans='Yes'
else:
    ans='No'
print(ans)

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
A=list(map(int,input().split()))
s=sorted(A,reverse=True)[m-1]
t=sum(A)//(4*m)
if s>t:
    ans='Yes'
else:
    ans='No'
print(ans)

Submission status: Wrong Answer

Solution code:
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')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

threshold = sum(A) / (4*m)

ans = 0
for i in A:
    if i > threshold:
        ans += 1

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

Submission status: Wrong Answer

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

threshold = sum(A) / (4*m)

ans = [i for i in A if i > threshold]

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

Submission status: Wrong Answer

Solution code:
n,m = map(int,input().split())
a = list(map(int,input().split()))
ans = 0

newlist = sorted(a,reverse=True)

print(newlist)

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

if ans==m:
    print("Yes")

else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,m = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
k=sum(a)
a.sort(reverse=True)
cont=0
ans=''
for i in a:
    if i>k*(1/(4*m)):
        cont+=1
if cont>=m: print("Yes")
else: print("No")

Submission status: Wrong Answer

Solution code:
n,m = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
k=sum(a)
a.sort(reverse=True)
cont=0
ans=''
for i in a:
    if i>k/4:
        cont+=1
if cont>=m: print("Yes")
else: print("No")

Submission status: Wrong Answer

Solution code:
def main():
    N, M = map(int, input().split())
    A = list(map(int, input().split(' ')))
    A.sort()
    A.reverse()
    total = sum(A)
    for i in range(M):
        if total // (4 * M) > A[i]:
            print('No')
            return
    print('Yes')
main()