Untitled
user_5668965
python
a year ago
369 B
9
Indexable
def solve(): n, f, k = map(int, input().split()) f -= 1 k -= 1 a = list(map(int, input().split())) x = a[f] a.sort(reverse=True) if a[k] > x: print("NO") elif a[k] < x: print("YES") else: print("YES" if k == n - 1 or a[k + 1] < x else "MAYBE") t = int(input()) for _ in range(t): solve()
Editor is loading...
Leave a Comment