Buggy python submission (verdict: Runtime Error):
def main():
    N, K = list(map(int, input().split(' ')))
    Ai = list(map(int, input().split(' ')))
    # print(Ai)
    P = []
    prev = 0
    now = 0
    
    S = [1]
    for index, i in enumerate(range(len(Ai)-K*2, len(Ai))):
        S.append(S[index] * Ai[i])
    # print(S, len(S))
    
    for n in range(K-1,N-1):
        # print(n, S[n], n-K, S[n-K])
        a1 = S[n] // S[n-K]
        a2 = S[n+1] // S[n-K+1]
        
        if a2 > a1:
            print('Yes')
        else:
            print('No')
        

main()

Fixed submission:
N, K = map(int, input().split())
A = list(map(int, input().split()))
 
for i in range(N - K):
  score_2 = A[i+K]
  score_1 = A[i]
  print('Yes' if score_1 < score_2 else 'No')

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    N, K = list(map(int, input().split(' ')))
    Ai = list(map(int, input().split(' ')))
    # print(Ai)
    P = []
    prev = 0
    now = 0
    # for i, n in enumerate(range(K-1, N)):
        
        
        # if i > 0:
        #     # print('a', n)
        #     prev = now
        #     now = sum(Ai[n-K+1:n+1])
        #     # print(now, prev)
        #     if now > prev:
        #         print('Yes')
        #     else:
        #         print('No')
        # else:
        #     # print('b', n)
        #     now = sum(Ai[n-K+1:n+1])
            
            
    # # print(P)
    # for i in range(len(P)-1):
    #     if P[i+1] > P[i]:
    #         print('Yes')
    #     else:
    #         print("No")
    
    S = [1]
    for i in range(len(Ai)):
        S.append(S[i] * Ai[i])
    # print(S, len(S))
    
    for n in range(K,N):
        # print(n, S[n], n-K, S[n-K])
        a1 = S[n] // S[n-K]
        a2 = S[n+1] // S[n-K+1]
        
        if a2 > a1:
            print('Yes')
        else:
            print('No')
        

main()

Fixed submission:
N, K = map(int, input().split())
A = list(map(int, input().split()))
 
for i in range(N - K):
  score_2 = A[i+K]
  score_1 = A[i]
  print('Yes' if score_1 < score_2 else 'No')

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    N, K = list(map(int, input().split(' ')))
    Ai = list(map(int, input().split(' ')))
    # print(Ai)
    P = []
    prev = 0
    now = 0
    for i, n in enumerate(range(K-1, N)):
        # P.append(sum(Ai[n-K+1:n+1]))
        
        if i > 0:
            # print('a', n)
            prev = now
            now = sum(Ai[n-K+1:n+1])
            # print(now, prev)
            if now > prev:
                print('Yes')
            else:
                print('No')
        else:
            # print('b', n)
            now = sum(Ai[n-K+1:n+1])
            
            
    # # print(P)
    # for i in range(len(P)-1):
    #     if P[i+1] > P[i]:
    #         print('Yes')
    #     else:
    #         print("No")
        

main()

Fixed submission:
N, K = map(int, input().split())
A = list(map(int, input().split()))
 
for i in range(N - K):
  score_2 = A[i+K]
  score_1 = A[i]
  print('Yes' if score_1 < score_2 else 'No')

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    N, K = list(map(int, input().split(' ')))
    Ai = list(map(int, input().split(' ')))
    # print(Ai)
    P = []
    for n in range(K-1, N):
        # print(Ai[n-2], Ai[n-1], Ai[n], Ai[n-2]*Ai[n-1]*Ai[n])
        # P.append(Ai[n-2]*Ai[n-1]*Ai[n])
        # t = Ai[n-K:n]
        P.append(sum(Ai[n-K+1:n+1]))
        # print(n-K+1, n)
        # print(Ai[n-K+1:n+1])
            
    # print(P)
    for i in range(len(P)-1):
        if P[i+1] > P[i]:
            print('Yes')
        else:
            print("No")
        

main()

Fixed submission:
N, K = map(int, input().split())
A = list(map(int, input().split()))
 
for i in range(N - K):
  score_2 = A[i+K]
  score_1 = A[i]
  print('Yes' if score_1 < score_2 else 'No')