A. 查找排序

    傳統題 1000ms 256MiB

查找排序

該比賽已結束,您無法在比賽模式下遞交該題目。您可以點選“在題庫中開啟”以普通模式檢視和遞交本題。

Title Description

Given an array aia_i of length nn , you need to sort it in positive order, search for kk after sorting, and output the index of kk . If this number does not exist, output -1.

Enter description

Enter a total of 2 lines. On the first line, there are two integers n,kn, k , with meanings as indicated in the question. On the second line, there are nn integers aia_i , with their meanings as indicated in the question.

Output description

One line, one integer, representing the index of kk .

Example

Sample Group # 1

Input Example

5 4
5 4 3 2 1 

Output Example

4

Sample Group # 2

Input Example

5 14
14 17 15 16 13 

Output Example

2

【12月月赛】New Year

未參加
狀態
已結束
規則
XCPC
題目
3
開始於
2024-12-7 14:45
結束於
2024-12-8 10:45
持續時間
20 小時
主持人
參賽人數
10