Masala #0068
K-kichik son
N ta elementdan iborat to’plamdagi K-kichik sonni toping.
INPUT.TXT kirish faylining dastlabki satrida bitta butun son, \(N (1 ≤ N ≤ 10^5)\) soni kiritiladi. Keyingi satrda \(N\) ta \([-10^9, 10^9]\) oralig’idagi butun sonlar bo’sh joy bilan ajratilgan holda kiritiladi. Oxirgi satrda esa bitta butun son, \(K (1 ≤ K ≤ N)\) soni kiritiladi.
OUTPUT.TXT chiqish faylida bitta butun son, masala javobini chop eting.
# | input.txt | output.txt |
---|---|---|
1 |
2 5 9 1 |
5 |
2 |
3 5 2 7 2 |
5 |
3 |
8 10 11 13 8 1 9 4 12 4 |
9 |