結果
| 問題 |
No.1454 ツブ消ししとるなEasy
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-05-02 06:02:15 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 78 ms / 2,000 ms |
| コード長 | 319 bytes |
| コンパイル時間 | 110 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 20,748 KB |
| 最終ジャッジ日時 | 2024-07-20 14:35:54 |
| 合計ジャッジ時間 | 1,688 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 16 |
ソースコード
N, M, X, Y = map(int, input().split())
A = list(map(int, input().split()))
x = [i for i in A if i >= X]
L = len(x)
S = sum(x)
if L > M:
print('Handicapped')
else:
z = [j for j in A if j < X and j > Y]
l = len(z)
if l + L <= M:
print(sum(z)+S)
else:
print(sum(sorted(z)[(l+L-M):])+S)