Help me in solving WEEDING problem

My issue

My code

t = int(input())
for i in range(t):
    n,m,k = map(int,input().split())
    l = list(map(int,input().split()))
    if (l[-1] + k - 1) > m :
        print("NO")
    else:
        print("YES")

Problem Link: WEEDING Problem - CodeChef
Can u kindly look into my code and find out my mistake