結果
| 問題 | No.2334 Distinct Cards |
| コンテスト | |
| ユーザー |
H20
|
| 提出日時 | 2023-06-02 21:45:12 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 264 bytes |
| 記録 | |
| コンパイル時間 | 200 ms |
| コンパイル使用メモリ | 85,248 KB |
| 実行使用メモリ | 107,904 KB |
| 最終ジャッジ日時 | 2026-06-02 19:12:52 |
| 合計ジャッジ時間 | 2,172 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 WA * 13 |
ソースコード
import collections
N,K = map(int, input().split())
A = list(map(int, input().split()))
CA = collections.Counter(A)
L = []
for k in CA.values():
L.append(k)
sorted(L)
ans = 0
for i,l in enumerate(L):
K-=l
if K<=0:
print(i+1)
exit()
H20