結果
| 問題 | No.2334 Distinct Cards |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-02 22:08:16 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 73 ms / 2,000 ms |
| + 598µs | |
| コード長 | 438 bytes |
| 記録 | |
| コンパイル時間 | 64 ms |
| コンパイル使用メモリ | 14,720 KB |
| 実行使用メモリ | 28,308 KB |
| 最終ジャッジ日時 | 2026-10-15 07:48:27 |
| 合計ジャッジ時間 | 2,909 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
from collections import Counter
import sys
def main():
sys.setrecursionlimit(1000000)
input = lambda: sys.stdin.readline()[:-1]
N, K = map(int, input().split())
A = map(int, input().split())
cnt = Counter(A).most_common()
ans = 0
for _, n in cnt:
ans += 1
K -= n
if K <= 0:
break
print(ans)
if not __debug__:
f = open(sys.argv[1], "r")
sys.stdin = f
main()