#P7459. [2017年杭电多校]Kanade's trio
[2017年杭电多校]Kanade's trio
Kanade's trio
Problem Description
Give you an array £¬you need to calculate how many tuples satisfy that and There are T test cases.
Input
There is only one integer T on first line. For each test case , the first line consists of one integer ,and the second line consists of integers which means the array
Output
For each test case , output an integer , which means the answer.
Sample Input
1
5
1 2 3 4 5
Sample Output
6
Source
2017 Multi-University Training Contest - Team 3