TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
import numpy as np
N, K = map(int,input().split())
H = np.array(list(map(int,input().split())))

if K >= N:
    print(0)
elif K == 0:
    answer = np.sum(H)
    print(answer)
else:
    ind = np.argpartition(H, -K)[-K:]
    print(ind)
    top_k = H[ind]
    answer = np.sum(H) - np.sum(top_k)
    print(answer)

if K >= N:
    print(0)
elif K == 0:
    answer = np.sum(H)
    print(answer)
else:
    ind = np.argpartition(H, -K)[-K:]
    print(ind)
    top_k = H[ind]
    answer = np.sum(H) - np.sum(top_k)
    print(answer)

import numpy as np
N, K = map(int,input().split())
H = np.array(list(map(int,input().split())))

if K >= N:
    print(0)
elif K == 0:
    answer = np.sum(H)
    print(answer)
else:
    ind = np.argpartition(H, -K)[-K:]
    top_k = H[ind]
    answer = np.sum(H) - np.sum(top_k)
    print(answer)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N,A=map(int,input().split())
B=sorted(list(int(input()) for i n range(N)))
for j in range(A):
    B.pop()
print(sum(B))

N,A=map(int,input().split())
B=sorted(list(map(int,input().split())))
for j in range(A):
    if B!=[]: B.pop()
print(sum(B))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
class Main:
    s = list(map(int, input().split()))
    n = s[0]
    k = s[1]
    sum = 0
    ksum=0
    list = [int(i) for i in input().split()]
    list = sorted(1, reverse=True)
    list[:k]
    for num in list:
        sum += num
    for knum in list[:k]:
        ksum += knum
    print(sum-ksum)

class Main:
    s = list(map(int, input().split()))
    n = s[0]
    k = s[1]
    sum = 0
    kSum = 0
    list = [int(i) for i in input().split()]
    newList = sorted(list, reverse=True)
    list[:k]
    for num in newList:
        sum += num
    for kNum in newList[:k]:
        kSum += kNum
    print(sum-kSum)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N, K = map(int, input().split())
H = list(map(int, input().split()))

H.sort()

cnt = 0
for i in range(N):
    if K > 0:
        K -= 1
    else:
        cnt += H[i]

print(cnt)

N, K = map(int, input().split())
H = list(map(int, input().split()))

H = sorted(H)[::-1]

cnt = 0
for i in range(N):
    if K > 0:
        K -= 1
    else:
        cnt += H[i]

print(cnt)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N, K = map(int, input().split())
if N <= K:
    print('0')
    return
H = sorted(list(map(int, input().split())))
if K == 0:
    print(sum(H))
else:
    print(sum(H[:K + 1]))


N, K = map(int, input().split())
H = sorted(list(map(int, input().split())))
if N <= K:
    print('0')
elif K == 0:
    print(sum(H))
else:
    print(sum(H[:N - K]))


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N, K = int(input().split())
H = []
H = int(input().split())
list.sort(H, reverse = True)
ANS = 0
for i in range(K, N):
    ANS += H[i]
print(ANS)

N, K = map(int, input().split())
H =  list(map(int, input().split()))
list.sort(H, reverse = True)
ANS = 0
for i in range(K, N):
    ANS += H[i]
print(ANS)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n,m = map(int,input().split())
li=list(map(int,input().split()))
if m>=n:
    print(0)
else:
    sort(li)
    print(sum(li[n-m:]))

n,m = map(int,input().split())
li=list(map(int,input().split()))
if m>=n:
    print(0)
else:
    li.sort()
    print(sum(li[:n-m]))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
monster_num, special_num = input().split()
monster_list = [input() for _ in range(monster_num)]


monster_list = sorted(monster_list)

for _ in range(special_num):
  monster_list = monster_list[:-1]
  
print(sum(monster_list))
  

monster_num, special_num = map(int ,input().split())
monster_list = list(map(int, input().split()))
 
monster_list = sorted(monster_list)[::-1]
 
monster_list = monster_list[special_num:]
  
print(sum(monster_list))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N,K=map(int,input().split())
if K>=N:
	print(0)
	quit()
L = [int(x) for x in input().split()]
L.sort()
if K:
	print(sum(L[:-K]))
print(sum(L))

n,k=map(int,input().split())
h=[int(i) for i in input().split()]
if k>=n:
    print(0)
else:
    print(sum(sorted(h)[k:]))

n,k=map(int,input().split())
h=[int(i) for i in input().split()]
h.sort(reverse=True)

if k>=n:
    print(0)
