Help me in solving DSSA13 problem

My issue

My code

# Read the number of test cases
T = int(input())

# Iterate through each test case
for _ in range(T):
    # Read input for the test case
    N, K, L = map(int, input().split())
    speeds = list(map(int, input().split()))

    # Find your friend's speed
    friend_speed = speeds[N - 1]

    # Calculate the maximum possible speed after drug intake
    max_friend_speed = friend_speed + K

    # Check if the maximum speed after drug intake is greater than the maximum speed among all participants
    if max_friend_speed > max(speeds):
        print("Yes")
    else:
        print("No")

Learning course: Kalasalingam Academy of Research and Education
Problem Link: CodeChef: Practical coding for everyone