LearnPy Hub
← Arena
AdvancedRating 1900

k-th Smallest Pair Distance

The distance of a pair is |aᵢ − aⱼ|. Over all pairs i < j, print the k-th smallest distance.

Input

n and k, then n integers.

Output

One integer.

Sample 1

Input
3 1
1 3 1
Output
0

Sample 2

Input
3 2
1 1 1
Output
0
solution.py
Output appears here
k-th Smallest Pair Distance · Python Arena problem · LearnPy Hub