#P2714. 四元组统计
四元组统计
Description
There are positive integers . You need to count how many quadruples satisfy .
Input Format
The input contains multiple testdata sets. For each testdata set: the first line contains a positive integer , followed by one line with positive integers .
Output Format
Several lines, each corresponding to one testdata set, representing the number of quadruples that satisfy the requirement.
4
2 3 4 5
4
2 4 6 8
7
2 3 4 5 7 6 8
1
0
34
Hint
For of the testdata, , and the number of testdata sets does not exceed .
For of the testdata, , , and the number of testdata sets does not exceed .
Translated by ChatGPT 5
京公网安备 11011102002149号