13 lines
224 B
Python
13 lines
224 B
Python
_, k = map(int, input().split())
|
|
a = list(map(int, input().split()))
|
|
u = set(a)
|
|
|
|
c = {}
|
|
for v in u:
|
|
c[v] = len([x for x in a if x == v])
|
|
|
|
for _ in range(k):
|
|
m = max(c, key=c.get)
|
|
c[m] -= 1
|
|
|
|
print(max(c.values())) |