結果
| 問題 | No.1454 ツブ消ししとるなEasy |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-07-03 15:05:59 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 136 ms / 2,000 ms |
| コード長 | 378 bytes |
| 記録 | |
| コンパイル時間 | 1,155 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 23,796 KB |
| 最終ジャッジ日時 | 2026-03-24 23:09:50 |
| 合計ジャッジ時間 | 3,660 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 16 |
ソースコード
n, m, x, y = map(int, input().split())
A = list(map(int, input().split()))
s = [a for a in A if a > y]
s.sort(reverse=True)
ans = []
for i in range(len(s)):
if s[i] >= x and len(ans) <= m:
ans.append(s[i])
if len(ans) > m:
print("Handicapped")
else:
i = len(ans)
while i < m and i < len(s):
ans.append(s[i])
i += 1
print(sum(ans))