結果
| 問題 | No.2334 Distinct Cards |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-10-04 23:07:08 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 85 ms / 2,000 ms |
| + 792µs | |
| コード長 | 257 bytes |
| 記録 | |
| コンパイル時間 | 72 ms |
| コンパイル使用メモリ | 14,720 KB |
| 実行使用メモリ | 25,680 KB |
| 最終ジャッジ日時 | 2026-10-15 07:52:49 |
| 合計ジャッジ時間 | 3,307 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
from collections import Counter
n, k = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
c = sorted(Counter(a).values())[::-1]
ans = 1
for cc in c:
k -= cc
if k <= 0:
print(ans)
break
else:
ans += 1