• + 1 comment

    Here, it's my code!

    for _ in range(int(input())):
        n = int(input())
    l = list(map(int,input().split()))
    result = "Yes"
    for i in range(1,n-1):
        if(l[i] > l[i-1] and l[i] > l[i+1]):
            result = "No"
            break
    print(result)