Codeforces Round 950 (Div. 3) |
---|

Finished |

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

sortings

sortings

*800

No tag edit access

The problem statement has recently been changed. View the changes.

×
B. Choosing Cubes

time limit per test

1 secondmemory limit per test

256 megabytesinput

standard inputoutput

standard outputDmitry has $$$n$$$ cubes, numbered from left to right from $$$1$$$ to $$$n$$$. The cube with index $$$f$$$ is his favorite.

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.

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).

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:

- 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.

Input

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.

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.

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.

Output

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.

You can output the answer in any case. For example, the strings "YES", "nO", "mAyBe" will be accepted as answers.

Example

Input

125 2 24 3 3 2 35 5 34 2 1 3 55 5 25 2 4 1 35 5 51 2 5 4 35 5 43 1 2 4 55 5 54 3 2 1 56 5 31 2 3 1 2 310 1 11 1 1 1 1 1 1 1 1 11 1 1425 2 32 2 1 1 22 1 12 15 3 13 3 2 3 2

Output

MAYBE YES NO YES YES YES MAYBE MAYBE YES YES YES NO

Codeforces (c) Copyright 2010-2024 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jul/18/2024 10:08:01 (i1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|