結果
| 問題 |
No.1454 ツブ消ししとるなEasy
|
| コンテスト | |
| ユーザー |
mono_0812
|
| 提出日時 | 2021-03-31 21:22:46 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 98 ms / 2,000 ms |
| コード長 | 685 bytes |
| コンパイル時間 | 90 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 20,784 KB |
| 最終ジャッジ日時 | 2024-12-15 14:32:18 |
| 合計ジャッジ時間 | 1,702 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 16 |
ソースコード
def I(): return input()
def IS(): return input().split()
def II(): return int(input())
def IIS(): return map(int,input().split())
def LIIS(): return list(map(int,input().split()))
def ZER(N): return [False for _ in range(N)]
INF=float("inf")
MOD=10**9+7
# V
# / ̄ψ ̄\
# | 合格祈願 |
# |_____|
##############################################################################
n,m,x,y=IIS()
A=LIIS()
li=[]
sm=0
cnt=0
for i in range(n):
if A[i]>=x:sm+=A[i];cnt+=1;continue
elif A[i]<=y:continue
else:li.append(A[i])
if not cnt<=m:
print("Handicapped")
exit()
li.sort(reverse=True)
print(sum(li[:min(m-cnt,len(li))])+sm)
mono_0812