結果

問題 No.1380 Borderline
ユーザー marroncastlemarroncastle
提出日時 2021-02-07 21:30:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 103 ms / 2,000 ms
コード長 259 bytes
コンパイル時間 1,726 ms
コンパイル使用メモリ 86,504 KB
実行使用メモリ 71,808 KB
最終ジャッジ日時 2023-09-19 04:34:33
合計ジャッジ時間 6,571 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
71,604 KB
testcase_01 AC 93 ms
71,664 KB
testcase_02 AC 95 ms
71,412 KB
testcase_03 AC 96 ms
71,600 KB
testcase_04 AC 95 ms
71,392 KB
testcase_05 AC 96 ms
71,604 KB
testcase_06 AC 97 ms
71,672 KB
testcase_07 AC 95 ms
71,428 KB
testcase_08 AC 95 ms
71,612 KB
testcase_09 AC 97 ms
71,688 KB
testcase_10 AC 96 ms
71,600 KB
testcase_11 AC 97 ms
71,672 KB
testcase_12 AC 95 ms
71,480 KB
testcase_13 AC 95 ms
71,252 KB
testcase_14 AC 96 ms
71,448 KB
testcase_15 AC 95 ms
71,484 KB
testcase_16 AC 95 ms
71,416 KB
testcase_17 AC 96 ms
71,424 KB
testcase_18 AC 99 ms
71,548 KB
testcase_19 AC 94 ms
71,512 KB
testcase_20 AC 95 ms
71,484 KB
testcase_21 AC 96 ms
71,448 KB
testcase_22 AC 94 ms
71,396 KB
testcase_23 AC 93 ms
71,396 KB
testcase_24 AC 95 ms
71,648 KB
testcase_25 AC 95 ms
71,304 KB
testcase_26 AC 96 ms
71,616 KB
testcase_27 AC 96 ms
71,668 KB
testcase_28 AC 95 ms
71,660 KB
testcase_29 AC 96 ms
71,712 KB
testcase_30 AC 96 ms
71,808 KB
testcase_31 AC 96 ms
71,432 KB
testcase_32 AC 96 ms
71,432 KB
testcase_33 AC 97 ms
71,796 KB
testcase_34 AC 97 ms
71,676 KB
testcase_35 AC 100 ms
71,700 KB
testcase_36 AC 95 ms
71,476 KB
testcase_37 AC 96 ms
71,668 KB
testcase_38 AC 94 ms
71,396 KB
testcase_39 AC 94 ms
71,496 KB
testcase_40 AC 96 ms
71,800 KB
testcase_41 AC 98 ms
71,440 KB
testcase_42 AC 103 ms
71,804 KB
testcase_43 AC 95 ms
71,496 KB
testcase_44 AC 94 ms
71,672 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
P = list(map(int, input().split()))
from collections import Counter
C = Counter(P)
C = sorted(C.items(), reverse=True)
cnt = 0
for k,v in C:
  if cnt+v>K:
    print(cnt)
    cnt = K+1
    break
  cnt += v
if cnt<=K:print(cnt)
0