logo AlgoBeat OnlineJudge
登录 注册

#209423. [EC Final 2021] Future Coder

内存限制:1024 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

Prof. Pang builds his famous coding team recently. To pursue a gold medal in ICPC, hundreds of pupils join his team. Unfortunately, one of Prof. Pang's students believes that for any integers and , . To disprove this proposition, Prof. Pang writes numbers on a paper and wants you to count how many pairs of numbers () satisfies .

输入格式

The first line contains a single integer () denoting the number of test cases.

For each test case, the first line contains a single integer (). The second line contains integers ().

It is guaranteed that the sum of over all test cases will not exceed .

输出格式

For each test case, print one line containing the answer.

样例

样例输入 1

2
8
3 -1 4 1 -5 9 2 -6
1
0

样例输出 1

19
0