結果
| 問題 |
No.1454 ツブ消ししとるなEasy
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-04-01 12:53:13 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 63 ms / 2,000 ms |
| コード長 | 280 bytes |
| コンパイル時間 | 352 ms |
| コンパイル使用メモリ | 82,368 KB |
| 実行使用メモリ | 90,840 KB |
| 最終ジャッジ日時 | 2024-12-17 16:56:49 |
| 合計ジャッジ時間 | 1,999 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 16 |
ソースコード
from bisect import bisect
from itertools import accumulate
N,M,X,Y = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
by,bx = bisect(A,Y),bisect(A,X)
if M < N-bx:
print("Handicapped")
else:
AC = [0]+list(accumulate(A))
print(AC[-1]-AC[max(N-M,by)])