#P1138. 第 k 小整数

第 k 小整数

Description

You are given nn positive integers. Find the kk-th smallest integer among the distinct values (count equal integers only once).

Input Format

The first line contains nn and kk; starting from the second line are the nn positive integers, separated by spaces.

Output Format

Output the value of the kk-th smallest integer; if there is no solution, output NO RESULT.

10 3
1 3 3 7 2 5 1 2 4 6

3

Hint

Constraints: n10000n \leq 10000, k4000k \leq 4000, and all positive integers are less than 3000030000.

Translated by ChatGPT 5