Shortest Stretch Reaching S
You are given an array of n positive integers a_1, a_2, ..., a_n and a target S.
A stretch is a contiguous subarray a_l, a_{l+1}, ..., a_r with 1 ≤ l ≤ r ≤ n; its length is
r − l + 1. Find the length of the shortest stretch whose sum is at least S.
If no stretch reaches S (that is, even the whole array sums to less than S), the answer is 0.
Input
The first line contains two integers n and S (1 ≤ n ≤ 10^6, 1 ≤ S ≤ 10^15).
The second line contains n integers a_1, a_2, ..., a_n (1 ≤ a_i ≤ 10^9).
Output
Print a single integer: the minimum length of a contiguous subarray with sum at least S, or 0 if
there is none.
Notes
In the first example, the stretch 4 3 has sum 7 ≥ 7 and length 2, and no single element reaches 7.
In the second example, the whole array sums to 10 < 11, so the answer is 0.
Sums can exceed 2^31; use 64-bit integers.