Problems
Find an element
Find an element
Array of n integers is given. Find its k-th element in decreasing order.
Input
First line contains the number of elements n (1 ≤ n ≤ 105
) in array, and integer k(1 ≤ k ≤ 105
). Second line contains n integers, not greater than 109
by absolute value.
Output
Print the k-th element of array sorted in decreasing order, or -1 if such element does not exist.
Input example #1
10 3 1 8 2 1 4 7 3 2 3 6
Output example #1
6