luogu#P9880. [EC Final 2021] Future Coder
[EC Final 2021] Future Coder
题目描述
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.
题目大意
题目描述
共 组数据,每组给出一个数 和 个数 ,求有多少个二元组 满足 。
输入格式
第一行为一个数 。
接下来 组数据,每组数据第一行为一个数 ,第二行为 个数 。
输出格式
行,为满足 的二元组 的组数。
Translated from FurippuWRY。
2
8
3 -1 4 1 -5 9 2 -6
1
0
19
0