chore: fix example problem: ch2/4
This commit is contained in:
parent
43ed0fd3f4
commit
b3ca1ea7d0
@ -1 +1 @@
|
|||||||
NO RESULT
|
-1
|
||||||
|
@ -1 +1 @@
|
|||||||
NO RESULT
|
-1
|
||||||
|
@ -1 +1 @@
|
|||||||
NO RESULT
|
-1
|
||||||
|
@ -7,12 +7,11 @@
|
|||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
给出 $N$ 个数,找出第 $P$ 小的数
|
给出 $N$ 个正数,找出第 $P$ 小的数
|
||||||
|
|
||||||
输入包括两行,第一行为 $N$ 和 $P$,第二行为 $N$ 个数
|
输入包括两行,第一行为 $N$ 和 $P$,第二行为 $N$ 个数
|
||||||
|
|
||||||
输出第 $P$ 小的数
|
输出第 $P$ 小的数,若不存在则输出 $-1$
|
||||||
|
|
||||||
|
|
||||||
## Example Cases
|
## Example Cases
|
||||||
|
|
||||||
@ -30,3 +29,19 @@
|
|||||||
```
|
```
|
||||||
2
|
2
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Case 2
|
||||||
|
|
||||||
|
#### Input
|
||||||
|
|
||||||
|
```
|
||||||
|
3 2
|
||||||
|
1 1 1
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Output
|
||||||
|
|
||||||
|
```
|
||||||
|
-1
|
||||||
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user