Competitions
2-й этап Всеукраинской олимпиады по информатике 2013-2014 уч.г. 10 кл. г. Бердичев
Find an element
Array of n integers is given. Find its k-th element in decreasing order.
Input data
First line contains the number of elements n (1 ≤ n ≤ 10^5
) in array, and integer k(1 ≤ k ≤ 10^5
). Second line contains n integers, not greater than 10^9
by absolute value.
Output data
Print the k-th element of array sorted in decreasing order, or -1 if such element does not exist.
Examples
Input example #1
10 3 1 8 2 1 4 7 3 2 3 6
Output example #1
6