diff --git a/arraysmoothening.py b/arraysmoothening.py new file mode 100644 index 0000000..62ac0a7 --- /dev/null +++ b/arraysmoothening.py @@ -0,0 +1,13 @@ +_, 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())) \ No newline at end of file