Олимпиадный тренинг

Задача 38923. Until the New Year - 2!


In some other world today is December 30th. N trees have been planted in grandfather Kokovani's garden. The height of the ith tree (1  <= i <= N) is hi meters. He decides to choose from these K trees and decorate them with a garland. To make the scenery more beautiful, the height of the decorated trees should be as close to each other as possible. More specifically, let the height of the tallest decorated tree be hmax meters and the height of the lowest decorated tree be hmin< /code> meters. The smaller the hmax-hmin value, the better. Determine the minimum possible value hmax-hmin?

Input
The first line contains two space-separated numbers N and K (2 <= N, K <= 105). The following N lines contain integers hi (1 <= hi <= 109), one per line.

Imprint
Display the answer to the problem.
 
Examples
# Input Output Explanation
1 5 3
10
15
11
14
12
2 If decorating the first, third and fifth trees, hmax=12, hmin=10, hmax-hmin=2
2 5 3
5
7
5
7
7
0