else:
    print(sum(h[k:]))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n, k = map(int, input().split())
H = sorted(list(map(int, input().split())))
if n <= k:
  print(0)
else:
  print(sum(H[:k]))

n, k = map(int, input().split())
H = sorted(list(map(int, input().split())))
if n <= k:
  print(0)
else:
  print(sum(H[:n-k]))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N,K=map(int,input().split())
H=[map(int,input().split())]


if N<=K:
  print(0)
else:
  H.sort()
  a=sum(H[0:N-K])
  print(a)

N,K=map(int,input().split())
H=list(map(int,input().split()))

if N<=K:
  print(0)
else:
  H.sort()
  a=sum(H[0:N-K])
  print(a)


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n,k = map(int,input().split())
h = list(map(int,input().split()))

l = h[0:(n-k)+1]

print(sum(l))

n,k = map(int,input().split())
h = list(map(int,input().split()))

if n < k:
    print('0')
else:
    h.sort()
    l = h[0:(n-k)]

    print(sum(l))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n,k = map(int, input().split())
H = list(map(int, input().split()))

H.sort()
H.reverse()

if n <= k:
  print(0)
else:
  print(sum(H[k+1:len(H)]))

n,k = map(int, input().split())
H = list(map(int, input().split()))

H.sort()
H.reverse()

if n <= k:
  print(0)
else:
  print(sum(H[k:n]))


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
hi = list(map(int, input().split()))
hi.sort(reverse=True)
del hi[:k]

num = 0
if hi == []:
    print(0)
else:
    for i in hi:
        num += i
    print(num)


import sys

sys.setrecursionlimit(10**9)

h, k = map(int, input().split())
hi = list(map(int, input().split()))
hi.sort(reverse=True)
del hi[:k]

num = 0
if hi == []:
    print(0)
else:
    for i in hi:
        num += i
    print(num)


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n,k=map(int,input().split())
hps=list(map(int,input().split()))
hps.sort()
if k>n:
  print(n)
elif k==n:
  print(k)
else:
  ans=k
  for i in range(k):
    hps.pop()
  ans+==sum(hps)
  print(ans)

n,k=map(int,input().split())
hps=list(map(int,input().split()))
hps.sort()
if k>n:
  print(0)
elif k==n:
  print(0)
else:
  ans=0
  for i in range(k):
    hps.pop()
  ans+=sum(hps)
  print(ans)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
monster_num,k = map(int,input().split(" "))
hp = list(map(int,input().split(" ")))
hp = sorted(hp, reverse = True)
print(hp)
total = 0
for i in hp:
    total += i
    
s = 0
for i in range(k):
    if s <= len(hp) - 1:
        total -= hp[s]
        s += 1

print(total)
    

monster_num,k = map(int,input().split(" "))
hp = list(map(int,input().split(" ")))
hp = sorted(hp, reverse = True)

total = 0
for i in hp:
    total += i
    
s = 0
for i in range(k):
    if s <= len(hp) - 1:
        total -= hp[s]
        s += 1

print(total)
    

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N,K=map(int,input().split())
H=list(map(int,input().split()))
ans=0
H.sort()
for i in range(N):
    if i>=N-K:
        ans+=1
    else:
        ans+=H[i]
print(ans)

N,K=map(int,input().split())
H=list(map(int,input().split()))
ans=0
H.sort()
for i in range(N):
    if i>=N-K:
        ans+=0
    else:
        ans+=H[i]
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n,k=map(int,input().split())
h=sorted(map(int,input().split()))[::-1]
ans=0
for i in range(k+1,n-k):
  ans+=i
print(ans)

n,k=map(int,input().split())
h=sorted(map(int,input().split()))[::-1]
ans=0
for i in range(k,n):
  ans+=h[i]
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n, k = map(int, input().split())
l = list(map(int, input().split()))
l.sort()
if n<=k :
    print(0)
else :
    sm = 0
    for i in range(n-k):
        sm += l[i]
    pritn(sm)

n, k = map(int, input().split())
l = list(map(int, input().split()))
l = sorted(l)
if n<=k :
    print(0)
else :
    sm = 0
    for i in range(n-k):
        sm += l[i]
    pritn(sm)

n, k = map(int, input().split())
l = list(map(int, input().split())).sort()
if n<=k :
    print(0)
else :
    sm = 0
    for i in range(n-k):
        sm += l[i]
    pritn(sm)

n, k = map(int, input().split())
l = list(map(int, input().split()))
l.sort()
if n<=k :
    print(0)
