An array has N integers (a1,a2,…,an) we have to perform operations on this array ,
In one operation you have to pic a subarray of size K and add 1 to every element in the
subarray.We can do atmost P operations on this array
Goal is to maximize the minimum element in the array .
Find the minimum element after perform P such operations
N K P
Array of size N
5 2 4
5 4 3 2 1
minimum value can be 4 after 4 operations of incrementing 2 elements each time.
@cubefreak777 can you help?