結果
| 問題 | No.2334 Distinct Cards |
| コンテスト | |
| ユーザー |
もちふわゆるゆる
|
| 提出日時 | 2023-06-02 21:53:26 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 78 ms / 2,000 ms |
| コード長 | 357 bytes |
| 記録 | |
| コンパイル時間 | 285 ms |
| コンパイル使用メモリ | 84,992 KB |
| 実行使用メモリ | 107,520 KB |
| 最終ジャッジ日時 | 2026-06-02 19:22:27 |
| 合計ジャッジ時間 | 2,493 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 22 |
ソースコード
import sys, math
input = lambda: sys.stdin.readline()[:-1]
def MI(): return map(int, input().split())
inf = 10**18
from collections import *
n,k = MI()
a = list(MI())
cnt = Counter(a)
cnt = sorted(cnt.items(), key=lambda x:x[1], reverse=True)
now = 0
ans = 0
for key, value in cnt:
if now >= k:
break
now += value
ans += 1
print(ans)
もちふわゆるゆる