結果
| 問題 | No.2334 Distinct Cards |
| コンテスト | |
| ユーザー |
yupooh
|
| 提出日時 | 2023-06-02 21:33:42 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 81 ms / 2,000 ms |
| + 458µs | |
| コード長 | 298 bytes |
| 記録 | |
| コンパイル時間 | 98 ms |
| コンパイル使用メモリ | 64,924 KB |
| 実行使用メモリ | 82,060 KB |
| 最終ジャッジ日時 | 2026-10-15 07:46:34 |
| 合計ジャッジ時間 | 3,527 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
import sys input = sys.stdin.readline from collections import defaultdict n,k=map(int,input().split()) a=list(map(int,input().split())) dic=defaultdict(int) for i in a: dic[i]+=1 l=[] for i in dic: l.append(dic[i]) l.sort(reverse=True) now=0 idx=0 while now<k: now+=l[idx] idx+=1 print(idx)
yupooh