A meter records n per-second power-draw deltas (which may be negative). You must find the shortest burst - the shortest non-empty contiguous stretch of seconds whose total draw is at least K.
Report the length of the shortest contiguous subarray with sum at least K. If no non-empty subarray has sum at least K, report -1.
Input format
Line 1: two integers n and K.
Line 2: n space-separated integers, the per-second deltas in order.
Output format
A single integer: the length of the shortest contiguous subarray with sum at least K, or -1 if none.
Constraints
- 1 <= n <= 100000
- -1000000000 <= K <= 1000000000
- -1000000000 <= each delta <= 1000000000