Given an array A consisting of integers of size N and 2 additional integers K and X, you need to find the number of Subsets of this array of size K, where Absolute difference between the Maximum and Minimum number of the subset is at most X.
As this number that you need to find can be rather large, print it Modulo 109+7
Input Format :
The first line contains 3 space separated integers denoting N, K and X. The next line contains N space separated integers, where the ith integer denotes A[i].
Output Format:
Print the required answer on a single line. As the answer can be rather large, print it Modulo 109+7.
Constraints:
1≤N≤5×105
1≤K≤N
1≤A[i],X≤109
Note :
Note that it may be possible that the maximum and minimum element of a subset may be equal to each other. 2 subsets are considered different if they differ in atleast one index picked from the array A.
One of the ways to pick a subset is : [5,3,1]. For this array, each subset of size 3 is a valid pick.