結果
問題 |
No.1454 ツブ消ししとるなEasy
|
ユーザー |
![]() |
提出日時 | 2021-09-12 15:16:11 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 73 ms / 2,000 ms |
コード長 | 347 bytes |
コンパイル時間 | 190 ms |
コンパイル使用メモリ | 82,584 KB |
実行使用メモリ | 88,868 KB |
最終ジャッジ日時 | 2024-06-24 05:07:05 |
合計ジャッジ時間 | 1,973 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
n,m,x,y = map(int,input().split()) A = sorted(list(map(int,input().split()))) ans = [] more = 0 for i in A: if x > i > y: ans.append(i) elif x <= i: ans.append(i) more += 1 if len(ans) - more < len(ans) - m: print("Handicapped") elif len(ans) - m <= 0: print(sum(ans)) else: print(sum(ans[len(ans)-m:]))