結果

問題 No.1380 Borderline
ユーザー hiragn
提出日時 2022-11-24 09:53:09
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 342 bytes
コンパイル時間 156 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-09-25 09:46:48
合計ジャッジ時間 2,976 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 2
other AC * 2 WA * 39
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import accumulate
from bisect import bisect_left
from collections import Counter


def main():
    n, k = map(int, input().split())
    p = list(map(int, input().split()))
    p.sort(reverse=True)

    c = Counter(p)
    acc = list(accumulate(c.values()))
    print(bisect_left(acc, k))


if __name__ == "__main__":
    main()
0