You are given an array $$$a$$$ of $$$n$$$ integers. A sub-array $$$[a_l, a_{l+1}, \cdots a_r]$$$ is considered end-balanced if $$$l \lt r$$$ and $$$a_l + a_r = a_{l+1} + ... + a_{r-1}$$$.
For example, the subarrays $$$[4, 9, 5]$$$, $$$[-1, 3, 5, 9]$$$, and $$$[0, 0]$$$ are considered end-balanced, and the subarrays $$$[0]$$$, $$$[-2, -3, -5]$$$, and $$$[1, 1]$$$ are not.
How many subarrays of $$$a$$$ are end-balanced?
The first line of the input contains a single integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The description of the test cases follows.
The first line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 2\cdot 10^5$$$) — the size of the array $$$a$$$.
The second line of each test case contains $$$n$$$ integers $$$a_1, a_2 \cdots a_n$$$ ($$$-10^9 \le a_i \le 10^9$$$) — the elements of the array $$$a$$$.
It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\cdot 10^5$$$.
For each test case, print a single integer — the number of end-balanced subarrays of $$$a$$$.
751 2 3 4 530 0 04-10 5 -5 1062 2 2 2 2 271 0 1 0 1 0 151000000000 1000000000 1000000000 1000000000 10000000001-1000000000
2 3 2 3 5 2 0
The end-balanced subarrays in the first test case are:
The end-balanced subarrays in the second test case are:
The end-balanced subarrays in the third test case are:
| Name |
|---|


