Given a sequence of length

and a positive integer

, you can permute the sequence. The goal is to permute the sequence in such a way that the difference between any two adjacent elements is at least

. How many different permutations can achieve this goal? It is guaranteed that the

elements in the sequence are all distinct.
输入描述:
The first line contains two integers
)
and
)
, representing the length of the sequence and the difference value, respectively.
The second line contains
integers )
, representing the elements in the sequence.
输出描述:
Output an integer in a single line, representing the number of permutations that achieve the goal.
示例1
说明
In the example, only permutaions
![[1, 4, 2]](https://hr.nowcoder.com/equation?tex=%5B1%2C%204%2C%202%5D)
and
![[2, 4, 1]](https://hr.nowcoder.com/equation?tex=%5B2%2C%204%2C%201%5D)
achieve the goal.