You have an array of size `n` of positive integers on which you can do the following operation by at most `N` times:

* Choose a sub-array and decrease its elements value by `k` (`k` must be smaller than the sub-array's minimum value).
* Such an operation costs the size of the sub-array multiplied by `k`.
* The total costs of these operations must not be larger than `M`.
* `N` and M can be extremely large.

Can you give me an efficient algorithm for minimizing the maximum element in this array?