You are viewing a single comment's thread. Return to all comments →
for i in range(int(input())): n = int(input()) p = list(map(int, input().split())) a = "Yes" for j in range(n//2): if max(p[j], p[~j]) < max(p[j+1], p[~(j+1)]): a = "No" break print(a)
Seems like cookies are disabled on this browser, please enable them to open this website
Piling Up!
You are viewing a single comment's thread. Return to all comments →