else :
    sm = 0
    for i in range(n-k):
        sm += l[i]
    print(sm)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N,K  =  map(int,input().split())
li = sorted(list(map(int,input().split())),reverse=True)
del(li[:K])
sum(li)

N,K  =  map(int,input().split())
li = sorted(list(map(int,input().split())),reverse=True)
del(li[:K])
print(sum(li))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
src/contest/abc/abc153/c.py


n, k = list(map(int, input().split()))

h = list(map(int, input().split()))

h.sort(reverse=True)

print(sum(h[min(n,k):]))


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
H, K = map(int, input().split())
A = list(map(int, input().split()))

A.sort()

ans = 0

for i in range( N - K ):
  ans += A[i]
  
print(ans)

H, K = map(int, input().split())
A = list(map(int, input().split()))

A.sort()

ans = 0

for i in range( H - K ):
  ans += A[i]
  
print(ans)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
h,n=map(int,input().split())
lists=list(map(int,input().split()))
if h>sum(lists):
    print("No")
else:
    print("Yes")

n,k=map(int,input().split())
lists=list(map(int,input().split()))
lists=sorted(lists)
if len(lists)<=k:
    print(0)
elif len(lists)>k:
    sub=lists[:len(lists)-k]
    print(sum(sub))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N, K=map(int, input().split())
H=list(map(int, input().split()))

if N<=K:
  print(0)
elif K==0:
  print(sum(H))
else:
  for i in range(K):
    maxh=max(H)
    H=H.remove(maxh)
  print(sum(H))




N, K=map(int, input().split())
H=list(map(int, input().split()))

if N<=K:
  print(0)
else:
  for i in range(K):
    maxh=max(H)
    H=H.remove(maxh)
  print(sum(H))




N, K=map(int, input().split())
H=list(map(int, input().split()))

if N<=K:
  print(0)
else:
  for i in range(K):
    maxh=max(H)
    H=H.remove(maxh)
  print(len(H))


N, K=map(int, innput().split())
H=list(map(int, input().split()))

if N<=K:
  print(0)
else:
  for i in range(K):
    maxh=max(H)
    H=H.remove(maxh)
  print(len(H))

N, K=map(int, input().split())
H=list(map(int, input().split()))

if N<=K:
  print(0)
elif K==0:
  print(sum(H))
else:
  H=sorted(H)
  print(sum(H[:len(H)-K]))



Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
input_num=input()
n=input_num.split()
num = list(map(int,n))

if len(num)-2<=num[1]:
  print(0)
else:
  a=num[2:]
  a.sort(reverse=True)
  b=a[num[1]:]
  print(sum(b))

input_num=[input() for i in range(2)]

n=input_num[0].split()
n=list(map(int,n))
a=input_num[1].split()
a=list(map(int,a))
     
if len(a)<=n[1]:
  print(0)
else:
  a.sort(reverse=True)
  b=a[n[1]:]
  print(sum(b))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n, k = map(int, input().split())
monsters = list(map(int, input().split()))

hissatsu = n-k

if hissatsu <= 0:
  print(0)
else:
  print(sum(monsters[-hissatsu:]))

n, k = map(int, input().split())
monsters = list(map(int, input().split()))

hissatsu = n-k

if hissatsu <= 0:
  print(0)
else:
  monsters.sort(reverse=True)
  print(sum(monsters[-hissatsu:]))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
HK = list(map(int,input().split(" ")))
HP = list(map(int,input().split(" ")))
H = HK[0]
K = HK[1]
HP.reverse()
sum_a = sum(HP[K:N])
print(sum_a)

HK = list(map(int,input().split(" ")))
HP = list(map(int,input().split(" ")))
H = HK[0]
K = HK[1]
HP.sort(reverse=Ture)
sum_a = sum(HP[K:N])
print(sum_a)

HK = list(map(int,input().split(" ")))
HP = list(map(int,input().split(" ")))
H = HK[0]
K = HK[1]
HP.sort(reverse=True)
sum_a = sum(HP[K:N])
print(sum_a)

HK = list(map(int,input().split(" ")))
HP = list(map(int,input().split(" ")))
H = HK[0]
K = HK[1]
HP.reverse()
sum_a = sum(HP[K:N])
print(sum_a)

HK = list(map(int,input().split(" ")))
HP = list(map(int,input().split(" ")))
H = HK[0]
K = HK[1]
HP.sort(reverse=True)
sum_a = sum(HP[K:])
print(sum_a)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n,k = map(int,input().split())
hn = list(map(int,input().split()))
hn_s = hn.sort()
attack = 0

