結果
問題 | No.2334 Distinct Cards |
ユーザー |
![]() |
提出日時 | 2023-06-02 21:39:13 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 113 ms / 2,000 ms |
コード長 | 838 bytes |
コンパイル時間 | 354 ms |
コンパイル使用メモリ | 82,688 KB |
実行使用メモリ | 100,096 KB |
最終ジャッジ日時 | 2024-12-28 16:52:29 |
合計ジャッジ時間 | 3,142 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
# import pypyjit;pypyjit.set_param("max_unroll_recursion=-1")# from bisect import *from collections import *# from heapq import *# from itertools import *# from math import *# from datetime import *# from decimal import*# from string import ascii_lowercase,ascii_uppercase# import numpy as npimport sysimport os# sys.setrecursionlimit(10**6)INF = 10**18MOD = 998244353# MOD = 10**9 + 7File = open("input.txt", "r") if os.path.exists("input.txt") else sys.stdindef input():return File.readline()[:-1]# ///////////////////////////////////////////////////////////////////////////N, K = map(int, input().split())A = list(map(int, input().split()))cnt = Counter(A)cnt = sorted(cnt.values(), reverse=True)total = 0for i in range(N):total += cnt[i]if total >= K:print(i + 1)break