Buggy python submission (verdict: Time Limit Exceeded):

def ruisekiseki(l):
    #関数バージョン
    lst = [1]
    s = 1
    for i,v in enumerate(l):
        lst.append(s * v)
        s *= v
    return lst


def main():
    n,k = map(int,input().split())
    test_scores = list(map(int,input().split()))
    r = ruisekiseki(test_scores)
    pre_score = r[k] // r[0]
    for i in range(k+1,n+1):
        #print(r[i] // r[i-k])
        if r[i] // r[i-k] > pre_score:
            print("Yes")
        else:
            print("No")
        pre_score = r[i] // r[i-k]





if __name__ == '__main__':
    main()


Fixed submission:
#尺取り法的な……
#

def main():
    n,k = map(int,input().split())
    scores = [0] + list(map(int,input().split()))
    for i in range(k+1,n+1):
        if scores[i] > scores[i-k]:
            print("Yes")
        else:
            print("No")

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):

def ruisekiseki(l):
    #関数バージョン
    lst = [1]
    s = 1
    for i,v in enumerate(l):
        lst.append(s * v)
        s *= v
    return lst


def main():
    n,k = map(int,input().split())
    test_scores = list(map(int,input().split()))
    r = ruisekiseki(test_scores)
    pre_score = r[k] // r[0]
    for i in range(k+1,n+1):
        #print(r[i] // r[i-k])
        if r[i] // r[i-k] > pre_score:
            print("Yes")
        else:
            print("No")
        pre_score = r[i] // r[i-k]





if __name__ == '__main__':
    main()


Fixed submission:
#尺取り法的な……
#

def main():
    n,k = map(int,input().split())
    scores = [0] + list(map(int,input().split()))
    for i in range(k+1,n+1):
        if scores[i] > scores[i-k]:
            print("Yes")
        else:
            print("No")

if __name__ == '__main__':
    main()

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

def main():
    n,k = map(int,input().split()) #学期は1-indexed
    scores = [0] + list(map(int,input().split()))
    seiseki = []
    for i in range(k,n+1):
        seiseki.append(reduce(lambda a,b:a*b,scores[i-k+1:i+1]))
    for i,_ in enumerate(seiseki):
        if i == 0:
            continue
        if seiseki[i] > seiseki[i-1]:
            print("Yes")
        else:
            print("No")






if __name__ == '__main__':
    main()


Fixed submission:
#尺取り法的な……
#

def main():
    n,k = map(int,input().split())
    scores = [0] + list(map(int,input().split()))
    for i in range(k+1,n+1):
        if scores[i] > scores[i-k]:
            print("Yes")
        else:
            print("No")

if __name__ == '__main__':
    main()

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

def main():
    n,k = map(int,input().split()) #学期は1-indexed
    scores = [0] + list(map(int,input().split()))
    seiseki = []
    for i in range(k,n+1):
        seiseki.append(reduce(lambda a,b:a*b,scores[i-k+1:i+1]))
    for i,_ in enumerate(seiseki):
        if i == 0:
            continue
        if seiseki[i] > seiseki[i-1]:
            print("Yes")
        else:
            print("No")






if __name__ == '__main__':
    main()


Fixed submission:
#尺取り法的な……
#

def main():
    n,k = map(int,input().split())
    scores = [0] + list(map(int,input().split()))
    for i in range(k+1,n+1):
        if scores[i] > scores[i-k]:
            print("Yes")
        else:
            print("No")

if __name__ == '__main__':
    main()