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
p02785
u035445296
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,K = map(int, input().split())\nH = list(map(int, input().split()))\nH.sort(reverse=True)\nprint(sum(H)-sum([i for i in range(K)]))', 'N,K = map(int, input().split())\nH = list(map(int, input().split()))\nH.sort(reverse=True)\nprint(sum(H[K:]))']
['Wrong Answer', 'Accepted']
['s978935817', 's955455403']
[26024.0, 26024.0]
[157.0, 149.0]
[129, 106]
p02785
u049979154
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\nh = list(map(int, input().split()))\n\nh.reverse\n\nh = h[k:]\n\nprint(sum(h))', 'n, k = map(int, input().split())\nh = list(map(int, input().split()))\n\nh.sort(reverse=True)\n\nh = h[k:]\n\nprint(sum(h))']
['Wrong Answer', 'Accepted']
['s669364768', 's260887577']
[26016.0, 26180.0]
[70.0, 149.0]
[105, 116]
p02785
u053909865
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['import numpy as np\n\nN, K = map(int, input().split())\nli = list(map(int,input().split()))\nlist.sort(li, reverse = True)\n\n\na = list(np.zeros(K))\nif N - K>=0:\n b = list(np.ones(N-K))\n a.extend(b)\nelse:\n a = list(np.zeros(N))\n\nprint(np.dot(a, li))', 'import numpy as np\n\nN, K = map(int, input().split())\nli = list(map(int,input().split()))\nlist.sort(li, reverse = True)\n\n\na = list(np.zeros(K))\nif N - K>0:\n b = list(np.ones(N-K))\n a.extend(b)\nelse:\n a = list(np.zeros(N))\n\nprint(np.dot(a, li))', 'import numpy as np\n\nN, K = map(int, input().split())\nli = list(map(int,input().split()))\nlist.sort(li, reverse = True)\n\n\na = list(np.zeros(K))\nif N - K>=0:\n b = list(np.ones(N-K))\n a.extend(b)\nelse:\n a = list(np.zeros(N))\n\nprint(int(np.dot(a, li)))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s109530204', 's935349720', 's119354783']
[36436.0, 36368.0, 36368.0]
[385.0, 397.0, 410.0]
[266, 265, 271]
p02785
u054274920
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['A,B=map(int,input().split())\nC=list(map(int,input().split()))\nC.sort(reverse=True)\nsum(C[B:])', 'A,B=map(int,input().split())\nC=list(map(int,input().split()))\nC.sort(reverse=True)\nprint(sum(C[B:]))']
['Wrong Answer', 'Accepted']
['s255315531', 's962167210']
[26764.0, 26024.0]
[150.0, 149.0]
[93, 100]
p02785
u057996804
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['h, k = map(int, input().split())\nlis = list(map(int, input().split()))\nif n >= k:\n lis.sort(reverse=True)\n lis = lis[k:]\nelse:\n lis = []\n \nprint(sum(lis))', 'h, k = map(int, input().split())\nlis = list(map(int, input().split()))\nif h >= k:\n lis.sort(reverse=True)\n lis = lis[k:]\nelse:\n lis = []\n \nprint(sum(lis))']
['Runtime Error', 'Accepted']
['s287454593', 's939863134']
[26764.0, 26024.0]
[69.0, 151.0]
[166, 166]
p02785
u065774356
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N=list(map(int,input().split()))\nH=list(map(int,input().split()))\ncount=0\nH=sorted(H,reverse=True)\nif N[1]>=len(H):\n print(len(H))\nelse:\n while N[1]>=1:\n del(H[0])\n N[1]-=1\n count+=1\n print(count+sum(H))\n ', 'N=list(map(int,input().split()))\nH=list(map(int,input().split()))\nH=sorted(H,reverse=True)\nif N[1]>=len(H):\n print(0)\nelse:\n del(H[0:N[1]])\n print(sum(H))\n ']
['Wrong Answer', 'Accepted']
['s999527576', 's157319818']
[26180.0, 26180.0]
[2104.0, 147.0]
[242, 172]
p02785
u067986264
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\nh = list(map(int, input().split()))\nif h == 0:\n print(sum(h))\nelif h >= n:\n print(0)\nelse:\n h.sort()\n print(sum(h[:n-k]))\n', 'n, k = map(int, input().split())\nh = list(map(int, input().split()))\nif k == 0:\n print(sum(h))\nelif k >= n:\n print(0)\nelse:\n h.sort()\n print(sum(h[:n-k]))\n']
['Runtime Error', 'Accepted']
['s879792486', 's039383093']
[26024.0, 26764.0]
[69.0, 152.0]
[159, 159]
p02785
u072606168
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k = map(int, input().split())\nh = list(map(int, input().split()))\nh.sort(reverse=True)\nk = min(k,len(h))\nprint(h)\ndel h[:k]\nprint(h)\nprint(sum(h))', 'n,k = map(int, input().split())\nh = list(map(int, input().split()))\nh.sort()\nk = min(k,len(h))\ndel h[:k]\nprint(sum(h))', 'n,k = map(int, input().split())\nh = list(map(int, input().split()))\nh.sort(reverse=True)\nk = min(k,len(h))\ndel h[:k]\nprint(sum(h))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s197709470', 's485674587', 's072752595']
[26180.0, 26180.0, 26764.0]
[189.0, 148.0, 148.0]
[148, 118, 130]
p02785
u078181689
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k = map(int,input().split())\narr = list(map(int,input().split()))\n\narr = sorted(arr)\narr[:min(n,k)] = [0]*min(n,k)\n\nprint(sum(arr)) ', 'n,k = map(int,input().split())\narr = list(map(int,input().split()))\n\narr = sorted(arr,reverse=True)\narr[:min(n,k)] = [0]*min(n,k)\n\nprint(sum(arr))']
['Wrong Answer', 'Accepted']
['s706572983', 's171936224']
[25768.0, 26024.0]
[150.0, 147.0]
[134, 146]
p02785
u082748852
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
["#!/user/bin/env python\n\n\n# -*- coding: utf-8 -*-\n\n\n__author_ = 'Maruta Yuzuha'\n__version_ = '1.0.0'\n__date__ = '2019/12/25'\n\ndef main():\n \n s = list(map(int, input().split()))\n t = list(map(int, input().split()))\n\n a = 0 \n b = s[0]\n d = s[1]\n f = 0\n for j in range(d): \n c = sum(t)\n if c != 0:\n g = max(t)\n for i in range(b):\n if g == t[i]:\n t[i] = 0\n t[f] = 0\n f = 0\n else:\n break\n a += sum(t)\n print(a)\n return 0\n\nif __name__ == '__main__':\n \n \n\n \n \n import doctest\n doctest.testmod()\n\n \n import sys\n sys.exit(main())", "#!/user/bin/env python\n\n\n# -*- coding: utf-8 -*-\n\n\n__author_ = 'Maruta Yuzuha'\n__version_ = '1.0.0'\n__date__ = '2019/12/25'\n\ndef main():\n \n s = list(map(int, input().split()))\n t = list(map(int, input().split()))\n\n a = 0 \n b = s[0]\n d = s[1]\n f = 0\n for j in range(d): \n c = sum(t)\n if c != 0:\n g = max(t)\n for i in range(b):\n if g == t[i]:\n t[i] = 0\n break\n t[f] = 0\n f = 0\n else:\n break\n a += sum(t)\n print(a)\n return 0\n\nif __name__ == '__main__':\n \n \n\n \n \n import doctest\n doctest.testmod()\n\n \n import sys\n sys.exit(main())", "#!/user/bin/env python\n\n\n# -*- coding: utf-8 -*-\n\n\n__author_ = 'Maruta Yuzuha'\n__version_ = '1.0.0'\n__date__ = '2019/12/25'\n\ndef main():\n \n s = list(map(int, input().split()))\n t = list(map(int, input().split()))\n\n a = 0 \n b = s[0]\n d = s[1]\n f = 0\n for j in range(d): \n c = sum(t)\n if c != 0:\n g = max(t)\n for i in range(b):\n if g == t[i]:\n t[i] = 0\n t[f] = 0\n f = 0\n else:\n break\n a += sum(t)\n print(a)\n return 0\n\nif __name__ == '__main__':\n \n \n\n \n \n import doctest\n doctest.testmod()\n\n \n import sys\n sys.exit(main())", "#!/user/bin/env python\n\n# -*- coding: utf-8 -*-\n\ndef main():\n \n s = list(map(int, input().split()))\n t = list(map(int, input().split()))\n\n a = 0 \n b = s[0]\n d = s[1]\n f = 0\n for j in range(d): \n c = sum(t)\n if c != 0:\n g = max(t)\n for i in range(b):\n if g == t[i]:\n t[i] = 0\n break\n t[f] = 0\n f = 0\n else:\n break\n a += sum(t)\n print(a)\n return 0\n\nif __name__ == '__main__':\n\n \n import sys\n sys.exit(main())", "#!/user/bin/env python\n\n\n# -*- coding: utf-8 -*-\n\ndef main():\n \n s = list(map(int, input().split()))\n t = list(map(int, input().split()))\n t.sort(reverse=True)\n a = 0 \n b = s[0]\n d = s[1]\n f = 0\n c = sum(t)\n for i in range(d):\n if c != 0:\n c -= t[i]\n t[i] = 0\n else:\n break\n a += sum(t)\n print(a)\n return 0\n\nif __name__ == '__main__':\n\n \n import sys\n sys.exit(main())"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s149100187', 's154175954', 's188531844', 's349618348', 's441578632']
[29684.0, 29680.0, 29652.0, 26016.0, 26016.0]
[2105.0, 2108.0, 2105.0, 2104.0, 172.0]
[1665, 1691, 1665, 858, 778]
p02785
u084327817
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\na = list(map(int, input().split()))\n\na.sort()\n\ncounter = 0\nif K > len(a):\n counter = 0\nelse:\n print(a)\n for _ in range(K):\n a.pop(-1)\n counter = sum(a)\nprint(counter)', 'N, K = map(int, input().split())\na = list(map(int, input().split()))\n\na.sort()\n\ncounter = 0\nif K >= len(a):\n counter = 0\nelse:\n for _ in range(K):\n a.pop(-1)\n counter = sum(a)\nprint(counter)']
['Wrong Answer', 'Accepted']
['s635427065', 's788352342']
[25768.0, 26180.0]
[206.0, 170.0]
[208, 198]
p02785
u086127549
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = list(map(int, input().rstrip().split()))\nh = list(map(int, input().rstrip().split()))\nh.sort()\nprint(sum(h[:min(0, n-k)]))', 'n, k = list(map(int, input().rstrip().split()))\nh = list(map(int, input().rstrip().split()))\nh.sort()\nprint(sum(h[:max(0, n-k)]))\n']
['Wrong Answer', 'Accepted']
['s831125796', 's296040287']
[26152.0, 26180.0]
[151.0, 153.0]
[129, 130]
p02785
u089230684
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['inputs = input().split(" ")\n\nmonsters_num, special_moves = int(inputs[0]), int(inputs[1])\n\nhealth_inp = input().split(" ")\nprint(health_inp)\nmonsters_health = [int(h) for h in health_inp]\nprint(monsters_health)\nmonsters_health.sort(reverse=True)\nprint(sum(monsters_health[special_moves:]))', 'N,K = map(int,input().split())\nH=[int(i) for i in input().split()]\n \nif K>=N:\n print(0)\nelse:\n I = sorted(H)\n x = 0\n for i in range(N-K):\n x += I[i]\n print(x)']
['Wrong Answer', 'Accepted']
['s446877032', 's703705980']
[38948.0, 26180.0]
[197.0, 178.0]
[289, 166]
p02785
u091852005
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\nh = list(map(int, input().split()))\n\nh.sort()\nif k:\n print(sum(h[:-k]))\nelse\n print(sum(h))', 'n, k = map(int, input().split())\nh = list(map(int, input().split()))\n\nh.sort()\n\nif k:\n print(sum(h[:-k]))\nelse:\n print(sum(h))']
['Runtime Error', 'Accepted']
['s584298307', 's751780787']
[2940.0, 26180.0]
[17.0, 153.0]
[130, 132]
p02785
u094999522
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['print(~-(1<<len(bin(int(input()))[2:])))', '#!/usr/bin/env python3\nn, k, *h = map(int, open(0).read().split())\nprint(sum(sorted(h)[-k-1::-1]))\n']
['Runtime Error', 'Accepted']
['s650719734', 's388485146']
[3060.0, 31664.0]
[18.0, 104.0]
[40, 99]
p02785
u098510720
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = (int(z) for z in input().split())\na = [int(z) for z in input().split()]\na.sort()\nsm = 0\nfor i in range(k,n):\n sm += a[i]\nprint(sm)', 'n, k = (int(z) for z in input().split())\na = [int(z) for z in input().split()]\na.sort()\nsm = 0\nfor i in range(n - k):\n sm += a[i]\nprint(sm)']
['Wrong Answer', 'Accepted']
['s401158603', 's390293185']
[26764.0, 25768.0]
[177.0, 183.0]
[138, 140]
p02785
u100277898
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['import math\n\nN, K = map(int,input().split())\nH = list(map(int,input().split()))\n\nif N <= K:\n print(0)\nelif K == 0:\n print(sum(H))\nelse:\n H.sort()\n h = H[:-K]\n print(h)\n print(sum(h))\n', 'import math\n\nN, K = map(int,input().split())\nH = list(map(int,input().split()))\n\nif N <= K:\n print(0)\nelif K == 0:\n print(sum(H))\nelse:\n H.sort()\n h = H[:-K]\n print(sum(h))\n']
['Wrong Answer', 'Accepted']
['s943829499', 's485262981']
[27300.0, 27300.0]
[172.0, 156.0]
[189, 178]
p02785
u103902792
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k = map(int,input().split())\nhs = list(map(int,input().split()))\n\nhs.sort()\n\nprint(sum(hs[:-3]))', 'n,k = map(int,input().split())\nk = min(n,k)\nhs = list(map(int,input().split()))\n\nhs.sort()\n\nprint(sum(hs[:len(hs)-k]))\n\n']
['Wrong Answer', 'Accepted']
['s672114463', 's095301039']
[26024.0, 26764.0]
[153.0, 151.0]
[98, 120]
p02785
u103915901
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\na=sorted(list(map(int,input().split())),reverse=True)\nprint(sum(a[k:-1]))\n', 'n,k=map(int,input().split())\na=sorted(list(map(int,input().split())),reverse=True)\nprint(sum(a[k:-1]))\n', 'n,k=map(int,input().split())\na=sorted(list(map(int,input().split())),reverse=True)\nprint(sum(a[k:]))\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s119511328', 's894315565', 's850880945']
[26024.0, 25768.0, 26764.0]
[157.0, 151.0, 153.0]
[103, 103, 101]
p02785
u104005543
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\nH = list(map(int, input().split()))\nsH = sorted(H, reverse=True)\nans = sum(sH[k:n-1:])\nprint(ans)', 'H, n = map(int, input().split())\nList = [[0 for i in range(4)] for j in range(n)]\nfor i in range(n):\n a, b = map(int, input().split())\n List[i][0] = b / a\n List[i][1] = b / H\n List[i][2] = a\n List[i][3] = b\n\ndef recal():\n for i in range(n):\n b = List[i][3]\n List[i][1] = b / H\n\nsList = sorted(List)\nMP = 0\nk = 0\nwhile H > 0:\n if sList[k][2] <= H:\n H -= sList[k][2]\n MP += sList[k][3]\n recal()\n else:\n if sList[k + 1][2] <= H:\n if sList[k][1] <= sList[k + 1][0]:\n H -= sList[k][2]\n MP += sList[k][3]\n recal()\n break\n else:\n H -= sList[k + 1][2]\n MP += sList[k + 1][3]\n recal()\n k += 1\n else:\n if sList[k][1] <= sList[k + 1][1]:\n H -= sList[k][2]\n MP += sList[k][3]\n recal()\n break\n else:\n H -= sList[k + 1][2]\n MP += sList[k + 1][3]\n recal()\n k += 1\nprint(MP)', 'n, k = map(int, input().split())\nH = list(map(int, input().split()))\nsH = sorted(H, reverse=True)\nans = sum(sH[k-1:n-1:])\nprint(ans)', 'n, k = map(int, input().split())\nH = list(map(int, input().split()))\nsH = sorted(H, reverse=True)\nans = sum(sH[k::])\nprint(ans)']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s253371416', 's628812671', 's984498017', 's344586673']
[25768.0, 43208.0, 26764.0, 26180.0]
[160.0, 202.0, 153.0, 159.0]
[130, 1115, 132, 127]
p02785
u112952458
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['import math\n\n\nN,K = map(int,input().split())\n\nK = min(N,K)\n\n\ndata = list(map(int,input().split()))\n\ndata.sort()\n\ntotal = sum( data[0:N-K] )\n\nprint(data)\nprint(total)\n\n ', 'import math\n\n\nN,K = map(int,input().split())\n\nK = min(N,K)\n\n\ndata = list(map(int,input().split()))\n\ndata.sort()\n\ntotal = sum( data[0:N-K] )\n\n\nprint(total)\n']
['Wrong Answer', 'Accepted']
['s363016464', 's202106477']
[27300.0, 27300.0]
[177.0, 152.0]
[171, 155]
p02785
u115110170
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int,input().split())\nls = list(map(int,input().split()))\n\nls = sorted(ls)\n\nif len(ls)<3:\n print(0)\nelse:\n print(sum(ls[:-2]))', 'n, k = map(int,input().split())\nls = list(map(int,input().split()))\n\nls = sorted(ls)\n\n\nif len(ls)<k+1:\n print(0)\nelse:\n print(sum(ls[:-k]) if k>0 else sum(ls))\n\n']
['Wrong Answer', 'Accepted']
['s253959263', 's299368013']
[26180.0, 26180.0]
[158.0, 150.0]
[138, 163]
p02785
u116038906
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['A,B,X = map(int, input().split())\n\nimport math\ndef d(N): \n return int(math.log10(N)) +1\n\n\nN_min =0\nN_max =10**9\nwhile 1<(N_max - N_min):\n N=(N_max + N_min)//2\n if A*N +B*d(N) >X:\n N_max = N\n else:\n N_min =N\nif A * N_max + B * d(N_max) <X:\n print(N_max)\nelse:\n print(N_min)', '\nN,K = (int(x) for x in input().split(" "))\nH = list(map(int, input().split()))\ntuujou_attack = 1\n\n\n\nnokori_kaisu = 0\nH_sorted = sorted(H)\nif N <= K:\n nokori_kaisu = 0\nelse:\n nokori_hissatuwaza = N -K\n \n nokori_kaisu = sum( H_sorted[:nokori_hissatuwaza] ) \n\nprint(nokori_kaisu)\n']
['Runtime Error', 'Accepted']
['s936390218', 's980774192']
[3064.0, 26024.0]
[17.0, 156.0]
[334, 614]
p02785
u116763463
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\narr = [int(j) for j in input().split()]\nif k>= n:\n\tprint(0)\nelse:\n\tarr.sort()\n\tprint(sum(arr[k:]))', 'n, k = map(int, input().split())\narr = [int(j) for j in input().split()]\nif k>= n:\n\tprint(0)\nelse:\n\tarr.sort(reverse=True)\n\tprint(sum(arr[k:]))']
['Wrong Answer', 'Accepted']
['s959839509', 's826344569']
[26764.0, 26180.0]
[156.0, 158.0]
[131, 143]
p02785
u121700322
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nH = list(map(int, input().split()))\n\n\n\n# two actions\n\n# special: make vitality 0. Fenek can use K times of specials.\n\n# print(H)\n\nif N <= K:\n print(0)\n exit()\n\n\nH.sort(reverse=True)\n# print(H)\n\n\nr_H = H[K:]\n# print(r_H)\nprint(sum(r_H))\n\nsum_H = 0\nfor hp in r_H:\n sum_H += hp\nprint(sum_H)\n\n# print(type(10**9))\n# print(type(2*10**14))', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\n\n\n\n# two actions\n\n# special: make vitality 0. Fenek can use K times of specials.\n\nH.sort(reverse=True)\n\nif N <= K:\n print(0)\n exit()\n\n\nr_H = H[K:]\n\n\nsum_H = 0\nfor hp in r_H:\n sum_H += hp\n\nprint(sum_H)\nprint(10**9)\nprint(2*10**14)', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\n\n\n\n# two actions\n\n# special: make vitality 0. Fenek can use K times of specials.\n\n# print(H)\n\nif N <= K:\n print(0)\n exit()\n\n\nH.sort(reverse=True)\n# print(H)\n\n\nr_H = H[K:]\n# print(r_H)\n# print(sum(r_H))\n\nsum_H = 0\nfor hp in r_H:\n sum_H += hp\nprint(sum_H)\n\n# print(type(10**9))\n# print(type(2*10**14))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s658774870', 's868544741', 's437147077']
[26180.0, 26764.0, 26180.0]
[167.0, 165.0, 170.0]
[469, 378, 471]
p02785
u127228093
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['monster, skill = map(int,input().split())\n\nmonster_hp = list(map(int,input().split()))\n\nmonster_hp.sort()\n\nattack_count = 0\n\nwhile(skill>0):\n skill -= 1\n monster_hp.pop(-1)\n\nfor hp in monster_hp:\n attack_count += hp\n\nprint(hp)', 'monster, skill = map(int,input().split())\n\nmonster_hp = list(map(int,input().split()))\n\nsorted_monster_hp = monster_hp.sort()\n\nattack_count = 0\n\nwhile(skill>0):\n skill -= 1\n sorted_monster_hp.pop(-1)\n\nfor hp in sorted_monster_hp:\n attack_count += hp\n\nprint(hp)', 'monster, skill = map(int,input().split())\n\nmonster_hp = list(map(int,input().split()))\n\nmonster_hp.sort()\n\nattack_count = 0\n\nwhile(skill>0):\n skill -= 1\n if len(monster_hp) > 0: \n monster_hp.pop(-1)\n print(monster_hp)\n\nfor hp in monster_hp:\n attack_count += hp\n\nprint(attack_count)', 'monster, skill = map(int,input().split())\n\nmonster_hp = list(map(int,input().split()))\n\nmonster_hp.sort()\n\nattack_count = 0\n\nwhile(skill>0):\n skill -= 1\n if len(monster_hp) > 0: \n monster_hp.pop(-1)\n \n\nfor hp in monster_hp:\n attack_count += hp\n\nprint(attack_count)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s283718308', 's294550005', 's553851488', 's015637182']
[26180.0, 26024.0, 150532.0, 26024.0]
[186.0, 148.0, 1875.0, 212.0]
[235, 269, 303, 286]
p02785
u130587994
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k = [int(x) for x in input().split()]\nh = [int(x) for x in input().split()]\nh.sort(reverse=True)\n \nif(len(h) <= k):\n\tprint("0")\nelse:\n\tprint(sum(h,k))', 'n,k = [int(x) for x in input().split()]\nh = [int(x) for x in input().split()]\nh.sort(reverse=True)\n \nif(len(h) <= k):\n\tprint("0")\nelse:\n\tprint(sum(h[k:]))']
['Wrong Answer', 'Accepted']
['s495065522', 's208954485']
[26024.0, 26180.0]
[156.0, 158.0]
[153, 155]
p02785
u135116520
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,K=map(int,input().split())\nH=list(map(int,input().split()))\nH.sort(reverse=True)\nH.remove(H[0:K])\nprint(K+sum(H[K:]))', 'N,K=map(int,input().split())\nH=list(map(int,input().split()))\nT=H.sort(reverse=True)\nT.remove(T[0:K])\nprint(K+sum(T[K:]))', 'N,K=map(int,input().split())\nH=list(map(int,input().split()))\nH.sort(reverse=True)\nfor i in range(K):\n H.remove(H[i])\nprint(K+sum(H[K::]))\n', 'N,K=map(int,input().split())\nH=list(map(int,input().split()))\nH.sort(reverse=True)\nH.remove(H[0:K])\nprint(sum(H[K:]))', 'N,K=map(int,input().split())\nH=list(map(int,input().split()))\nH.sort(reverse=True)\nfor i in range(K):\n H.remove(H[i])\nprint(sum(H[K:]))', 'N,K=map(int,input().split())\nH=list(map(int,input().split()))\nH.sort(reverse=True)\nfor i in range(K):\n H.remove(H[i])\nprint(K+sum(H[K:]))', 'N,K=map(int,input().split())\nH=list(map(int,input().split()))\nH.sort(reverse=True)\nH.remove(H[0:K])\nprint(sum(H[K:]))', 'N,K=map(int,input().split())\nH=list(map(int,input().split()))\nH.sort(reverse=True)\nprint(sum(H[K:]))']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s007028451', 's098020893', 's521813196', 's559378199', 's664219940', 's680186915', 's961380675', 's475572423']
[26180.0, 26024.0, 26764.0, 26024.0, 26764.0, 26764.0, 26024.0, 26180.0]
[157.0, 150.0, 2104.0, 155.0, 2104.0, 2104.0, 159.0, 149.0]
[119, 121, 140, 117, 136, 138, 117, 100]
p02785
u135265051
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['a = list(map(int,input().split()))\nb = list(map(int,input().split()))\n\nif len(b) <= a[1]:\n print("0")\nelif a[1]==0:\n print(sum(b))\nelse:\n del b[a[0]-1]\n b.sort(reverse=True)\n print(sum(b[(a[1]-1):len(b)]))\n print(b[a[1]:])\n', 'a = list(map(int,input().split()))\nb = list(map(int,input().split()))\n\nb.sort(reverse=True)\nfor i in range(a[1]):\n del b[0]\n print(sum(b))', 'a = list(map(int,input().split()))\nb = list(map(int,input().split()))\n\nif len(b) <= a[1]:\n print("0")\nelif a[1]==0:\n print(sum(b))\nelse:\n b.sort(reverse=True)\n print(sum(b[a[1]:]))']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s024310154', 's734167596', 's817158367']
[31520.0, 9012.0, 31616.0]
[121.0, 27.0, 107.0]
[241, 149, 192]
p02785
u151005508
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nH = list(map(int, input().split()))\n\nH=sorted(H, reverse=True)\nprint(H)\nprint(sum(H[K:]))', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\n\nH=sorted(H, reverse=True)\n\nprint(sum(H[K:]))']
['Wrong Answer', 'Accepted']
['s322621682', 's208981044']
[26024.0, 26180.0]
[174.0, 155.0]
[122, 114]
p02785
u152402277
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['import numpy\nN,K = map(int,input().split())\nH = list(map(int,input().split()))\n\nH = numpy.sort(H)\n#print(H)\n\nfor i in range(K):\n H.remove(H[N-1-i])\n\nprint(sum(H))', 'import numpy\nN,K = map(int,input().split())\nH = list(map(int,input().split()))\n\nH = numpy.sort(H)\nsum = 0\n#print(H)\nif N-K > 0:\n for i in range(N-K):\n sum = sum + H[i]\nelse:\n sum = 0\n \nprint(sum)']
['Runtime Error', 'Accepted']
['s617696262', 's736189623']
[34196.0, 43092.0]
[278.0, 368.0]
[163, 205]
p02785
u164678731
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['# coding: utf-8\nn, k = map(int, input().split())\nh = list(map(int, input().split()))\nh.sort()\nif n =< k:\n print(n)\nelse:\n print(sum(h[0: n - k]) + k)\n', '# coding: utf-8\nn, k = map(int, input().split())\nh = list(map(int, input().split()))\nh.sort()\nif n <= k:\n print(n)\nelse:\n print(sum(h[0: n - k]) + k)\n', '# coding: utf-8\nn, k = map(int, input().split())\nh = list(map(int, input().split()))\nh.sort()\nif n <= k:\n print(0)\nelse:\n print(sum(h[0: n - k]))\n']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s561172562', 's832568728', 's808037126']
[2940.0, 26180.0, 26180.0]
[17.0, 150.0, 149.0]
[156, 156, 152]
p02785
u168416324
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\nmon=list(map(int,input().split()))\nmon.sort(reverse=true)\nfor i in range(k):\n mon.pop(0)\nprint(sum(mon))\n ', 'n,k=map(int,input().split())\nmon=list(map(int,input().split()))\nmon.sort(reverse=True)\n\nprint(sum(mon[k:]))\n']
['Runtime Error', 'Accepted']
['s978650246', 's994411753']
[31416.0, 31400.0]
[70.0, 107.0]
[137, 108]
p02785
u175590965
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['h = int(input())\nans = 0\nc = 0\nwhile h >0:\n ans += 2**c\n h //= 2\n c+= 1\nprint(ans)', 'n,k = map(int,input().split())\nh= list(map(int,input().split()))\nsorted(h)\nprint(sum(h[:-k+1]))', 'h = int\n(input())\nans = 0\nc = 0\nwhile h >0:\n ans += 2**c\n h //= 2\n c+= 1\nprint(ans)', 'n,k = map(int,input().split())\nh= list(map(int,input().split()))\nsorted(h)\nif n <=k:\n print(0)\nelse:\nprint(sum(h[:n-k]))', 'n,k = map(int,input().split())\nh = list(map(int,input().split()))\nh.sort(reverse=True)\nprint(sum(h[k:]))']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s683772016', 's713854158', 's869634588', 's962005794', 's109290597']
[3060.0, 25768.0, 3060.0, 2940.0, 26180.0]
[17.0, 146.0, 17.0, 17.0, 152.0]
[91, 95, 92, 123, 104]
p02785
u179169725
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,K=map(int,input().split())\nH=sorted(map(int,input().split()))\nprint(sum(H[K:]))', 'N,K=map(int,input().split())\nH=sorted(map(int,input().split()))\n\n\nprint(sum(H[K:])+min(K,N))\n \n ', 'N,K=map(int,input().split())\nprint(sum(sorted(map(int,input().split()),reverse=True)[K:]))\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s170580316', 's286052246', 's850691670']
[31544.0, 31444.0, 31388.0]
[112.0, 108.0, 112.0]
[81, 102, 91]
p02785
u184882264
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k = input().split()\nm = [int(x) for x in input().split()]\nm.sort()\nfor i in range(k):\n if len(m) == 0:\n break\n m.pop(len(m))\nprint(sum(m))', 'n,k = [int(x) for x in input().split()]\nm = [int(x) for x in input().split()]\nm.sort()\nif n<k:\n k = n\nprint(sum(m[0:n-k]))']
['Runtime Error', 'Accepted']
['s057766091', 's823276572']
[26024.0, 26024.0]
[156.0, 158.0]
[145, 123]
p02785
u185037583
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['import heapq\n\nn, k = map(int, input().split())\nh = [-1 * int(i) for i in input().split()]\nheapq.heapify(h)\n\nif n <= k:\n print(0)\n exit()\n\nfor i in range(k):\n heapq.heappop(h)\n\nprint(sum(h))', 'import heapq\n\nn, k = map(int, input().split())\nh = [-1 * int(i) for i in input().split()]\nheapq.heapify(h)\n\nif n <= k:\n print(0)\n exit()\n\nfor i in range(k):\n heapq.heappop(h)\n\nprint(-1*sum(h))\n']
['Wrong Answer', 'Accepted']
['s581358367', 's146362359']
[25896.0, 25896.0]
[255.0, 246.0]
[192, 202]
p02785
u185405877
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['i = list(map(int, input().split()))\nj= list(map(int, input().split()))\nx=sorted(j, reverse=True)\nz=0\n\nif i[1]>=len(j):\n print(0)\nelse:\n for a in range(i[0],len(x)):\n z+=x[a]\n print(z)', 'i = list(map(int, input().split()))\nj= list(map(int, input().split()))\nx=sorted(j, reverse=True)\nz=0\n \nif i[1]>=len(j):\n print(0)\nelse:\n for a in range(i[1],len(x)):\n z+=x[a]\n print(z)']
['Wrong Answer', 'Accepted']
['s484992504', 's397350762']
[25768.0, 26764.0]
[149.0, 171.0]
[189, 190]
p02785
u189479417
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int,input().split())\nH = list(map(int,input().split()))\nH.sort()\ncnt = max(N,K)\nans = 0\nfor i in range(N-cnt):\n ans+=H[i]\nprint(ans)', 'N, K = map(int,input().split())\nH = list(map(int,input().split()))\nH.sort()\ncnt = min(N,K)\nans = 0\nfor i in range(N-cnt):\n ans+=H[i]\nprint(ans)']
['Wrong Answer', 'Accepted']
['s296690522', 's628675387']
[26180.0, 26024.0]
[146.0, 171.0]
[146, 146]
p02785
u189516107
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nH = list(map(int, input().split()))\n\nif N <= K:\n print(0)\nelif K == 0:\n print(sum(H))\nelse:\n H.sort()\n H_hissatsued = H[:-K]\n print(H_hissatsued)\n print(sum(H_hissatsued))', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\n\nif N <= K:\n print(0)\nelif K == 0:\n print(sum(H))\nelse:\n H.sort()\n H_hissatsued = H[:-K]\n #print(H_hissatsued)\n print(sum(H_hissatsued))']
['Wrong Answer', 'Accepted']
['s066485673', 's320537003']
[26024.0, 26024.0]
[174.0, 152.0]
[210, 211]
p02785
u195210605
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
["n,k = map(int, input().split(' '))\nh = list(map(int, input().split(' ')))\nh.sort()\n\nprint(n)\nprint(k)\nprint(h)\n\ns = 0\n\ni = 0\nwhile i < len(h)-k:\n s += h[i]\n i += 1\n\nprint(s)", "n,k = map(int, input().split(' '))\nh = list(map(int, input().split(' ')))\nh.sort()\n\n# print(n)\n# print(k)\n# print(h)\n\ns = 0\n\ni = 0\nwhile i < n-k:\n s += h[i]\n i += 1\n\nprint(s)"]
['Wrong Answer', 'Accepted']
['s849297411', 's224435706']
[26024.0, 26024.0]
[226.0, 187.0]
[175, 176]
p02785
u196507615
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=[int(x) for x in input().split()]\narr=[int(x) for x in input().split()]\ns=0\nif(n>k):\n\tfor i in range(n-k):\n \t\ts+=arr[i]\n print(s)\nelse:\n print(0)\n\n ', 'n,k=[int(x) for x in input().split()]\narr=[int(x) for x in input().split()]\ns=0\narr.sort()\nif(n>k):\n for i in range(n-k):\n s+=arr[i]\n print(s)\nelse:\n print(0)']
['Runtime Error', 'Accepted']
['s369052244', 's499261134']
[2940.0, 26764.0]
[17.0, 177.0]
[158, 172]
p02785
u200527996
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nH = list(map(int, input().split()))\nif N<=K:\n print(0)\nelse:\n H.sort()\n print(sum(H)-sum(H[N-1-k:]))', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\nif N<=K:\n print(0)\nelse:\n H.sort()\n print(sum(H[:N-K]))']
['Runtime Error', 'Accepted']
['s227166056', 's353986503']
[26180.0, 26180.0]
[151.0, 152.0]
[142, 133]
p02785
u201387466
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,K= map(int,input().split())\nH = list(map(int,input().split()))\nH.sort()\ns = 0\nfor i in range(K):\n s += H[i]\nprint(s+K) \n', 'N,K= map(int,input().split())\nH = list(map(int,input().split()))\nH = sort(H)\ns = 0\nfor i in range(N-K):\n s += H[i]\nprint(s+K)\n \n', 'N,K= map(int,input().split())\nH = list(map(int,input().split()))\nH.sort()\ns = 0\nfor i in range(N-K):\n s += H[i]\nprint(s) \n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s610816888', 's956830113', 's954494289']
[26180.0, 26020.0, 26024.0]
[184.0, 74.0, 183.0]
[123, 130, 123]
p02785
u201928947
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k = map(int,input().split())\na = list(map(int,input().split()))\na = sorted(a,reverse=true)\nfor i in range(min(n,k)):\n pop(0)\nprint(sum(a))', 'n,k = map(int,input().split())\na = list(map(int,input().split()))\na = sorted(a,reverse=True)\ndel a[:min(n,k)]\nprint(sum(a))']
['Runtime Error', 'Accepted']
['s695976032', 's082414274']
[26020.0, 26024.0]
[68.0, 148.0]
[141, 123]
p02785
u203694953
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int,input().split())\nH = list(map(int, input().split()))\n\nif K >= N:\n print(0)\n \nelif K == 0:\n print(sum(H))\n\nelse:\n H.sort\n print(sum(H[K-1:]))', 'N, K = map(int,input().split())\nH = list(map(int, input().split()))\n\nif K >= N:\n print(0)\n \nelif K == 0:\n print(sum(H))\n\nelse:\n H.sort\n print(sum(H[K+1:N-1]))', 'N, K = map(int,input().split())\nH = list(map(int, input().split()))\n\nif K >= N:\n print(0)\n \nelif K == 0:\n print(sum(H))\n\nelse:\n newH = sorted(H, reverse=True)\n print(sum(newH[K:]))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s713102949', 's802139842', 's887639588']
[26024.0, 26180.0, 26024.0]
[69.0, 70.0, 154.0]
[159, 162, 184]
p02785
u210827208
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\n\nH=list(map(int,input().split()))\n\nH.sort(reverse=True)\n\nprint(sum(H[k+1:]))', 'n,k=map(int,input().split())\n\n\nH=list(map(int,input().split()))\n\nH.sort(reverse=True)\n\nprint(sum(H[k:]))']
['Wrong Answer', 'Accepted']
['s587432516', 's241874053']
[26020.0, 26764.0]
[155.0, 150.0]
[105, 104]
p02785
u211805975
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['\nn,k = map(int,input().split())\ntairyoku = list(map(int,input().split()))\ntairyoku.sort(reverse=True)\n\nif k == 0:\n print(sum(tairyoku))\n \nelse:\n del tairyoku[:k]\n print(tairyoku)\n print(sum(tairyoku))', '\nn,k = map(int,input().split())\ntairyoku = list(map(int,input().split()))\ntairyoku.sort(reverse=True)\n\nif k == 0:\n print(sum(tairyoku))\n \nelse:\n del tairyoku[:k]\n print(sum(tairyoku))\n']
['Wrong Answer', 'Accepted']
['s697054314', 's905842760']
[26024.0, 26764.0]
[165.0, 146.0]
[237, 218]
p02785
u222668979
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\nh = sorted(map(int, input().split()))\n\nprint(sum(h[-k:]) if k!=1 else k)\n', 'n, k = map(int, input().split())\nh = sorted(map(int, input().split()))[::-1]\n\nprint(sum(h[k:]) if k!=1 else k)\n', 'n, k = map(int, input().split())\nh = sorted(map(int, input().split()))\n\nprint(sum(h[-k:]) if k != 1 else k)\n', 'import sys\ninput = sys.stdin.readline\n\nn, k = map(int, input().split())\nh = list(map(int, input().split()))\n\nh.sort(reverse=True)\nn_h = h[k:]\nprint(sum(n_h))']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s034069310', 's771227750', 's796747063', 's121010127']
[31664.0, 31600.0, 31516.0, 25884.0]
[112.0, 110.0, 113.0, 155.0]
[106, 111, 108, 157]
p02785
u223555291
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['import sys\na,b=map(int,input().split())\nc=list(map(int,input().split()))\nd=0\nc.sort()\ne=-1\nf=0\nfor i in range(a):\n d+=c[i]\n\nfor i in range(b):\n if b>0:\n b-=1\n f+=1\n \n d-=c[e]\n e-=1\n if d<0:\n print(f)\n sys.exit()\nwhile 1:\n d-=c[e]\n f+=1\n if d<0:\n print(f)\n else:\n pass', 'import sys\na,b=map(int,input().split())\nc=list(map(int,input().split()))\nif a<=b:\n print(0)\n\nelse:\n f=0\n d=0\n\n c.sort()\n e=-1\n f=0\n for i in range(a):\n d+=c[i]\n \n\n for i in range(b):\n if b>=0:\n b-=1\n f+=1\n \n d-=c[e]\n e-=1\n if d<=0:\n print(f)\n sys.exit()\n \n \n f+=c[e]\n f+=c[e-1]\n\n print(f)\n\n', 'import sys\na,b=map(int,input().split())\nc=list(map(int,input().split()))\nif a<=b:\n print(0)\n\nelse:\n f=0\n d=0\n\n c.sort()\n e=-1\n f=0\n for i in range(a):\n d+=c[i]\n \n\n for i in range(b):\n if b>0:\n b-=1\n f+=1\n \n d-=c[e]\n e-=1\n if d<=0:\n print(f)\n sys.exit()\n \nfor i in range(a+e+1):\n f+=c[i]\n\nprint(f)\n\n', 'import sys\na,b=map(int,input().split())\nc=list(map(int,input().split()))\nif a<=b:\n print(0)\n sys.exit()\n\nelse:\n f=0\n d=0\n\n c.sort()\n e=-1\n f=0\n for i in range(a):\n d+=c[i]\n \n\n for i in range(b):\n if b>0:\n b-=1\n f+=1\n \n d-=c[e]\n e-=1\n if d<=0:\n print(f)\n sys.exit()\n \nfor i in range(a+e+1):\n f+=c[i]\n\nprint(f)\n\n', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\nH.sort()\n\nif N - K < 0:\n print(0)\nelse:\n print(sum(H[:N-K]))\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s134350967', 's169563893', 's178412572', 's402907810', 's566647493']
[2940.0, 26176.0, 26180.0, 26180.0, 26024.0]
[17.0, 276.0, 269.0, 283.0, 153.0]
[318, 358, 363, 376, 132]
p02785
u224522483
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nHs = sorted(list(map(int, input().split())))\nwhile K > 0:\n Hs.pop()\nprint(sum(Hs))', 'N, K = map(int, input().split())\nHs = sorted(list(map(int, input().split())))\nif K >= N:\n print("0")\nelse:\n while K > 0:\n Hs.pop()\n K -= 1\n print(sum(Hs))']
['Runtime Error', 'Accepted']
['s199301328', 's007717307']
[26180.0, 26764.0]
[176.0, 181.0]
[116, 163]
p02785
u224993839
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\nc=sorted(list(map(int,input().split())))\nif k>n:\n print(0)\nelse:\n print(sum(c[:n-k])', 'n,k=map(int,input().split())\nif n==0:\n print(0)\nelse:\n c=sorted(list(map(int,input().split())))\n if k>=n:\n print(0)\n else:\n print(sum(c[:n-k]))\n\n ']
['Runtime Error', 'Accepted']
['s020829221', 's739354114']
[2940.0, 26764.0]
[17.0, 154.0]
[115, 157]
p02785
u235376569
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['l=[int(x) for x in input().rstrip().split()]\nl.sort(reverse = True)\n\nans=0\n\ndel l[0:a]\nans = a\nprint(sum(l))', 'N,K=[int(x) for x in input().rstrip().split()]\nH=[int(x) for x in input().rstrip().split()]\n\nH.sort(reverse=True)\nk=0\nif N<=K:\n K=N\nfor i in range(K):\n H[i]=0\n\nprint(sum(H))\n\n']
['Runtime Error', 'Accepted']
['s875065426', 's521052092']
[3060.0, 26024.0]
[17.0, 174.0]
[108, 177]
p02785
u236536206
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['3 0\n1000000000 1000000000 1000000000', 'import sys\nn,k=map(int,input().split())\nh=list(map(int,input().split()))\nh.sort()\nif n<=k:\n print(0)\n sys.exit()\nelse:\n for i in range(k):\n h[-i-1]=0\nans=0\nfor i in h:\n ans+=i\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s727018663', 's868842832']
[2940.0, 26024.0]
[17.0, 183.0]
[36, 206]
p02785
u241159583
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k = map(int, input().split())\nH = sorted(list(map(int, input().split())))\nprint(sum(H[:-k]) if k >= n else 0)', 'n,k = map(int, input().split())\nH = sorted(list(map(int, input().split())))\nif k >= n: ans = 0\nelif k == 0: ans = sum(H)\nelse: ans = sum(H[-k])\nprint(ans)', 'n,k = map(int, input().split())\nH = sorted(list(map(int, input().split())))[::-1]\nans = 0\nfor h in H:\n if k>0:\n k -= 1\n continue\n ans += h\nprint(ans)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s050923070', 's819499523', 's609445520']
[31356.0, 31444.0, 31504.0]
[108.0, 108.0, 124.0]
[111, 154, 169]
p02785
u243312682
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
["def main():\n n, k = map(int, input().split())\n h = [int(x) for x in input().split()]\n h_s = sorted(h)\n if len(h_s) <= k:\n ans = 0\n else:\n for _ in range(k):\n h_s.pop()\n ans = sum(h_s)\n print(ans)\n\nif __name__ == '__main__':\n main(", "def main():\n n, k = map(int, input().split())\n h = [int(x) for x in input().split()]\n h_s = sorted(h)\n if len(h_s) <= k:\n ans = 0\n else:\n for _ in range(k):\n h_s.pop()\n ans = sum(h_s)\n print(ans)\n\nif __name__ == '__main__':\n main()"]
['Runtime Error', 'Accepted']
['s167248853', 's683315871']
[8996.0, 31332.0]
[25.0, 124.0]
[283, 284]
p02785
u244466744
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nH = list(map(int, input().split()))\n\nH.sort(reverse = True)\nsum = 0\n\nfor i in range(K):\n H[i] = 0\n \nsum = sum(H)\n\nprint(sum)\n', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\n\na = 0\n\nif K > N:\n a = K - N\n\nfor _ in range(a):\n H.append(0)\n\nH.sort(reverse = True)\nsum = 0\n\nfor i in range(K):\n H[i] = 0\n \nfor i in range(N):\n sum += H[i]\n \nprint(sum)\n']
['Runtime Error', 'Accepted']
['s809668130', 's163716910']
[31512.0, 31400.0]
[125.0, 142.0]
[160, 246]
p02785
u244786566
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int, input().split())\nh=list(map(int,input().split()))\nH=sorted(h)\nfor i in range(k):\n H[n-k+1]=0\nprint(sum(H))', 'n,k=map(int, input().split())\nh=list(map(int,input().split()))\nH=sorted(h,reverse=True)\nif n>=k:\n\tfor i in range(k):\n\t\tH[i]=0\n\tprint(sum(H))\nelse: \n\tprint(0)\n']
['Runtime Error', 'Accepted']
['s979517877', 's064895581']
[26024.0, 25768.0]
[178.0, 161.0]
[119, 158]
p02785
u244836567
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['a,b=input().split()\nc=list(map(int,input().split()))\nc.sort()\nd=sum(c)\ne=0\nfor i in range(b):\n e=e+c[-b]\nprint(d-2*e)', 'a,b=input().split()\na=int(a)\nb=int(b)\nc=list(map(int,input().split()))\nc.sort()\nd=sum(c)\ne=0\nfor i in range(b):\n e=e+c[-b]\nprint(d-2*e)', 'a,b=input().split()\na=int(a)\nb=int(b)\nc=list(map(int,input().split()))\nc.sort()\nd=sum(c)\ne=0\nif a<=b:\n print(0)\nelse:\n for i in range(b):\n e=e+c[-i]\n print(d-e)', 'a,b=input().split()\na=int(a)\nb=int(b)\nc=list(map(int,input().split()))\nc.sort()\nd=sum(c)\ne=0\nif a<=b:\n print(0)\nelse:\n for i in range(1,b+1):\n e=e+c[-i]\n print(d-e)']
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s333626891', 's375847302', 's560793042', 's525569976']
[31636.0, 31424.0, 31616.0, 31756.0]
[107.0, 137.0, 134.0, 137.0]
[118, 136, 166, 170]
p02785
u254871849
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
["import sys\n\nn, k, *h = map(int, sys.stdin.read().split())\n\ndef main():\n print(sum(sorted(h)[:max(0, n-k)]))\n print(sum([]))\n\nif __name__ == '__main__':\n main()", "import sys\n\nn, k, *h = map(int, sys.stdin.read().split())\n\ndef main():\n print(sum(sorted(h)[:max(0, n-k)]))\n\nif __name__ == '__main__':\n main()"]
['Wrong Answer', 'Accepted']
['s739025948', 's297271942']
[25180.0, 25180.0]
[147.0, 152.0]
[169, 150]
p02785
u256868077
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\na=list(map(int,input().split()))\na.sort()\nif(k >= n):\n print(0)\nelse:\n b = a[k-1:]\n print(sum(b))', 'n,k=map(int,input().split())\na=list(map(int,input().split()))\na.sort(reverse=True)\nif(k >= n):\n print(0)\nelse:\n b = a[k:]\n print(sum(b))']
['Wrong Answer', 'Accepted']
['s377601947', 's874396898']
[26764.0, 26436.0]
[154.0, 153.0]
[129, 139]
p02785
u265475910
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['# coding: utf-8\nbodies_count = list(map(int,input().split()))\nenemy_life = list(map(int,input().split()))\ncount = 0\n\nif bodies_count[1] == 0:\n print(sum(enemy_life))\nelse:\n enemy_life.sort(reverse=True)\n a = bodies_count[1]-1\n del enemy_life[0:a]\n\n if enemy_life != []:\n print(sum(enemy_life))\n \n # if enemy_life == []:\n # print(count)\n # break\n # else:\n # enemy_life.sort()\n # print(enemy_life)\n # enemy_life.pop(enemy_life.index(max(enemy_life)))\n\n', '# coding: utf-8\nbodies_count = list(map(int,input().split()))\nenemy_life = list(map(int,input().split()))\n\nif bodies_count[1] == 0:\n print(sum(enemy_life))\nelse:\n enemy_life.sort(reverse=True)\n if bodies_count[1] == 1:\n del enemy_life[0] \n else:\n a = bodies_count[1]\n del enemy_life[0:a]\n\n if enemy_life != []:\n print(sum(enemy_life))\n else:\n print(0)\n \n # if enemy_life == []:\n # print(count)\n # break\n # else:\n # enemy_life.sort()\n # print(enemy_life)\n # enemy_life.pop(enemy_life.index(max(enemy_life)))\n\n']
['Wrong Answer', 'Accepted']
['s649120654', 's099094556']
[26180.0, 26024.0]
[145.0, 149.0]
[578, 667]
p02785
u266389451
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int,input().split())\nN_hp = list(map(int,input().split()))\nN_hp.sort(reverse=True)\nsum_turn = sum(N_hp[K:])\nprint(K+sum_turn)', 'N, K = map(int,input().split())\nN_hp = list(map(int,input().split()))\nN_hp.sort(reverse=True)\ndel N_hp[:K]\nsum_turn = sum(N_hp)\nprint(K+sum_turn)', 'N, K = map(int,input().split())\nN_hp = list(map(int,input().split()))\nN_hp.sort(reverse=True)\ndel N_hp[:K]\nsum_turn = sum(N_hp)\nprint(sum_turn)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s905028150', 's950674159', 's701168105']
[26024.0, 26024.0, 26024.0]
[154.0, 150.0, 145.0]
[136, 145, 143]
p02785
u277641173
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\nh=list(map(int,input().split()))\nh.sort(reverse=True)\nfor i in range(k):\n try:\n h.pop(0)\n except IndexError:\n pass\nprint(sum(h)+t)', 'n,k=map(int,input().split())\nh = set(map(int,input().split()))\n\nh = sorted(h)\nl = len(h)\nif k != 0:\n for i in range(l-k,l):\n h[i] = 0\n \nresult = 0 \nfor j in range(0, l):\n result = result + h[j]\nprint(h)\nprint(result)\n', 'n,k=map(int,input().split())\nh=list(map(int,input().split()))\nh.sort()\nfor i in range(k):\n try:\n h.pop(-1)\n except IndexError:\n pass\nprint(sum(h))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s013726734', 's101146238', 's694843114']
[26024.0, 35776.0, 26764.0]
[2108.0, 253.0, 176.0]
[167, 224, 154]
p02785
u281796054
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\nlife=sorted(list(map(int,input().split())))\nif n<k:\n print(0)\nelse\n ans=sum(life[k:])\n print(ans)', 'n,k=map(int,input().split())\nlife=sorted(list(map(int,input().split())))\nif n<k:\n print(0)\nelse:\n ans=sum(life[k:])\n print(ans)\n', 'n,k=map(int,input().split())\nlife=sorted(list(map(int,input().split())),reverse=True)\nif n<k:\n print(0)\nelse:\n ans=sum(life[k:])\n print(ans)\n\n ']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s769091972', 's923854014', 's969391096']
[2940.0, 26764.0, 26020.0]
[17.0, 154.0, 152.0]
[129, 131, 147]
p02785
u283782321
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['import heapq\nceruleans, skills = map(int, input().split())\nHP = list(map(lambda x: int(x) * (-1), input().split()))\n\nfor i in range(skills):\n heapq.heappop(HP)\n if HP == []:\n break\n\nprint(- sum(HP))', 'import heapq\nceruleans, skills = map(int, input().split())\nHP = list(map(lambda x: int(x) * (-1), input().split())) \nheapq.heapify(HP)\n\nfor i in range(skills):\n heapq.heappop(HP)\n\n if HP == []:\n break\n\nprint(-sum(HP))']
['Wrong Answer', 'Accepted']
['s974810420', 's218132119']
[25896.0, 25896.0]
[216.0, 271.0]
[203, 246]
p02785
u289381123
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['import math\nn,k=map(int,input().split())\nl=list(map(int,input().split()))\nl.sort()\nans=0\nif k>=n:\n ans=0\nelse:\n list_new=l[0:n-k]\n ans_pre=sum(list_new)\nprint(ans)\n', 'import math\nn,k=map(int,input().split())\nl=list(map(int,input().split()))\nl.sort()\nans=0\nif k>=n:\n ans=0\nelse:\n list_new=l[0:n-k]\n ans=sum(list_new)\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s426591061', 's389743831']
[25740.0, 27300.0]
[155.0, 167.0]
[173, 169]
p02785
u296518383
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nA = list(map(int, input().split()))\n\nif K >= N:\n print(0)\nelse:\n A.sort()\n A = A[::-1]\n answer = K + sum(A[K:])\n print(answer)', 'N, K = map(int, input().split())\nA = list(map(int, input().split()))\n\nif K >= N:\n print(0)\nelse:\n A.sort()\n A = A[::-1]\n answer = sum(A[K:])\n print(answer)\n\n']
['Wrong Answer', 'Accepted']
['s758018686', 's208879101']
[26024.0, 26024.0]
[153.0, 157.0]
[164, 162]
p02785
u298945776
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nH = list(map(int, input().split()))\n\nH.sort(reverse=True)\nif N < K:\n K = N\nfor i in range(K):\n H[i] = 0\nprint(H)\nans = sum(H)\nprint(ans)', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\n\nH.sort(reverse=True)\nif N < K:\n K = N\nfor i in range(K):\n H[i] = 0\n#print(H)\nans = sum(H)\nprint(ans)']
['Wrong Answer', 'Accepted']
['s952326685', 's551675957']
[26764.0, 26764.0]
[175.0, 165.0]
[175, 176]
p02785
u300457253
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['kazu1 = list(map(int, input().split()))\nkazu2 = list(map(int, input().split()))\nn = 0\nkazu2.sort(reverse=True)\n\nkazu2[0:kazu1[1]-1] = 0\n\nn += sum(kazu2)\n\nprint(n)', 'kazu1 = list(map(int, input().split()))\nkazu2 = list(map(int, input().split()))\nn = 0\nkazu2.sort(reverse=True)\n\nkazu2[:kazu1[1]] = [0]\n\nn += sum(kazu2)\n\nprint(n)']
['Runtime Error', 'Accepted']
['s036825911', 's708873264']
[26764.0, 26184.0]
[148.0, 149.0]
[162, 161]
p02785
u309120194
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nH = list(map(int, input().split()))\n\n\n\n\n\nH = sorted(H, reverse=True)\nans = K\nif N > K: ans += sum(H[K:])\n \nprint(ans)', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\n \n\n\n\n\n\n\nH = sorted(H, reverse=True)\nans = 0\nif N > K: ans = sum(H[K:])\n \nprint(ans)']
['Wrong Answer', 'Accepted']
['s170445087', 's893760046']
[31584.0, 31296.0]
[109.0, 107.0]
[379, 498]
p02785
u310079355
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nmonsterList = [int(x) for x in input().split()]\n\natackTimes = 0\n\nmonsterList.sort()\nif K == 0:\n for hp in monsterList[:-K]:\n atackTimes += hp\nelse:\n for hp in monsterList:\n atackTimes += hp\n\nprint(atackTimes)', 'N, K = map(int, input().split())\nmonsterList = [int(x) for x in input().split()]\n\natackTimes = 0\n\nmonsterList.sort()\nif K != 0:\n for hp in monsterList[:-K]:\n atackTimes += hp\nelse:\n for hp in monsterList:\n atackTimes += hp\n\nprint(atackTimes)']
['Wrong Answer', 'Accepted']
['s476619581', 's648571731']
[26180.0, 25768.0]
[173.0, 173.0]
[261, 261]
p02785
u310937700
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['import numpy as np\nimport numpy\n\nN,K =(float(x) for x in input().split())\nlist1 = np.array([float(s) for s in input().split()])\nprint(list1)\n\nlist2=np.sort(list1)\n\ni=0\nsum=0\nwhile i<N-K:\n sum=sum+list2[i]\n i=i+1\n\nprint(sum)', 'import numpy as np\nimport numpy\n\nN,K =(float(x) for x in input().split())\nlist1 = np.array([float(s) for s in input().split()])\n\n\nlist2=np.sort(list1)\ni=0\nsum=0\nwhile i<N-K:\n sum=sum+list2[i]\n i=i+1\n\nprint(sum)', 'import numpy as np\n\nN,K =(int(x) for x in input().split())\nlist1 = np.array([int(s) for s in input().split()])\n\n\nlist2=np.sort(list1)\n\ni=0\nsum=0\nwhile i<=N-K-1:\n sum=sum+list2[i]\n i=i+1\n\nprint(sum)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s397183840', 's962471203', 's582448755']
[32612.0, 32620.0, 34180.0]
[370.0, 367.0, 351.0]
[225, 212, 199]
p02785
u312666261
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\nhlist = list(map(int,input().split()))\n\nhlist.sort(reverse=True)\nprint(hlist)\n\nif n<k:\n k = n\nfor i in range(0,k):\n hlist[i] = 0\n\nprint(sum(hlist))', 'n,k=map(int,input().split())\nhlist = list(map(int,input().split()))\n\nhlist.sort(reverse=True)\n\nif n<k:\n k = n\nfor i in range(0,k):\n hlist[i] = 0\n\nprint(sum(hlist))']
['Wrong Answer', 'Accepted']
['s232544201', 's470675928']
[26764.0, 26764.0]
[200.0, 163.0]
[182, 169]
p02785
u317423698
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['import sys\n\nN, K = map(int, next(sys.stdin.buffer).split())\nH = sorted(map(int, next(sys.stdin.buffer).split()))\n\nprint(sum(H[:K])', 'import sys\n\nN, K = map(int, next(sys.stdin.buffer).split())\nH = list(map(int, next(sys.stdin.buffer).split()))\n\nif K:\n H.sort()\n print(sum(H[:-K]))\nelse:\n print(sum(H))\n']
['Runtime Error', 'Accepted']
['s703117913', 's142880261']
[8996.0, 29028.0]
[24.0, 104.0]
[130, 172]
p02785
u323045245
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['HP, k = map(int, input().split())\nenamy = list(map(int, input().split()))\n\nenamy1 = sorted(enamy, reverse=True)\nif n =< k:\n print(0)\nelse:\n del enamy1[0:k]\n print(sum(enamy1))\n', 'HP, k = map(int, input().split())\nenamy = list(map(int, input().split()))\n\nenamy1 = sorted(enamy, reverse=True)\ndel enamy1[0:k]\nprint(sum(enamy1)+k)', 'HP, k = map(int, input().split())\nenamy = list(map(int, input().split()))\n\nenamy1 = sorted(enamy, reverse=True)\nif len(enamy) <= k:\n print(0)\nelse:\n del enamy1[0:k]\n print(sum(enamy1))\n']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s548388433', 's954641617', 's111126449']
[3068.0, 26024.0, 26024.0]
[17.0, 149.0, 155.0]
[179, 148, 188]
p02785
u327532412
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nH = list(map(int, input().split())).sort(reverse=True)\nans = 0\nif len(H) - K <= 0:\n print(0)\nelse:\n ans += sum(H[K:])\n print(ans)', 'N, K = map(int, input().split())\nH = sorted(list(map(int, input().split())), reverse=True)\nprint(0) if len(H) - K <= 0 else print(sum(H[K:]))']
['Runtime Error', 'Accepted']
['s795256647', 's993357591']
[26180.0, 26024.0]
[141.0, 153.0]
[171, 141]
p02785
u333700164
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\nh=list(map(int,input().split()))\nh.sort()\nif n<k:\n ans=0\n for i in range(n-k-1):\n ans+=h[i]\n print(ans)\nelse:\n print(0)\n ', 'n,k=map(int,input().split())\nh=list(map(int,input().split()))\nh.sort()\nans=0\nfor i in range(n-k-1):\n ans+=h[i]\nprint(ans)', 'n,k=map(int,input().split())\nh=list(map(int,input().split()))\nh.sort()\nif n>k:\n ans=0\n for i in range(n-k-1):\n ans+=h[i]\n print(ans)\nelse:\n print(0)\n \n', 'n,k=map(int,input().split())\nh=list(map(int,input().split()))\nh.sort()\nif n>k:\n ans=0\n for i in range(n-k):\n ans+=h[i]\n print(ans)\nelse:\n print(0)\n \n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s715965425', 's775896997', 's852911657', 's971645848']
[31492.0, 31596.0, 31540.0, 31432.0]
[109.0, 121.0, 126.0, 126.0]
[158, 122, 159, 157]
p02785
u343977188
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\nH=list(map(int,input().split()))\n\nH.sort()\nH.reverse()\nprint(H)\ndel H[:k]\na=sum(H)\nprint(a)', 'n,k=map(int,input().split())\nH=list(map(int,input().split()))\n\nH.sort()\nH.reverse()\ndel H[:k]\na=sum(H)\nprint(a)']
['Wrong Answer', 'Accepted']
['s239809767', 's040280982']
[26764.0, 26764.0]
[177.0, 149.0]
[120, 111]
p02785
u347452770
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\n\nh = list(map(int, inoput().split))\nsum = 0\nh.sort()\n\nfor i in range(0, k):\n h[n-i-1] = 0\n \nfor i in range(0, n):\n sum += h[i]\n \nprint(sum)', 'n, k = map(int, input().split())\n \nh = list(map(int, inoput().split))\nsum = 0\nh.sort()\n\nif n < k:\n print(0)\nelse:\n for i in range(0, k):\n h[n-i-1] = 0\n \n for i in range(0, n):\n sum += h[i]\n print(sum)', 'n, k = map(int, input().split())\n \nh = list(map(int, input().split()))\nsum = 0\nh.sort()\n\nif n <= k:\n print(0)\nelse:\n for i in range(0, k):\n h[n-i-1] = 0\n \n for i in range(0, n):\n sum += h[i]\n \n print(sum)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s144157487', 's216486352', 's824811619']
[3060.0, 2940.0, 26024.0]
[18.0, 17.0, 204.0]
[176, 213, 220]
p02785
u348270417
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
["n,k=int(input()).split()\nh=list(map(int,input().split(' ')))\nh.sort()\nif(k!=0):\n print(sum(h[:-k]))\nelse:\n print(sum(h))", 'n,k=int(input()).split()\na=list(input().split())\nfor i in range(k):\n a.remove(max(a))\nprint(sum(a))', 'n,k=int(input()).split()\na=list(input().split())\na.sort()\nif(k!=0):\n print(sum(a[:-k]))\nelse:\n print(sum(a))', "n,k=list(map(int,input().strip().split(' ')))\nh=list(map(int,input().strip().split(' ')))\nh.sort()\nif(k!=0): print(sum(h[:-k]))\nelse: print(sum(h))"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s270928745', 's292574423', 's469575189', 's362487759']
[3060.0, 3060.0, 3060.0, 26180.0]
[18.0, 17.0, 17.0, 155.0]
[122, 100, 110, 147]
p02785
u349888092
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['import math\nN,K = map(int,(input().split()))\nL = list(map(int,(input().split())))\nL.sort()\nprint(L)\nfor x in range(K):\n del L[-1]\nprint(sum(L))', 'import math\nN,K = map(int,(input().split()))\nL = list(map(int,(input().split())))\nL.sort(reverse=True)\n#print(L)\nfor x in range(K-1):\n del L[0]\n print(L)\nprint(sum(L))', 'import math\nN,K = map(int,(input().split()))\nL = list(map(int,(input().split())))\nL.sort(reverse=True)\n#print(L)\nfor x in range(K-1):\n del L[0]\n # print(L)\nprint(sum(L))', 'import math\nN,K = map(int,(input().split()))\n\nL = list(map(int,(input().split())))\nL.sort()\n#print(L)\nnum = N-K\nif(num < 0):\n num = 0\nL = L[0:num]\n#print(L)\nprint(sum(L))']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s613178004', 's655204020', 's958236745', 's208373147']
[27300.0, 150596.0, 27300.0, 27300.0]
[188.0, 1994.0, 2104.0, 151.0]
[146, 173, 174, 184]
p02785
u350093546
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\nh=list(map(int,input().split()))\nif len(h)<=k:\n print(len(h))\nelse:\n h.sort()\n print(sum(h[:-1*k])+k)', "n,k=map(int,input().split())\nh=list(map(int,input().split()))\nif n<=k:\n print('0')\nelse:\n h.sort()\n h.pop([n-k:])\n print(sum(h))", "n,k=map(int,input().split())\nh=list(map(int,input().split()))\nif n<=k:\n print('0')\nelse:\n h.sort()\n for i in range(k):\n h.pop()\n print(sum(h))\n"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s017900565', 's334146775', 's369838520']
[26764.0, 2940.0, 26024.0]
[154.0, 17.0, 174.0]
[133, 132, 150]
p02785
u357230322
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\nh=list(map(int,input().split()))\nh.sort(reverse=True)\nif k<=n:\n for i in range(k):\n a[i]=0\n print(sum(h))\nelse:\n print(0)', 'n,k=map(int,input().split())\nh=list(map(int,input().split()))\nh.sort(reverse=True)\nif k<=n:\n for i in range(k):\n h[i]=0\n print(sum(h))\nelse:\n print(0)']
['Runtime Error', 'Accepted']
['s139270811', 's912648268']
[26180.0, 26764.0]
[149.0, 161.0]
[156, 156]
p02785
u362560965
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k = map(int, input().split())\nh = list(map(int, input().split()))\n\nh.sort(reversed=True)\n\nh = h[k:]\n\nprint(sum(h))', 'n,k = map(int, input().split())\nh = list(map(int, input().split()))\n\nh.sort()\n\nh = h[k:]\n\nprint(sum(h))', 'n,k = map(int, input().split())\nh = list(map(int, input().split()))\n\nh.sort(reverse=True)\n\nh = h[k:]\n\nprint(sum(h))']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s049787069', 's431113097', 's059837098']
[26020.0, 26764.0, 26024.0]
[70.0, 150.0, 152.0]
[116, 103, 115]
p02785
u369105927
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\n\nif k >= n:\n print(n)\n exit(0)\n\nh = sorted(map(int, input().split()))\nprint(sum(h[0:n-k]) + k)\n', 'n, k = map(int, input().split())\n\nif k >= n:\n print(0)\n exit(0)\n\nh = sorted(map(int, input().split()))\nprint(sum(h[0:n-k]))\n']
['Wrong Answer', 'Accepted']
['s161760086', 's537574428']
[26764.0, 26024.0]
[155.0, 153.0]
[130, 126]
p02785
u369752439
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['def get_input_line():\n return list(map(int, input().split()))\nn, k = get_input_line()\nh_list = get_input_line()\n\nprint(sum(h_list[k:]))', 'def get_input_line():\n return list(map(int, input().split()))\nn, k = get_input_line()\nh_list = get_input_line()\nh_list.sort()\nh_list.reverse()\n\nprint(sum(h_list[k:]))']
['Wrong Answer', 'Accepted']
['s345493106', 's344495348']
[26764.0, 26764.0]
[75.0, 160.0]
[138, 169]
p02785
u370721525
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['H, K = map(int, input().split())\nhp = list(map(input().split()))\nhp_sorted = sorted(hp, reverse=True)\nprint(sum(hp_sorted[K:]))\n', 'H, K = map(int, input().split())\nhp = list(int, map(input().split()))\nhp.sort(reverse=True)\nprint(sum(hp[K:]))\n', 'H, K = map(int, input().split())\nhp = list(map(input().split()))\nhp.sort(reverse=True)\nprint(sum(hp[K:]))\n', 'H, K = map(int, input().split())\nhp = list(map(input().split()))\nhp_sorted = sorted(hp, reverse=True)\nhp_new = hp_sorted[K:]\nprint(sum(hp_new))', 'H, K = map(int, input().split())\nhp = list(map(input().split()))\nhp_sorted = sorted(hp, reverse=True)\nhp_new = list(hp_sorted[K:])\nprint(sum(hp_new))\n', 'H, K = map(int, input().split())\nhp = list(map(int, input().split()))\nhp.sort(reverse=True)\nprint(sum(hp[K:]))\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s373365308', 's611990638', 's729863736', 's744712064', 's746123539', 's502837994']
[20980.0, 20240.0, 20240.0, 20240.0, 20240.0, 26020.0]
[36.0, 36.0, 36.0, 36.0, 35.0, 152.0]
[128, 111, 106, 143, 150, 111]
p02785
u375616706
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,K=map(int,input().split())\nL=list(map(int,input().split()))\nsum(L[:K])', 'N,K=map(int,input().split())\nL=list(map(int,input().split()))\nL=sorted(L)\nprint(sum(L[:K]))\n', 'N,K=map(int,input().split())\nL=list(map(int,input().split()))\nL=sorted(L)\nif K==0:\n print(sum(L))\nelse:\n\tprint(sum(L[:-K]))\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s562817798', 's697572544', 's754302496']
[26764.0, 25768.0, 26764.0]
[69.0, 157.0, 150.0]
[72, 92, 125]
p02785
u382407432
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int,(input().split()))\nH = list(map(int,(input().split())))\natk=0\nfor i in range(K):\n H.remove(max(H))\n\natk=SUM(H)\nprint(atk)', 'N, K = map(int,(input().split()))\nH = list(map(int,(input().split())))\natk=0\nH.sort(reverse=True)\ndel H[0:K]\nprint(H)\natk=sum(H)\nprint(atk)', 'N, K = map(int,(input().split()))\nH = list(map(int,(input().split())))\natk=0\nH.sort(reverse=True)\ndel H[0:K]\n\natk=sum(H)\nprint(atk)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s168016789', 's555314900', 's728404244']
[26024.0, 26024.0, 26024.0]
[2104.0, 164.0, 149.0]
[137, 139, 131]
p02785
u382423941
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\nH = list(map(int, input().split()))\nH.sort()\nif k >= n:\n print(0)\nelse:\n print(sum(H[max(0, -k-1):]))', 'n, k = map(int, input().split())\nH = list(map(int, input().split()))\nH = list(reversed(sorted(H)))\nif k >= n:\n print(0)\nelse:\n print(sum(H[k:]))']
['Wrong Answer', 'Accepted']
['s414899134', 's045501772']
[26180.0, 26764.0]
[154.0, 160.0]
[140, 150]
p02785
u384793271
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\nh = sorted(list(map(int, input().split())))\n\nif n <= k:\n print(0)\n exit()\nprint(sum(h[k:n]))\n', 'n, k = map(int, input().split())\nh = sorted(list(map(int, input().split())), reverse=True)\n\nif n <= k:\n print(0)\n exit()\nprint(sum(h[k:n]))\n']
['Wrong Answer', 'Accepted']
['s723177098', 's963816296']
[26024.0, 26180.0]
[151.0, 161.0]
[132, 146]
p02785
u398920952
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = input().split()\nN = int(N)\nK = int(K)\nH = input()\nH = [int(i) for i in H.split()]\nH.sort()\nwhile (K > 0 and len(H) == 0):\n del H[-1]\n K -=1\nprint(sum(H))', 'N, K = input().split()\nN = int(N)\nK = int(K)\nH = input()\nH = [int(i) for i in H.split()]\nH.sort()\nwhile (K > 0 and len(H) != 0):\n del H[-1]\n K -=1\nprint(sum(H))']
['Wrong Answer', 'Accepted']
['s827615849', 's114202697']
[28176.0, 28176.0]
[158.0, 206.0]
[162, 162]
p02785
u401487574
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['3 1\n4 1 5', 'n,k = map(int,input().split())\nH = list(map(int,input().split()))\nH.sort()\nif k>=n:\n print(0)\nelse:\n print(sum(H[0:n-k]))\n']
['Runtime Error', 'Accepted']
['s021954845', 's673855689']
[2940.0, 26764.0]
[17.0, 150.0]
[9, 128]
p02785
u404660239
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nsum(sorted(map(int, input().split()), reverse=True)[K:])', 'N, K = map(int, input().split())\nprint(sum(sorted(map(int, input().split()), reverse=True)[K:]))']
['Wrong Answer', 'Accepted']
['s942489362', 's274066436']
[26180.0, 26180.0]
[151.0, 147.0]
[89, 96]
p02785
u405256066
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['from sys import stdin\nH,K = [int(x) for x in stdin.readline().rstrip().split()]\nH = [int(x) for x in stdin.readline().rstrip().split()]\nsum(sorted(H)[::-1][K:])', 'from sys import stdin\nH,K = [int(x) for x in stdin.readline().rstrip().split()]\nH = [int(x) for x in stdin.readline().rstrip().split()]\nprint(sum(sorted(H)[::-1][K:]))']
['Wrong Answer', 'Accepted']
['s153720958', 's828240113']
[26024.0, 26764.0]
[164.0, 162.0]
[160, 167]
p02785
u408375121
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
["N, K = map(int, input().split(' '))\nnumlist = input().split(' ')\nnumlist.sort()\nif N <= K:\n print(0)\nelse:\n numsub = numlist[:N - K + 1]\n numsub_i = [int(s) for s in numsub]\n print(sum(numsub_i))", 'n, k = map(int, input().split())\nh = list(map(int, input().split()))\nh.sort(reverse=True)\nif len(h) <= k:\n print(0)\nelse:\n ans = sum(h[k:])\n print(ans)']
['Wrong Answer', 'Accepted']
['s397158053', 's567489460']
[27560.0, 26024.0]
[207.0, 152.0]
[199, 154]
p02785
u411858517
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nL = list(map(int, input().split()))\n\nL.sort()\nprint(sum(L[:N-K]), + K) ', 'N, K = map(int, input().split())\nL = list(map(int, input().split()))\n\nL.sort()\nif K > N:\n print(0)\nelse:\n print(sum(L[:N-K])) \n']
['Wrong Answer', 'Accepted']
['s825382976', 's221308099']
[26024.0, 26020.0]
[154.0, 150.0]
[104, 133]
p02785
u414048826
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\nhp_list = list(map(int, input().split()))\nhp_list.sort()\n\nattack = 0\nfor i, hp in enumurate(reversed(hp_list)):\n if i < k:\n continue\n attack += hp\nprint(attack)', 'n, k = map(int, input().split())\nhp_list = list(map(int, input().split()))\nhp_list.sort()\n\nattack = 0\nfor i, hp in enumerate(reversed(hp_list)):\n if i < k:\n continue\n attack += hp\nprint(attack)']
['Runtime Error', 'Accepted']
['s660040759', 's231811827']
[26020.0, 26024.0]
[150.0, 184.0]
[198, 198]
p02785
u418149936
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
["N, K = map(int,input().split(' '))\nH_ls = list(map(int, input().split(' ')))\nH_ls.sort()\nprint(sum(H_ls[K:]))", "N, K = map(int,input().split(' '))\nH_ls = list(map(int, input().split(' ')))\nprint(sum(H_ls[K:]))", "N, K = map(int, input().split(' '))\nH_ls = list(map(int, input().split(' ')))\nH_ls.sort(reverse=True)\nprint(sum(H_ls[K:]))"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s721409932', 's828670566', 's354601079']
[31516.0, 31536.0, 31564.0]
[103.0, 72.0, 108.0]
[109, 97, 122]