結果
問題 | No.1454 ツブ消ししとるなEasy |
ユーザー |
|
提出日時 | 2022-06-02 21:31:49 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 68 ms / 2,000 ms |
コード長 | 344 bytes |
コンパイル時間 | 220 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 80,768 KB |
最終ジャッジ日時 | 2024-09-21 02:09:16 |
合計ジャッジ時間 | 2,118 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
N,M,X,Y = map(int,input().split())A = list(map(int,input().split()))ans = 0l = []count = 0for a in A:if a >= X:ans += acount += 1elif a <= Y:continueelse:l.append(a)import sysif count > M:print("Handicapped")exit()l.sort(reverse = True)ans += sum(l[:M - count])print(ans)