結果

問題 No.2334 Distinct Cards
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2023-06-02 21:58:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 154 ms / 2,000 ms
コード長 325 bytes
コンパイル時間 572 ms
コンパイル使用メモリ 87,148 KB
実行使用メモリ 106,556 KB
最終ジャッジ日時 2023-08-28 03:24:59
合計ジャッジ時間 5,090 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
72,624 KB
testcase_01 AC 110 ms
72,760 KB
testcase_02 AC 107 ms
72,628 KB
testcase_03 AC 108 ms
72,764 KB
testcase_04 AC 106 ms
72,708 KB
testcase_05 AC 110 ms
73,084 KB
testcase_06 AC 107 ms
72,716 KB
testcase_07 AC 110 ms
72,656 KB
testcase_08 AC 108 ms
72,696 KB
testcase_09 AC 110 ms
72,712 KB
testcase_10 AC 108 ms
72,712 KB
testcase_11 AC 108 ms
72,768 KB
testcase_12 AC 154 ms
100,396 KB
testcase_13 AC 153 ms
100,976 KB
testcase_14 AC 154 ms
100,664 KB
testcase_15 AC 153 ms
100,864 KB
testcase_16 AC 152 ms
100,736 KB
testcase_17 AC 146 ms
106,040 KB
testcase_18 AC 149 ms
106,392 KB
testcase_19 AC 150 ms
106,556 KB
testcase_20 AC 131 ms
91,020 KB
testcase_21 AC 132 ms
91,108 KB
testcase_22 AC 131 ms
91,024 KB
testcase_23 AC 108 ms
72,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
input = sys.stdin.readline

N,K = map(int,input().split())
A = list(map(int,input().split()))
C = Counter(A)
V = list(C.values())
V.sort(reverse=True)
cnt = 0
x = 0
while x<K:
    x += V[cnt]
    cnt += 1
print(cnt)
0