if k>=n:
  print("0")

elif k<n:
  for _ in range(n-k):
    hn_s.pop(-1)
  print(str(sum(hn_s)))

n,k = map(int,input().split())
hn = sorted(list(map(int,input().split())))

attack = 0

if k>=n:
  print(attack)

elif k<n:
  print(sum(hn[0:n-k]))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
H, N = map(int, input().split())
A = [int(x) for x in input().split()]
print(A)
list2 = sorted(A, reverse=True)  
print(list2)
if N>0:
    del list2[0:N]
    print(list2)
    print(sum(list2))
elif N<0:
    print(sum(A))

H, N = map(int, input().split())
A = [int(x) for x in input().split()]
list2 = sorted(A, reverse=True)  

if N>H:
    print(0)
elif N>0:
    del list2[0:N]
    print(sum(list2))
elif N<=0:
    print(sum(A))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):

n,k = map(int,input().split())
h = list(map(int,input().split()))



h.sort(reverse = True)

if n <= k:
    print(0)

else:
    for i in range(k):
        s[i] = 0
print(sum(s))


n,k = map(int,input().split())
h = list(map(int,input().split()))



h.sort(reverse = True)

if n <= k:
    print(0)

else:
    for i in range(k):
        h[i] = 0
    print(sum(h))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N, K = map(int,input().split())
H = list(input().split())

H.sort(reverse=True)
print(sum(H[K:]))

N, K = map(int,input().split())
H = list(map(int,input().split()))

H.sort(reverse=True)
print(sum(H[K:]))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):


#include <algorithm>

using namespace std;

int main() {
  int n, k;
  cin >> n >> k;

  vector<int> h(n);
  for (int i = 0; i < n; i++) {
    cin >> h[i];
  }
  sort(h.begin(), h.end(), greater<int>());

  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (i < k) {
      ans++;
    } else {
      ans += h[i];
    }
  }
  cout << ans << endl;
  return 0;
}

#!/usr/bin/env python3

n, k = map(int, input().split())
h = sorted(map(int, input().split()), reverse=True)

print(sum(h[k:]))




Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n, k = map(int, input().split())
h = list(map(int, input().split()))

if n <= k:
    print(0)
elif k == 0:
    print(sum(h))
else:
    h.sort()
    print(h[:-k])
    print(sum(h[:-k]))


n, k = map(int, input().split())
h = list(map(int, input().split()))

h.sort(reverse=True)
print(sum(h[k:]))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
h,n = map(int,input().split())
a_ = list(map(int,input().split()))

a_.sort()
for i in range(n):
    a_[i] = 0
print(sum(a_))


n,k = map(int,input().split())
h_ = list(map(int,input().split()))

if len(h_) <= k:
    print(0)
else:
    h_.sort(reverse = True)
    for i in range(k):
        h_[i] = 0
    print(sum(h_))


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
import sys
n, k = map(int, sys.stdin.readline().split())
li = list(map(int, sys.stdin.readline().split()))
l = len(li)
t = 0
if l > k:
  li.sort().reverse()
  t = sum(li[k:])
print(t)
  

import sys
n, k = map(int, sys.stdin.readline().split())
li = list(map(int, sys.stdin.readline().split()))
l = len(li)
t = 0
if l > k:
  li.sort()
  li.reverse()
  t = sum(li[k:])
print(t)
  


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
from collections import deque

h, k, *a = map(int, open(0).read().split())
if h <= k:
    print(k)
    exit()

a.sort()
q = deque(a)

[q.pop() for _ in range(k)]
print(q)
print(sum(q))


from collections import deque

# ans = True
# print(["Yes", "No"][ans])

h, k, *a = map(int, open(0).read().split())
k = min(h,k)

a.sort()
for _ in range(k):
    a.pop()

print(sum(a))




Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort()

if n<=m:
  print(0)
else:
  a=a[-(n-m):]
  print(sum(a))


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

if n<=m:
  print(0)
elif m==0:
  print(sum(a))
else:
  a=a[:-m]
  print(sum(a))


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N,K = map(int,input().split())
H = list(map(int,input().split()))

sort = sorted(H, reverse = True)
print(sort)

ans = 0
for i in range(N):
    if i+1 > K:
        ans += sort[i]
    
print(ans)

N,K = map(int,input().split())
H = list(map(int,input().split()))

sort = sorted(H, reverse = True)
ans = 0
for i in range(N):
    if i+1 > K:
        ans += sort[i]
    
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N, K = map(int, input().split())
List = list(map(int, input().split()))


