Shortest Subsequence With Sum at Least X

No attempts yetTime limit3sMemory limit256 MB

Problem

You are given an integer sequence A1,A2,,ANA_1, A_2, \dots, A_N of length NN and an integer XX.

Consider the subsequences of consecutive elements Ai,Ai+1,,AjA_i, A_{i+1}, \dots, A_j (1ijN1 \le i \le j \le N) whose elements sum to XX or more. Write a program that finds the length of the shortest such subsequence. A subsequence holds at least one element.

Input

The first line contains the number of test cases TT.

The first line of each test case contains NN (1N500,0001 \le N \le 500{,}000) and XX (109X109-10^9 \le X \le 10^9). The second line contains the NN elements of the sequence, separated by spaces. Each element is an integer between 109-10^9 and 10910^9.

Output

For each test case, print on one line the shortest length among the subsequences of consecutive elements whose sum is XX or more. If there is no such subsequence, print 1-1.