結果
問題 | No.1454 ツブ消ししとるなEasy |
ユーザー |
|
提出日時 | 2021-03-31 21:10:34 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 67 ms / 2,000 ms |
コード長 | 427 bytes |
コンパイル時間 | 644 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 80,640 KB |
最終ジャッジ日時 | 2024-12-15 12:53:43 |
合計ジャッジ時間 | 1,832 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
N,M,X,Y=map(int,input().split())A=sorted(list(map(int,input().split())))ans=sum(A)need = N-Mfor i in range(N):if A[i] <= Y:ans -= A[i]need-=1elif A[i]>=X:if need<=0:print(ans);exit()print("Handicapped");exit()else:if need<=0:print(ans);exit()ans -= A[i]need-=1if need<=0:print(ans);exit()print(0)