Submission #11510914


Source Code Expand

Copy
#!/usr/bin/ python3.8
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, M, *A = map(int, read().split())
A.sort(reverse=True)
x = A[M - 1]
S = sum(A)

answer = 'Yes' if 4 * M * x >= S else 'No'
print(answer)

Submission Info

Submission Time
Task B - Popular Vote
User maspy
Language Python3 (3.4.3)
Score 200
Code Size 291 Byte
Status
Exec Time 17 ms
Memory 2940 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample_01, sample_02, sample_03
All 200 / 200 hand_01, hand_02, hand_03, hand_04, hand_05, hand_06, max_01, max_02, random_01, random_02, random_03, random_04, random_05, sample_01, sample_02, sample_03
Case Name Status Exec Time Memory
hand_01 17 ms 2940 KB
hand_02 17 ms 2940 KB
hand_03 17 ms 2940 KB
hand_04 17 ms 2940 KB
hand_05 17 ms 2940 KB
hand_06 17 ms 2940 KB
max_01 17 ms 2940 KB
max_02 17 ms 2940 KB
random_01 17 ms 2940 KB
random_02 17 ms 2940 KB
random_03 17 ms 2940 KB
random_04 17 ms 2940 KB
random_05 17 ms 2940 KB
sample_01 17 ms 2940 KB
sample_02 17 ms 2940 KB
sample_03 17 ms 2940 KB