Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    point = [1] * K
    point[0] = A[0]

    for i in range(1, K):
        point[i] = point[i - 1] * A[i]

    ans = ['No'] * (N - K)
    p = point[K - 1]
    for i in range(N - K):
        tmp = p * A[K + i] / A[i]
        if p < tmp:
            ans[i] = 'Yes'
        p = tmp
    print("\n".join(ans))

if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    ans = ['No'] * (N - K)
    for i in range(N - K):
        tmp = A[K + i] / A[i]
        if 1 < tmp:
            ans[i] = 'Yes'
    print("\n".join(ans))


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    point = [1] * (K)
    point[0] = A[0]

    for i in range(1, K):
        point[i] = point[i - 1] * A[i]

    ans = point[K - 1]
    for i in range(N - K):
        tmp = ans * A[K + i] / A[i]
        if ans < tmp:
            print('Yes')
        else:
            print('No')
        ans = tmp


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    ans = ['No'] * (N - K)
    for i in range(N - K):
        tmp = A[K + i] / A[i]
        if 1 < tmp:
            ans[i] = 'Yes'
    print("\n".join(ans))


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    point = [1] * (N)
    point[0] = A[0]

    for i in range(1, N):
        point[i] = point[i - 1] * A[i]

    ans = point[K - 1]
    for i in range(N - K):
        tmp = point[K + i] / point[i]
        if ans < tmp:
            print('Yes')
        else:
            print('No')
        ans = tmp


if __name__ == "__main__":
    main()

Fixed submission:
#!/usr/bin/env python3

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    ans = ['No'] * (N - K)
    for i in range(N - K):
        tmp = A[K + i] / A[i]
        if 1 < tmp:
            ans[i] = 'Yes'
    print("\n".join(ans))


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    point = [1] * (N)
    point[0] = A[0]

    for i in range(1, N):
        point[i] = point[i - 1] * A[i]

    ans = point[K - 1]
    for i in range(N - K):
        tmp = point[K + i] / point[i]
        if ans < tmp:
            print('Yes')
        else:
            print('No')
        ans = tmp


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    ans = ['No'] * (N - K)
    for i in range(N - K):
        tmp = A[K + i] / A[i]
        if 1 < tmp:
            ans[i] = 'Yes'
    print("\n".join(ans))


if __name__ == "__main__":
    main()