Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
Ai = list(map(int, input().split()))

class SegTree:
    def __init__(self, init_val, f=lambda x,y : x*y, default=1):
        size = len(init_val)
        self.size = 2**(size-1).bit_length()
        self.default = default
        self.dat = [default]*(self.size*2)
        self.f = f

        for i in range(size):
            self.dat[self.size + i] = init_val[i]
        for i in range(self.size- 1, 0, -1):
            self.dat[i] = self.f(self.dat[2 * i], self.dat[2 * i + 1])

    def update(self, i, x):
        i += self.size
        self.dat[i] = x
        while i > 0:
            i >>= 1
            self.dat[i] = self.f(self.dat[i*2], self.dat[i*2+1])

    def query(self, l, r):
        l += self.size
        r += self.size
        lres, rres = self.default, self.default
        while l < r:
            if l & 1:
                lres = self.f(lres, self.dat[l])
                l += 1

            if r & 1:
                r -= 1
                rres = self.f(self.dat[r], rres)
            l >>= 1
            r >>= 1
        res = self.f(lres, rres)
        return res

seg = SegTree(Ai)
# print(seg.query(0, 1))

def score(i):
    return seg.query(i - K, i)

for i in range(K + 1, N + 1):
    sp = score(i - 1)
    s = score(i)

    if sp < s:
        print("Yes")
    else:
        print("No")


Fixed submission:
N, K = map(int, input().split())
Ai = list(map(int, input().split()))

# class SegTree:
#     def __init__(self, init_val, f=lambda x,y : x*y, default=1):
#         size = len(init_val)
#         self.size = 2**(size-1).bit_length()
#         self.default = default
#         self.dat = [default]*(self.size*2)
#         self.f = f
#
#         for i in range(size):
#             self.dat[self.size + i] = init_val[i]
#         for i in range(self.size- 1, 0, -1):
#             self.dat[i] = self.f(self.dat[2 * i], self.dat[2 * i + 1])
#
#     def update(self, i, x):
#         i += self.size
#         self.dat[i] = x
#         while i > 0:
#             i >>= 1
#             self.dat[i] = self.f(self.dat[i*2], self.dat[i*2+1])
#
#     def query(self, l, r):
#         l += self.size
#         r += self.size
#         lres, rres = self.default, self.default
#         while l < r:
#             if l & 1:
#                 lres = self.f(lres, self.dat[l])
#                 l += 1
#
#             if r & 1:
#                 r -= 1
#                 rres = self.f(self.dat[r], rres)
#             l >>= 1
#             r >>= 1
#         res = self.f(lres, rres)
#         return res
#
# seg = SegTree(Ai)
# print(seg.query(0, 1))

# def score(i):
#     return seg.query(i - K, i)

for i in range(K + 1, N + 1):
    # sp = score(i - 1)
    # s = score(i)

    sp = Ai[i - K - 1]
    s = Ai[i - 1]

    if sp < s:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
import sys
import math
import statistics
import heapq

N, K = map(int, input().split())
Ai = list(map(int, input().split()))

def segfunc(x, y):
    # print("mult({}, {})".format(x, y))
    return x * y

class SegTree:
    def __init__(self, init_val, segfunc, ide_ele):
        n = len(init_val)
        self.segfunc = segfunc
        self.ide_ele = ide_ele
        self.num = 1 << (n - 1).bit_length()
        self.tree = [ide_ele] * 2 * self.num
        for i in range(n):
            self.tree[self.num + i] = init_val[i]
        for i in range(self.num - 1, 0, -1):
            self.tree[i] = self.segfunc(self.tree[2 * i], self.tree[2 * i + 1])

    def update(self, k, x):
        k += self.num
        self.tree[k] = x
        while k > 1:
            self.tree[k >> 1] = self.segfunc(self.tree[k], self.tree[k ^ 1])
            k >>= 1

    def query(self, l, r):
        res = self.ide_ele

        l += self.num
        r += self.num
        while l < r:
            if l & 1:
                res = self.segfunc(res, self.tree[l])
                l += 1
            if r & 1:
                res = self.segfunc(res, self.tree[r - 1])
            l >>= 1
            r >>= 1
        return res

