結果
| 問題 | No.2334 Distinct Cards |
| コンテスト | |
| ユーザー |
310icecrystal
|
| 提出日時 | 2023-06-03 03:49:23 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 76 ms / 2,000 ms |
| + 285µs | |
| コード長 | 266 bytes |
| 記録 | |
| コンパイル時間 | 75 ms |
| コンパイル使用メモリ | 64,488 KB |
| 実行使用メモリ | 82,976 KB |
| 最終ジャッジ日時 | 2026-10-15 07:49:39 |
| 合計ジャッジ時間 | 2,887 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
N,K = map(int,input().split())
A = list(map(int,input().split()))
from collections import Counter
A_count = Counter(A)
A_count_sorted = sorted(A_count.items(),key = lambda x:x[1],reverse=True)
i = 0
while K >= 1:
K -= A_count_sorted[i][1]
i += 1
print(i)
310icecrystal