Problem 3091 · Medium

Apply Operations to Make Sum of Array Greater Than or Equal to k

Start from [1] and either raise an element by one or append a copy of one; the best plan uses one repeated value near the square root of k.

Open the interactive visualisation