P1138 The k-th Smallest Integer
Description
You are given $n$ positive integers. Find the $k$-th smallest integer among the distinct values (count equal integers only once).
Input Format
The first line contains $n$ and $k$; starting from the second line are the $n$ positive integers, separated by spaces.
Output Format
Output the value of the $k$-th smallest integer; if there is no solution, output `NO RESULT`.
Explanation/Hint
Constraints: $n \leq 10000$, $k \leq 4000$, and all positive integers are less than $30000$.
Translated by ChatGPT 5