結果

問題 No.1454 ツブ消ししとるなEasy
コンテスト
ユーザー miya145592
提出日時 2023-05-09 00:06:18
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 45 ms / 2,000 ms
+ 16µs
コード長 307 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 311 ms
コンパイル使用メモリ 82,300 KB
実行使用メモリ 89,240 KB
最終ジャッジ日時 2026-09-29 21:32:08
合計ジャッジ時間 3,063 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from collections import deque
import bisect
N, M, X, Y = map(int, input().split())
A = list(map(int, input().split()))
A.sort()
A = deque(A)
while A and A[0]<=Y:
    A.popleft()
pos = bisect.bisect_left(A, X)
if len(A)-pos>M:
    print("Handicapped")
    exit()
while len(A)>M:
    A.popleft()
print(sum(A))
0