Problem: You are given an array of integers. Find the number of pairs () where the sum of is greater than or equal to and less than or equal to (that is, ).
For example, if , , and , then two pairs are suitable:
- and ();
- and ().
Input Format: The first line contains an integer (). Then test cases follow.
The first line of each test case contains three integers (, ) — the length of the array and the limits on the sum in the pair.
The second line contains integers ().
It is guaranteed that the sum of overall test cases does not exceed .
Output Format: For each test case, output a single integer — the number of index pairs (), such that .