Statement : A. Zhily and Array Operating
Deep in the wilderness, Zhily and Jily discovered a series of gathering places that contain abstract logic. Some of these gathering places harbor inconsistent errors in their logic, which may collapse at any moment. They hope to transmit logic between adjacent gathering places through reasonable transfer arrangements so that as many gathering places as possible can eventually restore logical stability.
You are given an array $a$ of $n$ integers. You can perform the following operation any number of times:
- Choose an index $i$ ($1 \le i \lt n$) and assign $a_i\gets a_i+a_{i+1}$.
Each index can be chosen at most once.
Find the maximum number of positive integers in the final array after all operations.
Each test contains multiple test cases. The first line contains the number of test cases $t$ ($1 \le t \le 10^4$). The description of the test cases follows.
The first line of each test case contains a single integer $n$ ($2\leq n \leq 2\cdot 10^5$).
The second line of each test case contains $n$ integers $a_1,a_2,\ldots,a_n$ ($-10^9\leq a_i\leq 10^9$).
It is guaranteed that the sum of $n$ over all test cases does not exceed $2\cdot10^5$.
For each test case, you should output a single line containing an integer $k$, the number of positive numbers in the final sequence.
Input
4
5
0 -1 3 -3 0
5
0 -2 1 2 3
5
0 1 0 1 0
2
1000000000 -1000000000
Output
3
5
4
1
Note
In the first test case, the array $a$ is operated on by the following process:
$[0,-1,3,-3,0]\to [0,\color{red}{2},3,-3,0]\to [\color{red}{2},2,3,-3,0]$.
There are $3$ positive numbers in the final array, and it can be proven that this is the maximum count of positive integers.
In the second test case, the final array can be:$[4,4,6,5,3]$, which is operated on by the following process:
$[0,-2,1,2,3]\to [0,-2,1,\color{red}{5},3]\to [0,-2,\color{red}{6},5,3]\to [0,\color{red}{4},6,5,3]\to [\color{red}{4},4,6,5,3]$.
In the third test case, the final array can be:$[1,1,1,1,0]$, which is operated on by the following process:
$[0,1,0,1,0]\to [\color{red}{1},1,0,1,0]\to [1,1,\color{red}{1},1,0]$.