remain_monster = N - K
new_list = sorted(List, reverse=True)

monsterHP = sum(new_list[remain_monster:])

print(monsterHP)

import sys
sys.setrecursionlimit(100000) 

N, K = map(int, input().split())
List = list(map(int, input().split()))
A = 0

remain_monster = N - K
new_list = sorted(List, reverse=True)

monsterHP = sum(new_list[remain_monster:])

print(monsterHP)

N, K = map(int, input().split())
List = list(map(int, input().split()))


remain_monster = N - K
if remain_monster <= 0:
    monsterHP = 0

else:
    new_list = sorted(List, reverse=True)

    monsterHP = sum(new_list[-remain_monster:])

print(monsterHP)



Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys


def InS(): return input()


def InL(): return list(map(int, input().split()))


def InI(): return int(input())


N, K = InL()
H = InL().sort()

if K >= N:
    print(0)
    sys.exit()

print(sum(H[0:N-K]))


import sys


def InS(): return input()


def InL(): return list(map(int, input().split()))


def InI(): return int(input())


N, K = InL()
H = InL()
H.sort()

if K >= N:
    print(0)
    sys.exit()
else:
    print(sum(H[0:N-K]))


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n,k=map(int,input().split())
a=list(int(x) for x in input().split())
s=0
if k <= n:
	print(s)
else:
	i for i in range(n-k):
		s += i
		print(s)

n,k=map(int,input().split())
a=list(int(x) for x in input().split())
a.sort(reverse = True)
s=0
if k <= n:
	print(0)
else:
		s = sum(a[:n-k])
		print(s)

n,k=map(int,input().split())
a=list(int(x) for x in input().split())
a.sort()
s=0
if k <= n:
	print(0)
else:
		s = sum(a[:n-k])
		print(s)


n,k=map(int,input().split())
a=list(int(x) for x in input().split())
a.sort()
s=0
if n <= k:
	print(0)
else:
		s = sum(a[:n-k])
		print(s)


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N,K=map(int,input().split())
H=list(map(int,input().split()))
print(N)
print(K)
s=0
if N<=K:
  print(0)
else:
  for i in range(H-N)
    s+=H[i]
  print(s)

N,K=map(int,input().split())
H=list(map(int,input().split()))
H.sort()
print(H)
s=0
if N<=K:
  print(0)
else:
  for i in range(N-K):
    s+=H[i]
  print(s)

N,K=map(int,input().split())
H=list(map(int,input().split())
print(N)
print(K)
s=0
if N<=K:
  print(0)
else:
  for i in range(H-N)
    s+=H[i]
  print(s)

N,K=map(int,input().split())
H=list(map(int,input().split()))
s=0
if N<=K:
  print(0)
else:
  for i in range(H-N):
    s+=H[i]
  print(s)

N,K=map(int,input().split())
H=list(map(int,input().split()))
I=sorted(H)
print(H)
print(I)
s=0
if N<=K:
  print(0)
else:
  for i in range(N-K):
    s+=I[i]
  print(s)

N,K=map(int,input().split())
H=list(map(int,input().split()))
I=sorted(H)
s=0
if N<=K:
  print(0)
else:
  for i in range(N-K):
    s+=I[i]
  print(s)

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n, k = map(int, input().split())
h = list(map(int, input().split()))
h.sort(reverse=True)
if len(h) <= k:
    print(0)
else:
    for _ in range(k):
        h.pop()
    print(sum(h))

n, k = map(int, input().split())
h = list(map(int, input().split()))
h.sort()
if len(h) <= k:
    print(0)
else:
    for _ in range(k):
        h.pop()
    print(sum(h))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N,K = map(int,input().split(" "))
H = list(map(int,input().split(" ")))
H = sorted(H,reverse = True)
for i in range(K):
    H.remove(H[i])
sum_ = sum(H)
pint(sum)

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

A.sort(reverse=True)
print(sum(A[K:]))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
data = input().split()
 
n = int(data[0])
k = int(data[1])

hpstr = input().split()
hp = []

for i in range(n):
  hp.append(int(hpstr[i]))

hp.sort()

print(hp)

ans = 0
for i in range(n - k):
  ans += hp[i]
 
print(ans)


data = input().split()
 
n = int(data[0])
k = int(data[1])
 
hpstr = input().split()
hp = []
 
for i in range(n):
  hp.append(int(hpstr[i]))
 
hp.sort()
 
ans = 0
for i in range(n - k):
  ans += hp[i]
 
print(ans)


Verdicts: Wrong Answer

Accepted