結果

問題 No.1380 Borderline
ユーザー miya145592
提出日時 2023-05-10 03:04:55
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 272 bytes
コンパイル時間 235 ms
コンパイル使用メモリ 82,192 KB
実行使用メモリ 54,188 KB
最終ジャッジ日時 2024-11-26 10:22:31
合計ジャッジ時間 2,972 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 40 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect
N, K = map(int, input().split())
P = list(map(int, input().split()))
P.sort()
l = 0
r = 401
ans = 0
while r-l>1:
    mid = (l+r)//2
    pos = bisect.bisect_left(P, mid)
    if N-pos<=K:
        r = mid
        ans = N-pos
    else:
        l = mid
print(ans)
0