You are given an object on the axis. Initially, you are at point , and you make steps on the axis. In the -th step, you change your coordinate according to the rule x := x + a_i. The current position has three cases:
c=0, which means that we are not moving at all (undirected).
c>0, which means we are moving to the right
c<0, which means we are moving to the left
During the simulation of all the object's movements, how many times will the object be undirected?
The first line contains one integer (1 \le t \le 10^4) – the number of test cases.
The first line of each test case contains two integers (1 \le n \le 10^5; -100 \le x \le 100) – the number of moves and the initial position.
The second line contains space-separated integers a_1,a_2,..,a_n (-1000 \le a_1,a_2,..,a_n \le 1000) – moves along the line.
It is guaranteed that the sum of does not exceed 4 \cdot 10^5.
For each test case, output a single integer, which is the number of times the object is undirected.
Example 1
In the first test case, we have the following process:
Move : Initially, you are at point c=0, so you are undirected.
Move : You are at point c=0+1=1.
Move : You are at point c=2+1=3.
Move : You are at point c=3-2=1.
Move : You are at point c=1-1=0, so you are undirected.
Thus, the answer is .
In the second test case, we have the following process:
Move : You are at point c=3.
Move : You are at point c=3+1=4.
Move : You are at point c=4-3=1.
Move : You are at point c=1-5=-4.
Move : You are at point c=-4+5=1.
Move : You are at point c=1+1=2.
Thus, the answer is .
In the third test case, we have the following process:
Move : You are at point c=2.
Move : You are at point c=2-1=1.
Move : You are at point c=1-1=0, so you are undirected.
Move : You are at point c=0-1=-1.
Move : You are at point c=-1+1=0, so you are undirected.
Thus, the answer is .
In the fourth test case, we have the following process:
Move : You are at point .
Move : You are at point 3-1=2.
Move : You are at point 2-1=1.
Move : You are at point 1-1=0, so you are undirected.
Thus, the answer is .
In the fifth test case, we have the following process:
Move : You are at point .
Move : You are at point 4-3=1.
Move : You are at point 1-1=0, so you are undirected.
Move : You are at point (no move), so you are undirected.
Move : You are at point (no move), so you are undirected.
Thus, the answer is .
Subtask ( points) : (a_i=1).
Subtask ( points) : (a_i>0;x>0)
Subtask ( points) : (1 \le n \le 500)
Subtask ( points) : No additional constraints.