Time limit
2s
Memory limit
128 MB
You are given a sequence A[1], A[2], ..., A[N] of N integers. Choose two numbers from the sequence, possibly the same element, so that their absolute difference is at least M.
Find the smallest possible difference among all valid choices.
The first line contains two integers N and M.
Each of the next N lines contains one integer, in order: A[1], A[2], ..., A[N].
Print the smallest difference that is at least M.
It is guaranteed that at least one valid choice exists.
1 <= N <= 100,0000 <= M <= 2,000,000,0000 <= |A[i]| <= 1,000,000,000