Every season at the cinnabar mines of Vermilion, someone must track down a clerical error. This year the task falls to Zara, armed only with the ribbons register. Task: All values are positive. Print the length of the shortest contiguous subarray whose sum is at least s, or 0 if none. Input format: First line: n and s. Second line: n positive integers. Output format: Print the minimum length, or 0 if impossible. Constraints: 1 <= n <= 2809; 1 <= a[i] <= 1000000000; 1 <= s <= 10^18.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= n <= 2809; 1 <= a[i] <= 1000000000; 1 <= s <= 10^18.
