knightnemo commited on
Commit
dd2f6c1
·
verified ·
1 Parent(s): 9c3919a

Upload code_segments/segment_62.txt with huggingface_hub

Browse files
Files changed (1) hide show
  1. code_segments/segment_62.txt +20 -0
code_segments/segment_62.txt ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Dmitry has $n$ cubes, numbered from left to right from $1$ to $n$. The cube with index $f$ is his favorite.
2
+
3
+ Dmitry threw all the cubes on the table, and the $i$-th cube showed the value $a_i$ ($1 \le a_i \le 100$). After that, he arranged the cubes in non-increasing order of their values, from largest to smallest. If two cubes show the same value, they can go in any order.
4
+
5
+ After sorting, Dmitry removed the first $k$ cubes. Then he became interested in whether he removed his favorite cube (note that its position could have changed after sorting).
6
+
7
+ For example, if $n=5$, $f=2$, $a = [4, \color{green}3, 3, 2, 3]$ (the favorite cube is highlighted in green), and $k = 2$, the following could have happened:
8
+
9
+ * After sorting $a=[4, \color{green}3, 3, 3, 2]$, since the favorite cube ended up in the second position, it will be removed. * After sorting $a=[4, 3, \color{green}3, 3, 2]$, since the favorite cube ended up in the third position, it will not be removed.
10
+
11
+ The first line contains an integer $t$ ($1 \le t \le 1000$) — the number of test cases. Then follow the descriptions of the test cases.
12
+
13
+ The first line of each test case description contains three integers $n$, $f$, and $k$ ($1 \le f, k \le n \le 100$) — the number of cubes, the index of Dmitry's favorite cube, and the number of removed cubes, respectively.
14
+
15
+ The second line of each test case description contains $n$ integers $a_i$ ($1 \le a_i \le 100$) — the values shown on the cubes.
16
+
17
+ For each test case, output one line — "YES" if the cube will be removed in all cases, "NO" if it will not be removed in any case, "MAYBE" if it may be either removed or left.
18
+
19
+ You can output the answer in any case. For example, the strings "YES", "nO", "mAyBe" will be accepted as answers.
20
+