The requirement for this problem is as simple as it can be.
You will be given a sequence of N integers: P1, P2, … , Pn. You have to find the number of possible pairs (Pi, Pj) such that: i ≠j and A ≤ Pi + Pj ≤ B where A and B are two integers.
Input
Input will start with an integer, T (≤ 100) denoting the number of test cases. Each case will contain three lines:
An integer, N (1 ≤ N ≤ 105)
Two space separated integers, A B (1 ≤ A ≤ B ≤ 106)
N space separated integers, each of which is called Pi (1 ≤ Pi ≤ 104)
Output
For each case, print a single line in this format Case x: z where x is the case number and z is the number of possible ways to form such pair.