Given an unsorted array of positive integers. Find the number of triangles that can be formed with three different array elements as lengths of three sides of triangles.
The first line of the input contains T denoting the number of test cases. The first line of each test case contains an integer represents N and the second line contains N space-separated integers.
For each test case, print the number of possible triangles in a separate line.
1 <= T <= 10
3 <= N <= 103
1 <= arr[i] <= 105