Problem Brief
Array Operations
OA
You are given an array of n elements and two variables, x and y.
In each operation, you can:
x from one element of the array.y from the remaining elements.Your task is to find the minimum number of operations required to make every element of the array ≤ 0.
Input Format:
n, the number of elements in the array.n space-separated integers representing the array.x and y, where x > y.Output:
Print the minimum number of operations to make each element ≤ 0.
1Example 1
Input
arr = [10, 20, 30, 40, 50], x = 5, y = 2
Output
13
Explanation
To make every element ≤ 0, the minimum number of operations required is 13.
Constraints
Limits and guarantees your solution can rely on.
🍊🍊