Problem: Yaroslav is playing a computer game, and at one of the levels, he encountered mushrooms arranged in a row. Each mushroom has its own level of toxicity; the -th mushroom from the beginning has a toxicity level of . Yaroslav can choose two integers , and then his character will take turns from left to right to eat mushrooms from this subsegment one by one, i.e., the mushrooms with numbers .
The character has a toxicity level , initially equal to . The computer game is defined by the number — the maximum toxicity level at any given time. When eating a mushroom with toxicity level , the following happens:
- The toxicity level of the character is increased by .
- If , the process continues; otherwise, becomes zero and the process continues.
Yaroslav became interested in how many ways there are to choose the values of and such that the final value of is not zero. Help Yaroslav find this number!
Input Format: Each test consists of multiple test cases. The first line contains an integer () — the number of test cases. Then follows the description of the test cases.
The first line of each test case contains two integers , () — the number of mushrooms and the maximum toxicity level.
The second line of each test case contains numbers ().
It is guaranteed that the sum of over all test cases does not exceed .
Output Format: For each test case, output a single number — the number of subsegments such that the final value of will not be zero.
Note: In the first test case, the subsegments , , , , , , and are suitable.
In the second test case, non-zero will remain only on the subsegments and .
In the third test case, on the only possible subsegment, will be zero.