Buggy python submission (verdict: Time Limit Exceeded):
import operator
import functools

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

    for i in range(K-1,N):
        lst= A[i-K+1:i+1]
        p = sum(lst)
        #p = mul(lst)
        #p = functools.reduce(operator.mul,lst)
        if i != K-1:
            if p <= prev:
                print('No')
            else:
                print('Yes')
        prev = p
    
if __name__ == "__main__":
    main()
    

Fixed submission:
def main():
    N,K = map(int,input().split())
    A = list(map(int,input().split()))
    p  = 0
 
    for i in range(K-1,N):
        #lst= A[i-K+1:i+1]
        #p = sum(lst)
        #p = mul(lst)
        #p = functools.reduce(operator.mul,lst)
        if i != K-1:
            if A[i] <= A[i-K]:
                print('No')
            else:
                print('Yes')
        
    
if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import operator
import functools

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

    for i in range(K-1,N):
        lst= A[i-K+1:i+1]
        p = sum(lst)
        #p = mul(lst)
        #p = functools.reduce(operator.mul,lst)
        if i != K-1:
            if p <= prev:
                print('No')
            else:
                print('Yes')
        prev = p
    
if __name__ == "__main__":
    main()
    

Fixed submission:
def main():
    N,K = map(int,input().split())
    A = list(map(int,input().split()))
    p  = 0
 
    for i in range(K-1,N):
        #lst= A[i-K+1:i+1]
        #p = sum(lst)
        #p = mul(lst)
        #p = functools.reduce(operator.mul,lst)
        if i != K-1:
            if A[i] <= A[i-K]:
                print('No')
            else:
                print('Yes')
        
    
if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import operator
import functools

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

    for i in range(K-1,N):
        lst= A[i-K+1:i+1]
        #p = mul(lst)
        p = functools.reduce(operator.mul,lst)
        if i != K-1:
            if p <= prev:
                print('No')
            else:
                print('Yes')
        prev = p
    
if __name__ == "__main__":
    main()

Fixed submission:
def main():
    N,K = map(int,input().split())
    A = list(map(int,input().split()))
    p  = 0
 
    for i in range(K-1,N):
        #lst= A[i-K+1:i+1]
        #p = sum(lst)
        #p = mul(lst)
        #p = functools.reduce(operator.mul,lst)
        if i != K-1:
            if A[i] <= A[i-K]:
                print('No')
            else:
                print('Yes')
        
    
if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
import math 
def main():
    N,K = map(int,input().split())
    A = list(map(int,input().split()))
    p  = 0
    def mul(A):
        m = 1
        for i in range(len(A)):
            m*=A[i]
        return m
        
    score = []
    for i in range(K-1,N):
        lst = A[i-K+1:i+1]
        p = mul(lst)
        if i != K-1:
            if p <= prev:
                print('No')
            else:
                print('Yes')
        prev = p
    
        

if __name__ == "__main__":
    main()
    

Fixed submission:
def main():
    N,K = map(int,input().split())
    A = list(map(int,input().split()))
    p  = 0
 
    for i in range(K-1,N):
        #lst= A[i-K+1:i+1]
        #p = sum(lst)
        #p = mul(lst)
        #p = functools.reduce(operator.mul,lst)
        if i != K-1:
            if A[i] <= A[i-K]:
                print('No')
            else:
                print('Yes')
        
    
if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
import math 
N,K = map(int,input().split())
A = list(map(int,input().split()))
p  = 0
def mul(A):
    m = 1
    for i in range(len(A)):
        m*=A[i]
    return m
    
score = []
for i in range(K-1,N):
    lst = A[i-K+1:i+1]
    p = mul(lst)
    score.append(p)

for i in range(len(score)-1):
    if score[i] >= score[i+1]:
        print('No')
    else:
        print('Yes')


    

Fixed submission:
def main():
    N,K = map(int,input().split())
    A = list(map(int,input().split()))
    p  = 0
 
    for i in range(K-1,N):
        #lst= A[i-K+1:i+1]
        #p = sum(lst)
        #p = mul(lst)
        #p = functools.reduce(operator.mul,lst)
        if i != K-1:
            if A[i] <= A[i-K]:
                print('No')
            else:
                print('Yes')
        
    
if __name__ == "__main__":
    main()