Due to weak test data, additional test cases have been provided. Data provided by
Given an array of
integers, find the shortest length subarray that has a sum greater than or equal to
.
Input Specification
The first line will contain integers,
.
The second line will contain integers
.
Output Specification
Output the shortest length subarray that has a sum greater than or equal to . If there is no subarray, print
-1
.
Subtasks
Subtask 1 [10%]
Subtask 2 [90%]
No further constraints.
Sample Input
6 3
1 0 2 0 1 2
Sample Output
2
Comments