problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p02718
u064027771
2,000
1,048,576
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`.
["a,b=map(int,input().split())\nl=list(map(int,input().split()))\nt=sum(l)//(4*b)\nans = [True for i in range(b,len(l)-3) if sum(l[i:i+3])]\nprint('Yes' if ans and all(ans) else 'No')", "a,b=map(int,input().split())\nl=list(map(int,input().split()))\nt=sum(l)/(4*b)\nans = [i for i in l if i>t]\nprint('Yes' if len(ans)>b and len(ans[:b])>b else 'No')", "a,b=map(int,input().split())\nl=list(map(int,input().split()))\nprint('Yes' if l[b-1]<sum(l)//(4*b) else 'No')", "a,b=map(int,input().split())\nl=list(map(int,input().split()))\nt=sum(l)/(4*b)\nans = [i for i in l if i>=t]\nprint('Yes' if len(ans)>=b else 'No')"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s364440666', 's462833042', 's932540870', 's784390158']
[3060.0, 3060.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0, 17.0]
[177, 160, 108, 143]
p02718
u067694718
2,000
1,048,576
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`.
['n, m = [for i in input().split()]\na = [int(i) for i in input().split()]\n\nok_count = 0\nfor i in a:\n if i > 1 / (4 * sum(a)): ok_count += 1\n\nprint("Yes" if m >= ok_count else "No")', 'n, m = [int(i) for i in input().split()]\na = [int(i) for i in input().split()]\n\nok_count = 0\nfor i in a:\n if i > 1 / (4 * sum(a)): ok_count += 1\n\nprint("Yes" if m >= ok_count else "No")', 'n, m = [int(i) for i in input().split()]\na = [int(i) for i in input().split()]\n\nok_count = 0\nfor i in a:\n if i >= sum(a) / (4 * m): ok_count += 1\n\nprint("Yes" if m <= ok_count else "No")']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s242096607', 's316372118', 's882079179']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[181, 188, 189]
p02718
u068142202
2,000
1,048,576
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`.
['n, m= map(int, (input().split()))\na = list(map(int, input().split()))\ncount = 0\ntotal = 0\nfor i in a:\n total += i\nfor j in a:\n if j / total => 1 / (4 * m):\n count += 1\nif count >= m:\n print("Yes")\nelse:\n print("No")', 'n, m= map(int, (input().split()))\na = list(map(int, input().split()))\ncount = 0\ntotal = 0\nfor i in a:\n total += i\nfor j in a:\n if j // total > 1 // (4 * m):\n count += 1\nif count > m:\n print("Yes")\nelse:\n print("No")', 'n, m= map(int, (input().split()))\na = list(map(int, input().split()))\ncount = 0\ntotal = 0\nfor i in a:\n total += i\nfor j in a:\n if not (j / total < 1 / (4 * m)):\n count += 1\nif count >= m:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s303489857', 's365129492', 's134108848']
[2940.0, 3060.0, 3060.0]
[17.0, 18.0, 17.0]
[222, 222, 227]
p02718
u069273180
2,000
1,048,576
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`.
['n,m=map(int,input().split())\na=list(map(int,input().split()))\n \ntoku = sum(a) // (4*m)\n \na.sort(reverse=True)\nif a[m-1] >= toku:\n print("Yes")\n else:\n print("No")', 'n,m=map(int,input().split())\na=list(map(int.input().split()))\n\ntoku = sum(a) // (4*m)\n\na.sort(reverse=True)\nif a[m-1] >= toku:\n print("Yes")\n else:\n print("No")', 'n,m=map(int,input().split())\na=list(map(int,input().split()))\n\ntoku = sum(a) / (4 * m)\na=sorted(a,reverse=True)\n \nif a[m-1] >= toku:\n print("Yes")\nelse:\n print("No")\n ']
['Runtime Error', 'Runtime Error', 'Accepted']
['s446571202', 's791692756', 's436344690']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[165, 163, 179]
p02718
u070379349
2,000
1,048,576
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`.
["N,M = map(int, input().split())\nA = sorted(list (map(int, input() .split() ) ) )\n\nif A[M-1] >= sum(A)/M/4 :\n\tprint( 'Yes' )\n\nelse :\n\tprint( 'No' )", "N,M = map(int, input().split())\nA = sorted(list (map(int, input() .split() ) ) )\n\nif A[N-M] >= sum(A)/M/4 :\n\tprint( 'Yes' )\n\nelse :\n\tprint( 'No' )"]
['Wrong Answer', 'Accepted']
['s104421221', 's112277692']
[2940.0, 2940.0]
[17.0, 17.0]
[146, 146]
p02718
u073606136
2,000
1,048,576
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`.
['# coding: utf-8\n\nkind, choose = map(int, input().split())\ncount = 0\ntotal = 0\n\nnum = input().split(" ")\nfor i in num:\n total += int(i)\n\nok = total / (4 * kind)\nfor i in num:\n if int(i) >= total / ok:\n count += 1\n\nif count > choose:\n print("Yes")\nelse:\n print("No")', '# coding: utf-8\n\nkind, choose = map(int, input().split())\ncount = 0\ntotal = 0\n\nnum = input().split(" ")\nfor i in num:\n total += int(i)\n\nok = total / (4 * choose)\n\nfor i in num:\n if int(i) >= ok:\n count += 1\n\nif count >= choose:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s114449760', 's259290844']
[9184.0, 9184.0]
[29.0, 27.0]
[283, 279]
p02718
u074060241
2,000
1,048,576
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`.
['nm=input().split()\nvote=[int(i) in input().split()]\nn=int(nm[0])\nm=int(nm[1])\nselectable=0\nfor v in vote:\n if v < 4*m:\n continue\n else:\n selectable+=1\nif selectable>=m:\n print("Yes")\nelse:\n print("No")\n ', 'nm=input().split()\nvote=[int(i) in input().split()]\nn=int(nm[0])\nm=int(nm[1])\nselectable=0\nfor v in vote:\n\tif v < 4*m:\n\t\tcontinue\n\telse:\n\t\tselectable+=1\nif selectable>=m:\n\tprint("Yes")\nelse:\n\tprint("No")\n', 'nm=input().split()\nvote=[int(i) for i in input().split()]\nn=int(nm[0])\nm=int(nm[1])\nselectable=0\nall=sum(vote)\nfor v in vote:\n\tif v < all/(4*m):\n\t\tcontinue\n\telse:\n\t\tselectable+=1\nif selectable>=m:\n\tprint("Yes")\nelse:\n\tprint("No")\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s161964647', 's444397623', 's099856153']
[3060.0, 3060.0, 3060.0]
[17.0, 17.0, 17.0]
[218, 204, 230]
p02718
u075304271
2,000
1,048,576
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`.
['import numpy as np\nimport math\nimport collections\nimport fractions\nimport itertools\n\ndef mput(): return map(int, input().split())\ndef lput(): return list(map(int, input().split()))\ndef iput(): return int(input())\n\ndef solve():\n n, m = mput()\n a = lput()\n line = sum(A) / (4 * m)\n bit = 0\n for i in a:\n if i >= line:\n bit += 1\n if bit >= m:\n print("Yes")\n else:\n print("No")\n return 0\n\nif __name__ == "__main__":\n solve()', 'import numpy as np\nimport math\nimport collections\nimport fractions\nimport itertools\n\ndef mput(): return map(int, input().split())\ndef lput(): return list(map(int, input().split()))\ndef iput(): return int(input())\n\ndef solve():\n n, m = mput()\n a = lput()\n line = sum(a) / (4 * m)\n bit = 0\n for i in a:\n if i >= line:\n bit += 1\n if bit >= m:\n print("Yes")\n else:\n print("No")\n return 0\n\nif __name__ == "__main__":\n solve()']
['Runtime Error', 'Accepted']
['s561906113', 's671255438']
[27104.0, 27148.0]
[112.0, 105.0]
[479, 479]
p02718
u078960732
2,000
1,048,576
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`.
['for _ in range(1):\n\t# n = int(input())\n\tn,m = map(int,input().split())\n\tarr = list(map(int,input().split()))\n\t\n\tarr.sort(reverse=True)\n\tif arr[m-1] >= sum(arr)/(4*m):\n\t\tprint("YES")\n\telse:\n\t\tprint("NO")', 'for _ in range(1):\n\tn,m = map(int,input().split())\n\tarr = list(map(int,input().split()))\n\tarr.sort()\n\tarr.reverse()\n\tif arr[m-1] >= sum(arr)/(4*m):\n\t\tprint("Yes")\n\telse:\n\t\tprint("No")']
['Wrong Answer', 'Accepted']
['s659717201', 's591871882']
[3060.0, 3064.0]
[17.0, 18.0]
[215, 183]
p02718
u083227509
2,000
1,048,576
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`.
['N, M = map(int,input().split())\n2 A = list(map(int,input().split()))\n3 S = sum(A)\n4 cnt = 0\n5 for a in A:\n6 if a >= S / (4*M):\n7 cnt += 1\n8 if cnt >= M:\n9 print("Yes")\n10 else:\n11 print("No")', 'N, M = map(int,input().split())\nA = list(map(int,input().split()))\nS = sum(A)\ncnt = 0\nfor a in A:\n if a >= S / (4*M):\n cnt += 1\nif cnt >= M:\n print("Yes")\nelse:\n\tprint("No")']
['Runtime Error', 'Accepted']
['s336098313', 's028289589']
[2940.0, 3060.0]
[17.0, 17.0]
[191, 178]
p02718
u085510145
2,000
1,048,576
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`.
['A=list(map(int,input().split()))\npop = 1/(4*M)*sum(A)\nlis = []\n\nfor i in A:\n if i>pop:\n lis.append(i)\nif len(lis)>=M:\n print("Yes")\nelse:\n print("No")', 'A=list(map(int,input().split()))\npop = int(1/(4*M)*sum(A))\nlis = []\nfor i in A:\n if i>=pop:\n lis.append(i)\nif len(lis)>=M:\n print("Yes")\nelse:\n print("No")', 'A=list(map(int,input().split()))\npop = 1/(4*M)*sum(A)\nlis = []\nfor i in A:\n if i>pop:\n lis.append(i)\nif len(lis)>=M:\n print("Yes")\nelse:\n print("No")', 'N,M=map(int,input().split())\nA=list(map(int,input().split()))\npop = 1/(4*M)*sum(A)\nlis = []\nfor i in A:\n if i>=pop:\n lis.append(i)\nif len(lis)>=M:\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s049908222', 's094590098', 's587111363', 's664102690']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 38.0]
[166, 171, 165, 196]
p02718
u085910248
2,000
1,048,576
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`.
['N, M = map(int, input().split())\nA = sorted(map(int, input().split()), reverse=True)\nt = sum(A)\nif (1/(4*M))*t <= A[M-1]:\n print("YES")\nelse:\n print("NO")\n', 'N, M = map(int, input().split())\nA = sorted(map(int, input().split()), reverse=True)\nt = sum(A)\nif t/(4*M) <= A[M-1]:\n print("YES")\nelse:\n print("NO")\n', 'N, M = map(int, input().split())\nA = sorted(map(int, input().split()), reverse=True)\nt = sum(A)\nif t/(4*M) <= A[M-1]:\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s139643588', 's376040928', 's120237385']
[2940.0, 2940.0, 2940.0]
[19.0, 18.0, 23.0]
[161, 157, 157]
p02718
u087118202
2,000
1,048,576
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`.
["n,m=map(int,input().split())\na=list(map(int,input().split()))\n\nlimit=sum(a)/(4*m)\nc=0\nfor aa in a:\n if a >=limit:\n c+=1\n else:\n pass\nif c==0:\n print('No')\nelse:\n print('Yes')", "n,m=map(int,input().split())\na=list(map(int,input().split()))\n\nlimit=sum(a)/(4*m)\nc=0\nfor aa in a:\n if aa >=limit:\n c+=1\n else:\n pass\nif c>=m:\n print('No')\nelse:\n print('Yes')", "n,m=map(int,input().split())\na=list(map(int,input().split()))\n \nlimit=sum(a)/(4*m)\nc=0\nfor aa in a:\n if aa >=limit:\n c+=1\n else:\n pass\nif c>=m:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Wrong Answer', 'Accepted']
['s432052380', 's625504902', 's745855677']
[9180.0, 9036.0, 9176.0]
[26.0, 29.0, 30.0]
[184, 185, 190]
p02718
u087373960
2,000
1,048,576
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`.
['N, M = [int(i) for i in input().split()]\nA = [int(i) for i in input().split()]\ntotal_votes = sum(A)\nminimum_votes = int(total_votes / (4 * M)))\neligible_products = 0\n\nfor vote in A:\n if vote >= minimum_votes:\n eligible_products += 1\n\nif eligible_products >= M:\n print("Yes")\nelse:\n print("No")\n', 'N, M = [int(i) for i in input().split()]\nA = [int(i) for i in input().split()]\nminimum_votes = sum(A) * (1 / (4 * M))\n\neligible_products = [a for a in A if a >= minimum_votes]\n\nif len(eligible_products) >= M:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s579154388', 's648886246']
[2940.0, 3060.0]
[17.0, 18.0]
[310, 247]
p02718
u088115428
2,000
1,048,576
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`.
['from sys import stdin, stdout\nn,m = map(int, stdin.readline().rstrip().split(\' \'))\nl = list(map(int, stdin.readline().rstrip().split(\' \')))\nsum = sum(l)\nk = sum/(4*m)\ncount = 0\nl.sort(reverse = True)\na = (len(l)-1)\nfor i in (0, a):\n if(l[i]>k):\n print(l[i])\n count =count +1\n else:\n break\nif (count>=m):\n print("Yes")\nelse:\n print("No")', 'from sys import stdin, stdout\nn,m = map(int, stdin.readline().rstrip().split(\' \'))\nl = list(map(int, stdin.readline().rstrip().split(\' \')))\nsum = sum(l)\nk = sum/(4*m)\ncount = 0\nl.sort(reverse = True)\na = (len(l)-1)\nfor i in (0, a):\n if(l[i]>k):\n count =count +1\n \nif (count>m):\n print("Yes")\nelse:\n print("No")', 'from sys import stdin, stdout\nn,m = map(int, stdin.readline().rstrip().split(\' \'))\nl = list(map(int, stdin.readline().rstrip().split(\' \')))\nsum = sum(l)\nk = sum/(4*m)\nprint(k,sum)\ncount = 0\nl.sort(reverse = True)\na = (len(l)-1)\nfor i in (0, a):\n if(l[i]>k):\n print(l[i])\n count =count +1\n else:\n break\nif (count>=m):\n print("Yes")\nelse:\n print("No",count)', 'n, m = map(int, input().split())\na = list(map(int, input().split()))\nans = "Yes"\n \na.sort(reverse=True)\n \nfor i in range(m):\n if a[i] < sum(a)*(1/(4*m)):\n ans = "No"\n break\n \nprint(ans)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s318891432', 's370450340', 's505999713', 's619401718']
[3064.0, 3064.0, 3064.0, 3060.0]
[17.0, 17.0, 17.0, 17.0]
[355, 319, 374, 202]
p02718
u089230684
2,000
1,048,576
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`.
['n, m = list(map(int, input().split()))\na = list(map(int, input().split()))\nsumA = sum(a)\n\nsumBy4 = sumA/(4*m)\n\ncount = 0\n\nfor i in range(n):\n if(a[i] > sumBy4):\n count += 1\n\nif(count >= m):\n print("YES")\n\nelse:\n print("NO")', 'n, m = list(map(int, input().split()))\na = list(map(int, input().split()))\nsumA = sum(a)\n\nsumBy4 = sumA/(4*m)\n\ncount = 0\n\nfor i in range(n):\n if(a[i] < sumBy4):\n continue\n\n else:\n count += 1\n\nif(count >= m):\n print("Yes")\n\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s001542418', 's021918890']
[3064.0, 3064.0]
[18.0, 18.0]
[239, 267]
p02718
u089644470
2,000
1,048,576
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`.
["n,m = map(int,input().split())\na_list = list(map(int,input().split()))\n\ncount = 0\nx = sum(a_list)/(4*m)\nprint(x)\nfor i in range(0,n):\n if a_list[i] >= x :\n count += 1\nif count >= m :\n print('Yes')\nelse :\n print('No')", "n,m = map(int,input().split())\na_list = list(map(int,input().split()))\n\ncount = 0\nx = sum(a_list)/(4*m)\nfor i in range(0,n):\n if a_list[i] >= x :\n count += 1\nif count >= m :\n print('Yes')\nelse :\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s236707846', 's328807783']
[3064.0, 3060.0]
[17.0, 18.0]
[222, 214]
p02718
u095094246
2,000
1,048,576
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`.
['n,m=[int(x) for x in input().split()]\na = [int(x) for x in input().split()]\ntotal = sum(a)\ncnt = n\nfor i in range(0, n):\n if a[i] < int(total / (4 * m)):\n cnt -= 1\n if cnt < m:\n print("No")\n return\nprint("Yes")', 'import sys,math\nn,m=[int(x) for x in input().split()]\na = [int(x) for x in input().split()]\ntotal = sum(a)\ncnt = n\nfor i in range(0, n):\n if a[i] < math.ceil(total / (4 * m)):\n cnt -= 1\n if cnt < m:\n print("No")\n sys.exit()\nprint("Yes")']
['Runtime Error', 'Accepted']
['s677877972', 's944577068']
[3064.0, 3064.0]
[17.0, 17.0]
[221, 247]
p02718
u095844416
2,000
1,048,576
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`.
["n,m=map(int,input().split())\na=list(map(int,input().split()))\nsort=sorted(a,reverse=True)\nb=sum(a)\ncount=0\nfor i in sort:\n count+=1\n if i<b/4:\n break\n \nif count-1<=m:\n print('Yes')\nelse:\n print('No')\n \n\n ", "n,m=map(int,input().split())\na=list(map(int,input().split()))\nsort=sorted(a,reverse=True)\nb=sum(a)\ncount=0\nfor i in sort:\n count+=1\n if i<b/4*m:\n break\nif count-1<=m:\n print('Yes')\nelse:\n print('No')\n \n\n ", "n,m=map(int,input().split())\na=list(map(int,input().split()))\nsort=sorted(a,reverse=True)\nprint(sort)\nb=sum(a)\nprint(b)\ncount=0\nfor i in sort:\n count+=1\n if i<b/4*m:\n break\nprint(count-1)\n \nif count-1<=m:\n print('Yes')\nelse:\n print('No')\n \n\n ", "n,m=map(int,input().split())\na=list(map(int,input().split()))\nsort=sorted(a,reverse=True)\nb=sum(a)\ncount=0\n\nfor i in sort:\n if i<b/(4*m):\n break\n else:\n count+=1\n\nif count>=m:\n print('Yes')\nelse:\n print('No')\n \n\n "]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s336514402', 's608425470', 's919133349', 's524136376']
[9200.0, 9180.0, 9184.0, 9180.0]
[21.0, 21.0, 24.0, 23.0]
[221, 218, 256, 230]
p02718
u100873497
2,000
1,048,576
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`.
["num1 = int(input().split())\nnum2 = list(map(int, input().split()))\n\nnum2.sort(reverse=True)\nN=num1[0]\nM=num1[1]\nA=num2[M-1]\n\nif A<N/M/4:\n print('No')\nelse:\n print('Yes')", "num1 = int(input().split())\nnum2 = sorted(map(int, input().split())\n\nN=num1[0]\nM=num1[1]\nA=num2[M-1]\n\nif A<N/M/4:\n print('No')\nelse:\n print('Yes')", "num1 = int(input().split())\nnum2 = list(map(int, input().split()))\n\nnum2.sort(reverse=True)\nN=int(num1[0])\nM=int(num1[1])\nA=int(num2[M-1])\n\nif A<N/M/4:\n print('No')\nelse:\n print('Yes')", "num1 = int(input().split())\nnum2 = list(map(int, input().split()) \n \n \nsorted(num2,reverse=True) \nN=num1[0]\nM=num1[1]\nA=num2[M-1]\n\nif A<N/M/4:\n print('No')\nelse:\n print('Yes')", "num1 = int(input().split())\nnum2 = list(map(int, input().split()))\n\nsorted(num2, reverse=True)\nN=num1[0]\nM=num1[1]\nA=num2[M-1]\n\nif A<N/M/4:\n print('No')\nelse:\n print('Yes')", "num1=input().split()\nnum2=input().split()\n\nnum2.sort(reverse=True)\nN=int(num1[0])\nM==int(num1[1])\nA=int(num2[int(num1[1])-1])\n\nif A<N/M/4:\n print('Yes')\n else:\n print('No')", "num1=input().split()\nnum2=input().split()\n\nnum2.sort(reverse=True)\nN=int(num1[0])\nM=int(num1[1])\nA=int(num2[M-1])\n\nif A<N/M/4:\n print('Yes')\nelse:\n print('No')\n", "n,m = map(int,input().split())\nli = list(map(int,input().split()))\n \nli.sort(reverse=True)\n \na=li[m-1]\nb=sum(li)\n\nif a>=b/4/m:\n print('Yes')\nelse:\n print('No')\n \n"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s050632490', 's074849519', 's196958879', 's284204892', 's493516574', 's595813196', 's827318171', 's682474824']
[3060.0, 2940.0, 3064.0, 2940.0, 3064.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 19.0, 17.0, 17.0, 17.0, 17.0, 17.0]
[175, 152, 190, 217, 178, 181, 166, 168]
p02718
u101350975
2,000
1,048,576
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`.
["M, N = map(int, input().split())\nA = list(map(int, input().split()))\nA.sort(reverse=True)\u3000\nS = sum(A)\nif A[M-1] >= S / 4M\nprint('Yes')\nelse:\n ('No')\n", "N, M = map(int, input().split())\nA = list(map(int, input().split()))\nA.sort(reverse=True)\nS = sum(A)\nif A[M-1] >= S / (4 * M):\n print('Yes')\nelse:\n print('No')\n"]
['Runtime Error', 'Accepted']
['s946737870', 's766653219']
[2940.0, 2940.0]
[17.0, 17.0]
[155, 167]
p02718
u104935308
2,000
1,048,576
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`.
['def main():\n mylist = []\n for i in range(2):\n mylist.append(input())\n N, M = list(map(int, mylist[0].split()))\n votes = list(map(int, mylist[1].split()))\n\n v_sum = sum(votes)\n\n votes.sort(reverse=True)\n print(votes)\n\n flag = True\n for i in range(M):\n if votes[i] < v_sum / (4 * M):\n flag = False\n\n if flag:\n print("Yes")\n else:\n print("No") \n\n\n\nif __name__ == "__main__":\n main()', 'def main():\n mylist = []\n for i in range(2):\n mylist.append(input())\n N, M = list(map(int, mylist[0].split()))\n votes = list(map(int, mylist[1].split()))\n\n v_sum = sum(votes)\n\n votes.sort(reverse=True)\n\n flag = True\n for i in range(M):\n if votes[i] < v_sum / (4 * M):\n flag = False\n\n if flag:\n print("Yes")\n else:\n print("No") \n\n\n\nif __name__ == "__main__":\n main()']
['Wrong Answer', 'Accepted']
['s513416196', 's652547260']
[3064.0, 3064.0]
[17.0, 17.0]
[457, 440]
p02718
u108136854
2,000
1,048,576
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`.
["N, M = map(int, input().split())\nvotes = [int(i) for i in input().split()]\ncount = [1 for vote in votes if vote >= sum(votes) * 1 / (4 * M)]\nif count >= M:\n print('Yes')\nelse:\n print('No')", "N, M = map(int, input().split())\nvotes = [int(i) for i in input().split()]\ncount = [1 for vote in votes if vote >= sum(votes) * 1 / (4 * M)]\nif sum(count) >= M:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s560123408', 's619013095']
[2940.0, 2940.0]
[17.0, 17.0]
[190, 195]
p02718
u108918063
2,000
1,048,576
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`.
['N,M=map(int,input().split())\nl=list(map(int,input().split()))\nlimit=sum(l)/(M*3)\nnum=0\nfor i in l:\n if i >= limit:\n num+=0\nif num >=M:\n print("Yes")\nelse:\n print("No")', 'N,M=map(int,input().split())\nl=list(map(int,input().split()))\nlimit=sum(l)/(M*4)\nnum=0\nfor i in l:\n if i >= limit:\n num+=0\nif num >=M:\n print("Yes")\nelse:\n print("No")', 'N,M=int(input().split())\nl=list(map(int,input().split()))\nlimit=sum(l)/(M*3)\nnum=0\nfor i in l:\n if i >= limit:\n num+=0\nif num >=M:\n print("Yes")\nelse:\n print("No")', 'N,M=map(int,input().split())\nl=list(map(int,input().split()))\nlimit=sum(l)/(M*4)\nnum=0\nfor i in l:\n if i >= limit:\n num+=1\nif num >=M:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s133640383', 's644009988', 's677537776', 's324731113']
[3060.0, 3060.0, 3060.0, 3060.0]
[17.0, 18.0, 18.0, 19.0]
[173, 173, 169, 173]
p02718
u111684666
2,000
1,048,576
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`.
['n, m = map(int, input().split())\nA = list(map(int, input().split()))\nall = sum(A)\n\ncnt = 0\nfor x in A:\n if 4 * m * x >= all:\n cnt++;\n \nif cnt >= m:\n print("Yes")\nelse :\n print("No")\n', 'n, m = map(int, input().split())\nA = list(map(int, input().split()))\nall = sum(A)\n\ncnt = 0\nfor x in A:\n if 4 * m * A[i] >= all:\n cnt++;\n \nif cnt >= m:\n print("Yes")\nelse :\n print("No")\n', 'n, m = map(int, input().split())\nA = list(map(int, input().split()))\nall = sum(A)\n\ncnt = 0\nfor x in A:\n if 4 * m * x >= all:\n cnt += 1\n \nif cnt >= m:\n print("Yes")\nelse :\n print("No")\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s262344202', 's783203615', 's769174252']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 19.0]
[189, 192, 191]
p02718
u112007848
2,000
1,048,576
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`.
['n, m = map(int, input().split(" "))\na = list(map(int, input().split(" ")))\na.sort(reverse=True)\nprint(a)\nif a[m - 1] < sum(a) /4 / m:\n print("No")\nelse:\n print("Yes")', 'n, m = map(int, input().split(" "))\na = list(map(int, input().split(" ")))\na.sort(reverse=True)\n#print(a)\nif a[m - 1] < sum(a) /4 / m:\n print("No")\nelse:\n print("Yes")']
['Wrong Answer', 'Accepted']
['s177699851', 's860815322']
[2940.0, 2940.0]
[18.0, 17.0]
[168, 169]
p02718
u112266373
2,000
1,048,576
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`.
['m, n = list(map(int, input().split(" ")))\na_list = list(map(int, input().split(" "))).sort(reverse=True)\nif m == 0:\n print(\'Yes\')\nelse:\n if a_list[m-1] >= sum(a_list) / (4 * m):\n print(\'Yes\')\n else:\n print(\'No\')', 'n, m = list(map(int, input().split(" ")))\na_list = sorted(list(map(int, input().split(" "))), reverse=True)\nif m == 0:\n print(\'Yes\')\nelse:\n if a_list[m-1] >= sum(a_list) / (4 * m):\n print(\'Yes\')\n else:\n print(\'No\')']
['Runtime Error', 'Accepted']
['s695930502', 's616393037']
[3060.0, 3060.0]
[17.0, 18.0]
[234, 237]
p02718
u112747720
2,000
1,048,576
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`.
["[int(i) for i in input().join(' ')]\nN = input()\nM = input()\n\nitems = [int(i) for i in input().join(' ')]\nitems.sort()\ntotal = sum(items)\n\nflag = 1\nfor i in range(M):\n if 1 // (4 * M) >= items[i]:\n pass\n else:\n flag = 0\nif not flag:\n print('Yes')\nelse:\n print('No')", "a = [int(i) for i in input().join(' ')]\nN = a[0]\nM = a[1]\n\nitems = [int(i) for i in input().join(' ')]\nitems.sort()\ntotal = sum(items)\n\nflag = 1\nfor i in range(M):\n if 1 // (4 * M) >= items[i]:\n pass\n else:\n flag = 0\nif not flag:\n print('Yes')\nelse:\n print('No')", "N, M= int(input().join(' '))\n\nitems = [int(i) for i in input().join(' ')]\nitems.sort()\ntotal = sum(items)\n\nflag = 1\nfor i in range(M):\n if 1 // (4 * M) >= items[i]:\n pass\n else:\n flag = 0\nif not flag:\n print('Yes')\nelse:\n print('No')", "N,M = [int(i) for i in input().split()]\n\nitems = [int(i) for i in input().split()]\nitems.sort(reverse=True)\ntotal = sum(items)\n\nflag = 1\nfor i in range(M):\n if total // (4 * M) >= items[i]:\n pass\n else:\n flag = 0\nif flag:\n print('Yes')\nelse:\n print('No')", "N,M = [int(i) for i in input().split()]\n\nitems = [int(i) for i in input().join(' ')]\nitems.sort()\ntotal = sum(items)\n\nflag = 1\nfor i in range(M):\n if 1 // (4 * M) >= items[i]:\n pass\n else:\n flag = 0\nif not flag:\n print('Yes')\nelse:\n print('No')", "N, M= int(input().join(' '))\n\nitems = [i for i in input().join(' ')]\nitems.sort()\ntotal = sum(items)\n\nflag = 1\nfor i in range(M):\n if 1 // (4 * M) >= items[i]:\n pass\n else:\n flag = 0\nif not flag:\n print('Yes')\nelse:\n print('No')", "N,M = [int(i) for i in input().split()]\n\nitems = [int(i) for i in input().split()]\nitems.sort(reverse=True)\ntotal = sum(items)\n\nflag = 1\nfor i in range(M):\n if total / (4 * M) >= items[i]:\n pass\n else:\n flag = 0\nif flag:\n print('Yes')\nelse:\n print('No')", "N,M = [int(i) for i in input().split()]\n\nitems = [int(i) for i in input().split()]\nitems.sort()\ntotal = sum(items)\n\nflag = 1\nfor i in range(M):\n if 1 // (4 * M) >= items[i]:\n pass\n else:\n flag = 0\nif flag:\n print('Yes')\nelse:\n print('No')", "N = int(input())\nM = int(input())\n\nitems = [i for i in input().join(' ')]\nitems.sort()\ntotal = sum(items)\n\nflag = 1\nfor i in range(M):\n if 1 // (4 * M) >= items[i]:\n pass\n else:\n flag = 0\nif not flag:\n print('Yes')\nelse:\n print('No')", "N,M = [int(i) for i in input().split()]\n\nitems = [int(i) for i in input().split()]\nitems.sort(reverse=True)\ntotal = sum(items)\n\nflag = 1\nfor i in range(M):\n if total / (4 * M) <= items[i]:\n pass\n else:\n flag = 0\nif flag:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s077955195', 's118190847', 's324423779', 's355882240', 's374097585', 's378998472', 's475799586', 's794949910', 's833329368', 's130960651']
[3064.0, 3064.0, 3064.0, 3064.0, 3060.0, 3064.0, 3064.0, 3060.0, 3060.0, 3064.0]
[20.0, 17.0, 17.0, 19.0, 17.0, 18.0, 17.0, 17.0, 17.0, 17.0]
[274, 272, 243, 264, 254, 238, 263, 248, 243, 263]
p02718
u113107956
2,000
1,048,576
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`.
["n,m=map(int,input().split())\na=list(map(int,input().split()))\na.sort(reverse=True)\ncount=0\nfor i in range(m-1):\n if a[i]>=1/4*m:\n count+=1\nif count==m:\n print('Yes')\nelse:\n print('No')", "n,m=map(int,input().split())\na=list(map(int,input().split()))\na.sort(reverse=True)\ncount=0\nb=4*m\nnum=sum(a)/b\nfor i in range(m):\n if a[i]>=num:\n count+=1\n \nif count==m:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s821280405', 's152503098']
[3060.0, 3060.0]
[17.0, 17.0]
[200, 224]
p02718
u113971909
2,000
1,048,576
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`.
["n,m=map(int,input().split())\na=list(map(int,input().split()))\nx=sum(a)//m\nc=0\nfor i in a:\n if i>x:\n c+=1\nif c>=m:\n print('Yes')\nelse:\n print('No')", '#!/usr/bin python3\n# -*- coding: utf-8 -*-\n\nimport sys\ninput = sys.stdin.readline\n\ndef main():\n N,M = map(int, input().split())\n A = list(map(int, input().split()))\n X = sum(A)/(4*M)\n c = sum([1 for i in A if i >= X])\n if c>=M:\n print("Yes")\n else:\n print("No")\n\n\nif __name__ == \'__main__\':\n main()']
['Wrong Answer', 'Accepted']
['s946129373', 's832830180']
[2940.0, 3060.0]
[17.0, 17.0]
[152, 333]
p02718
u113991073
2,000
1,048,576
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`.
['n,m=map(int,input().split())\na=list(map(int,input().split()))\n\nnew_a=sorted(a,reverse=True)\nsums=sum(a)\n\nif new_a[m-1]>=sums/(b*4):\n print("Yes")\nelse:\n print("No")', 'top=0\nsum=0\ndef sort(a,n):\n for i in range(n):\n sum=sum+a[i-1]\n if a[i-1]<a[i] or i==1:\n top=a[n-1]\nasp=0\ndef am(m):\n asp=1-(1/(4*m))\n if top>sum*asp:\n print("No")\n else:\n print("Yes")\n\nn,m=list(map(int,input().split()))\na=list(map(int,input().split()))\n\nsort(a,n)\nam(m)', 'top=0\nsum=0\nasp=0\nn,m=list(map(int,input().split()))\na=list(map(int,input().split()))\n\nfor i in range(n):\n sum=sum+int(a[i-1])\n if a[i-1]<a[i] or i==1:\n top=int(a[i-1])\n\nasp=float(1-(1/(4*m)))\nasc=float((1/(4*m))\nif top>sum*asp or top/asp>sum:\n print("No")\nelse:\n print("Yes")', 'n,m=map(int,input().split())\na=list(map(int,input().split()))\n\nnew_a=sorted(a,reverse=False)\nsums=sum(a)\n\nif new_a[0]>=sums/(m*4):\n print("Yes")\nelse:\n print("No")', 'n,m=map(int,input().split())\na=list(map(int,input().split()))\n\nnew_a=sorted(a)\nsums=sum(a)\n\nif new_a[m-1]>=sums/(m*4):\n print("Yes")\nelse:\n print("No")', 'top=0\nsum=0\nasp=0\nn,m=list(map(int,input().split()))\na=list(map(int,input().split()))\n\nfor i in range(n):\n sum=sum+a[i-1]\n if a[i-1]<a[i] or i==1:\n top=a[n-1]\nasp=1-(1/(4*m))\n if top>sum*asp:\n print("No")\n else:\n print("Yes")', 'n,m=map(int,input().split())\na=list(map(int,input().split()))\n\nnew_a=sorted(a)\nsums=sum(a)\n\nif new_a[0]>=sums/(m*4):\n print("Yes")\nelse:\n print("No")', 'n,m=(map(int,input().split()))\na=list(map(int,input().split()))\n\nnew_a=sorted(a,reverse=True)\nsums=sum(a)\n\nif new_a[m-1]>sums/(b*4):\n print("Yes")\nelse:\n print("No")', 'n,m=list(map(int,input().split()))\na=list(map(int,input().split()))\n\na=sorted(a)\nsum=sum(a)/(4*m)\n\nif a[m-1]>sum:\n print("Yes")\nelse:\n print("No")', 'n,m=list(map(int,input().split()))\na=list(map(int,input().split()))\n\nsum=0\nasp=float(1/(4*m))\na=sorted(a,key=lambda x: -x)\nfor i in range(n):\n sum=sum+int(a[i-1])\n\nif int(a[0])>sum*asp:\n print("No")\nelse:\n print("Yes")', 'n,m=(map(int,input().split()))\na=list(map(int,input().split()))\n\nb=sorted(a)\nzyo=sum(b)/(4*m)\n\nif b[m-1]>zyo:\n print("Yes")\nelse:\n print("No")', 'n,m=list(map(int,input().split()))\na=list(map(int,input().split()))\n\nsum=0\nasp=float(1/(4*m))\na=sorted(a,key=lambda x: -x)\nfor i in range(n):\n sum=sum+int(a[i-1])\n\nif int(a[0])>sum*asp and int(a[1])>sum*asp:\n print("No")\nelse:\n print("Yes")', 'top=0\nsum=0\ndef sort(a,n)\n for i in range(n):\n sum=sum+a[i-1]\n if a[i-1]<a[i] or i==1:\n top=a[n-1]\nasp=0\ndef am(m):\n asp=1-(1/(4*m))\n if top>sum*asp:\n print("No")\n else:\n print("Yes")\n\nn,m=list(map(int,input().split()))\na=list(map(int,input().split()))\n\nsort(a,n)\nam(m)', 'n,m=map(int,input().split())\na=list(map(int,input().split()))\n\nnew_a=sorted(a,reverse=True)\nsums=sum(a)\n\nif new_a[m-1]>=sums/(m*4):\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s037866677', 's098134677', 's271861493', 's273616711', 's280879436', 's397844572', 's553367998', 's661184234', 's711471737', 's719529635', 's780202572', 's883910783', 's960864122', 's463198114']
[3060.0, 3064.0, 3064.0, 2940.0, 2940.0, 3064.0, 3060.0, 3060.0, 3060.0, 3064.0, 3060.0, 3064.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0, 17.0, 17.0, 18.0, 19.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0]
[170, 321, 295, 169, 157, 258, 155, 171, 152, 227, 148, 249, 320, 170]
p02718
u115110170
2,000
1,048,576
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`.
['n,m = map(int, input().split())\n\nls = list(map(int, input().split()))\nls = sorted(ls,reverse=True)\nprint(ls)\nprint("Yes" if ls[m-1]*4*m >=sum(ls) else "No")\n\n', 'n,m = map(int, input().split())\n\nls = list(map(int, input().split()))\nls = sorted(ls,reverse=True)\nprint("Yes" if ls[m-1]*4*m >=sum(ls) else "No")']
['Wrong Answer', 'Accepted']
['s246327244', 's121405126']
[2940.0, 2940.0]
[17.0, 17.0]
[158, 146]
p02718
u115877451
2,000
1,048,576
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`.
["a,b=map(int,input().split())\nn=list(map(int,input().split()))\nc=sum(n)/(4*b)\nd=[i for i in n if i>=c]\nprint(a,b,c,d,sum(n))\nif b>len(d):\n print('No')\nelse:\n print('Yes')", "a,b=map(int,input().split())\nn=list(map(int,input().split()))\nc=sum(n)/(4*b)\nd=[i for i in n if i>=c]\nif b>len(d):\n print('No')\nelse:\n print('Yes')"]
['Wrong Answer', 'Accepted']
['s045694635', 's610656538']
[3064.0, 3060.0]
[17.0, 17.0]
[175, 153]
p02718
u119982001
2,000
1,048,576
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`.
["N, M = list(map(int, input().split()))\nA = sorted(map(int, input().split()), reverse=True)\nprint(N, M , A, sum(A))\n\nborder = sum(A) // (4*M)\nflag = 'Yes'\n\nfor i in range(M):\n if border > A[i]:\n flag = 'No'\n\nprint(flag)\n", "import math\n\nN, M = list(map(int, input().split()))\nA = sorted(map(int, input().split()), reverse=True)\n\nborder = sum(A) / (4*M)\nflag = 'Yes'\n\nfor i in range(M):\n if border > A[i]:\n flag = 'No'\n\nprint(flag)"]
['Wrong Answer', 'Accepted']
['s578249671', 's416986267']
[3060.0, 3060.0]
[18.0, 18.0]
[229, 216]
p02718
u121276807
2,000
1,048,576
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`.
["N,M = list(map(int, input().split()))\n\nA = list(map(int, input().split()))\n\nprint(A)\n\nAsum = sum(A)\n\nfor i in range(M):\n Amax = max(A)\n max_index = A.index(Amax)\n A.pop(max_index)\n \n\nif Amax < Asum/4/M:\n print('No')\nelse:\n print('Yes')", "N,M = list(map(int, input().split()))\n\nA = list(map(int, input().split()))\n\nAsum = sum(A)\n\nfor i in range(M):\n Amax = max(A)\n max_index = A.index(Amax)\n A.pop(max_index)\n \n\nif Amax < Asum/4/M:\n print('No')\nelse:\n print('Yes')"]
['Wrong Answer', 'Accepted']
['s103013859', 's642239669']
[3060.0, 3064.0]
[17.0, 17.0]
[254, 244]
p02718
u131464432
2,000
1,048,576
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`.
['N,M = map(int,input().split())\nA = list(map(int,input().split()))\n\ndef vote(a,m):\n a.sort(reverse=True)\n for i in range(m):\n if a[i-1] >= sum(a)/(4*m):\n return True\n else:\n return False\n \nans = "Yes" if vote(A,M) else "No"\nprint(ans)', 'N,M = map(int,input().split())\nA = list(map(int,input().split()))\n\ndef vote(a,m):\n a.sort(reverse=True)\n if a[m-1] >= sum(a)/(4*m):\n return True\n else:\n return False\n \nans = "Yes" if vote(A,M) else "No"\nprint(ans)', 'N,M = map(int,input().split())\nA = list(map(int,input().split()))\n\ndef vote(a,m):\n a.sort(reverse=True)\n if a[m-1] >= sum(a)/(4*m):\n return True\n else:\n return False\n \nans = "Yes" if vote(A,M) else "No"\nprint(ans)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s281056262', 's761695432', 's667379462']
[9120.0, 8908.0, 9164.0]
[27.0, 25.0, 30.0]
[254, 231, 229]
p02718
u131881594
2,000
1,048,576
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`.
['_,m=map(int,input().split())\na=list(map(int,input().split()))\ncnt=0\ntemp=sum(a)\nfor v in a:\n if v>=a/(4*m): cnt+=1\nif cnt>=m: print("Yes")\nelse: print("No")', '_,m=map(int,input().split())\na=list(map(int,input().split()))\ncnt=0\ntemp=sum(a)\nfor v in a:\n if v>=temp/(4*m): cnt+=1\nif cnt>=m: print("Yes")\nelse: print("No")']
['Runtime Error', 'Accepted']
['s555907526', 's674649702']
[9156.0, 9176.0]
[24.0, 29.0]
[159, 162]
p02718
u132331017
2,000
1,048,576
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`.
["n, m = map(int, input().split())\na_list = input().split()\na_sum = 0\nfor i in range(len(a_list)):\n a_list[i] = int(a_list[i])\n a_sum += a_list[i]\na_list.reverse()\n\nok_num = 0\nkijyun = int(a_sum/(4*m))\nif a_sum % (4*m) == 0:\n kijyun += 1\nfor i in a_list:\n if i > kijyun:\n ok_num += 1\n else:\n break\n if ok_num == m:\n print('Yes')\n quit()\nprint('No')\n\n", "n, m = map(int, input().split())\na_list = input().split()\na_sum = 0\nfor i in range(len(a_list)):\n a_list[i] = int(a_list[i])\n a_sum += a_list[i]\na_list.reverse()\n\nok_num = 0\nkijyun = int(a_sum/(4*m))\nfor i in a_list:\n if i > kijyun:\n ok_num += 1\n else:\n break\n if ok_num >= m:\n print('Yes')\n quit()\nprint('No')", "n, m = map(int, input().split())\na_list = input().split()\na_sum = 0\nfor i in range(len(a_list)):\n a_list[i] = int(a_list[i])\n a_sum += a_list[i]\na_list.reverse()\n\nok_num = 0\nkijyun = int(a_sum/(4*m))\nif a_sum % (4*m) == 0:\n kijyun -= 1\nfor i in a_list:\n if i > kijyun:\n ok_num += 1\n else:\n break\n if ok_num == m:\n print('Yes')\n quit()\nprint('No')\n\n", "n, m = map(int, input().split())\na_list = input().split()\na_sum = 0\nfor i in range(len(a_list)):\n a_list[i] = int(a_list[i])\n a_sum += a_list[i]\na_list.reverse()\n \nok_num = 0\nkijyun = int(a_sum/(4*m))\nif a_sum % (4*m) == 0:\n kijyun -= 1\nfor i in a_list:\n if i > kijyun:\n ok_num += 1\n if ok_num == m:\n print('Yes')\n quit()\nprint('No')\n "]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s182673217', 's538113011', 's769563273', 's204347536']
[3064.0, 3064.0, 3064.0, 3064.0]
[17.0, 18.0, 17.0, 17.0]
[394, 353, 394, 371]
p02718
u132734887
2,000
1,048,576
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`.
['x = input().split()\ny = input().split()\n\n\na = [int(i) for i in x]\nb = [int(i) for i in y]\n\nM = a[1]\ns = sum(b)\nc = 0\n\nfor i in b:\n if i >= int((1/(4*M)*S):\n c += 1\n if c > 1:\n print("Yes")\n\nprint("No")\n', 'x = input().split()\ny = input().split()\n\n\n\na = [int(i) for i in x]\nb = [int(i) for i in y]\n\nM = a[1]\ns = sum(b)\nc = 0\nf = False\n\nfor i in b:\n if i >= ((1/(4*M)*s)):\n c += 1\n if c == M:\n print("Yes")\n f = True\n break\n\nif not f:\n print("No")\n']
['Runtime Error', 'Accepted']
['s297594805', 's763720200']
[2940.0, 3064.0]
[17.0, 18.0]
[222, 277]
p02718
u133174241
2,000
1,048,576
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`.
["input_d21 = list(map(int, input().split()))\ninput_d22 = list(map(int, input().split()))\n\nN = input_d21[0]\nM = input_d21[1]\n\nA = input_d22\n\nsohyo = sum(A)\nzyoken = float(sohyo) / float(4 * M)\n\n\nA = sorted(A, reverse=True)\nprint(A)\nprint(sohyo)\nprint(zyoken)\n\nif A[M-1] >= zyoken:\n print('Yes')\n \nelse:\n print('No')", "input_d21 = list(map(int, input().split()))\ninput_d22 = list(map(int, input().split()))\n\nN = input_d21[0]\nM = input_d21[1]\n\nA = input_d22\n\nsohyo = sum(A)\nzyoken = float(sohyo) / float(4 * M)\n\n\nA = sorted(A, reverse=True)\n\nif A[M-1] >= zyoken:\n print('Yes')\n \nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s694162849', 's988470039']
[3064.0, 3064.0]
[17.0, 17.0]
[322, 286]
p02718
u133356863
2,000
1,048,576
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`.
["N,M=map(int,input().split())\nA = list(map(int, input().split()))\nselect=0\nfor i in range(len(A)-1):\n if A[i]>sum(A)*(1/(4*M)):\n select+=1\n \ndef ans(M,select): \n if M>=select:\n return 'Yes'\n \n else:\n return 'No'\n\nprint(ans(M,select))", "N,M=map(int,input().split())\nA = list(map(int, input().split()))\nselect=0\nfor i in range(N-1):\n if A[i]>sum(A)*(1/(4*M)):\n select+=1\n \ndef ans(M,select): \n if M==select:\n return 'Yes'\n \n else:\n return 'No'\n\nprint(ans(M,select))", "N,M=map(int,input().split())\nA = list(map(int, input().split()))\nselect=0\nfor i in range(len(A)):\n if A[i]>=sum(A)*(1/(4*M)):\n select+=1\n \ndef ans(M,select): \n if M<=select:\n return 'Yes'\n \n else:\n return 'No'\n\nprint(ans(M,select))"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s383535224', 's835239088', 's097948243']
[3060.0, 3060.0, 3060.0]
[18.0, 17.0, 17.0]
[272, 267, 271]
p02718
u135632715
2,000
1,048,576
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`.
['num, choice = map(int, input().split())\ntmp = input().split()\nproduct_list = [int(s) for s in tmp]\nproduct_list.sort()\nsum = 0\nfor i in range(num):\n sum += product_list[i]\nif product_list[choice-1] >= sum/(choice*4):\n print("Yes")\nelse:\n print("No")', 'num, choice = map(int, input().split())\ntmp = input().split()\nproduct_list = [int(s) for s in tmp]\nproduct_list.sort(reverse=True)\nsum = 0\nfor i in range(num):\n sum += product_list[i]\nif product_list[choice-1] >= sum/(choice*4):\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s011822135', 's286044183']
[3060.0, 3060.0]
[17.0, 17.0]
[252, 271]
p02718
u137667583
2,000
1,048,576
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`.
['n,m = map(int,input().split())\na = sorted(list(map(int,input().split())),reverse=True)\nprint("YNeos"[sum([sum(a)/(4*m)>=a[i] for i in range(m)])<m::2])', 'n,m = map(int,input().split())\na = sorted(list(map(int,input().split())),reverse=True)\nprint("YNeos"[sum(a[i]<sum(a)/(4*m)for i in range(m))<m::2])', 'n,m = map(int,input().split())\na = sorted(list(map(int,input().split())),reverse=True)\nprint("YNeos"[sum(a[i]>=sum(a)/(4*m)for i in range(m))<m::2])']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s243358707', 's318895410', 's250467780']
[3060.0, 3060.0, 3060.0]
[18.0, 18.0, 18.0]
[151, 147, 148]
p02718
u140191608
2,000
1,048,576
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`.
["N , M = (map(int , input().split()))\nA = list(map(int , input().split()))\ns = sum(A)\ntou = -(-1//(4*M))*s\ncount = 0\nfor i in A:\n if i > tou:\n count += 1\nif count >= M:\n print('Yes')\nelse:\n print('No')", "N , M = (map(int , input().split()))\nA = list(map(int , input().split()))\ns = sum(A)\ntou = (1/(4*M))*s\ncount = 0\nfor i in A:\n if i < tou:\n continue\n else:\n count += 1\nif count >= M:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s981762301', 's597458600']
[3060.0, 3064.0]
[17.0, 17.0]
[216, 240]
p02718
u141419468
2,000
1,048,576
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`.
['n, m = map(int, input().split())\na = list(map(int, input().split()))\n\nA = sum(a)\nl = a.sort(reverse=True)\n\nif l[m-1] >= A/(4*m):\n print("Yes")\nelse:\n print("No")', 'n, m = list(map(int, input().split()))\na = list(map(int, input().split()))\n\nA = sum(a)\na.sort(reverse=True)\n\nif a[m-1] >= A/(4*m):\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s525713036', 's508980038']
[3060.0, 3060.0]
[18.0, 18.0]
[167, 169]
p02718
u144072139
2,000
1,048,576
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`.
['N,M=map(int,input().split())\nA=list(map(int,input().split()))\nA=A.sort(reverse=True)\ns=sum(A)\n\nP=0 \nfor a in A:\n if a>=s/(4*M):\n P+=1\n else:\n break\n \nif P==M:\n print("Yes")\nelse:\n print("No")', 'N,M=map(int,input().split())\nA=list(map(int,input().split()))\n\ns=sum(A)\n\nP=0 \nfor a in A:\n if 4*M*a>=s:\n P+=1\n \nif P==M:\n print("Yes")\nelse:\n print("No")', 'N,M=map(int,input().split())\nA=list(map(int,input().split()))\nA=sorted(A)\ns=sum(A)\n\nP=0 \nfor a in A:\n if a>=s/(4*M):\n P+=1\n else:\n break\n \nif P==M:\n print("Yes")\nelse:\n print("No")', 'N,M=map(int,input().split())\nA=list(map(int,input().split()))\n\ns=sum(A)\n\nP=0 \nfor n in range(N):\n if 4*M*A[n]>=s:\n P+=1\n \nif P==M:\n print("Yes")\nelse:\n print("No")', 'N,M=map(int,input().split())\nA=list(map(int,input().split()))\nA.sort(reverse=True)\ns=sum(A)\n\nP=0 \nfor a in A:\n if a>=s/(4*M):\n P+=1\n else:\n break\n \nif P==M:\n print("Yes")\nelse:\n print("No")', 'N,M=map(int,input().split())\nA=list(map(int,input().split()))\nA.sort(reverse=True)\ns=sum(A)\n\nif A[M-1]>=s/(4*M):\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s279708333', 's319507637', 's812993425', 's854627185', 's941663604', 's681688970']
[3060.0, 2940.0, 3060.0, 3060.0, 3060.0, 3060.0]
[18.0, 18.0, 17.0, 17.0, 17.0, 17.0]
[240, 192, 229, 202, 238, 151]
p02718
u146066372
2,000
1,048,576
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`.
['n,m=map(int,input().split())\na=list(map(int,input().split()))\ncnt=0\na.sort(reverse=True)\nALL=0\nprint(a)\n\nfor i in a:\n ALL+=i\n\nprint(ALL)\n\n\nfor i in range(m):\n if a[i]>=ALL/(4*m):\n cnt+=1\n if cnt==m:\n print("Yes")\n else:\n print("No")\n break\n', 'n,m=map(int,input().split())\na=list(map(int,input().split()))\ncnt=0\na.sort(reverse=True)\nALL=0\n\nfor i in a:\n ALL+=i\n\n\nfor i in range(m):\n if a[i]>=ALL/(4*m):\n cnt+=1\n if cnt==m:\n print("Yes")\n else:\n print("No")\n break\n']
['Wrong Answer', 'Accepted']
['s381485941', 's401998111']
[9032.0, 9212.0]
[30.0, 31.0]
[288, 267]
p02718
u149368256
2,000
1,048,576
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`.
['n, m = map(int, input().split())\na_list = list(map(int, input().split()))\ncount = 0\n\nfor i in range(n):\n if a_list[i] >= (sum(a_list) / (4*m)):\n count += 1\n \nif count >= m:\n print("YES")\nelse:\n print("NO")', 'n, m = map(int, input().split())\na_list = list(map(int, input().split()))\ncount = 0\nsuma = sum(a_list)\n\nfor i in range(n):\n if a_list[i] >= (suma / (4*m)):\n count += 1\n \nif count >= m:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s108963514', 's921927224']
[3060.0, 3060.0]
[17.0, 18.0]
[212, 224]
p02718
u155946404
2,000
1,048,576
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`.
["n,m =map(int,input().split())\nA = list(map(int, input().split())) \n\nsouwa = sum(A)\n\nhyou = 1/(4*souwa)\nninki = 0\n\nfor number in A:\n if number > hyou:\n ninki = ninki + 1\n\nif m == souwa:\n print('Yes')\nelse:\n print('No')", "n,m =map(int,input().split())\nA = list(map(int, input().split())) \n\nsouwa = sum(A)\nprint(souwa)\n\nhyou = 1(4*souwa)i\nninki = 0\n\nfor i in range(A):\n if A(i)>hyou:\n ninki = ninki + 1\n\nif m == souwa:\n print('Yes')\nelse:\n print('No')", "n,m =map(int,input().split())\nA = list(map(int, input().split())) \n\nsouwa = sum(A)\nhyou = souwa/(4*m)\nninki = 0\n\nfor number in A:\n if number >= hyou:\n ninki = ninki + 1\n\nif m <= ninki:\n print('Yes')\nelse:\n print('No')\n"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s411962751', 's952220337', 's817918174']
[3060.0, 2940.0, 3060.0]
[17.0, 18.0, 17.0]
[232, 243, 228]
p02718
u156944760
2,000
1,048,576
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`.
['n, m = map(int, input().split())\nA = sorted([int(x) for x in input().split()], reverse=True)\nAsum = sum(A)\nlmt = (Asum/(m*4))\n\nprint(A[m-1] )\nif A[m-1] >= lmt:\n print("Yes")\nelse:\n print("No")', 'n, m = map(int, input().split())\nA = sorted([int(x) for x in input().split()], reverse=True)\nAsum = sum(A)\nlmt = (Asum/(m*4))\n\n\nif A[m-1] >= lmt:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s821120934', 's568775733']
[3060.0, 3060.0]
[17.0, 17.0]
[198, 184]
p02718
u161693347
2,000
1,048,576
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`.
['import sys, re, os\nfrom collections import deque, defaultdict, Counter\nfrom math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians\n# from fractions import gcd\nfrom itertools import permutations, combinations, product, accumulate\nfrom operator import itemgetter, mul\nfrom copy import deepcopy\nfrom string import ascii_lowercase, ascii_uppercase, digits\nfrom functools import reduce\nfrom bisect import bisect_left, insort_left\nfrom heapq import heapify, heappush, heappop\n\nINPUT = lambda: sys.stdin.readline().rstrip()\nINT = lambda: int(INPUT())\nMAP = lambda: map(int, INPUT().split())\nS_MAP = lambda: map(str, INPUT().split())\nLIST = lambda: list(map(int, INPUT().split()))\nS_LIST = lambda: list(map(str, INPUT().split()))\nZIP = lambda: zip(*(MAP() for _ in range(n)))\n\nsys.setrecursionlimit(10 ** 9)\nINF = float(\'inf\')\nmod = 10 ** 9 + 7\n\n\ndef main():\n N, M = MAP()\n A = LIST()\n\n W = sum(A)\n A = sorted(A, reverse=True)\n print(A)\n\n for i, a in enumerate(A):\n if a < W / (4*M):\n print("No")\n sys.exit()\n print(i)\n if i == M:\n print("Yes")\n sys.exit()\n\n\nif __name__ == \'__main__\':\n main()\n', 'import sys, re, os\nfrom collections import deque, defaultdict, Counter\nfrom math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians\n# from fractions import gcd\nfrom itertools import permutations, combinations, product, accumulate\nfrom operator import itemgetter, mul\nfrom copy import deepcopy\nfrom string import ascii_lowercase, ascii_uppercase, digits\nfrom functools import reduce\nfrom bisect import bisect_left, insort_left\nfrom heapq import heapify, heappush, heappop\n\nINPUT = lambda: sys.stdin.readline().rstrip()\nINT = lambda: int(INPUT())\nMAP = lambda: map(int, INPUT().split())\nS_MAP = lambda: map(str, INPUT().split())\nLIST = lambda: list(map(int, INPUT().split()))\nS_LIST = lambda: list(map(str, INPUT().split()))\nZIP = lambda: zip(*(MAP() for _ in range(n)))\n\nsys.setrecursionlimit(10 ** 9)\nINF = float(\'inf\')\nmod = 10 ** 9 + 7\n\n\ndef main():\n N, M = MAP()\n A = LIST()\n\n W = sum(A)\n A = sorted(A, reverse=True)\n\n for i in range(M):\n if A[i] < W / (4*M):\n print("No")\n sys.exit()\n\n print("Yes")\n\n\nif __name__ == \'__main__\':\n main()\n']
['Wrong Answer', 'Accepted']
['s095609493', 's268727206']
[4228.0, 3980.0]
[134.0, 29.0]
[1181, 1098]
p02718
u165114979
2,000
1,048,576
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`.
["n, m = input().split()\nn = int(n)\nm = int(m)\nc=0\nfor i in range(n):\n c += a[i]\nv = c/(4*m)\na = list(map(int, input().split()))\na.sort(reverse = True)\nif a[m-1] < v:\n print('No')\nelse:\n print('Yes')\n", "n, m = input().split()\nn = int(n)\nm = int(m)\nc=0\n\na = list(map(int, input().split()))\nfor i in range(n):\n c += a[i]\nv = c/(4*m)\na.sort(reverse = True)\nif a[m-1] < v:\n print('No')\nelse:\n print('Yes')"]
['Runtime Error', 'Accepted']
['s293622836', 's013563457']
[9176.0, 9184.0]
[25.0, 31.0]
[201, 201]
p02718
u174181999
2,000
1,048,576
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`.
["N, M = map(int, input().split())\nA = list(map(int, input().split()))\nvote = sum(A)\ncnt = 0\n\nprint(N, M)\nprint(A)\n\nfor i in range(N):\n if A[i] >= vote / 4 / M:\n cnt += 1\n else:\n continue\n\nif cnt >= M:\n print('Yes')\nelse:\n print('No')", "N, M = map(int, input().split())\nA = list(map(int, input().split()))\nvote = sum(A)\ncnt = 0\n\nfor i in range(N):\n if A[i] >= vote / 4 / M:\n cnt += 1\n else:\n continue\n \nif cnt >= M:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s737119700', 's409353404']
[3064.0, 3060.0]
[18.0, 17.0]
[242, 221]
p02718
u175590965
2,000
1,048,576
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`.
['n,m = map(int,input().split())\na = list(map(int,input().split()))\nans = 0\ns = sum(a)\nfor i in range(a):\n if i >= s/(4*m):\n ans += 1\nif ans >= m:\n print("Yes")\nelse:\n print("No")', 'n,m = map(int,input().split())\na = list(map(int,input().split()))\nb = sum(a)\ncnt = 0\nfor i in a:\n if i >= b/(4*m):\n cnt +=1\nif cnt >=m:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s232599094', 's907203336']
[3060.0, 9184.0]
[17.0, 37.0]
[193, 184]
p02718
u175746978
2,000
1,048,576
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`.
["N, M = map(int, input().split())\nA = map(int, input().split()\ncount = 0\n\nfor i in A:\n if i > sum(A)/(4*M):\n count += 1\n else:\n continue\n\nif count > M:\n print('Yes')\nelse:\n print('No')", 'n,m=map(int,input().split())\nb=list(map(int,input().split()))\ns=sum(b)\na=[i for i in b if i>=s/(4*m)]\nprint("Yes" if len(a)>=m else "No")']
['Runtime Error', 'Accepted']
['s240004137', 's173017663']
[2940.0, 2940.0]
[17.0, 18.0]
[209, 137]
p02718
u177370876
2,000
1,048,576
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`.
['n, m = map(int, input().split())\na = map(int, input().split())\ns=0\ncan=0\nfor b in a:\n s+=b \nfor b in a:\n if b >= s / (4*m):\n can+=1\nif can > m:\n print("Yes")\nelse:\n print("No")\n', 'n, m = map(int, input().split())\na = map(int, input().split())\ns=0\ncan=0\nfor b in a:\n s+=b \nfor b in a:\n if b >= s / (4*m):\n can+=1\nif can >= m:\n print("Yes")\nelse:\n print("No")\n', 'n, m = map(int, input().split())\na = list(map(int, input().split()))\ns=0\ncan=0\nfor b in a:\n s+=b \n\nfor c in a:\n if c >= s / (4*m):\n can+=1\n\nif can >= m:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s678981749', 's691359574', 's742961941']
[2940.0, 2940.0, 3060.0]
[18.0, 17.0, 17.0]
[196, 197, 204]
p02718
u178509296
2,000
1,048,576
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`.
["N, M = map(int, input().split())\nA = list(map(int, input().split()))\nt = 0\nS = 0\nfor Ai in A:\n S=S+Ai\n\nfor Ai in A:\n if Ai >= S/(4*M):\n t = t+1\n\nif t >= M:\n print('yes')\nelse:\n print('no')\n\n\n\n\n\n\n\n", "N, M = map(int, input().split())\nA = list(map(int, input().split()))\nt = 0\nfor Ai in A:\n if Ai >= 1/(4*M):\n t = t+1\n\nif t >= M:\n print('yes')\nelse:\n print('no')\n\n", "N, M = map(int, input().split())\nA = list(map(int, input().split()))\nt = 0\nS = 0\nfor Ai in A:\n S=S+Ai\n\nfor Ai in A:\n if Ai >= S/(4*M):\n t = t+1\n\nif t >= M:\n print('Yes')\nelse:\n print('No')\n\n\n\n\n\n\n\n"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s447755950', 's706123656', 's438695753']
[3060.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[215, 178, 215]
p02718
u181195295
2,000
1,048,576
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`.
['n, m = map(int,input().split())\nA = list(map(int,input().split()))\n\nlim = 1/(4*m)\nA = A/sum(A)\nans = 0\nfor a in A:\n if a>=lim:\n ans += 1\n \nif ans >= m:\n print("Yes")\nelse:\n print("No")\n', 'n, m = map(int,input().split())\nA = list(map(int,input().split()))\n\nlim = 1/(4*m)\n\nans = 0\nfor a in A:\n a /= sum(A)\n if a>=lim:\n ans += 1\n \nif ans >= m:\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Accepted']
['s340335218', 's753228894']
[3060.0, 2940.0]
[17.0, 17.0]
[194, 196]
p02718
u181668771
2,000
1,048,576
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`.
["def main():\n from builtins import int, map, list, print\n import sys\n sys.setrecursionlimit(10 ** 6)\n\n input = sys.stdin.readline\n input_list = (lambda: input().rstrip().split())\n input_number = (lambda: int(input()))\n input_number_list = (lambda: list(map(int, input_list())))\n\n N, M = input_number_list()\n A = input_number_list()\n total = sum(A)\n cnt = 0\n for a in A:\n if a >= total / (4 * M):\n cnt += 1\n print('YNeos'[cnt < M::2])\n\n if __name__ == '__main__':\n main()\n", "def main():\n from builtins import int, map, list, print\n import sys\n sys.setrecursionlimit(10 ** 6)\n\n input = sys.stdin.readline\n input_list = (lambda: input().rstrip().split())\n input_number = (lambda: int(input()))\n input_number_list = (lambda: list(map(int, input_list())))\n\n N, M = input_number_list()\n A = input_number_list()\n total = sum(A)\n cnt = 0\n for a in A:\n if a >= total / (4 * M):\n cnt += 1\n print('YNeos'[cnt < M::2])\n\nif __name__ == '__main__':\n main()\n"]
['Wrong Answer', 'Accepted']
['s174023042', 's308638275']
[3060.0, 3060.0]
[17.0, 18.0]
[537, 529]
p02718
u182898140
2,000
1,048,576
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`.
["n,m=map(int,input().split())\na=list(map(int,input().split()))\n\nif min(a)>n/4*m:\n print('Yes')\nelse:\n print('No')", "N,M=map(int,input().split())\nA=list(map(int,input().split()))\n\ntotal_vote=sum(A)/(4*M)\nsele=0\n\nfor i in A:\n if i >= total_vote:\n sele+=1\n else:\n pass\n\nif M<=sele:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s112130495', 's182812966']
[2940.0, 3060.0]
[17.0, 17.0]
[114, 205]
p02718
u183840468
2,000
1,048,576
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`.
["import bisect\nn,m = [int(i) for i in input().split()]\nal = sorted([int(i) for i in input().split()])\ntotal = sum(al)\n\nidx = bisect.bisect_left(al,total/(4*m))\nidx = bisect.bisect_left(al,789)\n\nif n - idx > m:\n print('Yes')\nelif al[idx+1] == total/(4*m):\n print('No')\nelse:\n print('No')\n", "import bisect\nn,m = [int(i) for i in input().split()]\nal = sorted([int(i) for i in input().split()],reverse = True)\ntotal = sum(al)\n\nl = al[:m]\n\nif l[-1] >= total/(4*m):\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s104305365', 's722044927']
[3060.0, 3060.0]
[18.0, 18.0]
[295, 208]
p02718
u184335045
2,000
1,048,576
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`.
["n,m = map(n,m = map(int,input().split())\na = list(map(int,input().split()))\n\ns = sum(a)\nu = s / (4*m)\nc = 0\nfor i in a:\n if i >= u: c += 1\n\nif c >= m: print('Yes')\nelse : print('No')", "n,m = map(int,input().split())\na = list(map(int,input().split()))\n\ns = sum(a)\nu = s / (4*m)\nc = 0\nfor i in a:\n if i >= u: c += 1\n\nif c >= m: print('Yes')\nelse : print('No')"]
['Runtime Error', 'Accepted']
['s018183806', 's020575010']
[2940.0, 3060.0]
[17.0, 19.0]
[185, 175]
p02718
u185350737
2,000
1,048,576
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`.
["n,m = map(int, input().split())\na = list(map(int, input().split()))\n\nt = 0\ncheck=False\nfor i in range(len(a)):\n t += a[i]\n\nfor i in reversed(range(len(a))):\n for j in range(i):\n if(a[j] < a[j+1]):\n a[j], a[j+1] = a[j+1],a[j]\nprint(a)\n\nprint(int(t/(4*m)))\nfor i in range(m):\n if(a[i] < int(t/(4*m))):\n check=False\n break \n else:\n check = True \n \nif(check):\n print('Yes')\nelse:\n print('No')\n", "n,m = map(int, input().split())\na = list(map(int, input().split()))\n\nt = 0\ncheck=False\nfor i in range(len(a)):\n t += a[i]\n\nfor i in reversed(range(len(a))):\n for j in range(i):\n if(a[j] < a[j+1]):\n a[j], a[j+1] = a[j+1],a[j]\n elif(a[j] == a[j+1]):\n check=False\n break\n\nif(check == True):\n for i in range(m):\n if(a[i] > t/(4*m)):\n check = True\n else:\n check=False\n \n \nif(check):\n print('Yes')\nelse:\n print('No')", "n,m = map(int, input().split())\na = list(map(int, input().split()))\n\n\nt = 0\ncheck=False\nfor x in range(len(a)):\n t += a[x]\n\nfor i in reversed(range(len(a))):\n for j in range(i):\n if(a[j] < a[j+1]):\n a[j], a[j+1] = a[j+1],a[j]\n\nfor y in range(m):\n if(a[y] >= t/(4*m)):\n check = True\n else:\n check=False\n break\n\nif(check):\n print('Yes')\nelse:\n print('No')\n"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s481693949', 's515899798', 's332616229']
[3064.0, 3064.0, 3064.0]
[18.0, 19.0, 18.0]
[418, 458, 377]
p02718
u187995923
2,000
1,048,576
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`.
['n,m=[int(e) for e in input().split()]\na=[int(e) for e in input().split()]\ncount = 0\nsum = 0\nfor i in range(n):\n sum += a[i]\nprint(sum)\nfor i in range(n):\n if a[i] >= sum / (4*m):\n count +=1\nif count >= m:\n print("Yes")\nelse:\n print("No")', 'n,m=[int(e) for e in input().split()]\na=[int(e) for e in input().split()]\ncount = 0\nsum = 0\nfor i in range(n):\n sum += a[i]\nfor i in range(n):\n if a[i] >= sum / (4*m):\n count +=1\nif count >= m:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s603012554', 's008623580']
[3064.0, 3064.0]
[17.0, 19.0]
[256, 245]
p02718
u194228880
2,000
1,048,576
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`.
["nm = input('')\nn = int(nm.split(' ')[0])\nm = int(nm.split(' ')[1])\nalist = input('').split(' ')\n\nt = 0\nfor i in range(n):\n t += int(alist[i])\nlm = t/(m*4)\nprint(lm)\ns = 0\nfor i in range(n):\n a = int(alist[i])\n if a > lm:\n s+=1\n\nif s > m:\n print('Yes')\nelse:\n print('No')\n\n", "nm = input('')\nn = int(nm.split(' ')[0])\nm = int(nm.split(' ')[1])\nalist = input('').split(' ')\n\nt = 0\nfor i in range(n):\n t += int(alist[i])\n\n s = 0\nfor i in range(n):\n a = int(alist[i])\n if a*4*m >= t:\n s+=1\n\nif s >= m:\n print('Yes')\nelse:\n print('No')\n\n"]
['Wrong Answer', 'Accepted']
['s249936351', 's159150351']
[3064.0, 3060.0]
[17.0, 17.0]
[280, 265]
p02718
u197922478
2,000
1,048,576
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`.
['N,M = map(int,input().split())\nA = list(map(int,input().split()))\n\nans = "Yes"\nsum_M = sum(A)\nan = 0\nfor i in range(M):\n if A[i] < sum_M*1/4/M:\n an += 1\n \nif an<M:\n ans = "No"\n\nprint(ans)\n ', 'N,M = map(int,input().split())\nA = list(map(int,input().split()))\n\nans = "Yes"\nsum_M = sum(A)\nan = 0\nfor i in range(len(A)):\n if A[i] >= sum_M/(4*M):\n an += 1\n \nif an<M:\n ans = "No"\n\nprint(ans)\n ']
['Wrong Answer', 'Accepted']
['s094370902', 's018978376']
[3060.0, 3060.0]
[17.0, 17.0]
[212, 218]
p02718
u199138816
2,000
1,048,576
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`.
['import math\nn,m = list(map(int,input().split()))\na = list(map(int,input().split()))\nt = sum(a)\nc = 0\nf = 0\nfor i in range(n):\n\tif a[i] >= t//(4*m):\n\t\tc += 1\n\nif c>=m:\n\tprint("YES")\nelse:\n\tprint("NO")', 'import math\nn,m = list(map(int,input().split()))\na = list(map(int,input().split()))\nt = sum(a)\nc = 0\nf = 0\nfor i in range(n):\n\tif a[i] >= math.ceil(t/(4*m)):\n\t\tc += 1\n\tif c==m:\n\t\tf = 1\n\t\tprint("YES")\n\t\tbreak\nif f==0:\n\tprint("NO")', 'import math\nn,m = list(map(int,input().split()))\na = list(map(int,input().split()))\nt = sum(a)\nc = 0\nf = 0\nfor i in range(n):\n\tif a[i] >= math.ceil(t/(4*m)):\n\t\tc += 1\n\nif c>=m:\n\tprint("YES")\nelse:\n\tprint("NO")', 'import math\nn,m = list(map(int,input().split()))\na = list(map(int,input().split()))\nt = sum(a)\nc = 0\nf = 0\nfor i in range(n):\n\tif a[i] >= math.ceil(t/(4*m)):\n\t\tc += 1\n\nif c>=m:\n\tprint("Yes")\nelse:\n\tprint("No")']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s051406290', 's228636632', 's577177807', 's352743628']
[3060.0, 3064.0, 3064.0, 3064.0]
[17.0, 17.0, 17.0, 17.0]
[199, 229, 209, 209]
p02718
u199290844
2,000
1,048,576
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`.
["def getInput():\n return [int(i) for i in input().rstrip().split(' ')]\n\nN, M = getInput()\nA = getInput()\n_4M = int(sum(A)/(4*M) + .9)\nprint(_4M)\nA.sort(reverse=True)\ncnt = 0\nfor i in A:\n if i >= _4M:\n cnt += 1\n\nprint('Yes') if cnt >= M else print('No')", "def getInput():\n return [int(i) for i in input().rstrip().split(' ')]\nN, M = getInput()\nA = getInput()\n_4M = math.ceil(sum(A) / (4*M))\nA.sort(reverse=True)\ncnt = 0\nfor i in A:\n if i >= _4M:\n cnt += 1\nprint('Yes') if cnt >= M else print('No')", "import math\ndef getInput():\n return [int(i) for i in input().rstrip().split(' ')]\nN, M = getInput()\nA = getInput()\n_4M = math.ceil(sum(A) / (4*M))\nA.sort(reverse=True)\ncnt = 0\nfor i in A:\n if i >= _4M:\n cnt += 1\nprint('Yes') if cnt >= M else print('No')"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s342847791', 's678255286', 's651897398']
[3064.0, 3060.0, 3060.0]
[17.0, 17.0, 17.0]
[264, 254, 266]
p02718
u200527996
2,000
1,048,576
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`.
['N,M = map(int, input().split())\nA = list(map(int, input().split()))\nA_sum = sum(A)\ntmp = A_sum/4/M\nA.sort()\nif A[M-1] <tmp:\n print("No")\nelse:\n print("Yes")', 'N,M = map(int, input().split())\nA = list(map(int, input().split()))\nA_sum = sum(A)\ntmp = A_sum/4/M\nA.sort()\nprint(A[N-M],tmp)\nif A[N-M] <tmp:\n print("No")\nelse:\n print("Yes")', 'N,M = map(int, input().split())\nA = list(map(int, input().split()))\nA_sum = sum(A)\ntmp = A_sum/4/M\nA.sort()\nif A[N-M] <tmp:\n print("No")\nelse:\n print("Yes")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s643943790', 's727475364', 's272471106']
[2940.0, 3060.0, 2940.0]
[17.0, 18.0, 17.0]
[162, 180, 162]
p02718
u204616996
2,000
1,048,576
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`.
["N,M=map(int,input().split())\nA=list(map(int,input().split()))\nx=sum(A)\nif sum([i if a>=x/4/M else 0 for a in A])>=M:\n print('Yes')\nelse:\n print('No')", "N,M=map(int,input().split())\nA=list(map(int,input().split()))\nx=sum(A)\nif sum([1 if a>=x/4/M else 0 for a in A])>=M:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s897863311', 's226398571']
[3056.0, 2940.0]
[17.0, 18.0]
[151, 151]
p02718
u205087376
2,000
1,048,576
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`.
["n,m = map(int,input().split())\nl = list(int(input() for i in range(1,n+1)))\ncnt = 0\nfor j in range(0,n):\n if l[j]/(sum(l)) >= 1/(4*m):\n cnt += 1\nif cnt >= m:\n print('Yes')\nelse:\n print('No')", "n,m = map(int,input().split())\nl = list(map(int,input().split()))\ncnt = 0\nfor i in l:\n if i >= sum(l)/(4*m):\n cnt += 1\nif cnt >= m:\n print('Yes')\nelse:\n print('No')\n "]
['Runtime Error', 'Accepted']
['s250288766', 's286338746']
[3060.0, 2940.0]
[18.0, 18.0]
[196, 173]
p02718
u207326980
2,000
1,048,576
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`.
["n,m = map(int,input().split())\n \na = [ int(x) for x in input().split()]\nlimit = sum(a)//(4*m)\n \ncount=0\nfor x in a:\n \tif(x>=limit):\n \tcount+=1\nif(count<m):\n \tprint('No')\nelse:\n \tprint('Yes')\n\n", 'sfhgfh', "n,m = map(int,input().split())\n \na = [ int(x) for x in input().split()]\nlimit = sum(a)/(4*m)\n \ncount=0\nfor x in a:\n \tif(x>=limit):\n \t\t\tcount+=1\nif(count<m):\n \tprint('No')\nelse:\n \tprint('Yes')"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s142147966', 's812188786', 's271381568']
[2940.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0]
[200, 6, 199]
p02718
u210828934
2,000
1,048,576
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`.
['cl1 = input().split()\ncl2 = input().split()\nn = int(cl1[0])\nm = int(cl1[1])\ncl1 = [int(s) for s in cl1]\ncl2 = [int(s) for s in cl2]\n\nsum= 0.0\nfor i in range(n):\n sum = cl2[i]+ sum\nprint(sum)\ncl2 = sorted(cl2,reverse=True)\nif(cl2[m-1] > sum//(4*m)):\n print("Yes")\nelse:\n print("No")', 'cl1 = input().split()\ncl2 = input().split()\nn = int(cl1[0])\nm = int(cl1[1])\ncl1 = [int(s) for s in cl1]\ncl2 = [int(s) for s in cl2]\nsum= 0.0\nfor i in range(n):\n sum = cl2[i]+ sum\ncl2 = sorted(cl2,reverse=True)\nif(cl2[m-1] < sum/(4*m)):\n print("No")\nelse:\n print("Yes")']
['Wrong Answer', 'Accepted']
['s504443155', 's454494050']
[3064.0, 3188.0]
[17.0, 18.0]
[290, 277]
p02718
u212242633
2,000
1,048,576
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`.
["N,M=map(int,input().split())\nA=list(map(int,input().split()))\nA.sort(reverse=True)\n\nc=0\nfor i in range(M):\n if A[i]<sum(A)*(1/4*M):c+=0\n else:c+=1\nif c==0:print('Yes')\nelse:print('No')\n ", "N,M=map(int,input().split())\nA=list(map(int,input().split()))\n\nc=0\nfor i in range(M):\n if A[i]<sum(A)*(1/4*M):c+=0\n else:c+=1\nif c==0:print('Yes')\nelse:print('No')", "N,M=map(int,input().split())\nA=list(map(int,input().split()))\nA.sort(reverse=True)\n\nc=0\nfor i in range(M):\n if A[i]<sum(A)/(4*M):c+=1\n else:c+=0\nif c==0:print('Yes')\nelse:print('No')\n "]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s272458720', 's434888680', 's166321361']
[2940.0, 3060.0, 2940.0]
[18.0, 18.0, 19.0]
[199, 169, 191]
p02718
u212347962
2,000
1,048,576
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`.
['N, M = map(int, input().split())\nA = list(map(int, input().split()))\nans = 0\ntotal = 0\n \nfor i in range(len(A)):\n total += A[i]\nprint(total)\n \nA = sorted(A, reverse=True)\nprint(A)\nfor i in range(M):\n if(A[i] >= total/(4*M)):\n ans += 1\n print("p")\n else:\n ans += 0\n print("s")\nif(M == ans):\n print("Yes")\nelse:\n print("No")', 'N, M = map(int, input().split())\nA = list(map(int, input().split()))\nans = 0\ntotal = 0\n \nfor i in range(len(A)):\n total += A[i]\nA = sorted(A, reverse=True)\nfor i in range(M):\n if(A[i] >= total/(4*M)):\n ans += 1\n else:\n ans += 0\nif(M == ans):\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s846174453', 's063334759']
[3064.0, 3064.0]
[17.0, 17.0]
[365, 303]
p02718
u213155373
2,000
1,048,576
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`.
['N,M = map(int,input().split(" "))\nMER = map(int,input().split(" "))\nmer_sum = sum(MER)\n \nthreshold = mer_sum / (4 * M)\nmer_over = [1 if i >= threshold else 0 for i in MER]\nmer_threshold = sum(mer_over)\n \nif N <= mer_threshold:\n print("Yes")\nelse:\n print("No")', 'N,M = map(int,input().split(" "))\nMER = map(int,input().split(" "))\nmer_sum = sum(MER)\n\nthreshold = mer_sum / (4 * M)\nmer_over = [1 if i < threshold else 0 for i in MER]\nmer_threshold = sum(mer_over)\n\nif N <= mer_threshold:\n print("Yes")\nelse:\n print("No")', 'N,M = map(int,input().split(" "))\nMER = list(map(int,input().split(" ")))\nmer_sum = sum(MER)\n\nthreshold = mer_sum / (4 * M)\nmer_over = [1 if i >= threshold else 0 for i in MER]\nmer_threshold = sum(mer_over)\n\nif M <= mer_threshold:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s481497365', 's836683207', 's093842729']
[3060.0, 3064.0, 3064.0]
[17.0, 17.0, 18.0]
[261, 258, 265]
p02718
u213498391
2,000
1,048,576
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`.
["n, m = map(int, input().split())\na = list(map(int, input().split()))\n\nMAX_VOTE_NUM = 1000\n\nx = [-1] * MAX_VOTE_NUM\ntotal_vote_num = 0\nfor i in range(n):\n x[a[i] - 1] = i\n total_vote_num += a[i]\n\n popular_num = 0\n for i in range(MAX_VOTE_NUM):\n index = MAX_VOTE_NUM - i - 1\n if x[index] != -1 and ((index + 1) * 4 * m) >= total_vote_num:\n popular_num += 1\n\n if popular_num >= m:\n print('Yes')\n else:\n print('No')\n", "n, m = map(int, input().split())\na = list(map(int, input().split()))\n\nMAX_VOTE_NUM = 1000\n\nx = [-1] * MAX_VOTE_NUM\ntotal_vote_num = 0\nfor i in range(n):\n x[a[i] - 1] = i\n total_vote_num += a[i]\n\npopular_num = 0\nfor i in range(MAX_VOTE_NUM):\n index = MAX_VOTE_NUM - \n if x[index - 1] != -1 and (index * 4 * m) >= total_vote_num:\n popular_num += 1\n\nif popular_num >= m:\n print('Yes')\nelse:\n print('No')", "n, m = map(int, input().split())\na = list(map(int, input().split()))\n\nMAX_VOTE_NUM = 1000\n\nx = [-1] * MAX_VOTE_NUM\ntotal_vote_num = 0\nfor i in range(n):\n x[a[i] - 1] = i\n total_vote_num += a[i]\n\npopular_num = 0\nfor i in range(MAX_VOTE_NUM):\n index = MAX_VOTE_NUM - i\n if x[index - 1] != -1 and (index * 4 * m) >= total_vote_num:\n popular_num += 1\n\nif popular_num >= m:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s418154208', 's610070193', 's373940714']
[3064.0, 2940.0, 3064.0]
[36.0, 17.0, 17.0]
[435, 409, 410]
p02718
u215286521
2,000
1,048,576
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`.
['nums = list(map(int, input().split()))\nn = nums[0]\nm = nums[1]\n\na = list(map(int, input().split()))\n\nsum = 0\nfor v in a:\n sum += v\n\nresult = []\nfor s in a:\n if s >= sum * (1 / (4 * m)):\n result.append(s)\nprint(result)\nif len(result) >= m:\n print("Yes")\nelse:\n print("No")', 'nums = list(map(int, input().split()))\nn = nums[0]\nm = nums[1]\n\na = list(map(int, input().split()))\n\nsum = 0\nfor v in a:\n sum += v\n\nresult = []\nfor s in a:\n if s >= sum * (1 / (4 * m)):\n result.append(s)\nprint(result)\nif len(result) >= m:\n print("Yes")\nelse:\n print("No")\n', 'nums = list(map(int, input().split()))\nn = nums[0]\nm = nums[1]\n\na = list(map(int, input().split()))\n\nsum = 0\nfor v in a:\n sum += v\n\nresult = []\nfor s in a:\n if s >= sum * (1 / (4 * m)):\n result.append(s)\nif len(result) >= m:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s621217811', 's800495209', 's021545619']
[3064.0, 3064.0, 3064.0]
[17.0, 17.0, 18.0]
[288, 289, 274]
p02718
u216888678
2,000
1,048,576
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`.
['N,M=map(int,input().split())\nA=list(map(int,input().split()))\ncount=0\na=sum(A)\nfor i in range(N):\n if A[i]>=a/(4*M):\n count=count+1\nprint(count)\nif count>=M:\n print("Yes")\nelse:\n print("No")', 'N,M=map(int,input().split())\nA=list(map(int,input().split()))\ncount=0\na=sum(A)\nfor i in range(N):\n if A[i]>=a/(4*M):\n count=count+1\nif count>=M:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s622838461', 's117277030']
[3064.0, 3060.0]
[17.0, 17.0]
[206, 193]
p02718
u217729995
2,000
1,048,576
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`.
['vote = input("Enter the vote: ")\nif ', 'n,m = map(int,input().split())\na = list(map(int, input().split()))\npopular = list(filter(lambda e: e>=(1/(4*m))*sum(a),a))\nprint("Yes" if len(popular) >= m else "No")']
['Runtime Error', 'Accepted']
['s587028847', 's781422945']
[2940.0, 2940.0]
[17.0, 18.0]
[36, 166]
p02718
u222185706
2,000
1,048,576
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`.
['\nfirst_input = list(map(lambda x:int(x), input().split(" ")))\nsecond_input = list(map(lambda x:int(x), input().split(" ")))\n\nsecond_input.sort(reverse=True)\ncriteria = sum(second_input)/float(4*first_input[1])\n\ncount = 0\nfor i in range(len(second_input)):\n if second_input[i]>=criteria:\n count = count+1\n else:\n break\n\nif count >= first_input[1]:\n print("Yes")\nelse:\n print("No")\nbreak\n', '\nfirst_input = list(map(lambda x:int(x), input().split(" ")))\nsecond_input = list(map(lambda x:int(x), input().split(" ")))\n\nsecond_input.sort(reverse=True)\ncriteria = sum(second_input)/float(4*first_input[1])\n\ncount = 0\nfor i in range(len(second_input)):\n if second_input[i]>=criteria:\n count = count+1\n else:\n break\n\nif count >= first_input[1]:\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Accepted']
['s094176844', 's895618073']
[3064.0, 3064.0]
[17.0, 17.0]
[412, 406]
p02718
u222668979
2,000
1,048,576
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`.
["import sys\ninput = sys.stdin.readline\n\n\nn, m = map(int, input().split())\na = list(map(int, input().split()))\nsuma,cnt=sum(a),0\n\nprint(1 / 4 / m)\nfor i in range(n):\n if a[i] >= suma / 4 / m:\n cnt += 1\n\nif cnt >= m:\n print('Yes')\nelse:\n print('No')\n", "import sys\ninput = sys.stdin.readline\n\n\nn, m = map(int, input().split())\na = list(map(int, input().split()))\nsuma, cnt = sum(a), 0\n\nfor i in range(n):\n if a[i] >= suma / 4 / m:\n cnt += 1\n\nif cnt >= m:\n print('Yes')\nelse:\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s033914564', 's680957378']
[3060.0, 3060.0]
[18.0, 18.0]
[263, 250]
p02718
u224119985
2,000
1,048,576
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`.
["n,m=map(int,input().split())\na=list(map(int,input().split()))\nsumA=sum(a)\ncnt=0\nfor i in a:\n if i>=sum/(4*m):\n cnt=cnt+1\nif cnt>=m:\n print('Yes')\nelse:\n print('No')", "n,m=map(int,input().split())\na=list(map(int,input().split()))\nsumA=sum(a)\ncnt=0\nfor i in a:\n if i>=sum/(4*m):\n cnt=cnt+1\n else:\n cnt=cnt\nif cnt>=m:\n print('Yes')\nelse:\n print('No')", "n,m=map(int,input().split())\nsum=0\nfor i in range(n):\n a=input()\n sum=sum+a\nnum=0\nfor i in range(n):\n a=input()\n if a<1/(4*sum):\n num=num\n else:\n num=num+1\nif num>=m:\n print('Yes')\nelse:\n print('No')", "n,m=map(int,input().split())\na=list(map(int,input().split()))\nsumA=sum(a)\ncnt=0\nfor i in a:\n if i>=sumA/(4*m):\n cnt=cnt+1\n else:\n cnt=cnt\nif cnt>=m:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s376277467', 's516018089', 's719569891', 's712595153']
[3060.0, 3064.0, 3060.0, 3060.0]
[18.0, 17.0, 17.0, 18.0]
[180, 206, 234, 207]
p02718
u227085629
2,000
1,048,576
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`.
["n,m = map(int, input().split())\ns = input()\nt = s.rstrip().split(' ')\nc = 0\nfor a in t:\n c += int(a)\nd = 0\nfor a in t:\n if int(a) >= c:\n d += 1\nif d < m:\n print('No')\nelse:\n print('Yes')", "n,m = map(int, input().split())\ns = input()\nt = s.rstrip().split(' ')\nc = 0\nfor a in t:\n c += int(a)\nd = 0\nfor a in t:\n if int(a) >= c/4/m :\n d += 1\nif d < m:\n print('No')\nelse:\n print('Yes')"]
['Wrong Answer', 'Accepted']
['s025950458', 's663454946']
[3060.0, 3064.0]
[17.0, 17.0]
[193, 198]
p02718
u228303592
2,000
1,048,576
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`.
['import math\nn,m = map(int,input().split())\n\nl = list(map(int,input().split()))\ns = sum(l)\nans = 0\nt = s/(4*m)\n\nfor i in l:\n if i>=math.ceil(t):\n ans+=1\n if ans>=m:\n print("Yes")\n else:\n print("No")', 'import math\nn,m = map(int,input().split())\n\nl = list(map(int,input().split()))\ns = sum(l)\nans = 0\nt = s/(4*m)\n\nfor i in l:\n if i>=math.ceil(t):\n ans+=1\n \nif ans>=m:\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s270123214', 's607056170']
[9188.0, 9176.0]
[22.0, 20.0]
[209, 205]
p02718
u228976998
2,000
1,048,576
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`.
['inputValues = [int(i) for i in input().split()]\nn = inputValues[0]\nm = inputValues[1]\nvotes = [int(i) for i in input().split()]\ntotal = sum(votes)\ncnt = 0\nfor i in votes:\n if i >= total*(1/(4*m)):\n cnt += 1\n print(i)\nif cnt >= m:\n print("Yes")\nelse:\n print("No")\n', 'inputValues = [int(i) for i in input().split()]\nn = inputValues[0]\nm = inputValues[1]\nvotes = [int(i) for i in input().split()]\ntotal = sum(votes)\ncnt = 0\nfor i in votes:\n if i >= total*(1/(4*m)):\n cnt += 1\n # print(i)\nif cnt >= m:\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s491161987', 's706988770']
[9216.0, 9176.0]
[27.0, 27.0]
[286, 288]
p02718
u232873434
2,000
1,048,576
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`.
["M,N = input().split()\nA = list(input().split())mport numpy as np\nN,M = map(int,input().split())\nA = np.array(list(map(int,input().split())))\n\nall_sum_a = np.sum(A)\n\nif M<=np.sum(A>=all_sum_a/(4*M)):\n print('Yes')\nelse:\n print('No')\n", "import numpy as np\nN,M = map(int,input().split())\nA = np.array(list(map(int,input().split())))\n\nall_sum_a = np.sum(A)\n\nif M<=np.sum(A>=all_sum_a/(4*M)):\n print('Yes')\nelse:\n print('No')\n"]
['Runtime Error', 'Accepted']
['s384074830', 's775924886']
[2940.0, 12488.0]
[17.0, 151.0]
[238, 192]
p02718
u235066013
2,000
1,048,576
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`.
["n,m=[int(i) for i in input().split()]\nlist=[int(i) for i in input().split()]\nx=1/(4*m)\ncount=0\nfor i in range(1,n+1):\n if list[i]>=x:\n count+=1\n\nif count>=m:\n print('Yes')\nelse:\n print('No')", "n,m=[int(i)for i in input().split()]\nlist=[int(i) for i in input().split()]\nx=1/(4*m)\ncount=0\nfor i in range(1,n+1):\n if list[i]>=x:\n count+=1\n\nif count>=m:\n print('Yes')\nelse:\n print('No'", "n,m=[int(i) for i in input().split()]\nlist=[int(i) for i in input().split()]\nx=1/(4*m)\ncount=0\nfor i in range(1,n+1):\n if list[i-1]>=x:\n count+=1\n\nif count==m:\n print('Yes')\nelse:\n print('No')", "n,m=[int(i) for i in input().split()]\nlist=[int(i) for i in input().split()]\nx=1/(4*m)\ny=sum(list)\ncount=0\nfor i in range(1,n+1):\n if list[i-1]>=x*y:\n count+=1\n\nif count>=m:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s258084335', 's895031404', 's924917355', 's904978791']
[3060.0, 2940.0, 3060.0, 3064.0]
[18.0, 17.0, 17.0, 17.0]
[196, 194, 198, 212]
p02718
u238084414
2,000
1,048,576
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`.
['n, m = map(int, input().split())\na = list(map(int, input().split()))\n\ncnt = 0\n\nfor i in range(n):\n if a[i] >= sum(a)/(4*m):\n cnt += 1\n\nif cnt >= m:\n print("True")\nelse:\n print("False")', 'n, m = map(int, input().split())\na = list(map(int, input().split()))\n\ncnt = 0\n\nfor i in range(n):\n if a[i] >= sum(a)/(4*m):\n cnt += 1\n\nif cnt >= m:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s632960619', 's872238972']
[3060.0, 3060.0]
[18.0, 17.0]
[190, 186]
p02718
u239528020
2,000
1,048,576
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`.
['#!/usr/bin/env python3\n\na = int(input())\na, b = map(int, input().split())\na = list(str(input()))\n', '#!/usr/bin/env python3\n\nimport numpy as np\nN, M = map(int, input().split())\nA = list(map(int, input().split()))\n\nA = np.array(A)\n\nnum = np.sum(A >= np.sum(A)/(4*M))\n\nif num >= M:\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Accepted']
['s781697127', 's440236283']
[2940.0, 14280.0]
[17.0, 150.0]
[97, 218]
p02718
u246907970
2,000
1,048,576
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`.
["import sys\n\nnm=input().split()\na=input()\nn=int(nm[0])\nm=int(nm[1])\nlista=[]\nfor i in a:\n lista.append(int(i))\ncount=0\nsuma=sum(lista)\nthre=suma/4/m\nfor i in lista:\n if i >= thre:\n count+=1\n if count >= m:\n print('Yes')\n sys.exit()\nprint('No')", "import sys\n \nnm=input().split()\na=input().split()\nn=int(nm[0])\nm=int(nm[1])\nlista=[]\nfor i in a:\n lista.append(int(i))\ncount=0\nsuma=sum(lista)\nthre=suma/4/m\nfor i in lista:\n if i >= thre:\n count+=1\n if count >= m:\n print('Yes')\n sys.exit()\nprint('No')"]
['Runtime Error', 'Accepted']
['s407730537', 's456151871']
[3064.0, 3064.0]
[17.0, 18.0]
[254, 263]
p02718
u247114740
2,000
1,048,576
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`.
["n, m = map(int, input().split())\na = [int(x) for x in input().split()]\ns = sum(a)\nl = a // (4 * m)\n\na = sorted(a, reverse = True)\nf = 0\nfor i in a:\n i < l:\n f = i\n break\nif(f < m):\n print('No')\nelse:\n print('Yes')", "N, M = map(int, input().split())\nvote_nums = sorted([float(i) for i in input().split()], reverse=True)\n \nborder_rate = 1 / (4 * M)\ntarget = vote_nums[:M]\n \nfor vote_num in target:\n if vote_num < border_rate * sum(vote_nums):\n print('No')\n exit()\n \nprint('Yes')"]
['Runtime Error', 'Accepted']
['s733993551', 's360425207']
[2940.0, 3060.0]
[17.0, 17.0]
[222, 267]
p02718
u248315138
2,000
1,048,576
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`.
["n, m = map(int, input().split())\nvotes = [int(i) for i in input().split()]\nvotes.sort()\nif m > n:\n print('No')\nelse:\n for i in range(m):\n if votes[i] < sum(votes) // 4*m:\n print('No')\n break\n else:\n print('Yes')\n\n\n\n\n\n\n", "\n\nn, m = map(int, input().split())\nvotes = [int(i) for i in input().split()]\nz = sum(votes)\nif sum(map(lambda x: x >= z / (4*m), votes)) >= m:\n print('Yes')\nelse:\n print('No')\n\n\n\n\n\n\n\n\n\n\n\n\n\n"]
['Wrong Answer', 'Accepted']
['s826278968', 's040397939']
[2940.0, 2940.0]
[17.0, 20.0]
[263, 195]
p02718
u248670337
2,000
1,048,576
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`.
["n,m=map(int,input().split())\nL=sorted(list(map(int,input().split())))\nprint('Yes' if all([L[i]*m*4>=sum(L) for i in range(m)] else 'No')", "n,m=map(int,input().split())\nL=sorted(list(map(int,input().split())),reverse=True)\nprint('Yes' if all([L[i]*m*4>=sum(L) for i in range(m)]) else 'No')\n"]
['Runtime Error', 'Accepted']
['s782326313', 's539897409']
[2940.0, 2940.0]
[18.0, 17.0]
[136, 151]
p02718
u250554058
2,000
1,048,576
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`.
["def main():\n n, m = (int(x) for x in input().split())\n a_list = list(map(int, input().split()))\n sum_num = 0\n sum_num = sum(a_list)\n count = 0\n for i in a_list:\n if(i >= sum_num/(4 * m)):\n count += 1\n\n print(count)\n if(count >= m):\n print('Yes')\n else:\n print('No')\n\nif __name__ == '__main__':\n main()\n", "def main():\n n, m = (int(x) for x in input().split())\n a_list = list(map(int, input().split()))\n sum_num = 0\n sum_num = sum(a_list)\n count = 0\n for i in a_list:\n if(i >= sum_num/(4 * m)):\n count += 1\n\n if(count >= m):\n print('Yes')\n else:\n print('No')\n\nif __name__ == '__main__':\n main()\n"]
['Wrong Answer', 'Accepted']
['s167341329', 's640167456']
[3060.0, 3060.0]
[17.0, 17.0]
[326, 311]
p02718
u250664216
2,000
1,048,576
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`.
['n,m = map(int, input().split())\na = list(map(int, input().split()))\n\ns = a.sum()\nmin_num = s//(4*m)\n\nres = "No"\ncount = 0\nfor x in a:\n if x >= min_num:\n count += 1\n if count >= m:\n res = "Yes"\n break\nprint(res)', 'n,m = map(int, input().split())\na = list(map(int, input().split()))\n\ns = sum(a)\nmin_num = float(s)/(4*m)\n\nres = "No"\ncount = 0\nfor x in a:\n if x >= min_num:\n count += 1\n if count >= m:\n res = "Yes"\n break\nprint(res)']
['Runtime Error', 'Accepted']
['s665454460', 's272255299']
[3060.0, 3060.0]
[17.0, 17.0]
[237, 242]
p02718
u254634413
2,000
1,048,576
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`.
['N, M = map(int, input().split())\n\nvotes = list(map(int, input().split()))\n\ntotal_votes = sum(votes)\nprint(total_votes)\nthreshold = total_votes / (4*M)\nprint(threshold)\ntemp = 0\nfor v in votes:\n if v > threshold:\n temp += 1\n\nif temp > M:\n print("Yes")\nelse:\n print("No")\n', 'N, M = map(int, input().split())\n\nvotes = list(map(int, input().split()))\n\ntotal_votes = sum(votes)\nthreshold = total_votes / (4*M)\ntemp = 0\nfor v in votes:\n if v >= threshold:\n temp += 1\n\nif temp >= M:\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s904569567', 's253296282']
[3060.0, 3060.0]
[17.0, 17.0]
[286, 252]
p02718
u258355189
2,000
1,048,576
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`.
['str1 = input()\nA = input()\n\nlist1 = str1.split()\nlist2 = A.split()\nN = list1[0]\nM = list1[1]\n\nM_count = 0\n\nall = 0\nfor i in range(len(list2)):\n all = all + int(list2[i])\n#print("all" + str(all))\n\njudge = 1/(4*int(M)) * all\n#print("judge" + str(judge))\n\nfor i in list2:\n \n if int(i) >= judge:\n M_count = M_count + 1\n #print("M_count" + str(M_count))\n \nif M_count >= int(M):\n print("yes")\nelse:\n print("no")', 'str1 = input()\nA = input()\n\nlist1 = str1.split()\nlist2 = A.split()\nN = list1[0]\nM = list1[1]\n\nM_count = 0\n\nall = 0\nfor i in range(len(list2)):\n all = all + int(list2[i])\n#print("all" + str(all))\n\njudge = 1/(4*int(M)) * all\n#print("judge" + str(judge))\n\nfor i in list2:\n \n if int(i) >= judge:\n M_count = M_count + 1\n #print("M_count" + str(M_count))\n \nif M_count >= int(M):\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s328960056', 's509764583']
[3064.0, 3064.0]
[17.0, 17.0]
[460, 460]
p02718
u262481526
2,000
1,048,576
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`.
["N, M = map(int, input().split())\nA = list(map(int, input().split()))\ntotal = sum(A) / 4 * M\nA.sort(reverse = False)\nif A[M-1] >= total:\n print('Yes')\nelse:\n print('No')", "N, M = map(int, input().split())\nA = list(map(int, input().split()))\ntotal = sum(A) / (4 * M)\nA.sort(reverse = True)\nif A[M-1] >= total:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s441597539', 's020391832']
[9184.0, 9160.0]
[19.0, 21.0]
[170, 171]
p02718
u264564865
2,000
1,048,576
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`.
["import sys\ninput = lambda: sys.stdin.readline().rstrip()\nyes = lambda boolean: print('Yes') if boolean else print('No')\ninput_ints = lambda: list(map(int, input().split()))\n\nN, M = input_ints()\nA = input_ints()\nA.sort(reverse=1)\nyes(A[M-1]*4*M>_1)", "import sys\ninput = lambda: sys.stdin.readline().rstrip()\nyes = lambda boolean: print('Yes') if boolean else print('No')\ninput_ints = lambda: list(map(int, input().split()))\n \nN, M = input_ints()\nA = input_ints()\nA.sort(reverse=1)\nyes(A[M-1]*4*M>=sum(A))"]
['Runtime Error', 'Accepted']
['s783895481', 's185706777']
[3064.0, 3060.0]
[17.0, 17.0]
[247, 253]