Array Reduction
Given an array consisting of integers. For one operation, you can choose position (), decrease by , and increase the value of all other elements () by .
Find the minimum number of operations needed to make all elements of the array less than or equal to zero (i.e., non-positive), or report that it is impossible to do so.
Input
The first line contains three integers , , (, ) — the length of the array and the operation parameters.
The second line contains integers () — the initial values of the array elements.
Output
Output a single integer — the minimum number of operations needed to make all elements of the array less than or equal to zero. If it is impossible, output .
If it is possible, output integers (), which represent the number of operations performed on the element with index . Note that the equality must hold.
Examples
Scoring
( points) ;
( points) ;
( points) ;
( points) ;
( points) ;
( points) ;
( points) ;
( points) ;
( points) ;
( points) ;
( points) without additional constraints.