Maximum Subset

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

Let us define the value of a multiset of integers is the minimum difference between any two distinct elements. If a multiset contains two elements with the same value, then the two elements are considered different elements thus the value of the multiset is 0.

Given a multiset of integers A consisting of N elements, we want to find the value of the subset of A consisting of K elements which has the maximum value.

입력

The first line contains two integers: N K (2 ≤ KN ≤ 100,000) in a line denoting the number of elements of A and the number of elements of the subset of A we are looking for. The second line contains N integers: A1, A2, ..., AN (0 ≤ Ai ≤ 1,000,000,000) representing the elements of set A.

출력

The output contains the value of the subset of A consisting of K elements which has the maximum value, in a line.