You are given an array of \(N\) non-negative integers \([A_1, A_2, A_3, ... , A_N]\), and a non-negative integer \(K\). A subarray is an array composed of a contiguous block of original array elements. You can perform the following operation on a subarray:
Increase each element of this subarray by a non-negative number such that the total sum of all the increments does not exceed \(K\). You must make all the elements of this subarray equal.
Determine the maximum length of a subarray in which all the elements can be made equal by performing the mentioned operation.
Input format
- First line: An integer \(N\) denoting the number of elements in the array
- Second line: An integer \(K\)
- Third line: \(N\) space-separated integers where \(A_i\) denotes the elements of the array
Output format
Print the maximum length of a subarray in which all the elements can be made equal by performing the operation.
Constraints
\(1 ≤ N ≤ 10^5\\ 0 ≤ K ≤ 10^9\\ 1 ≤ Ai ≤ 10^9\)