seg = SegTree(Ai, segfunc, 1)
# print(seg.query(0, 1))

def score(i):
    return seg.query(i - K, i)

for i in range(K + 1, N + 1):
    sp = score(i - 1)
    s = score(i)

    if sp < s:
        print("Yes")
    else:
        print("No")


Fixed submission:
N, K = map(int, input().split())
Ai = list(map(int, input().split()))

# class SegTree:
#     def __init__(self, init_val, f=lambda x,y : x*y, default=1):
#         size = len(init_val)
#         self.size = 2**(size-1).bit_length()
#         self.default = default
#         self.dat = [default]*(self.size*2)
#         self.f = f
#
#         for i in range(size):
#             self.dat[self.size + i] = init_val[i]
#         for i in range(self.size- 1, 0, -1):
#             self.dat[i] = self.f(self.dat[2 * i], self.dat[2 * i + 1])
#
#     def update(self, i, x):
#         i += self.size
#         self.dat[i] = x
#         while i > 0:
#             i >>= 1
#             self.dat[i] = self.f(self.dat[i*2], self.dat[i*2+1])
#
#     def query(self, l, r):
#         l += self.size
#         r += self.size
#         lres, rres = self.default, self.default
#         while l < r:
#             if l & 1:
#                 lres = self.f(lres, self.dat[l])
#                 l += 1
#
#             if r & 1:
#                 r -= 1
#                 rres = self.f(self.dat[r], rres)
#             l >>= 1
#             r >>= 1
#         res = self.f(lres, rres)
#         return res
#
# seg = SegTree(Ai)
# print(seg.query(0, 1))

# def score(i):
#     return seg.query(i - K, i)

for i in range(K + 1, N + 1):
    # sp = score(i - 1)
    # s = score(i)

    sp = Ai[i - K - 1]
    s = Ai[i - 1]

    if sp < s:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin
N,K = [int(x) for x in stdin.readline().rstrip().split()]
A = [int(x) for x in stdin.readline().rstrip().split()]

score = 1
for i in range(0,K):
    score*=A[i]

for i in range(K,N):
    if A[i] > A[i-K]:
        print("Yes")
    else:
        print("No")

Fixed submission:
from sys import stdin
N,K = [int(x) for x in stdin.readline().rstrip().split()]
A = [int(x) for x in stdin.readline().rstrip().split()]

for i in range(K,N):
    if A[i] > A[i-K]:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin
N,K = [int(x) for x in stdin.readline().rstrip().split()]
A = [int(x) for x in stdin.readline().rstrip().split()]

score = 1
for i in range(0,K):
    score*=A[i]

for i in range(K,N):
    tmp = score
    score *= A[i]
    score //= A[i-K]
    if score > tmp:
        print("Yes")
    else:
        print("No")

Fixed submission:
from sys import stdin
N,K = [int(x) for x in stdin.readline().rstrip().split()]
A = [int(x) for x in stdin.readline().rstrip().split()]

for i in range(K,N):
    if A[i] > A[i-K]:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin
N,K = [int(x) for x in stdin.readline().rstrip().split()]
A = [int(x) for x in stdin.readline().rstrip().split()]

score = 1
for i in range(0,K):
    score*=A[i]

for i in range(K,N):
    tmp = score
    score *= A[i]
    score //= A[i-K]
    if score > tmp:
        print("Yes")
    else:
        print("No")

Fixed submission:
from sys import stdin
N,K = [int(x) for x in stdin.readline().rstrip().split()]
A = [int(x) for x in stdin.readline().rstrip().split()]

for i in range(K,N):
    if A[i] > A[i-K]:
        print("Yes")
    else:
        print("No")