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
|
u266143155
| 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)\nans = "Yes"\nfor i in range(n):\n if a[i] < sum(a)*(1/(4*m)):\n ans = "No"\n break\nprint(ans)', 'n, m = map(int, input().split())\na = list(map(int, input().split()))\na.sort(reverse = True)\nans = "Yes"\nfor i in range(n):\n if a[i] < sum(a)*(1/(4*m)):\n ans = "No"\n break\nprint(ans)', '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', 'Accepted']
|
['s479996287', 's759151086', 's392413997']
|
[3060.0, 3060.0, 3060.0]
|
[17.0, 17.0, 17.0]
|
[198, 198, 199]
|
p02718
|
u266294380
| 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())))\nsum_a = sum(a)\nif a[m-1] >= sum_a/(4*m):\n print('Yes')\nelse:\n print('No')\n", "n, m = map(int, input().split())\na = sorted(list(map(int, input().split())))\nsum_a = sum(a)\nif a[n-m] >= sum_a/(4*m):\n print('Yes')\nelse:\n print('No')"]
|
['Wrong Answer', 'Accepted']
|
['s536384215', 's191637414']
|
[2940.0, 3060.0]
|
[21.0, 19.0]
|
[157, 156]
|
p02718
|
u266964556
| 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 = input().split()\nfor i in range(n):\n A[i] = int(A[i])\ncount = 0\nsum = sum(A)\nfor i in range(n):\n if A[i] < sum/(4*m):\n pass\n else:\n count += 1\nprint(count,sum)\nif count >= m:\n print("Yes")\nelse:\n print("No")', 'n,m = map(int,input().split())\nA = input().split()\nfor i in range(n):\n A[i] = int(A[i])\ncount = 0\nsum = sum(A)\nfor i in range(n):\n if A[i] < sum/(4*m):\n pass\n else:\n count += 1\nif count >= m:\n print("Yes")\nelse:\n print("No")']
|
['Wrong Answer', 'Accepted']
|
['s142783737', 's851370660']
|
[3064.0, 3064.0]
|
[17.0, 17.0]
|
[270, 253]
|
p02718
|
u272457181
| 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()))\nB = 0\nC = 0\n\nfor i in range(list(A)):\n c += A[i]\n \nfor i in range(list(A)):\n if A[i] >= 1/(4*M):\n B += 1\n\nif B >= M:\n print('Yes')\nelse:\n print('No')\n ", "N, M = map(int,input().split())\nA = list(map(int,input().split()))\nB = 0\n\nfor i in range(list(A)):\n if A[i] >= 1/(4*M):\n B += 1\n\nif B >= M:\n print('Yes')\nelse B < M:\n print('No')\n ", "N, M = map(int,input().split())\nA = list(map(int,input().split()))\nB = 0\nC = 0\n\nfor i in range(len(A)):\n C += A[i]\n \nfor i in range(len(A)):\n if A[i] >= C/(4*M):\n B += 1\n\nif B >= M:\n print('Yes')\nelse:\n print('No')\n "]
|
['Runtime Error', 'Runtime Error', 'Accepted']
|
['s556981096', 's621563531', 's567107889']
|
[9092.0, 8972.0, 9120.0]
|
[28.0, 29.0, 27.0]
|
[229, 189, 227]
|
p02718
|
u273660689
| 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\n//print(A)\n\ncnt = 0\ncnt1 = 0\n\nfor i in range(N):\n cnt = cnt + A[i]\n\nfor i in range(N):\n if A[i] / cnt > 1 / 4 / M:\n cnt1 = cnt1 + 1\n\n//print(cnt1)\n\nif cnt1 > M:\n print('Yes')\nelse:\n print('No')\n", "N, M = map(int, input().split())\nA = map(int, input().split())\n\ncnt = 0\ncnt1 = 0\n\nfor i in range(N):\n cnt = cnt + A[i]\n\nfor i in range(N):\n if A[i] / cnt > 1 / 4 / M:\n cnt1 = cnt1 + 1\n\nif cnt1 > M:\n print('Yes')\nelse:\n print('No')\n", "N,M = map(int,input().split())\nA[N]=map(int,input().split())\n\ncnt = 0\ncnt1 = 0\n\nfor i in range(N):\n \tcnt = cnt + A[N]\n\nfor i in range(N):\n \tif A[i]/cnt > 1/4/M:\n\t\tcnt1 =cnt1 + 1\n \nif cnt1 > M:\n\tprint('Yes')\nelif\n\tprint('No')\n ", "N, M = map(int, input().split())\nA = list(map(int, input().split()))\n\n\n\ncnt = 0\ncnt1 = 0\n\nfor i in range(N):\n cnt = cnt + A[i]\n\nfor i in range(N):\n if A[i] / cnt >= 1 / 4 / M:\n cnt1 = cnt1 + 1\n\n\n\nif cnt1 >= M:\n print('Yes')\nelse:\n print('No')\n"]
|
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
|
['s259991536', 's653077059', 's823436492', 's513315755']
|
[2940.0, 3060.0, 2940.0, 3060.0]
|
[17.0, 17.0, 17.0, 19.0]
|
[283, 250, 234, 262]
|
p02718
|
u275704180
| 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())\narr = list(map(int,input().split()))\n\nres = 0\nfor i in range(N):\n if arr[i] < (1/(4*M)*sum(arr)):\n res = res\n else:\n res += 1\nprint(res)\nif res >= M:\n print('Yes')\nelse:\n print('No')", "N,M = map(int,input().split())\narr = list(map(int,input().split()))\n\nres = 0\nfor i in range(N):\n if arr[i] < (1/(4*M)*sum(arr)):\n res = res\n else:\n res += 1\nprint(res)\nif res == M:\n print('Yes')\nelse:\n print('No')", "N,M = map(int,input().split())\narr = list(map(int,input().split()))\n\nres = 0\nfor i in range(N):\n if arr[i] < (1/(4*M)*sum(arr)):\n res = res\n else:\n res += 1\n\nif res >= M:\n print('Yes')\nelse:\n print('No')"]
|
['Wrong Answer', 'Wrong Answer', 'Accepted']
|
['s258271428', 's891061055', 's194898069']
|
[3060.0, 3060.0, 3060.0]
|
[17.0, 18.0, 17.0]
|
[239, 239, 229]
|
p02718
|
u281334626
| 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 \nsum_A =0\nfor i in range(N):\n sum_A += A[i]\n \nans = 1\nfor i in range(N):\n if (4*M*A[i] > sum_A):\n ans= ans*1\n else:\n \tans =ans*0\n \nif (ans != 0):\n print('Yes')\nelse:\n print('No')", "N, M = map(int, input().split())\nA = list(map(int, input().split()))\n \nsum_A =0\nfor i in range(N):\n sum_A += A[i]\n \nans = 1\nfor i in range(M):\n if (4*M*A[i] < sum_A):\n ans= ans*1\n else:\n \tans =ans*0\n \nif (ans == 1):\n print('Yes')\nelse:\n print('No')", "N, M = map(int, input().split())\nA = list(map(int, input().split()))\n \nsum_A =0\nfor i in range(N):\n sum_A += A[i]\n \nans = 1\nfor i in range(N):\n if (4*M*A[i] < sum_A):\n ans= ans*1\n else:\n \tans =ans*0\n \nif (ans != 0):\n print('Yes')\nelse:\n print('No')", "N, M = map(int, input().split())\nA = list(map(int, input().split()))\n \nsum_A =0\nfor i in range(N):\n sum_A += A[i]\n\nfor i in range(N):\n if (4*M*A[M] < sum_A):\n print('No')\n else:\n print('Yes')", "N, M = map(int, input().split())\nA = list(map(int, input().split()))\n \nsum_A =0\nfor i in range(N):\n sum_A += A[i]\n\nans = 1\nfor i in range(N):\n if (4*M*A[i] > sum_A):\n ans= ans*1\n else:\n \tans =ans*0\n \t\nif (ans != 0):\n print('Yes')\nelse:\n print('No')\n", "N, M = map(int, input().split())\nA = list(map(int, input().split()))\n \nsum_A =0\nfor i in range(N):\n sum_A += A[i]\n \nans = 1\nfor i in range(N):\n if (4*M*A[i] < sum_A):\n \tans =ans*0\n else:\n ans= ans*1\n \nif (ans != 0):\n print('Yes')\nelse:\n print('No')", " N, M = map(int, input().split())\n A = list(map(int, input().split()))\n \n sum_A =0\n for i in range(N):\n sum_A += A[i]\n \n ans = 1\n for i in range(M):\n if (4*M*A[i] > sum_A):\n ans= ans*1\n else:\n \tans =ans*0\n \n if (ans == 1):\n print('Yes')\n else:\n print('No')", "N, M = map(int, input().split())\nA = list(map(int, input().split()))\n \nsum_A =0\nfor i in range(N):\n sum_A += A[i]\n\nans = 0\nfor i in range(N):\n if (4*M*A[i] >= sum_A):\n ans+=1\n else:\n \tans+=0\n \t\nif (ans >= M):\n print('Yes')\nelse:\n print('No')\n"]
|
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
|
['s024980496', 's347702378', 's386099712', 's539578562', 's657005116', 's737760876', 's946956583', 's498695203']
|
[3064.0, 3064.0, 3064.0, 3060.0, 3060.0, 3064.0, 2940.0, 3060.0]
|
[17.0, 17.0, 18.0, 17.0, 19.0, 17.0, 17.0, 17.0]
|
[273, 273, 273, 214, 277, 273, 345, 270]
|
p02718
|
u282652245
| 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 = list(map(int, input().split()))\nA = list(map(int, input().split()))\n\ncount = 0\nsumA = sum(A)\nboard = sumA // (4*NM[1])\n\n\nprint(sumA)\nprint(board)\n\nfor i in range(len(A)):\n if A[i] >= board:\n count += 1\n else:\n continue\n\n\nif count > NM[1]:\n print("Yes")\nelse:\n print("No")\n', 'NM = list(map(int, input().split()))\nA = list(map(int, input().split()))\n\ncount = 0\nsumA = sum(A)\nboard = sumA // (4*NM[1])\n\n\nprint(sumA)\nprint(board)\n\nfor i in range(len(A)):\n if A[i] > board:\n count += 1\n else:\n continue\n\n\nif count >= NM[1]:\n print("Yes")\nelse:\n print("No")\n', 'NM = list(map(int, input().split()))\nA = list(map(int, input().split()))\n\ncount = 0\nsumA = sum(A)\nboard = sumA / (4*NM[1])\n\n\n# print(sumA)\n# print(board)\n\nfor i in range(len(A)):\n if float(A[i]) >= board:\n count += 1\n else:\n continue\n\n\nif count >= NM[1]:\n print("Yes")\nelse:\n print("No")\n']
|
['Wrong Answer', 'Wrong Answer', 'Accepted']
|
['s390677677', 's462408997', 's605181665']
|
[3060.0, 3060.0, 3060.0]
|
[17.0, 17.0, 18.0]
|
[303, 303, 314]
|
p02718
|
u282978698
| 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`.
|
['nums1=[int(e) for e in input().split()]\nnums2=[int(t) for t in input().split()]\nall_vote = 0\nsum = nums1[0]\nfor num in nums2:\n all_vote += num\nfor k in nums2:\n if (k/(all_vote) < 1/(4*nums1[1])):\n sum-=1\nif(nums1[1]<=sum):\n print(Yes)\nelse:\n print(No)', "nums1=[int(e) for e in input().split()]\nnums2=[int(t) for t in input().split()]\nall_vote = 0\nsums = nums1[0]\nfor num in nums2:\n all_vote += num\nfor k in nums2:\n if (k/(all_vote) < 1/(4*nums1[1])):\n sums-=1\nif(nums1[1]<=sums):\n print('Yes')\nelse:\n print('No')"]
|
['Runtime Error', 'Accepted']
|
['s077582661', 's030496654']
|
[3064.0, 3064.0]
|
[17.0, 18.0]
|
[258, 265]
|
p02718
|
u283853418
| 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\nm = 4*M\nc = 0 \nfor i in range(0,M):\n if a[i] >=m:\n c +=1\n \n \n \nif c = M:\n print('Yes')\nelse:\n print('No')", 'n, m = map(int, input().split())\na = list(map(int, input().split()))\ns = sum(a)\na.sort(reverse = True)\nk = s/(4*m)\nif a[m-1] < k:\n print("No")\nelse:\n print("Yes")']
|
['Runtime Error', 'Accepted']
|
['s458053064', 's013825930']
|
[2940.0, 3060.0]
|
[17.0, 17.0]
|
[207, 164]
|
p02718
|
u287660527
| 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 = input().split()\ns = 0\nfor i in a:\n s += int(i)\nc = 0\nfor i in a:\n c = a.count(int(i) >= s/(4*m))\nif c >= m:\n print('Yes')\nelse:\n print('No')", "n,m = map(int,input().split())\na = input().split()\ns = 0\nfor i in a:\n s += int(i)\nc = 0\nfor i in a:\n if int(i) >= s/(4*m):\n c += 1\nif c >= m:\n print('Yes')\nelse:\n print('No')"]
|
['Wrong Answer', 'Accepted']
|
['s555726518', 's470971207']
|
[8984.0, 8936.0]
|
[30.0, 29.0]
|
[179, 181]
|
p02718
|
u287669475
| 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`.
|
['i1 = input()\ni2 = input()\n\n# i1 = "4 1"\n# i2 = "5 4 2 1"\nlist1 = [int(s) for s in i1.split()]\nlist2 = [int(s) for s in i2.split()]\n\nn = list1[0]\nm = list1[1]\n\n\ntotal = sum(list2)\n\n\ncount = 0\n\nfor a in range(m):\n if (list2[a]/total > 1/(4*m)):\n count += 1 \n\nif count == m:\n print("yes")\nelse:\n print("no")\n\n', 'i1 = input()\ni2 = input()\n\n# i1 = "4 1"\n# i2 = "5 4 2 1"\nlist1 = [int(s) for s in i1.split()]\nlist2 = [int(s) for s in i2.split()]\n\nn = list1[0]\nm = list1[1]\n\n\ntotal = sum(list2)\n\n\ncount = 0\n\nfor a in range(n):\n if (list2[a]/total > 1/(4*m)):\n count += 1 \n\nif count == m:\n print("Yes")\nelse:\n print("No")', 'i1 = input()\ni2 = input()\n\n# i1 = "4 1"\n# i2 = "5 4 2 1"\nlist1 = [int(s) for s in i1.split()]\nlist2 = [int(s) for s in i2.split()]\n\nn = list1[0]\nm = list1[1]\n\n\ntotal = sum(list2)\n\n\ncount = 0\n\nfor a in range(m):\n if (list2[a]/total > 1/(4*m)):\n count += 1 \n\nif count == m:\n print("yes")\nelse:\n print("no")', 'i1 = input()\ni2 = input()\n\n# i1 = "4 1"\n# i2 = "5 4 2 1"\nlist1 = [int(s) for s in i1.split()]\nlist2 = [int(s) for s in i2.split()]\n\nn = list1[0]\nm = list1[1]\n\n\ntotal = sum(list2)\n\n\ncount = 0\n\nfor a in range(n):\n if (list2[a]/total >= 1/(4*m)):\n count += 1 \n\nif count == m:\n print("Yes")\nelse:\n print("No")', 'i1 = input()\ni2 = input()\n\n# i1 = "4 1"\n# i2 = "5 4 2 1"\nlist1 = [int(s) for s in i1.split()]\nlist2 = [int(s) for s in i2.split()]\n\nn = list1[0]\nm = list1[1]\n\n\ntotal = sum(list2)\n\n\ncount = 0\n\nfor a in range(m):\n if (list2[a]/total > 1/(4*m)):\n count += 1 \n\nif count == m:\n print("yes")\nelse:\n print("no")\n\n', 'i1 = input()\ni2 = input()\n\n# i1 = "4 1"\n# i2 = "5 4 2 1"\nlist1 = [int(s) for s in i1.split()]\nlist2 = [int(s) for s in i2.split()]\n\nn = list1[0]\nm = list1[1]\n\n\ntotal = sum(list2)\n\n\ncount = 0\n\nfor a in range(n):\n if (list2[a]/total >= 1/(4*m)):\n count += 1 \n\nif count >= m:\n print("Yes")\nelse:\n print("No")\n']
|
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
|
['s128985704', 's197661612', 's685342882', 's856734967', 's953735855', 's827578104']
|
[3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3060.0]
|
[17.0, 17.0, 18.0, 17.0, 17.0, 17.0]
|
[333, 331, 331, 332, 333, 333]
|
p02718
|
u288430479
| 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())))[::-1]\ns = float(sum(l)/4*m)\nt = "Yes"\nfor i in range(m):\n if l[i]>=s:\n t = "No"\nprint(t)\n', 'n,m = map(int,input().split())\nl = sorted(list(map(int,input().split())))[::-1]\ns = float(sum(l)/(4*m))\nt = "Yes"\nfor i in range(m):\n if l[i]<s:\n t = "No"\n break\nprint(t)']
|
['Wrong Answer', 'Accepted']
|
['s054611457', 's803240317']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[168, 177]
|
p02718
|
u288613683
| 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()))\nsum = 0\nans = 0\nfor i in range(N):\n sum += A[i]\nprint(sum)\nfor i in range(N):\n if A[i] >= sum*(1/(4*M)):\n ans += 1\nprint("Yes" if ans >= M else "No")', 'N, M = map(int, input().split())\nA = list(map(int, input().split()))\nans = 0\nfor i in A:\n if i >= sum(A)/(4*M):\n ans += 1\nprint("Yes" if ans >= M else "No")']
|
['Wrong Answer', 'Accepted']
|
['s336298938', 's472740986']
|
[3064.0, 3060.0]
|
[17.0, 18.0]
|
[223, 160]
|
p02718
|
u293436958
| 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())\n\nA = list(map(int, input().split()))\n\nlist.sort(A,reverse = True)\nprint(A)\n\ns=float(sum(A)/(4*M))\ncheck=0\nfor i in range(0, M):\n if A[i]<=s:\n check=1\n\nif check ==1:\n print('No')\nelse:\n print('Yes')", "N,M=(int(x) for x in input().split())\n\nA = list(map(int, input().split()))\n\nlist.sort(A,reverse = True)\n\ns=float(sum(A)/(4*M))\ncheck=0\nfor i in range(0, M):\n if A[i]<s:\n check=1\n\nif check ==1:\n print('No')\nelse:\n print('Yes')"]
|
['Wrong Answer', 'Accepted']
|
['s301338381', 's023870310']
|
[3064.0, 3064.0]
|
[17.0, 17.0]
|
[251, 241]
|
p02718
|
u296101474
| 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\nborder = sum(a_list) * (1/(4*m))\nprint(sum(a_list))\nprint(1/(4*m))\nprint(border)\n\ncnt = 0\nfor i in a_list:\n if cnt == m:\n print('Yes')\n exit()\n\n if i >= border:\n cnt += 1\n\nprint('No')\n", "n, m = map(int, input().split())\na_list = list(map(int, input().split()))\n\nborder = sum(a_list) * (1/(4*m))\n\ncnt = 0\nfor i in a_list:\n if cnt == m:\n print('Yes')\n exit()\n\n if i >= border:\n cnt += 1\n\nif cnt >= m:\n print('Yes')\nelse:\n print('No')\n"]
|
['Wrong Answer', 'Accepted']
|
['s941366245', 's372500357']
|
[3060.0, 3060.0]
|
[17.0, 17.0]
|
[286, 278]
|
p02718
|
u296557772
| 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 = [int(x) for x in input().split()]\n total = sum(a)\n \n can_be_selected = list(filter(lambda x: x >= total/4/m, a))\n return len(can_be_selected) >= m\n\nmain()', 'def main():\n n,m = [int(x) for x in input().split()]\n a = [int(x) for x in input().split()]\n \n can_be_selected = list(filter(lambda x: x > 1/4/m, a))\n return len(can_be_selected) >= m\n\nmain()', 'def main():\n n,m = [int(x) for x in input().split()]\n a = [int(x) for x in input().split()]\n total = sum(a)\n \n can_be_selected = list(filter(lambda x: x >= total/4/m, a))\n if len(can_be_selected) >= m:\n print("Yes")\n else:\n print("No")\n\nmain()']
|
['Wrong Answer', 'Wrong Answer', 'Accepted']
|
['s307496425', 's857705670', 's285484284']
|
[3316.0, 2940.0, 2940.0]
|
[20.0, 17.0, 17.0]
|
[218, 196, 256]
|
p02718
|
u298633786
| 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(a) for a in input().split(\' \')]\nS = sum(A)\nthre = S / (4 * M)\nprint(thre)\n\ncnt = 0\nfor a in A:\n if a >= thre:\n cnt += 1\n\nif cnt >= M:\n print("Yes")\nelse:\n print("No")\n', 'N, M = map(int, input().split(\' \'))\nA = [int(a) for a in input().split(\' \')]\nS = sum(A)\nthre = S / (4 * M)\n\ncnt = 0\nfor a in A:\n if a >= thre:\n cnt += 1\n\nif cnt >= M:\n print("Yes")\nelse:\n print("No")\n']
|
['Wrong Answer', 'Accepted']
|
['s169761315', 's540522168']
|
[3060.0, 3060.0]
|
[17.0, 17.0]
|
[228, 216]
|
p02718
|
u303739137
| 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())\naa = map(int, input().split())\nthre = sum(aa) / (4*m)\ncnt = 0\nfor a in aa:\n cnt +=1\nif cnt >= m:\n print('Yes')\nelse:\n print('No')\n", "n, m = map(int, input().split())\naa = map(int, input().split())\nthre = sum(aa) / (4*m)\ncnt = 0\nfor a in aa:\n if a >= thre\n cnt +=1\nif cnt >= m:\n print('Yes')\nelse:\n print('No')\n", "n, m = map(int, input().split())\naa = list(map(int, input().split()))\nthre = sum(aa) / (4*m)\ncnt = 0\nfor a in aa:\n if a >= thre:\n cnt +=1\nif cnt >= m:\n print('Yes')\nelse:\n print('No')\n"]
|
['Wrong Answer', 'Runtime Error', 'Accepted']
|
['s482566788', 's741435004', 's362601389']
|
[2940.0, 2940.0, 2940.0]
|
[17.0, 17.0, 17.0]
|
[167, 182, 190]
|
p02718
|
u304974600
| 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\n\ninput = stdin.readline\n\nn, k = map(int, input().split())\na = [int(x) for x in input().split()]\nvote = sum(a) / 4 / m\n\na.sort()\na.reverse()\n\nprint("Yes" if a[m - 1] >= vote else "No")', 'from sys import stdin\n \ninput = stdin.readline\n \nn, m = map(int, input().split())\na = [int(x) for x in input().split()]\nvote = sum(a) / 4 / m\n \na.sort()\na.reverse()\n \nprint("Yes" if a[m - 1] >= vote else "No")']
|
['Runtime Error', 'Accepted']
|
['s221838515', 's880704295']
|
[3060.0, 3060.0]
|
[18.0, 19.0]
|
[205, 209]
|
p02718
|
u306060982
| 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(i) for i in input().split()]\ns = sum(a)\nc=0\n\nfor i in range(n):\n\n if a[i]*4*m >= s:\n c+=1\n\nif c>=m:\n print('Yse')\nelse:\n print('No')", "n,m = map(int,input().split())\na = [int(i) for i in input().split()]\ns = sum(a)\nc=0\n\nfor i in range(n):\n\n if a[i]*4*m >= s:\n c+=1\n\nif c>=m:\n print('Yes')\nelse:\n print('No')\n"]
|
['Wrong Answer', 'Accepted']
|
['s738657915', 's224364552']
|
[3060.0, 3060.0]
|
[17.0, 18.0]
|
[186, 187]
|
p02718
|
u306142032
| 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()))\nfor x in a:\n if x >= sum(a)/(4*m):\n \tres += x\n\nif res >= m:\n print('Yes')\nelse:\n print('No')", "n,m=map(int,input().split())\na=list(map(int,input().split()))\nif sum(x >= sum(a)/(4*m) for x in a) >= m:\n print('Yes')\nelse:\n print('No')"]
|
['Runtime Error', 'Accepted']
|
['s418990368', 's490941191']
|
[2940.0, 3060.0]
|
[18.0, 17.0]
|
[158, 139]
|
p02718
|
u306497037
| 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 = []\nfor i in range(N):\n a = int(input()) \n if a >= 1/(4*M):\n A.append(a)\n\nif len(A)>=M:\n print("Yes")\nelse:\n print("No")\n ', 'N,M = map(int,input().split())\nA = map(int,input().split())\nnew_A = []\nfor i in range(N):\n if A[a] >= 1/(4*M):\n new_A.append(a)\n \nif len(new_A)>=M:\n print("Yes")\nelse:\n print("No")', 'N,M = map(int,input().split())\nA = list(map(int,input().split()))\nnew_A = []\nfor i in range(N):\n if A[i] >= sum(A)/(4*M):\n new_A.append(A[i])\n\nif len(new_A)>=M:\n print("Yes")\nelse:\n print("No")']
|
['Runtime Error', 'Runtime Error', 'Accepted']
|
['s431072249', 's667454045', 's284595611']
|
[2940.0, 3060.0, 3060.0]
|
[17.0, 17.0, 17.0]
|
[166, 186, 199]
|
p02718
|
u309120194
| 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 = sum(A)\nA = sorted(A)\nans = 'Yes'\nfor i in M:\n if A[i] < s/(4*M): \n ans = 'No'\n break\n \nprint(ans)", "N, M = map(int, input().split())\nA = list(map(int, input().split()))\n \ns = sum(A)\nA = sorted(A, reverse=True)\nprint(A)\nans = 'Yes'\nfor i in range(M):\n if A[i] < s/(4*M): \n ans = 'No'\n break\n\nprint(ans)", "N, M = map(int, input().split())\nA = list(map(int, input().split()))\n\ns = sum(A)\nA = sorted(A, reverse=True)\n\n\nif A[M-1]*(4*M) >= s: print('Yes')\nelse: print('No')"]
|
['Runtime Error', 'Wrong Answer', 'Accepted']
|
['s710775869', 's871070664', 's928042536']
|
[9020.0, 9168.0, 9108.0]
|
[26.0, 27.0, 26.0]
|
[181, 208, 352]
|
p02718
|
u311113280
| 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())\nhoge=list(ap,int,input.split())\ntotal_vote=sum(hoge)\nif sorted(hoge)[-M]>total_vote/(4*M):\n print('Yes')\nelse:\n print('No')\n", "N,M=map(int,input().split())\nhoge=list(map(int,input().split()))\n\nif sorted(hoge)[-M] >= sum(hoge)/(4*M):\n print('Yes')\nelse:\n print('No')"]
|
['Runtime Error', 'Accepted']
|
['s497219837', 's149622885']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[155, 140]
|
p02718
|
u314837274
| 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()))\nnum=sum(a)\ntmp=float(num)/float(4.0*m)\ncount=0\nfor i in range(n):\n if a[i]>=tmp:\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()))\nnum=sum(a)\ntmp=num//(4*m)\ncount=0\nfor i in range(n):\n if a[i]>=tmp:\n count+=1\nif count==m:\n print("Yes")\nelse:\n print("No")', 'n,m=map(int,input().split())\na=[0]*n\nfor i in range(n):\n a[i]=int(input().split())\nnum=sum(a)\ntmp=num//(4*m)\ncount=0\nfor i in range(n):\n if a[i]>=tmp:\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()))\nnum=sum(a)\ntmp=num/(4.0*m)\ncount=0\nfor i in range(n):\n if a[i]>=tmp:\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()))\nnum=sum(a)\ntmp=float(num)/float(4.0*m)\ncount=0\nfor i in range(n):\n if a[i]>=tmp:\n count+=1\nif count>=m:\n print("Yes")\nelse:\n print("No")']
|
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
|
['s028888466', 's069817712', 's208893436', 's981599435', 's281109329']
|
[3060.0, 3060.0, 3060.0, 3064.0, 3060.0]
|
[17.0, 17.0, 17.0, 18.0, 17.0]
|
[205, 192, 213, 193, 205]
|
p02718
|
u317528406
| 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, m = int(n), int(m)\na = input().split()\na = [int(i) for i in a]\na.sort()\na.reverse()\nfor i in range(n):\n if a[i] < 1/4m:\n print("No")\n break\n if i == m:\n print("Yes")\n break', 'n, m = input().split()\nn, m = int(n), int(m)\na = input().split()\na = [int(i) for i in a]\na.sort()\na.reverse()\nfor i in range(n):\n if a[i] < 1/4m:\n print("No")\n break\n if i == m-1:\n print("Yes")\n break\n', 'n, m = input().split()\nn, m = int(n), int(m)\na = input().split()\na = [int(i) for i in a]\na.sort()\na.reverse()\ns = 1/(4*m)*sum(i for i in a)\nfor i in range(n):\n if a[i] < s:\n print("No")\n break\n if i == m-1:\n print("Yes")\n break\n']
|
['Runtime Error', 'Runtime Error', 'Accepted']
|
['s802437896', 's869362379', 's384188128']
|
[2940.0, 2940.0, 3060.0]
|
[17.0, 18.0, 17.0]
|
[212, 215, 262]
|
p02718
|
u319695085
| 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\n\nN, M = [int(x) for x in input().split()]\nA = [int(x) for x in input().split()]\n\nA = sorted(A)[::-1]\ntotal = sum(A)\nprint(A[M-1])\nif A[M] < total * (1 / (4 * M)):\n print('No')\nelse:\n print('Yes')\n", "N, M = [int(x) for x in input().split()]\nA = [int(x) for x in input().split()]\n\n\nA = sorted(A)[::-1]\ntotal = sum(A)\n\nif A[M-1] < total:\n print('No')\nelse:\n print('Yes')\n\n", "#!/usr/bin/env python3\n\n\nN, M = list(map(int, input().split()))\nA = list(map(int, input().split()))\n\nA = sorted(A)[::-1]\ntotal = sum(A)\nprint(A[M-1])\nif A[M] < total * (1 / (4 * M)):\n print('No')\nelse:\n print('Yes')\n", "# A = [int(x) for x in line2.split()]\n\nN, M = [int(x) for x in input().split()]\nA = [int(x) for x in input().split()]\n\n\nA = sorted(A)[::-1]\ntotal = sum(A)\nthre = total * (1 / (4*M))\nif A[M-1] < thre:\n print('No')\nelse:\n print('Yes')\n"]
|
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
|
['s533725163', 's579612716', 's811539990', 's559317700']
|
[2940.0, 2940.0, 2940.0, 3060.0]
|
[23.0, 17.0, 18.0, 19.0]
|
[226, 212, 222, 239]
|
p02718
|
u320098990
| 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())\nin_list = input().split\nvote_list = [int(i) for i in in_list]\n\nans = 0\nfor ai in vote_list:\n if ai >= 1/(4*m)*sum(vote_list):\n ans += 1\n\nif ans < m :\n print('no')\nelse:\n print('yes')", "n, m = map(int, input().split())\nin_list = input().split()\nvote_list = [int(i) for i in in_list]\n\nans = 0\nfor ai in vote_list:\n if ai >= 1/(4*m)*sum(vote_list):\n ans += 1\n\nif ans < m :\n print('No')\nelse:\n print('Yes')"]
|
['Runtime Error', 'Accepted']
|
['s873527002', 's243045556']
|
[9120.0, 9080.0]
|
[25.0, 26.0]
|
[231, 233]
|
p02718
|
u322793329
| 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())\nc = input().split()\nm = 0\nfor i in range(len(c)):\n c[i] = int(c[i])\n m += c[i]\nc.sort(reverse=True)\nif c[b-1] >= m * (1 / (4*b)):\n print('Yes')\nelse:\n print('No')\nprint(m*(1/(4*b)))", "a,b = map(int, input().split())\nc = input().split()\nm = 0\nfor i in range(len(c)):\n c[i] = int(c[i])\n m += c[i]\nc.sort(reverse=True)\nif c[b-1] >= m * (1 / (4*b)):\n print('Yes')\nelse:\n print('No')\n"]
|
['Wrong Answer', 'Accepted']
|
['s178301216', 's950623542']
|
[3064.0, 2940.0]
|
[17.0, 17.0]
|
[225, 207]
|
p02718
|
u323776907
| 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)\nb = sum(a)\nc = 0\nd = "Yes"\nl = 1 / (4 * m)\nb = b * l\nwhile c < m:\n if a[c] < b:\n d = "No"\n c += 1\nprint(d)', 'n, m = map(int, input().split())\na = list(map(int, input().split()))\na = sort(a)\nb = sum(a)\nc = 0\nd = "Yes"\nl = 1 / (4 * m)\nb = b * l\nwhile c < m:\n if a[c] < b:\n d = "No"\n c += 1\nprint(d)', 'n, m = map(int, input().split())\na = list(map(int, input().split()))\nb = 0\nc = 0\nd = "Yes"\nl = 1 / (4 * m)\nfor i in a:\n b += i\nb = b * l\nwhile c < m:\n if a[c] < b:\n d = "No"\n\nprint(d)\n', 'n, m = map(int, input().split())\na = list(map(int, input().split()))\na.sort(reverse = True)\nb = 0\nc = 0\nd = ""\nl = 1 / (4 * m)\nfor i in a:\n b += i\nb = b * l\nwhile c < m:\n if a[c] < b:\n d = "No"\n else:\n d = "Yes"\n c += 1\nprint(d)']
|
['Runtime Error', 'Runtime Error', 'Time Limit Exceeded', 'Accepted']
|
['s332896224', 's439160771', 's841845350', 's568861667']
|
[3060.0, 3060.0, 3060.0, 3060.0]
|
[17.0, 17.0, 2108.0, 19.0]
|
[207, 192, 189, 240]
|
p02718
|
u325119213
| 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 actual(n, m, a_list):\n threshold = sum(a_list) / (4 * m)\n\n count_can_be_popular = 0\n\n for vote in a_list:\n if vote >= threshold:\n count_can_be_popular += 1\n\n if count_can_be_popular >= m:\n return 'Yes'\n\n return 'No'\n\nn, m = map(int, input().split())\na_list = map(int, input().split())\n \nprint(actual(n, m, a_list))\n", "def actual(n, m, a_list):\n popular_threshold = sum(a_list) / (4 * m)\n\n count_can_be_popular = 0\n\n for vote in a_list:\n if vote >= popular_threshold:\n count_can_be_popular += 1\n\n if count_can_be_popular >= m:\n return 'Yes'\n\n return 'No'\n\nn, m = map(int, input().split())\na_list = list(map(int, input().split()))\n\nprint(actual(n, m, a_list))"]
|
['Wrong Answer', 'Accepted']
|
['s263192617', 's027626864']
|
[9132.0, 9132.0]
|
[21.0, 24.0]
|
[360, 379]
|
p02718
|
u331997680
| 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()))\nprint(A)\nB = 0\nfor i in range(N):\n if(A[i] >= sum(A)/(4*M)):\n B += 1\nif(B >= M):\n print('Yes')\nelse:\n print('No')", "N, M = map(int, input().split())\nA = list(map(int,input().split()))\nB = 0\nfor i in A:\n if(A[i] >= 1/(4*M)):\n B += 1\nif(B >= M):\n print('Yes')\nelse:\n print('No')", "N, M = map(int, input().split())\nA = list(map(int,input().split()))\nprint(A)\nB = 0\nfor i in range(N):\n if(A[i] >= sum(A)/(4*M)):\n B += 1\nif(B >= M):\n print('Yes')\nelse:\n print('No')\n", "N, M = map(int, input().split())\nA = list(map(int,input().split()))\nB = 0\nfor i in range(N):\n if(A[i] >= sum(A)/(4*M)):\n B += 1\nif(B >= M):\n print('Yes')\nelse:\n print('No')"]
|
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
|
['s017707814', 's237107664', 's914148128', 's559721299']
|
[3060.0, 3060.0, 3060.0, 3060.0]
|
[17.0, 18.0, 18.0, 17.0]
|
[187, 166, 188, 178]
|
p02718
|
u333073607
| 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`.
|
['am,n = list(map(int,input().split()))\narr = list(map(int,input().split()))\ngot = 0\nfor i in range(am):\n\tif arr[i]>=1/(4*am):\n got+=1\nif got >=n:\n\tprint("YES")\nelse:\n print("NO")', 'am,n = list(map(int,input().split()))\narr = list(map(int,input().split()))\ngot = 0\nfor i in range(am):\n if arr[i]>=1/(4*am):\n got+=1\nif got >=n:\n print("YES")\nelse:\n print("NO")', 'am,n = list(map(int,input().split()))\narr = list(map(int,input().split()))\ngot = 0\ns = sum(arr)\nfor i in range(am):\n if arr[i]>=s*(1/(4*n)):\n got+=1\nif got >=n:\n print("Yes")\nelse:\n print("No")']
|
['Runtime Error', 'Wrong Answer', 'Accepted']
|
['s012292846', 's087808688', 's654247605']
|
[2940.0, 3060.0, 3060.0]
|
[18.0, 17.0, 17.0]
|
[183, 193, 209]
|
p02718
|
u333731247
| 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=[input().split() for i in range(1)]\n\nall=0\nfor i in range(N):\n all+=int(A[0][i])\nFLAG=int(1/(4*M)*all)\nflag=0\n\nfor i in range(N):\n if FLAG>int(A[0][i]):\n flag+=1\nif flag==0:\n print('Yes')\nelse:\n print('No')", "N,M=map(int,input().split())\nA=[input().split() for i in range(1)]\n\nall=0\nfor i in range(N):\n all+=int(A[0][i])\n\nFLAG=1/(4*M)*all\nflag=0\n\nfor i in range(N):\n if FLAG<=int(A[0][i]):\n flag+=1\n\nif flag>=M:\n print('Yes')\nelse:\n print('No')"]
|
['Wrong Answer', 'Accepted']
|
['s508976142', 's648898477']
|
[3064.0, 3064.0]
|
[17.0, 18.0]
|
[256, 254]
|
p02718
|
u334242570
| 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()))\nsum=0\nfor i in range(len(a)):\n sum=sum+a[i]\n \nx= (sum)//(4*m)\n\nl=[]\nfor j in range(len(a)):\n if(a[i]>=x):\n l.append(a[i])\n \nif(len(l)>=m):\n print("Yes")\nelse:\n print("No")\n', 'n,m=map(int,input().split())\na=list(map(int,input().split()))\nsum=0\nfor i in range(n):\n sum=sum+a[i]\n \nx= (sum)/(4*m)\n#print(x)\nl=[]\nfor j in range(n):\n if(a[j] >= x):\n l.append(a[j])\n#print(l) \nif(len(l)>=m):\n print("Yes")\nelse:\n print("No")']
|
['Wrong Answer', 'Accepted']
|
['s519456522', 's276148088']
|
[3064.0, 3188.0]
|
[17.0, 19.0]
|
[263, 271]
|
p02718
|
u334617936
| 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\n\ndef main():\n args1, args2 = input().rstrip().split(\' \'), input().rstrip().split(\' \')\n N, M = int(args1[0]), int(args1[1])\n items = np.array([int(val) for val in args2])\n items = np.sort(items)[::-1]\n items_sum = np.sum(items)\n bottom = items_sum / 4. / M\n print(bottom)\n \n if(items[M-1] >= bottom):\n print(\'Yes\')\n else:\n print(\'No\')\n \nif __name__ == "__main__":\n main()', 'import numpy as np\n\ndef main():\n args1, args2 = input().rstrip().split(\' \'), input().rstrip().split(\' \')\n N, M = int(args1[0]), int(args1[1])\n items = np.array([int(val) for val in args2])\n items = np.sort(items)[::-1]\n items_sum = np.sum(items)\n bottom = items_sum / 4. / M\n \n if(items[M-1] >= bottom):\n print(\'Yes\')\n else:\n print(\'No\')\n \nif __name__ == "__main__":\n main()']
|
['Wrong Answer', 'Accepted']
|
['s010970244', 's423650831']
|
[12640.0, 12504.0]
|
[150.0, 151.0]
|
[439, 421]
|
p02718
|
u335950809
| 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()))\n\n#s = sum(l)\ns = 0\nfor i in l:\n s += i\n \nprint('s=%d' %s)\n\nl = sorted(l,reverse=True)\n\nprint(l)\n\nx = s * (1 / 4*m)\nans = 0\n\nprint('x = %d' %x)\n\n\nfor i in range(m):\n if(l[i] >= x):\n ans = ans + 1\n\nif(ans >= m):\n print('Yes')\nelse:\n print('No')\n ", "n,m = map(int,input().split())\nl = list(map(int,input().split()))\n\nsum = sum(l)\nl = sorted(l,reverse=True)\nx = sum / (1 / 4*m)\nans = 0\n\n\n\nfor i in range(m):\n if(l[i] >= x):\n ans = ans + 1\n\nif(ans >= m):\n print('Yes')\nelse:\n print('No')\n ", "n,m = map(int,input().split())\nl = list(map(int,input().split()))\n\ns = sum(l)\n \n#print('s=%d' %s)\n\nl = sorted(l,reverse=True)\n\n#print(l)\n\nx = (1 / (4*m)) * s\nans = 0\n\n#print('x = %d' %x)\n\n\nfor i in range(m):\n if(l[i] >= x):\n ans = ans + 1\n #print('l[%d]=%d' %(i,l[i]))\n\nif(ans >= m):\n print('Yes')\nelse:\n print('No')"]
|
['Wrong Answer', 'Wrong Answer', 'Accepted']
|
['s200361907', 's840306987', 's235603946']
|
[3064.0, 3060.0, 3064.0]
|
[17.0, 17.0, 17.0]
|
[335, 256, 338]
|
p02718
|
u337626942
| 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()\nS = sum(A)\n \nif 1/(4*M) <= A[N-M]/S :\n\tprint("YES")\nelse:\n\tprint("NO")', 'N, M = map(int, input(). split())\nA = list(map(int, input().split())\nA.sort()\nS = sum(A)\n \nif 1/(4M) <= A[N-M]/S :\n\tprint("YES")\nelse:\n\tprint("NO")', 'N, M = map(int, input(). split())\nA = list(map(int, input().split()))\nA.sort()\nS = sum(A)\n \nif 1/(4*M) <= A[N-M]/S :\n\tprint("YES")\nelse:\n\tprint("NO")', 'N, M = map(int, input(). split())\nA = list(map(int, input().split()))\nA.sort()\nS = sum(A)\n \nif 1/(4*M) <= A[N-M]/S :\n\tprint("Yes")\nelse:\n\tprint("No")']
|
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
|
['s368452695', 's578871921', 's588121226', 's305842316']
|
[2940.0, 2940.0, 3060.0, 3060.0]
|
[17.0, 17.0, 17.0, 17.0]
|
[156, 155, 157, 157]
|
p02718
|
u343823529
| 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())\nplist = list(map(int, input().split()))\nplist.sort(reverse=True)\nif(plist[m-1]<sum(plist)/4/m):\n print('no')\nelse:\n print('yes')", "n, m = map(int, input().split())\nplist = list(map(int, input().split()))\nplist.sort(reverse=True)\nif(plist[m-1]<sum(plist)/4/m):\n print('No')\nelse:\n print('Yes')"]
|
['Wrong Answer', 'Accepted']
|
['s170669336', 's035383029']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[167, 167]
|
p02718
|
u345483150
| 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()))\nb=sum(a)\nfor i in range(n):\n if a[i]>=b/(4*m):\n a[i]=x\nif a.count(x)>=m:\n print('Yes')\nelse:\n print('No')", "n,m=map(int,input().split())\na=list(map(int,input().split()))\nb=sum(a)\nfor i in range(n):\n if a[i]>=b/(4*m):\n a[i]=-1\nif a.count(-1)>=m:\n print('Yes')\nelse:\n print('No')"]
|
['Runtime Error', 'Accepted']
|
['s942188996', 's581487058']
|
[3060.0, 3060.0]
|
[17.0, 17.0]
|
[183, 185]
|
p02718
|
u346531902
| 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())\nc=0\nv=list(map(int,input().split()))\ns=sum(v)\nval=s/(m*4)\nfor i in range(n):\n\tif(val<=v[i]):\n\t\tc=c+1\nif(c>=m):\n\tprint("YES")\nelse:\n\tprint("NO")', 'n,m=map(int,input().split())\nm=4*m\nm1=m//4\nc=0\nv=list(map(int,input().split()))\ns=sum(v)\nval=s/m\nfor i in range(n):\n\tif(val<=v[i]):\n\t\tc=c+1\nif(c>=m1):\n\tprint("YES")\nelse:\n\tprint("NO")', 'from math import *\nfrom copy import *\nfrom string import *\t\t\t\t\nfrom random import *\nfrom sys import stdin\nfrom sys import maxsize\nfrom operator import *\t\t\t\t\nfrom itertools import *\nfrom collections import Counter\t\t\n\n\n\nn,m=map(int,input().split())\nm=4*m\nm1=m//4\nc=0\nv=list(map(int,input().split()))\ns=sum(v)\nval=s//m\nfor i in range(n):\n\tif(val<=v[i]):\n\t\tc=c+1\nif(c>=m1):\n\tprint("YES")\nelse:\n\tprint("NO")', 'n,m=map(int,input().split())\nc=0\nv=list(map(int,input().split()))\ns=sum(v)\nv.sort(reverse=True)\nval=s/(m*4)\nif(v[m-1]>=val):\n\tprint("YES")\nelse:\n\tprint("NO")', 'n,m=map(int,input().split())\nval=4*m\nc=0\nfor i in range(n):\n v=int(input())\n v=v/val\n if(v<m):\n c=c+0\n else:\n c=c+1\nif(c>=m):\n print("YES")\nelse:\n print("NO")', "n,m = input().split()\nN = int(n)\nM = int(m)\na = [int(i) for i in input().split()]\na.sort(reverse=True)\nk = sum(a)/(4*M)\nif k > a[M-1]:\n print('No')\nelse:\n print('Yes')"]
|
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
|
['s112561448', 's243839979', 's275161228', 's633876815', 's669716603', 's532700834']
|
[3188.0, 3064.0, 4424.0, 3060.0, 3060.0, 3060.0]
|
[19.0, 18.0, 37.0, 18.0, 17.0, 17.0]
|
[172, 183, 491, 157, 170, 173]
|
p02718
|
u347363297
| 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()\nm = int(m)\n\nvotes = input().split()\nvotes = [int(i) for i in votes]\nvotes.sort(reverse=True)\n\ntotal = sum(votes)\n\nvalid = True\nfor i in range(m):\n if votes[i] <= total/(4*m):\n valid = False\n break\n\nif valid:\n print('yes')\nelse:\n print('no')", "n, m = input().split()\nm = int(m)\n\nvotes = input().split()\nvotes = [int(i) for i in votes]\nvotes.sort()\n\ntotal = sum(votes)\n\nvalid = True\nfor i in range(m):\n if votes[i] <= total/(4*m):\n valid = False\n break\n\nif valid:\n print('yes')\nelse:\n print('no')", "n, m = input().split()\nm = int(m)\n\nvotes = input().split()\nvotes = [int(i) for i in votes]\nvotes.sort(reverse=True)\n\ntotal = sum(votes)\n\nvalid = True\nfor i in range(m):\n if votes[i] < total/(4*m):\n valid = False\n break\n\nif valid:\n print('Yes')\nelse:\n print('No')"]
|
['Wrong Answer', 'Wrong Answer', 'Accepted']
|
['s521534064', 's976812720', 's776155128']
|
[3064.0, 3064.0, 3064.0]
|
[17.0, 17.0, 18.0]
|
[286, 274, 285]
|
p02718
|
u347920118
| 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 = []\nvote = []\nnum = list(map(int,input().split()))\nvote = list(map(int,input().split()))\nN = num[0]\nM = num[1]\nj = sum(vote)/(4*M)\nprint(j)\n\ncnt = 0\nfor i in range(0,len(vote)):\n if vote[i]>=j:\n cnt += 1\n else:\n pass\nif M<=cnt:\n print("Yes")\nelse:\n print("No")\n', 'num = []\nvote = []\nnum = list(map(int,input().split()))\nvote = list(map(int,input().split()))\nN = num[0]\nM = num[1]\nj = sum(vote)/(4*N)\ncnt = 0\nfor i in range(0,len(vote)-1):\n if vote[i]>=j:\n cnt += 1\n else:\n pass\nif N<=cnt:\n print("Yes")\nelse:\n print("No")\n', 'num = []\nvote = []\nnum = list(map(int,input().split()))\nvote = list(map(int,input().split()))\nN = num[0]\nM = num[1]\nj = sum(vote)/(4*M)\n#print(j)\n\ncnt = 0\nfor i in vote:\n if i>=j:\n cnt += 1\n else:\n pass\n#print(cnt)\nif M<=cnt:\n print("Yes")\nelse:\n print("No")\n']
|
['Wrong Answer', 'Wrong Answer', 'Accepted']
|
['s197618947', 's325564268', 's305381017']
|
[3064.0, 3060.0, 3060.0]
|
[17.0, 17.0, 17.0]
|
[293, 285, 286]
|
p02718
|
u348432940
| 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())\nList = list(map(int, input().split()))\nstand = 1 / (4 * M) * sum(List)\narr = []\nfor i in range(List):\n if List[i] >= stand:\n arr.append(List[i])\nif len(arr) >= M:\n print("Yes")\nelse:\n print("No")\n ', 'N ,M = map(int, input().split())\nList = list(map(int, input().split()))\nstand = 1 / (4 * M) * sum(List)\narr = []\nfor i in range(len(List)):\n if List[i] >= stand:\n arr.append(List[i])\nif len(arr) >= M:\n print("Yes")\nelse:\n print("No")\n \n']
|
['Runtime Error', 'Accepted']
|
['s238558768', 's779746674']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[237, 243]
|
p02718
|
u350093546
| 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())\na=list(map(int,input().split()))\na.sort()\nif a(n-m)<math.ceil(sum(a)//(4*m)):\n print('No')\nelse:\n print('Yes')\n", "n,m=map(int,input().split())\na=list(map(int,input().split()))\ncount=0\nfor i in a:\n if i>=sum(a)/(4*m):\n count+=1\nif count>=m:\n print('Yes')\nelse:\n print('No')"]
|
['Runtime Error', 'Accepted']
|
['s470145509', 's095117509']
|
[9144.0, 9076.0]
|
[22.0, 23.0]
|
[154, 164]
|
p02718
|
u353478669
| 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 = input()\na = list(input())\nx = int(0)\n\nn, m = m.split()\nn = int(n)\nm = int(m)\n\nlist.sort(a)\n\nfor i in range(len(a)- 1, n, -1):\n print(i)\n x += int(a[i])\n\nfor i in range(len(a)- 1, len(a) - m -1, -1):\n print(i)\n if int(a[i]) // 4 * int(m) < 0:\n print('No')\n exit()\n\nprint('Yes')\n", "m = input()\na = input()\nx = int(0)\ny1, y2 = int(0)\n\nn, m = m.spilit()\n\nfor i in range(0, len(a), 2):\n x += int(a[i])\n y2 = y1 if y1 < int(a[i]) else y2\n y1 = int(a[i]) if y1 < int(a[i]) else y1\n\nif not y1 // 4 * m or y2 // 4 * m:\n print('Yes')\n\nelse:\n print('No')\n", "m = input()\nb = input()\nx = int(0)\na = list()\n\nn, m = m.split(' ')\nn = int(n)\nm = int(m)\n\nb = b.split(' ')\nfor i in range(len(b)):\n a.append(int(b[i]))\n\nlist.sort(a, reverse = True)\n\nfor i in range(len(a)):\n x += int(a[i])\n\nfor i in range(m):\n print(a)\n if int(a[i]) < x / (4 * m):\n print('No')\n exit()\n\nprint('Yes')\n", "m = input()\nb = input()\nx = int(0)\na = list()\n\nn, m = m.split(' ')\nn = int(n)\nm = int(m)\n\nb = b.split(' ')\nfor i in range(len(b)):\n a.append(int(b[i]))\n\nlist.sort(a, reverse = True)\n\nfor i in range(len(a)):\n x += int(a[i])\n\nfor i in range(m):\n if int(a[i]) < x / (4 * m):\n print('No')\n exit()\n\nprint('Yes')\n"]
|
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
|
['s527398989', 's792660439', 's936097996', 's825153796']
|
[3064.0, 3060.0, 3064.0, 3064.0]
|
[17.0, 17.0, 18.0, 18.0]
|
[307, 279, 343, 330]
|
p02718
|
u353919145
| 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 continue\n\n else:\n count += 1\n\nif(count == m):\n print("Yes")\n\nelse:\n print("No")', 'b = list(map(int, input().split()))\nn = b[0]\nm = b[1]\na = list(map(int, input().split()))\nsum = sum(a)\na = sorted(a, reverse=True)\n\nif a[m - 1] < (1 / (4 * m)) * sum:\n print("No")\nelse:\n print("Yes")']
|
['Wrong Answer', 'Accepted']
|
['s067154935', 's165421228']
|
[3064.0, 3060.0]
|
[17.0, 18.0]
|
[267, 205]
|
p02718
|
u354281482
| 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)\ns = sum(a)\nprint(a,s)\nif a[m-1] < s/(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)\ns = sum(a)\nif a[m-1] < s/(4*m):\n print("No")\nelse:\n print("Yes")']
|
['Wrong Answer', 'Accepted']
|
['s784727653', 's304457777']
|
[3060.0, 3060.0]
|
[17.0, 17.0]
|
[171, 160]
|
p02718
|
u355154595
| 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,y = map(int,input().split())\nA=list(map(int,input().split()))\nT=sum(A)\na=0\nfor i in range(x):\n if A[i]<1/(4*T):\n a+=1\nif a>=y:\n print('Yes')\nelse:\n print('No')\n", "N,M=map(int,input().split())\ns=int(input())\nS=sum(s)\nif sorted(s)[-1:-M]<S/(4*M):\n print('No')\nelse:\n print('Yes')\n", "x,y = map(int,input().split())\nA=[int(input()) for i in range(x)]\nT=sum(A)\na=0\nfor i in range(x):\n if A[i]<1/(4*T):\n a+=1\nif a>=y:\n print('Yes')\nelse:\n print('No')\n", "N,M,s=map(int,input().split())\nS=sum(s)\nif sorted(s)[-1:-M]<S/(4*M):\n print('No')\nelse:\n print('Yes')\n", "N,M,s=map(int,input().split())\nS=sum(s)\nif sorted(s)[-1:-m]<S/(4*M):\n print('No')\nelse:\n print('Yes')\n", "\nN,M,s=map(int,input().split())\nS=sum(s)\nm=sorted(s)[-M]\nif m<S/(4*M):\n print('No')\nelse:\n print('Yes')\n", "x,y = map(int,input().split())\nA=list(map(int,input().split()))\nT=sum(A)\na=0\nfor i in range(x):\n if A[i]>=T/(4*y):\n a+=1\nif a>=y:\n print('Yes')\nelse:\n print('No')\n"]
|
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
|
['s035597065', 's340290737', 's628517432', 's629866890', 's840640085', 's926157957', 's651203260']
|
[9152.0, 2940.0, 9176.0, 2940.0, 2940.0, 2940.0, 9024.0]
|
[30.0, 17.0, 25.0, 17.0, 18.0, 17.0, 28.0]
|
[172, 121, 171, 108, 108, 110, 173]
|
p02718
|
u355853184
| 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\ncnt = N\nA_sum = sum(A_list)\n\nfor i in range(N):\n if A_list[i] <= int(A_sum/4/M):\n cnt -= 1\nif cnt >= M:\n print("yes")\nelse:\n print("No")', 'N, M = map(int, input().split())\nA_list = list(map(int, input().split()))\n\ncnt = 0\nA_sum = sum(A_list)\n\nfor i in range(N):\n if A_list[i] >= A_sum/4/M:\n cnt += 1\nif cnt >= M:\n print("yes")\nelse:\n print("No")', 'import math\n\nN, M = map(int, input().split())\nA_list = list(map(int, input().split()))\n\ncnt = 0\nA_sum = sum(A_list)\n\nfor i in range(N):\n if A_list[i] >= math.ceil(A_sum/4/M):\n cnt += 1\nif cnt >= M:\n print("yes")\nelse:\n print("No")\n', 'import math\n\nN, M = map(int, input().split())\nA_list = list(map(int, input().split()))\n\ncnt = M\nA_sum = sum(A_list)\n\nfor i in range(N):\n if A_list[i] <= int(A_sum/4/M):\n cnt -= 1\nif cnt >= M:\n print("yes")\nelse:\n print("No")\n', 'import math\n\nN, M = map(int, input().split())\nA_list = list(map(int, input().split()))\n\ncnt = 0\nA_sum = sum(A_list)\n\nfor i in range(N):\n if A_list[i] >= math.ceil(A_sum/4/M):\n cnt += 1\nif cnt >= M:\n print("Yes")\nelse:\n print("No")\n']
|
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
|
['s508232502', 's698481544', 's825620398', 's889009930', 's183480632']
|
[9192.0, 9116.0, 9028.0, 9108.0, 9100.0]
|
[26.0, 29.0, 31.0, 30.0, 31.0]
|
[227, 222, 247, 241, 247]
|
p02718
|
u356748525
| 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()n,m = input().split()\nn = int(n)\nm = int(m)\narr = list(map(int,input().split()))\nminn = sum(arr)*(1/(4*m))\nt = 0\nfor i in arr:\n if i >= minn:\n t += 1\nif t >= m:\n print("Yes")\nelse:\n print("No")', 'n,m = input().split()\nn = int(n)\nm = int(m)\narr = list(map(int,input().split()))\nminn = sum(arr)*(1/(4*m))\nt = 0\nfor i in arr:\n if i >= minn:\n t += 1\n#print(t)\nif t >= m:\n print("Yes")\nelse:\n print("No")']
|
['Runtime Error', 'Accepted']
|
['s520205704', 's094793886']
|
[8764.0, 9092.0]
|
[29.0, 26.0]
|
[220, 209]
|
p02718
|
u357003319
| 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(" "))\nlis2=[]\nfor i in range(0,n):\n\tlis2.append(int(input()))\nlis2=sorted(lis2,reverse=True)\nsum1=sum(lis2)\ncount=0\nfor i in range(0,m):\n if(lis2[i]>=((1/(4*m))*sum1)):\n count=0\n else:\n count=1\n break\nif(count==1):\n print("No")\nelse:\n print("Yes")', 'n,m=map(int,input().split(" "))\nlis2=[]\nfor i in range(0,n):\n\tlis2.append(int(input()))\nlis2=sorted(lis2,reverse=True)\nsum1=sum(lis2)\ncount=0\nfor i in range(0,m):\n if(lis2[i]>=((1/(4*m))*sum1)):\n count=0\n else:\n count=1\n break\nif(count==1):\n print("No")\nelse:\n print("Yes")', 'n,m=map(int,input().split(" "))\nlis2=map(int,input().split(" "))\n\nlis2=sorted(lis2,reverse=True)\nsum1=sum(lis2)\ncount=0\nfor i in range(0,m):\n if(lis2[i]>=((1/(4*m))*sum1)):\n count=0\n else:\n count=1\n break\nif(count==1):\n print("No")\nelse:\n print("Yes")']
|
['Runtime Error', 'Runtime Error', 'Accepted']
|
['s392400830', 's767006876', 's837178722']
|
[3064.0, 3064.0, 3064.0]
|
[17.0, 17.0, 17.0]
|
[286, 286, 264]
|
p02718
|
u362563655
| 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\ns = sum(A)\nm = s//(4*M)\nfor i in range(N):\n if A[i] >= m:\n count += 1\nif count == M:\n print("Yes")\nelse:\n print("No")\n', 'N,M=map(int, input().split())\nA = list(map(int, input().split()))\ncount =0\ns = sum(A)\nm = s/(4*M)\nfor i in range(N):\n if A[i] >= m:\n count += 1\nif count >= M:\n print("Yes")\nelse:\n print("No")\n']
|
['Wrong Answer', 'Accepted']
|
['s008393794', 's930954650']
|
[3060.0, 3060.0]
|
[17.0, 18.0]
|
[199, 198]
|
p02718
|
u363080243
| 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(set((map(int, input().split()))))\nvote = []\nfor Ai in A:\n\tif Ai > (1 / (4 * M) * sum(A)):\n vote.append(Ai)\nif len(vote) >= M:\n print("Yes")\nelse:\n print("No")', 'N, M = map(int, input().split())\nA = list(set((map(int, input().split()))))\nprint(A)\nvote = []\nfor Ai in A:\n if Ai > (1 / (4 * M) * sum(A)):\n vote.append(Ai)\nif len(vote) >= M:\n print("Yes")\nelse:\n print("No")', "N, M = map(int, input().split())\nA = list(map(int, input().split()))\n\ncheck = ((1 / (4 * M)) * sum(A))\nx = 0\nfor item in A:\n if item < check:\n x += 1\n\nans = N - x\n\nif ans >= M :\n print('Yes')\nelse:\n print('No')\n"]
|
['Runtime Error', 'Wrong Answer', 'Accepted']
|
['s266380469', 's380416729', 's720236239']
|
[2940.0, 3060.0, 3060.0]
|
[18.0, 17.0, 17.0]
|
[211, 225, 227]
|
p02718
|
u366963613
| 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 -*-\nN, M = list(map(int, input().split()))\nA = list(map(int, input().split()))\nA = sorted(A, reverse=True)\nif (A[M - 1] > sum(A) / (4 * M)):\n print('yes')\nelse:\n print('No')", "# -*- coding: utf-8 -*-\nN, M = list(map(int, input().split()))\nA = list(map(int, input().split()))\nA = sorted(A, reverse=True)\nif (A[M - 1] >= sum(A) / (4 * M)):\n print('Yes')\nelse:\n print('No')"]
|
['Wrong Answer', 'Accepted']
|
['s732486142', 's727101091']
|
[3060.0, 3060.0]
|
[17.0, 17.0]
|
[199, 200]
|
p02718
|
u369796672
| 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())) \n\nS = sum(l)\n\nlr = [i for i in l if i >= S/4M]\n\nif len(lr) >= M:\n \tprint("Yes")\nelse:\n \tprint("No")', 'N, M = map(int, input().split())\nl = list(map(int, input().split())) \n \nS = sum(l)\nX = 4*M\n \nlr = [i for i in l if i >= S/X]\n \nif len(lr) >= M:\n \tprint("Yes")\nelse:\n \tprint("No")']
|
['Runtime Error', 'Accepted']
|
['s212673378', 's532702698']
|
[2940.0, 3060.0]
|
[17.0, 17.0]
|
[171, 181]
|
p02718
|
u373703188
| 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_lst = []\na_lst = list(map(int, input().split()))\n# print()\npercent = sum(a_lst) / (4 * m)\ncnt = 0\nfor i in range(n):\n print("a", a_lst[i])\n \n if a_lst[i] >= percent:\n cnt += 1\nif cnt >= m:\n print(\'Yes\')\nelse:\n print(\'No\')', 'n, m = map(int, input().split())\na_lst = []\na_lst = list(map(int, input().split()))\n# print()\npercent = sum(a_lst) / (4 * m)\ncnt = 0\nfor i in range(n):\n # print("a", a_lst[i])\n \n if a_lst[i] >= percent:\n cnt += 1\nif cnt >= m:\n print(\'Yes\')\nelse:\n print(\'No\')']
|
['Wrong Answer', 'Accepted']
|
['s407862814', 's144447796']
|
[3064.0, 3060.0]
|
[17.0, 18.0]
|
[334, 336]
|
p02718
|
u374082254
| 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\nsumA = sum(A)\n\nfilteredA = list(filter(lambda x: x < (sumA / (4*M)), A))\n\nif M >= len(filteredA):\n print(\'Yes\')\nelse:\n print("No")\n', 'N, M = map(int, input().split())\nA = list(map(int, input().split()))\n\nsumA = sum(A)\n\nfilteredA = list(filter(lambda x: x >= (sumA / (4*M)), A))\n\nif M <= len(filteredA):\n print(\'Yes\')\nelse:\n print("No")\n']
|
['Wrong Answer', 'Accepted']
|
['s015496749', 's442629381']
|
[2940.0, 3060.0]
|
[17.0, 18.0]
|
[207, 208]
|
p02718
|
u374202816
| 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`.
|
["try:\n N_s,M_s=input().split(' ')\n N=int(N_s)\n M=int(M_s)\n \n if N>=1 and N<=100 and M>=1 and M<=100:\n votes=input().split(' ')\n counter=0\n vote= list(map(int, votes))\n summer=sum(vote)\n percent=summer/(4*M)\n print(percent)\n for i in vote:\n if i>percent:\n counter+=1\n if counter>=M:\n print('Yes')\n else :\n print('No')\n \nexcept Exception as e:\n print(e)", "\ntry:\n N_s,M_s=input().split(' ')\n N=int(N_s)\n M=int(M_s)\n \n if N>=1 and N<=100 and M>=1 and M<=100:\n votes=input().split(' ')\n counter=0\n vote = [int(i) for i in votes]\n summer=sum(vote)\n percent=summer/(4*M)\n for i in votes:\n if int(i)>=percent:\n counter+=1\n if counter>=M:\n print('Yes')\n else :\n print('No')\n \nexcept Exception as e:\n print(e)"]
|
['Wrong Answer', 'Accepted']
|
['s678704326', 's948547082']
|
[9172.0, 9076.0]
|
[21.0, 23.0]
|
[486, 474]
|
p02718
|
u379424722
| 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()))\nS = sum(L)\nL = sorted(L)\nA = 0\n#print(L)\n\nfor i in L:\n print(i)\n if i >= S/4/M:\n \n A += 1\n \n#print(A)\nif A >= M:\n print("Yes")\nelse:\n print("No")', 'N,M = map(int,input().split())\nL = list(map(int,input().split()))\nS = sum(L)\nL = sorted(L)\nA = 0\n#print(L)\n\nfor i in L:\n #print(i)\n if i >= S/4/M:\n \n A += 1\n \n#print(A)\nif A >= M:\n print("Yes")\nelse:\n print("No")']
|
['Wrong Answer', 'Accepted']
|
['s945782678', 's761558536']
|
[3060.0, 3060.0]
|
[17.0, 17.0]
|
[244, 245]
|
p02718
|
u383018986
| 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)\n\nprint(A[M-1])\n\nresult = 'No' if A[M-1] < sum(A) / (4 * M) else 'Yes'\nprint(result)\n", "N, M = map(int, input().split())\nA = sorted(list(map(int, input().split())), reverse=True)\n\nresult = 'No' if A[M-1] < sum(A) / (4 * M) else 'Yes'\nprint(result)\n"]
|
['Wrong Answer', 'Accepted']
|
['s259913789', 's846608371']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[175, 160]
|
p02718
|
u383309665
| 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().strip().split())\nA = map(int, input().strip().split())\nt = (1 / (4 * m)) * sum(A)\ns = sum([(v >= t) for v in A])\nprint('Yes') if s >= m else print('No')\n", "n, m = map(int, input().strip().split())\nA = list(map(int, input().strip().split()))\nt = (1 / (4 * m)) * sum(A)\ng = [(v >= t) for v in A]\ns = sum(g)\nprint('Yes') if s >= m else print('No')\n"]
|
['Wrong Answer', 'Accepted']
|
['s517958327', 's907613986']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[177, 189]
|
p02718
|
u385649291
| 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`.
|
['\nline_num = input()\nline = line_num.split(" ")\n \n \nline2 = input().split(" ")\nsum_vote = 0\nfor i in line2:\n # print(i)\n sum_vote += int(i)\n \n\nnuma = sum_vote/int(line[1])\nnum= numa/4\n\nlist =[]\nfor i in line2:\n if int(i) =>num:\n list.append(i)\n else:\n pass\n\nif len(list)>int(line[1]):\n print("Yes")\nelse:\n print("No")', '\nline_num = input()\nline = line_num.split(" ")\n \n \nline2 = input().split(" ")\nsum_vote = 0\nfor i in line2:\n # print(i)\n sum_vote += int(i)\n \n\nnuma = sum_vote/int(line[1])\nnum= numa/4\n\nlist =[]\nfor i in line2:\n if int(i) >=num:\n list.append(i)\n else:\n pass\n\nif len(list)>=int(line[1]):\n print("Yes")\nelse:\n print("No")']
|
['Runtime Error', 'Accepted']
|
['s713113623', 's208603707']
|
[2940.0, 3064.0]
|
[17.0, 17.0]
|
[439, 440]
|
p02718
|
u385873134
| 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(map(int, input().split()))\na.sort(reverse=True)\n\nflg = True\n\nsoutouhyou = int(sum(a) * (1 / (4 * M)))\n\ncount = 0\n\nif soutouhyou > 0:\n for num in list(range(M)):\n if a[num] >= soutouhyou:\n count += 1\n\nif count > N:\n print('Yes')\nelse:\n print('No')\n", "N, M = list(map(int, input().split()))\na = list(map(int, input().split()))\na.sort(reverse=True)\n\nrate = sum(a) * (1 / (4 * M))\n\ncount = 0\n\nfor num in list(range(M)):\n if a[num] >= rate:\n count += 1\n\nif count >= M:\n print('Yes')\nelse:\n print('No')\n"]
|
['Wrong Answer', 'Accepted']
|
['s370114235', 's862534194']
|
[3064.0, 3060.0]
|
[18.0, 18.0]
|
[322, 263]
|
p02718
|
u386439695
| 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`.
|
['\na = list(map(int,input().split()))\n\nlist.sort(a, reverse=True)\n\nans = "No"\n\n\nif a[m-1] >= sum(a)/(4*m) :\n ans = "Yes"\nprint (ans)', 'n,k = map(int,input().split())\n\nans1 = n%k\n\nif ans1 > k-ans1:\n ans1 = k-ans1\nprint(ans1)', 'n,m = map(int,input().split())\n\na = list(map(int,input().split()))\n\nlist.sort(a, reverse=True)\n\nans = "No"\n\nif a[2] > 4*m :\n ans = "Yes"\nprint (ans)', 'n,m = map(int,input().split())\n\na = list(map(int,input().split()))\n\nlist.sort(a, reverse=True)\n\nans = "No"\n\n\nif a[m-1] >= sum(a)/(4*m) :\n ans = "Yes"\nprint (ans)']
|
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
|
['s642188714', 's811441084', 's828075940', 's546442673']
|
[2940.0, 2940.0, 3060.0, 3060.0]
|
[17.0, 17.0, 17.0, 17.0]
|
[131, 89, 149, 162]
|
p02718
|
u387774811
| 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\nB=len(A)\nc=0\nfor i in range(B):\n c+=A[i]\nif A[B-M]>=c/4:\n print("Yes")\nelse:\n print("No")', 'N,M = map(int,input().split())\nA = list(map(int,input().split()))\nc=0\nfor i in range(len(A)):\n c+=A[i]\nd=c/4/M\ne=0\nfor i in range(len(A)):\n if A[i]>=d:\n e+=1\nif e>=M:\n print("Yes")\nelse:\n print("No")']
|
['Wrong Answer', 'Accepted']
|
['s855057355', 's989261381']
|
[3060.0, 3064.0]
|
[42.0, 17.0]
|
[160, 200]
|
p02718
|
u388458865
| 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()) \nG = sum(a) \nnum = 1/(4*G)\ns = \nyesman = 0\nwhile a(:n)\nif s >= num:\n yesman = yesman + 1\n \nif yesman >= m:\n print("Yes")\nelse : print("No")', 'N,M = map(int,input().split())\nA = list(map(int,input().split()))\nS = sum(A) \nA.sort(reverse = True) \nif A[M-1] >= S / (4*M) : print("Yes") \nelse :print("No")']
|
['Runtime Error', 'Accepted']
|
['s646613078', 's829379474']
|
[2940.0, 3060.0]
|
[18.0, 17.0]
|
[259, 277]
|
p02718
|
u392058721
| 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()))\nu = sum(a) / (4*m)\nprint(u)\nl = 0\nfor i in a:\n if i >= u:\n l += 1\nprint("Yes") if l >= m else print("No")', 'n, m = map(int, input().split())\na = list(map(int, input().split()))\nu = sum(a) / (4*m)\nl = 0\nfor i in a:\n if i >= u:\n l += 1\nprint("Yes") if l >= m else print("No")']
|
['Wrong Answer', 'Accepted']
|
['s105291328', 's119395011']
|
[3064.0, 3060.0]
|
[17.0, 17.0]
|
[184, 175]
|
p02718
|
u393253746
| 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().strip().split()]\na= n, m = [int(x) for x in input().strip().split()]\n\na.sort(reverse=True)\ns = sum(a)\nthresh = s/(4*m)\nflag=True\nfor i in range(m):\n if a[i]< thresh:\n flag=False\n break\n\nif flag:\n print("YES")\nelse:\n print("NO")', 'n, m = [int(x) for x in input().strip().split()]\na = [int(x) for x in input().strip().split()]\n\na.sort(reverse=True)\ns = sum(a)\nthresh = s/(4*m)\nflag=True\nfor i in range(m):\n if a[i]< thresh:\n flag=False\n break\n\nif flag:\n print("Yes")\nelse:\n print("No")']
|
['Runtime Error', 'Accepted']
|
['s343363528', 's915018301']
|
[3064.0, 3064.0]
|
[17.0, 18.0]
|
[282, 276]
|
p02718
|
u396210538
| 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\n\nN, M = [int(x) for x in stdin.readline().rstrip().split()]\nA = [int(x) for x in input().split()]\n\n# print(N, M, A)\nA.sort()\nb = sum(A)*(1/(4*M))\n# print(b)\nif A[N-1-M-1] >= b:\n print("Yes")\nelse:\n print("No")\n# print(A)\n', 'from sys import stdin\n\nN, M = [int(x) for x in stdin.readline().rstrip().split()]\nA = [int(x) for x in input().split()]\n\n# print(N, M, A)\nA.sort()\nif sum(A) % (4*M) == 0:\n b = sum(A)//(4*M)\nelse:\n b = sum(A)//(4*M)+1\n# print(b,A,A[N-1-M+1])\nif A[N-1-(M-1)] >= b:\n print("Yes")\nelse:\n print("No")\n# print(A)\n']
|
['Wrong Answer', 'Accepted']
|
['s342363623', 's076603496']
|
[2940.0, 3060.0]
|
[17.0, 17.0]
|
[249, 319]
|
p02718
|
u396460578
| 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,c = list(map(int,input().split()))\na,b = b,a\na,c = c,a\nprint(a," ",b," ",c)', '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']
|
['s977433222', 's465032792']
|
[3060.0, 2940.0]
|
[18.0, 17.0]
|
[79, 166]
|
p02718
|
u396707099
| 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())\nlis = list(map(int,input().split()))\nlis.sort()\nt = sum(lis)\nc=0\ncondition = 1/(2*m)\ncost = t*condition\nfor i in range(len(lis)):\n if(lis[i]>cost):\n c+=1\nif(c>=m):\n print("Yes")\nelse:\n print("No")', 'n,m = map(int,input().split())\nlis = list(map(int,input().split()))\nlis.sort()\nt = sum(lis)\nc=0\nfor i in range(m):\n if(lis[i]>(1/(2*m))):\n c+=1\n else:\n break\nif(c==m):\n print("YES")\nelse:\n print("NO")', 'n,m = map(int,input().split())\nlis = list(map(int,input().split()))\nlis.sort()\nt = sum(lis)\nc=0\ncondition = 1/(4*m)\ncost = t*condition\nfor i in range(len(lis)):\n if(lis[i]>cost):\n c+=1\nif(c>=m):\n print("YES")\nelse:\n print("NO")', 'n,m = map(int,input().split())\nlis = list(map(int,input().split()))\nlis.sort()\nt = sum(lis)\nc=0\nfor i in range(len(lis)):\n if(lis[i]>(1/(2*m))):\n c+=1\n else:\n break\nif(c==m):\n print("YES")\nelse:\n print("NO")', 'n,m = map(int,input().split())\nlis = list(map(int,input().split()))\nlis.sort()\nt = sum(lis)\nc=0\nfor i in range(len(lis)):\n if(lis[i]>(1/(2*m))):\n c+=1\nif(c>=m):\n print("YES")\nelse:\n print("NO")', 'n,m = map(int,input().split())\nlis = list(map(int,input().split()))\nlis.sort()\nt = sum(lis)\nc=0\ncondition = 1/(4*m)\ncost = t*condition\nfor i in range(len(lis)):\n if(lis[i]>=cost):\n c+=1\nif(c>=m):\n print("Yes")\nelse:\n print("No")']
|
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
|
['s423766985', 's486102256', 's667873498', 's905559173', 's962808806', 's479842546']
|
[3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0]
|
[19.0, 17.0, 17.0, 18.0, 17.0, 17.0]
|
[233, 210, 233, 217, 199, 234]
|
p02718
|
u402077280
| 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`.
|
['nmlist = list(map(int, input().split()))\nsvote = list(map(int, input().split()))\nallvote = sum(svote)\nmaxvote = max(svote)\nn0 = nmlist[1] - 1\nn1 = n0 / allvote\nn2 = 1 / (4 * nmlist[1])\nif n1 > n2:\n print("Yes")\nelse:\n print("No")\n', 'nmlist = list(map(int, input().split()))\nsvote = list(map(int, input().split()))\nallvote = sum(svote)\nmaxvote = max(svote)\nsvote.sort(reverse=True)\nn0 = nmlist[1] - 1\nn1 = svote[n0] / allvote\nn2 = 1 / (4 * nmlist[1])\nif n1 >= n2:\n print("Yes")\nelse:\n print("No")\n']
|
['Wrong Answer', 'Accepted']
|
['s492865391', 's330984926']
|
[2940.0, 3060.0]
|
[18.0, 17.0]
|
[237, 270]
|
p02718
|
u402342597
| 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())\nnum_point = [int(x) for x in input().split()]\ncount = 0\n\nprint(sum(num_point))\nfor n in num_point:\n n > (sum(num_point)/(4*m))\n count += 1\n\nif count >= m:\n print("Yes")\nelse:\n print("No")\n', 'n, m = (int(x) for x in input().split())\nnum_point = [int(x) for x in input().split()]\ncount = 0\n\nfor n in num_point:\n n > sum(num_point) * 1 / (4 * m)\n count += 1\n print(n)\n\nif count >= m:\n print("Yes")\nelse:\n print("No")\n', 'n, m = (int(x) for x in input().split())\nnum_point = [int(x) for x in input().split()]\ncount = 0\n \nfor n in num_point:\n if n >= (sum(num_point) / (4 * m)):\n count += 1\n \nif count >= m:\n print("Yes")\nelse:\n print("No")']
|
['Wrong Answer', 'Wrong Answer', 'Accepted']
|
['s003392120', 's905510412', 's038908569']
|
[2940.0, 3060.0, 3060.0]
|
[17.0, 17.0, 18.0]
|
[241, 238, 233]
|
p02718
|
u404789658
| 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\nsum = 0\nfor i in range(len(a)):\n sum += a[i]\n\nmin_hyou = 1/(4*m) * sum\ncount = 0\nfor i in range(len(a)):\n if min_hyou < a[i]:\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()))\n\nsum = 0\nfor i in range(len(a)):\n sum += a[i]\n\nmin_hyou = int(1/(4*m) * sum)\nprint(min_hyou)\n\ncount = 0\nfor i in range(len(a)):\n if min_hyou < a[i]:\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()))\n\nsum = 0\nfor i in range(len(a)):\n sum += a[i]\n\nmin_hyou = sum/(4*m)\n\ncount = 0\nfor i in range(len(a)):\n if min_hyou <= a[i]:\n count+=1\nif count>=m:\n print("Yes")\nelse:\n print("No")']
|
['Wrong Answer', 'Wrong Answer', 'Accepted']
|
['s273328758', 's864685689', 's609540519']
|
[3064.0, 3064.0, 3064.0]
|
[17.0, 17.0, 18.0]
|
[267, 289, 265]
|
p02718
|
u405660020
| 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\nsou=sum(a)\nprint(sou)\nfor i in range(n):\n if a[i]>=sou/(4*m):\n cnt+=1\nprint('Yes' if cnt>=m else 'No')\n", "n,m=map(int,input().split())\na=list(map(int, input().split()))\n\ncnt=0\nsou=sum(a)\nfor i in range(n):\n if a[i]>=sou/(4*m):\n cnt+=1\nprint('Yes' if cnt>=m else 'No')\n"]
|
['Wrong Answer', 'Accepted']
|
['s667771314', 's594495872']
|
[3316.0, 2940.0]
|
[21.0, 17.0]
|
[183, 172]
|
p02718
|
u407513296
| 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_vote = 0\nx = 1 # =true\n\n\nfor i in range(N-1):\n all_vote = all_vote + A[i]\n if A[i] < (1/4)*M*all_vote:\n x = 0 # =false\n\nif x == 1:\n print("Yes")\nelse:\n print("No")\n', 'N, M = map(int, input().split())\nA = list(map(int, input().split()))\nall_vote = sum(A)\ncount = 0\n\n\nfor i in range(N):\n if A[i] >= all_vote / (4*M):\n count += 1\n\nif count < M:\n print("No")\nelse:\n print("Yes")\n\n ']
|
['Wrong Answer', 'Accepted']
|
['s900563798', 's954606059']
|
[2940.0, 3060.0]
|
[17.0, 17.0]
|
[256, 230]
|
p02718
|
u414469094
| 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, n = input().split()\na = input().split()\nsum_a = sum(a) / (4 * m)\n\nyes_num = 0\nno_num = 0\n\nok = m\nng = n - m\n\nfor i in a:\n if i < sum_a:\n no_num += 1\n else:\n yes_num += 1\n if no_num > ng:\n break\n if yes_num >= ok:\n\n exit(0)\n\nprint("No")\n', '\nn, m = input().split()\nm = int(m)\nn = int(n)\na = input().split()\nsum_a = sum(int(i) for i in a) / (4 * m)\n\nyes_num = 0\nno_num = 0\n\nok = m\nng = n - m\n\nfor i in a:\n if int(i) < sum_a:\n no_num += 1\n else:\n yes_num += 1\n if no_num > ng:\n break\n if yes_num >= ok:\n print("Yes")\n exit(0)\n\nprint("No")\n']
|
['Runtime Error', 'Accepted']
|
['s065555771', 's483303309']
|
[3060.0, 3060.0]
|
[17.0, 18.0]
|
[280, 343]
|
p02718
|
u419633921
| 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())\nlist = list(map(int, input().split()))\n\nnum = 0\n\nfor i in list:\n if i >= sum(list)/(4*M):\n num+=1\n\nprint(num)\n\nif num >= M:\n print('Yes')\nelse:\n print('No')", "N,M = map(int, input().split())\nlist = list(map(int, input().split()))\n\nnum = 0\n\nfor i in list:\n if int(i) >= sum(list)/(4*M):\n num+=1\n\nif num >= M:\n print('yes')\nelse:\n print('No')\n", "N,M = map(int, input().split())\nlist = list(map(int, input().split()))\n\nnum = 0\n\nfor i in list:\n if i >= sum(list)/(4*M):\n num+=1\n\nif num >= M:\n print('Yes')\nelse:\n print('No')"]
|
['Wrong Answer', 'Wrong Answer', 'Accepted']
|
['s712119112', 's760391030', 's509810104']
|
[3060.0, 2940.0, 2940.0]
|
[17.0, 18.0, 17.0]
|
[204, 198, 192]
|
p02718
|
u419914612
| 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().strip().split())\nlst = list(map(int, input().split()))\nlst.sort(reverse = True)\nsol = lst[:m]\nif sol[-1] < sum(lst)/(4*m):\n print("NO") \nelse:\n print("YES")', 'n, m = map(int,input().strip().split())\nlst = list(map(int, input().split()))\nsumm = 0\nfor i in lst:\n summ += i\n# print(summ)\nsol = 1/(m * 4)\n# print(sol)\nres = sol*summ\n# print(res)\nif lst[m] > res:\n print("YES")\nelse:\n print("NO")', 'n, m = map(int, input().split())\nlst = list(map(int, input().split()))\nlst.sort(reverse = True)\nsol = lst[:m]\nif sol[-1] < sum(lst)/(4*m):\n print("NO") \nelse:\n print("YES")\n', 'n, m = map(int,input().strip().split())\nlst = list(map(int, input().split()))\nsumm = sum(lst)\n# print(summ)\nsol = 1/(m * 4)\n# # print(sol)\nres = sol*summ\n# # print(res)\nif lst[m-1] >= res:\n print("YES")\nelse:\n print("NO")', 'n, m = map(int,input().strip().split())\nlst = list(map(int, input().split()))\nsumm = sum(lst)\nsol = summ/(m * 4)\ncounter = 0\nfor i in range(len(lst)):\n if lst[i] >= sol:\n counter += 1\n\nif counter >= m:\n print("YES")\nelse:\n print("NO")', 'n,m = map(int,input().split())\ns = list(map(int,input().split()))\ns.sort(reverse = True)\ns1 = s[:m]\nif(s1[-1]<sum(s)/(4*m)):\n print("No")\nelse:\n print("Yes")']
|
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
|
['s037415973', 's453029942', 's642109113', 's707862909', 's907920636', 's064107774']
|
[3060.0, 3064.0, 2940.0, 3060.0, 3060.0, 3060.0]
|
[19.0, 18.0, 18.0, 17.0, 17.0, 17.0]
|
[185, 241, 179, 227, 250, 163]
|
p02718
|
u421674761
| 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\nstd = sum(a)*1/(4*m)\nprint(std)\n\ncnt = 0\nfor i in range(n):\n if a[i] >= std:\n cnt += 1\n\n\n\nif cnt >= m:\n print('Yes')\nelse:\n print('No')\n", "n,m = map(int,input().split())\na = list(map(int,input().split()))\n\nstd = sum(a)*(1/(4*m))\n\ncnt = 0\nfor i in range(n):\n if a[i] >= std:\n cnt += 1\n\nif cnt >= m:\n print('Yes')\nelse:\n print('No')\n"]
|
['Wrong Answer', 'Accepted']
|
['s242478879', 's338334624']
|
[9068.0, 9084.0]
|
[28.0, 28.0]
|
[357, 208]
|
p02718
|
u421693050
| 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, k = map(int, input().split())\na = abs( n % k)\nb = abs( a - (n + a) % k)\nif a < b:\n print(a)\nelse:\n print(b)', 'n, m = map(int, input().split())\na = list(map(int, input().split()))\nrequiredValue = float(sum(a)) / 4 / m\ncount = 0\n\nfor x in a:\n if x >= requiredValue:\n count += 1\n\nif count >= m:\n print("Yes")\nelse:\n print("No")']
|
['Wrong Answer', 'Accepted']
|
['s060923292', 's442864576']
|
[2940.0, 3060.0]
|
[17.0, 17.0]
|
[117, 230]
|
p02718
|
u423520901
| 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()]\nl = [int(x) for x in input().split()]\nk = []\nfor i in l:\n if(i >= sum(l)/(4*m)):\n k.append(i)\nif(len(k) < m):\n print("No")\nelse:\nprint("Yes")', 'n, m = [int(x) for x in input().split()]\nl = [int(x) for x in input().split()]\nk = []\nfor i in l:\n if(i > sum(l)/(4*m))\n \tk.append(i)\nif(len(k) < m):\n print("No")\nelse:\n print("Yes")', 'n, m = [int(x) for x in input().split()]\nl = [int(x) for x in input().split()]\nk = []\nfor i in l:\n if(i >= sum(l)/(4*m)):\n k.append(i)\nif(len(k) < m):\n print("No")\nelse:\n print("Yes")']
|
['Runtime Error', 'Runtime Error', 'Accepted']
|
['s181236258', 's845275334', 's211272123']
|
[2940.0, 2940.0, 3060.0]
|
[17.0, 17.0, 18.0]
|
[187, 186, 189]
|
p02718
|
u425236751
| 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()\nA = [int(i) for i in input().split()]\nA.sorted(reverse=True)\nans="Yes"\nth = sum(A)/(4*M)\nprint(type(th))\nfor i in range(M):\n if A[M-1-i] < th:\n ans="No"\n break\nprint(ans) ', 'N,M =input().split()\nA = list(map(int, input().split()))\nA.sort(reverse=True)\nans="Yes"\n\nth = sum(A)/(4*int(M))\nfor i in range(int(M)):\n if A[int(M)-1-i] < th:\n ans="No"\n break\nprint(ans) ']
|
['Runtime Error', 'Accepted']
|
['s308323902', 's581187551']
|
[3060.0, 3064.0]
|
[18.0, 18.0]
|
[200, 196]
|
p02718
|
u425762225
| 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)\n\ns = sum(a)\n\nif a[M-1] / s >= 1/4M:\n print("Yes")\nelse:\n print("No")\n \nreturn', 'N,M = map(int,input().split())\na = sorted(list(map(int,input().split())),reverse=True)\n\ns = sum(a)\n\nif a[M-1] >= s/4M:\n print("Yes")\nelse:\n print("No")\n \nreturn', 'N,M = map(int,input().split())\na = sorted(list(map(int,input().split())),reverse=True)\na\ns = sum(a)\n\nif a[M-1] >= s/(4*M):\n print("Yes")\nelse:\n print("No")']
|
['Runtime Error', 'Runtime Error', 'Accepted']
|
['s450274986', 's543576649', 's893027190']
|
[2940.0, 2940.0, 3060.0]
|
[17.0, 17.0, 17.0]
|
[167, 163, 157]
|
p02718
|
u428416104
| 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 = list(map(int, input().split()))\na = list(map(int, input().split()))\nSum=0\nflag=0\n\nfor i in range(len(a)):\n Sum+=a[i]\n\na.sort(reverse=True)\n\nfor i in range(nm[1]):\n if a[i]<sum/(4*nm[1]):\n flag=1\n break\n\nif flag==1:\n print(No)\nelse:\n print(Yes)\n', "nm = list(map(int, input().split()))\na = list(map(int, input().split()))\nSum=0\nflag=0\n\nfor i in range(len(a)):\n Sum+=a[i]\n\na.sort(reverse=True)\n\nfor i in range(nm[1]):\n if a[i]<Sum/(4*nm[1]):\n flag=1\n break\n\nif flag==1:\n print('No')\nelse:\n print('Yes')\n"]
|
['Runtime Error', 'Accepted']
|
['s528604745', 's055396912']
|
[3060.0, 3060.0]
|
[17.0, 17.0]
|
[275, 279]
|
p02718
|
u430336181
| 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\njudge = sum(A) / (4 * M)\n\nL = [i for i in A if i >= judge]\nprint(L)\n\n\nif len(L) >= M:\n print("Yes")\nelse:\n print("No")', 'N, M = map(int, input().split())\nA = list(map(int, input().split()))\njudge = sum(A) / (4 * M)\n\nL = [i for i in A if i >= judge]\n\nif len(L) >= M:\n print("Yes")\nelse:\n print("No")']
|
['Wrong Answer', 'Accepted']
|
['s349140756', 's500196420']
|
[3060.0, 3060.0]
|
[17.0, 17.0]
|
[194, 183]
|
p02718
|
u434191418
| 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())\nvote_list = [int(i) for i in input().split()]\nvote_list.sort(reverse=True)\n\nMth_got_vote = vote_list[M - 1]\nprint(Mth_got_vote)\nif Mth_got_vote < sum(vote_list) / (4 * M):\n print("No")\nelse:\n print("Yes")', 'N,M = map(int, input().split())\nvote_list = [int(i) for i in input().split()]\nvote_list.sort(reverse=True)\n\nMth_got_vote = vote_list[M - 1]\n\nif Mth_got_vote < sum(vote_list) / (4 * M):\n print("No")\nelse:\n print("Yes")']
|
['Wrong Answer', 'Accepted']
|
['s507721661', 's844629297']
|
[9000.0, 9172.0]
|
[27.0, 26.0]
|
[242, 223]
|
p02718
|
u434296044
| 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=map(int,input().split())\n str=list(map(int,input().split()))\n cal=sum(str)/(4*M)\n print(sorted(str, reverse=True))\n\n\n for i in range(M):\n if str[i]<cal:\n print("No")\n return\n\n print("Yes")\n return\n\nmain()\n', 'def main():\n N,M=map(int,input().split())\n str=list(map(int,input().split()))\n cal=sum(str)\n str.sort(reverse=True)\n\n for i in range(M):\n if str[i]<cal*(1/(4*M)):\n print("No")\n return\n\n print("Yes")\n return\n\nmain()\n']
|
['Wrong Answer', 'Accepted']
|
['s005721086', 's404166935']
|
[3060.0, 3060.0]
|
[17.0, 19.0]
|
[272, 265]
|
p02718
|
u437351386
| 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(" ")))\nn=a[0]\nm=a[1]\ntouhyou=list(map(int,input().split(" ")))\ns=flaot(sum(touhyou)/4/m)\nlist=[]\nfor i in touhyou:\n if i>=s:\n list.append(i)\nif len(list)>=m:\n print("Yes")\nelse:\n print("No" )\na=list(map(int,input().split(" ")))\nn=a[0]\nm=a[1]\ntouhyou=list(map(int,input().split(" ")))\ns=flaot(sum(touhyou)/4/m)\nlist=[]\nfor i in touhyou:\n if i>=s:\n list.append(i)\nif len(list)>=m:\n print("Yes")\nelse:\n print("No" )\n', 'a=list(map(int,input().split()))\nn=a[0]\nm=a[1]\ntouhyou=list(map(int,input().split()))\ns=float(sum(touhyou)/4/m)\nlist=[]\nfor i in touhyou:\n if i>=s:\n list.append(i)\nif len(list)>=m:\n print("Yes")\nelse:\n print("No" )\n']
|
['Runtime Error', 'Accepted']
|
['s770700377', 's097496938']
|
[3064.0, 3060.0]
|
[17.0, 18.0]
|
[454, 221]
|
p02718
|
u439063038
| 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\nsum_a = sum(a)\na = a.sort()\ncnt = 0\nfor i in a:\n if i >= 1 / (4*sum_a):\n cnt += 1\nif cnt >= M:\n print('Yes')\nelse:\n print('No')", "n, m = map(int, input().split())\na = list(map(int, input().split()))\n\nsum_a = sum(a)\na = sorted(a)\n\ncnt = 0\nfor i in a:\n if i >= sum_a / (4*m):\n cnt += 1\nif cnt >= m:\n print('Yes')\nelse:\n print('No')"]
|
['Runtime Error', 'Accepted']
|
['s919405072', 's895575228']
|
[9120.0, 9012.0]
|
[25.0, 31.0]
|
[213, 215]
|
p02718
|
u442068463
| 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())\nList = list(map(int, input().split()))\nc = sum(List)\nList = sorted(List)[::-1]\nd = List(b-1)\nif d < c/4/b;\n\tprint("No")\nelif\n\tprint("Yes")', 'a,b = map(int, input().split())\nList = list(map(int, input().split()))\nc = sum(List)\nList = sorted(List)[::-1]\nd = List(b-1)\nif d < c/4/b:\n\tprint("No")\nelse:\n\tprint("Yes")', 'a,b = map(int, input().split())\nList = list(map(int, input().split()))\nc = sum(List)\nList = sorted(List)[::-1]\nd = List[b-1]\nif d < c/4/b:\n\tprint("No")\nelse:\n\tprint("Yes")']
|
['Runtime Error', 'Runtime Error', 'Accepted']
|
['s043485148', 's799172081', 's891243461']
|
[2940.0, 3060.0, 3060.0]
|
[17.0, 17.0, 17.0]
|
[170, 171, 171]
|
p02718
|
u444722572
| 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\n\nA=list(map(int,input().split()))\nSum=sum(A)\npop=[]\nl=Sum/(4*M)\nfor i in range(N):\n if(A[i]>l):\n pop.append(A[i])\n \nprint("Yes" if len(pop)==M else "No")', 'N,M=map(int,input().split())\n\n\nA=list(map(int,input().split()))\nSum=sum(A)\npop=[]\nl=Sum/(4*M)\nfor i in range(N):\n if(A[i]>=l):\n pop.append(A[i])\n \nprint("Yes" if len(pop)==M else "No")', 'N,M=map(int,input().split())\n\n\nA=list(map(int,input().split()))\nSum=sum(A)\npop=[]\nl=Sum/(4*M)\nfor i in range(N):\n if(A[i]>=l):\n pop.append(A[i])\n \nprint("Yes" if len(pop)>=M else "No")']
|
['Wrong Answer', 'Wrong Answer', 'Accepted']
|
['s247447469', 's465369901', 's538081179']
|
[3060.0, 3060.0, 3060.0]
|
[17.0, 17.0, 17.0]
|
[200, 201, 201]
|
p02718
|
u446460730
| 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_list = list(map(int, input().split()))\na_list.sort(reverse=True)\n\ntotal_votes = sum(a_list)\n\nprint(a_list[m-1])\n\nif a_list[m-1] < total_votes / (4 * m):\n print('Yes')\nelse:\n print('No')", "n, m = map(int, input().split())\n\na_list = list(map(int, input().split()))\na_list.sort(reverse=True)\n\ntotal_votes = sum(a_list)\n\nprint(a_list[m-1])\n\nif a_list[m-1] < total_votes / (4 * m):\n print('No')\nelse:\n print('Yes')", "n, m = map(int, input().split())\n\na_list = list(map(int, input().split()))\na_list.sort(reverse=True)\n\ntotal_votes = sum(a_list)\n\nif a_list[m-1] < total_votes / (4 * m):\n print('No')\nelse:\n print('Yes')"]
|
['Wrong Answer', 'Wrong Answer', 'Accepted']
|
['s294577415', 's668980240', 's942612789']
|
[3060.0, 3060.0, 3060.0]
|
[17.0, 18.0, 17.0]
|
[227, 227, 207]
|
p02718
|
u457290011
| 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 = int(input())\nm = int(input())\na = list(map(int,input().split()))\nsum = sum(a)\ncount = 0\n\nfor i in range(len(a)):\n if a[i] >= sum/(4*m):\n count += 1\n\nif count == m:\n print("Yes")\nelse:\n print("No")', 't = list(map(int,input().split()))\na = list(map(int,input().split()))\ns = sum(a)\ncount = 0\n\nfor i in range(t[0]):\n if a[i] >= s/(4 * t[1]):\n count += 1\n\nif count >= t[1]:\n print("Yes")\nelse:\n print("No")']
|
['Runtime Error', 'Accepted']
|
['s008629295', 's417248716']
|
[3060.0, 3064.0]
|
[17.0, 17.0]
|
[216, 219]
|
p02718
|
u459150945
| 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 = 'Yes'\nA.sort(reverse=True)\nprint(A)\nfor i in range(M):\n if A[i] < sum(A)/(4*M):\n ans = 'No'\n break\nprint(ans)\n", "N, M = map(int, input().split())\nA = list(map(int, input().split()))\nans = 'Yes'\nA.sort(reverse=True)\nfor i in range(M):\n if A[i] < sum(A)/(4*M):\n ans = 'No'\n break\nprint(ans)\n"]
|
['Wrong Answer', 'Accepted']
|
['s969015161', 's967552051']
|
[3060.0, 2940.0]
|
[17.0, 17.0]
|
[202, 193]
|
p02718
|
u459419927
| 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\nN,M=list(map(int,(stdin.readline().strip().split())))\nA=list(map(int,(stdin.readline().strip().split())))\nhyou=int(sum(A)/(4*M))\ncount=0\nfor i in range(N):\n if A[i]>hyou:count+=1\nif count>=M:print("yes")\nelse:print("no")', 'from sys import stdin\nN,M=list(map(int,(stdin.readline().strip().split())))\nA=list(map(int,(stdin.readline().strip().split())))\nhyou=sum(A)/(4*M)\ncount=0\nfor i in range(N):\n if (A[i])<hyou:continue\n count+=1\nif count>=M:print("yes")\nelse:print("no")', 'from sys import stdin\nN,M=list(map(int,(stdin.readline().strip().split())))\nA=list(map(int,(stdin.readline().strip().split())))\nhyou=sum(A)/(4*M)\ncount=0\nfor i in range(N):\n if float(A[i])>=hyou:count+=1\nif count>=M:print("yes")\nelse:print("no")', 'from sys import stdin\nN,M=list(map(int,(stdin.readline().strip().split())))\nA=list(map(int,(stdin.readline().strip().split())))\nhyou=int(sum(A)/(4*M))\ncount=0\nfor i in range(N):\n if A[i]>=hyou:count+=1\nif count==M:print("yes")\nelse:print("no")', 'from sys import stdin\nN,M=list(map(int,(stdin.readline().strip().split())))\nA=list(map(int,(stdin.readline().strip().split())))\nhyou=int(sum(A)/(4*M))\ncount=0\nfor i in range(N):\n if A[i]<hyou:count=count\n else:count+=1\nif count>=M:print("yes")\nelse:print("no")', 'from sys import stdin\nN,M=list(map(int,(stdin.readline().strip().split())))\nA=list(map(int,(stdin.readline().strip().split())))\nhyou=int(sum(A)/(4*M))\ncount=0\nfor i in range(N):\n if A[i]>hyou:count+=1\nif count>=M:print("yes")\nelse:print("no")', 'from sys import stdin\nN,M=list(map(int,(stdin.readline().strip().split())))\nA=list(map(int,(stdin.readline().strip().split())))\nhyou=sum(A)/(4*M)\ncount=0\nfor i in range(N):\n if A[i]>=hyou:count+=1\nif count>=M:print("yes")\nelse:print("no")', 'from sys import stdin\nN,M=list(map(int,(stdin.readline().strip().split())))\nA=list(map(int,(stdin.readline().strip().split())))\nhyou=sum(A)/(4*M)\ncount=0\nfor i in range(N):\n if A[i]>=hyou:count+=1\nif count>=M:print("yes")\nelse:print("no")', 'from sys import stdin\nN,M=list(map(int,(stdin.readline().strip().split())))\nA=list(map(int,(stdin.readline().strip().split())))\nhyou=sum(A)/(4*M)\ncount=0\nfor i in range(N):\n if float(A[i])>=hyou:count+=1\nif count>=M:print("yes")\nelse:print("no")', 'from sys import stdin\nN,M=list(map(int,(stdin.readline().strip().split())))\nA=list(map(int,(stdin.readline().strip().split())))\nhyou=(sum(A)/(4*M))\ncount=0\nfor i in range(N):\n if (A[i])<hyou:continue\n count+=1\nif count>=M:print("Yes")\nelse:print("No")']
|
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
|
['s161821090', 's319474368', 's333458391', 's487299875', 's509959235', 's521531695', 's582917625', 's769986463', 's980338237', 's950127477']
|
[3192.0, 3064.0, 3064.0, 3064.0, 3060.0, 3064.0, 3060.0, 3060.0, 3064.0, 3064.0]
|
[17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 18.0, 17.0, 18.0, 18.0]
|
[245, 255, 248, 246, 266, 245, 241, 241, 248, 257]
|
p02718
|
u460009487
| 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.sort(reverse=True)\n\nvote = sum(a)\n\nif a[m-1] => vote*1/(4*m):\n print('Yes')\nelse:\n print('No')\n", "n, m = map(int, input().split())\na = list(map(int, input().split()))\n\na.sort(reverse=True)\n\nvote = sum(a)\n\nif a[m-1] >= vote*1/(4*m):\n print('Yes')\nelse:\n print('No')\n"]
|
['Runtime Error', 'Accepted']
|
['s500574629', 's348152733']
|
[2940.0, 2940.0]
|
[17.0, 17.0]
|
[169, 169]
|
p02718
|
u465652095
| 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())\nlist = [int(i) for i input().split()]\n\ntotal = 0\nfor i in range(N):\n if i >= sum(list) / (4 * M):\n total = total + 1\n\nif total >= M:\n print("Yes")\nelse:\n print(\'No\')', 'N,M = map(int,input().split())\nlist = [int(i) for i input().split()]\n\ntotal = 0\nfor i in range(N):\n if i >= (sum(list) / (4 * M)):\n total = total + 1\n\nif total >= M:\n print("Yes")\nelse:\n print(\'No\')', 'N,M = map(int,input().split())\nlist = [int(i) for i input().split()]\n\ntotal = 0\nfor i in range(N):\n if i >= (sum(list) / (4 * M)):\n total = total + 1\n\nif total >= M:\n print("Yes")\nelse:\n print(\'No\')', 'N,M = map(int,input().split())\nA = list(map(int,input().split()))\n\ntotal = 0\nfor i in A:\n if i >= (sum(A) / (4 * M)):\n total = total + 1\n\nif total >= M:\n print("Yes")\nelse:\n print(\'No\')']
|
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
|
['s239385688', 's524563229', 's561320739', 's893573845']
|
[8928.0, 8872.0, 8952.0, 9128.0]
|
[24.0, 23.0, 20.0, 20.0]
|
[212, 214, 214, 201]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.