P17254 [HackerEarth] Sean is proud of his knowledge in mathematics and is always seen boasting about it everywhere. One day Sean's friend Mary gave him a challenge, and since Mary was a girl Sean had crush o
普及
题目描述

Sean is proud of his knowledge in mathematics and is always seen boasting about it everywhere. One day Sean's friend Mary gave him a challenge, and since Mary was a girl Sean had crush on, Sean accepted her challenge without querying further what was it about.

In the challenge, Mary gives Sean a set of integers, and asks the total number of subsets of that set containing positive number of elements, sum of all elements of which equals zero. Since the total number could be very large, Sean is a little bit of afraid of solving this task by himself and seeks your help.

Input:
The first line of input contains the number of test cases t, 2*t lines follow.

For each test case, the first line contains a positive number n, the number of elements in the set.
The second line consists of n integers separated by a single space. i'th integer is denoted by a[i].
Output:
For each test case, output the required answer on a separate line.
Constraints:

1 ≤ t ≤ 5
1 ≤ n ≤ 40
|a[i]| ≤ 1000000000

SAMPLE INPUT
1
4
2 3 -2 -1

SAMPLE OUTPUT
2

Explanation

In the given example, there are only 2 subsets that satisfy the given condition and they are, {2, -2} and {3, -2, -1}

输入格式

见题面

输出格式

见题面

样例输入
5 40 0 -4 0 -3 0 -2 1 -3 2 0 4 -3 0 -4 0 -3 1 -4 0 -4 2 -3 0 0 2 -2 4 -2 1 -4 1 -2 0 -1 2 -3 3 0 3 -3 40 2 0 3 -2 4 -3 0 0 0 -1 4 -2 1 -1 2 -3 0 -3 1 -2 4 -4 1 0 0 -3 3 -1 0 -1 1 -2 1 -4 4 -2 4 -2 2 -4 40 0 -3 1 -1 4 0 4 0 1 -2 4 0 1 0 2 -4 3 -2 2 -3 1 0 0 -4 4 -1 2 0 0 -4 0 0 3 -3 3 -4 1 0 4 -2 40 2 -3 4 -1 3 -4 0 -3 1 -4 3 -2 4 0 2 0 2 -1 0 -4 0 -2 2 0 3 0 0 -4 2 -1 3 0 2 -4 3 -2 3 -3 1 -2 40 4 -4 1 -3 0 0 3 -4 1 0 0 -4 3 -2 4 -3 0 -1 2 -2 3 -2 4 0 3 -2 4 -4 2 0 1 -1 2 -4 1 -4 0 -1 0 -3
样例输出
58100037631 48909416959 53176205823 65450737663 51917165567