Minimal Subarray Length#6951

Minimal Subarray Length

3 seconds
128 megabytes
Very easy (≈850)

You are given an integer sequence of length and another value .

You have to find a contiguous subsequence of the given sequence such that the sum is greater or equal to . And you have to find that segment with minimal length.

Input

First line of the input file contains the number of test cases. Each test case starts with a line containing integers (1 \leq N \leq 500000) and (-10^9 \leq X \leq 10^9). Next line contains integers denoting the elements of the sequence. These integers will be between -10^9 to 10^9 inclusive.

Output

For each test case output the minimum length of the sub array whose sum is greater or equal to . If there is no such array, output .

Examples

Example 1

Loading
Loading