Le Le loves sequences, so El El gives him one as present days ago.
Le Le treasures the sequence

, and everyday he will do the following as routine:
- Choose a subsequence
, create a new sequence b, and let
. - Sort
increasingly.
For he takes arithmetic progressions as the most beautiful sequences in the world, he wonders how many ways to choose the subsequence so that

could be an arithmetic progression.
An arithmetic progression is a sequence

that

.
输入描述:
The first line contains an integer

— number of test cases.
Each test case contains two lines:
The first line contains an integer

, denoting the length of the sequence.
The second line contains
integers
.
输出描述:
Output
lines containing the number of possible subsequences for each test case.
备注:

.
For each test case, it's guaranteed that

and all

are distinct.