Phần tử lớn thứ K


Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 1G

Problem type

Cho dãy số nguyên $a_1,a_2,...,a_N$ đôi một phân biệt. Hãy in ra phần tử lớn thứ $K$ trong dãy.

Dữ liệu

  • Dòng duy nhất chứa hai số nguyên $N, K$ $(1 \le K \le N \le 10^5)$;
  • Dòng tiếp theo chứa $N$ số nguyên $a_i$ $(0< a_i \le 10^9)$.

Kết quả

  • Kết quả bài toán.

Ví dụ

Ví dụ 1

input

5 2
1 6 4 8 3

output

6

Comments

There are no comments at the moment.