This problem is pretty easy.
A[N] is a array contain N(2 <= N <= 10000) integers.
Garfield define Garfield DN Number as follow:
There are two integers i, j. 1 <= i < j <= N and the A[i] > [j].
It means the Garfield DN Number contain two integers.
Now you have to count all the Garfield DN Numbers.
First line contain a integer T(T <= 100), means the test case.
For each test case, the first integer N, means the array's length.
And then, this line follow N integers.
For each case, count the sum of Garfield DN Number number;