Problem:


Score: 300 points

Problem Statement

M-kun is a student in Aoki High School, where a year is divided into N terms.

There is an exam at the end of each term. According to the scores in those exams, a student is given a grade for each term, as follows:

For the first through (K-1)-th terms: not given.

For each of the K-th through N-th terms: the multiplication of the scores in the last K exams, including the exam in the graded term.

M-kun scored A_i in the exam at the end of the i-th term.

For each i such that K+1 \leq i \leq N, determine whether his grade for the i-th term is strictly greater than the grade for the (i-1)-th term.

Constraints

2 \leq N \leq 200000

1 \leq K \leq N-1

1 \leq A_i \leq 10^{9}

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N K
A_1 A_2 A_3 \ldots A_N

Output

Print the answer in N-K lines.

The i-th line should contain Yes if the grade for the (K+i)-th term is greater than the grade for the (K+i-1)-th term, and No otherwise.

Sample Input 1

5 3
96 98 95 100 20

Sample Output 1

Yes
No

His grade for each term is computed as follows:

3-rd term: (96 \times 98 \times 95) = 893760

4-th term: (98 \times 95 \times 100) = 931000

5-th term: (95 \times 100 \times 20) = 190000

Sample Input 2

3 2
1001 869120 1001

Sample Output 2

No

Note that the output should be No if the grade for the 3-rd term is equal to the grade for the 2-nd term.

Sample Input 3

15 7
3 1 4 1 5 9 2 6 5 3 5 8 9 7 9

Sample Output 3

Yes
Yes
No
Yes
Yes
No
Yes
Yes



Sample input:
5 3
96 98 95 100 20


Sample output:
Yes
No

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from collections import deque
from functools import lru_cache
import bisect
import re
import queue
import copy
import decimal


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [Scanner.string() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [Scanner.int() for i in range(n)]


def solve():
    N, K = Scanner.map_int()
    A = Scanner.map_int()
    for i in range(K, N):
        if A[i - K] < A[i]:
            print('Yes')
        else:
            print('No')


def main():
    # sys.setrecursionlimit(1000000)
    # sys.stdin = open("sample.txt")
    solve()


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# C - Marks
def main():
    N, K, *A = map(int, open(0).read().split())
    res = ["Yes" if tail > top else "No" for top, tail in zip(A, A[K:])]
    print("\n".join(res))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def resolve():
    n, k = map(int, input().split())
    A = list(map(int, input().split()))

    for i in range(k, n):
        if (A[i-k] < A[i]):
            print('Yes')
        else:
            print('No')

if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
A = [*map(int, input().split())]
for i in range(k, n): print('Yes' if A[i-k] < A[i] else 'No')

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
A = [*map(int, input().split())]
for i in range(k, n):
    if A[i-k] < A[i]: print('Yes')
    else: print('No')

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
a = list(map(int, input().split()))

for i in range(k, n):
    if a[i - k] < a[i]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
A=list(map(int,input().split()))
for i in range(n-k):
    print('Yes' if A[i]<A[i+k] else 'No')

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
A=list(map(int,input().split()))


for i in range(k,n):
    if A[i-k]<A[i]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
ar=list(map(int,input().split()))
for i in range(k,n):
    print("Yes" if ar[i]>ar[i-k] else "No")

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
a = list(map(int, input().split()))
for i in range(n-k):
    if a[i] < a[i+k]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
N, K = map(int,input().split())
A = list(map(int, input().split()))


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

Submission status: Accepted

Solution code:
N,K = map(int,input().split())
A = list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
n,k= map(int, input().split())
num= [int (x) for x in input().split()]
for i in range(n-k):
    if num[i] < num[k+i]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
n, k = map(int, input().split())

a = list(map(int, input().split()))

for i in range(k, n):
  if a[i-k] < a[i]:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
def main():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))

    ans = []
    for i in range(k, n):
        if a[i-k] < a[i]:
            ans.append('Yes')
        else:
            ans.append('No')

    for x in ans:
        print(x)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n, k = map(int,input().split())
a = list(map(int,input().split()))


for i in range(n-k):
    
  if a[i] < a[k+i]:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
#解説を見て
# 初期入力
import sys
input = sys.stdin.readline  #文字列では使わない
N,K = map(int, input().split())
A = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
# 解説

def main():
    from math import log10

    N, K = map(int, input().split())
    *A, = map(int, input().split())

    def accumulate(a):
        s = 0
        for x in a:
            s += log10(x)
            yield s

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

    for i in range(K, N):
        if acc[i] > acc[i - 1] + 1e-10:
            print('Yes')
        else:
            print('No')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import numpy as np

n, k = map(int, input().split())
A = np.array(input().split(), dtype = np.int64)
score = np.array([0 for i in range(n- k + 1)], dtype = np.int64)
wknum = 1
for i  in range(k):
    wknum *= A[i]

for i in range(n - k):
    wknum //= A[i]
    wknum *= A[k + i]
    if A[i] >= A[k + i]:
        print('No')
    else:
        print('Yes')

Submission status: Accepted

Solution code:

N, K = [int(i) for i in input().split()]
A = [int(i) for i in input().split()]

#%%

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

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
a = list(map(int, input().split())) 

for i in range(k, n):
    if a[i-k] < a[i]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

N, K = mi()
A = li()


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

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
A_LIST = list(map(int, input().split()))

for index in range(K, N):
    if A_LIST[index] > A_LIST[index - K]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
import sys

def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))

N,K = LI()
A = LI()

ans = []

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

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
a = list(map(int,input().split()))

for i in range(n-k):
  if a[i] < a[i+k]:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

Solution code:
import decimal
import numpy as np
import sys

def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))

N,K = LI()
A = LI()

ans = []

for i in range(K,N):
    if A[i-K] < A[i]:
        ans.append('Yes')
    else:
        ans.append('No')

print('\n'.join(ans))

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
A = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
a=list(map(int,input().split()))
[print("Yes" if a[k+i]>a[i] else "No") for i in range(n-k)]

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
a = list(map(int,input().split()))
for i in range(n-k):
    if a[i] < a[i+k]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
def main():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    for i in range(n-k):
        if a[i] < a[i+k]:
            print("Yes")
        else:
            print("No")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
a=list(map(int,input().split()))

for i in range(n-k):
    print("Yes" if a[i]<a[i+k] else "No")

Submission status: Accepted

Solution code:
def resolve():
    n, k = map(int, input().split())
    A = list(map(int, input().split()))
    for i in range(k, n):
        if A[i] > A[i-k]:
            print("Yes")
        else:
            print("No")
resolve()

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
A = list(map(int, input().split()))

for i in range(n-k):
    if A[i] < A[k+i]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n-k):
  if a[i]<a[k+i]:
    print('Yes')
  else:
    print("No")

Submission status: Accepted

Solution code:
n, k = list(map(int, input().split()))
a = list(map(int, input().split()))

ans = []
for i in range(n-k):
    if (a[i] < a[i+k]):
        ans.append("Yes")
    else:
        ans.append("No")

for i in range(len(ans)):
    print(ans[i])

Submission status: Accepted

Solution code:
import numpy as np
n,k=map(int,input().split())
a=list(map(int,input().split()))
for i in range(0,n-k):
    if a[i]<a[i+k]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
N,K=map(int,input().split())
A=list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
def solve():
    N, K = [int(x) for x in input().split()]
    A = [int(x) for x in input().split()]
    ans = []
    for i in range(K, N):
        if A[i - K] < A[i]:
            ans.append('Yes')
        else:
            ans.append('No')
    print('\n'.join(ans))


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
N,K = map(int, input().split())
A = list(map(int, input().split()))

a = 0
while K < N:
    if A[a] < A[K]:
        print("Yes")
    else:print("No")
    K += 1
    a += 1

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
a = list(map(int,input().split()))

sum = 0

for i in range(0,k):
        sum += a[i]

was = sum
for i in range(n-k):
        now=was - a[i] + a[k+i]
        if was < now:
                print('Yes')
        else:
                print('No')
        was = now

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n, k = map(int, input().split())
a = list(map(int, input().split()))
for i in range(n):
    if i >= k:
        if a[i - k] < a[i]:
            print("Yes")
        else:
            print("No")

Submission status: Accepted

Solution code:
n,k,*a=map(int,open(0).read().split())
for i in range(n-k):
  if a[i]<a[i+k]:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n-k):
  if(a[i] < a[i+k]):print("Yes")
  else:print("No")

Submission status: Accepted

Solution code:
n,k,*a=map(int,open(0).read().split())
for i in range(n-k):print("Yes" if a[i]<a[i+k] else "No")

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
l = list(map(int, input().split()))
start = k
c = 0
for i in range(n-k):
    if l[start]>l[c]:
      print("Yes")
    else:
      print("No")
    start+=1
    c+=1

Submission status: Accepted

Solution code:
n, k = map(int,input().split())
a = list(map(int,input().split()))
for i in range(n-k):
    if a[i] < a[i+k]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
scs = list(map(int, input().split()))

for i in range(k, n):
    if  scs[i] > scs[i - k]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
a = list(map(int, input().split()))
for i in range(k, n):
    if a[i] > a[i - k]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
a = list(map(int, input().split()))

for i in range(n - k):
    print("Yes" if a[i] < a[i+k] else "No")

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
A = list(map(int, input().split()))

for i in range(n - k): #iはスタート地点
    old = A[i] #Aのj番目の要素をかける
    new = A[i + k]
    
    if old < new:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
def main():
    N, K = map(int, input().split())
    l = list(map(int, input().split()))
    for i in range(K, N):
        if l[i] > l[i-K]:
            print('Yes')
        else:
            print('No')
main()

Submission status: Accepted

Solution code:
def main():
    n, k = [int(x) for x in input().split()]
    scores = [int(x) for x in input().split()]

    for old, new in zip(scores, scores[k:]):
        if old < new:
            print('Yes')
        else:
            print('No')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
A = list(map(int, input().split()))

ans = []
for i in range(N-K):
    a1 = A[i]
    a2 = A[i+K]
    if a1 < a2:
        ans.append('Yes')
    else:
        ans.append('No')

print(*ans, sep='\n')

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
l = list(map(int, input().split()))

for i in range(n-k):
    if l[i] >= l[i+k]:
        print("No")
    else:
        print("Yes")

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n-k):
  if a[i]<a[i+k]:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
a=list(map(int,input().split()))

for i in range(k,n):
    zenkai = a[i-k]
    konkai = a[i]
    if zenkai < konkai:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
items = list(input().split())

for i in range(k, n):
  if (int(items[i]) > int(items[i-k])):
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
a = list(map(int,input().split()))

for i in range(k,n):
    if a[i-k] < a[i]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
def main():
    N, K = map(int, input().split())
    A = [1] + list(map(int, input().split()))
    for i in range(K+1, N+1):
        if A[i] > A[i-K]:
            print("Yes")
        else:
            print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
a = list(map(int, input().split()))

for i in range(n - k):
    print('Yes' if a[k+i] > a[i] else 'No')

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
a = list(map(int, input().split()))

for i in range(n - k):
    if a[k+i] > a[i]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
A = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
n,k = map(int, input().split())
a = list(map(int, input().split()))

for i in range(k, n):
  if (a[i-k] < a[i]):
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
lst_1=list(map(int,input().split()))
# print(lst_1)
for i in range(n-k):
    if(lst_1[i+k]>lst_1[i]):
        print("Yes")
    else:print("No")

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n-k):
  if a[i]<a[i+k]:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
A = list(map(int, input().split()))

ans = []
for i in range(K, N):
    ans.append(['No', 'Yes'][A[i] > A[i - K]])

print('\n'.join(ans))

Submission status: Accepted

Solution code:
import sys
INF = 1 << 60
MOD = 10**9 + 7 # 998244353
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
def resolve():
    n, k = map(int, input().split())
    A = list(map(int, input().split()))
    for i in range(n - k):
        print("YNeos"[1 - (A[i + k] > A[i])::2])
resolve()

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
a = list(map(int,input().split()))

for i in range(k,n):
  if a[i] > a[i-k]:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
A = list(map(int, input().split()))

for idx, a in enumerate(A):
    if idx < K:
        continue
    else:
        if a <= A[idx - K]:
            print('No')
        else:
            print('Yes')

Submission status: Accepted

Solution code:
N, K = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]

for i in range(K, N):
    if a[i-K] < a[i]:
        print('Yes')
    else :
        print('No')

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
A = [int(i) for i in input().split()]
i_list = [0] * N

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n):
    res = [None] * n
    for i in range(n):
        res[i] = II()
    return res
def LIR(n):
    res = [None] * n
    for i in range(n):
        res[i] = LI()
    return res
def FR(n):
    res = [None] * n
    for i in range(n):
        res[i] = IF()
    return res
def LIR(n):
    res = [None] * n
    for i in range(n):
        res[i] = IF()
    return res
def LIR_(n):
    res = [None] * n
    for i in range(n):
        res[i] = LI_()
    return res
def SR(n):
    res = [None] * n
    for i in range(n):
        res[i] = S()
    return res
def LSR(n):
    res = [None] * n
    for i in range(n):
        res[i] = LS()
    return res
mod = 1000000007
inf = float('INF')

#solve
def solve():
    n, k = LI()
    a = LI()
    for i in range(n - k):
        if a[i] >= a[i + k]:
            print("No")
        else:
            print("Yes")
    return


#main
if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
N,K=map(int,input().split())
A=list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
[n,k] = map(int, input().split(' '))
A = list(map(int, input().split(' ')))

for i in range(k,n):
  if A[i-k]<A[i]:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

Solution code:
import numpy as np
n, k = map(int, input().split())
A = list(map(int, input().split()))
A = np.array(A)

for i in range(n-k):
  if A[k+i] > A[i]:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
def main():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))

    for i in range(0, n-k):
        if a[i] < a[k+i]:
            print("Yes")
        else:
            print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
a = list(map(int, input().split()))

for i in range(k,n):
    if a[i]>a[i-k]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
_,k,*a=map(int,open(0).read().split())
for a,b in zip(a,a[k:]):print('YNeos'[a>=b::2])

Submission status: Accepted

Solution code:
n, k = map(int, input().split(" "))
a = list(map(int, input().split(" ")))

for i in range(k, n):
    if a[i-k] < a[i]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
n,k,*a=map(int,open(0).read().split())
for a,b in zip(a,a[k:]):print('YNeos'[a>=b::2])

Submission status: Accepted

Solution code:
from heapq import *
import sys
from collections import *
from itertools import *
from decimal import *
import copy
from bisect import *
import math
sys.setrecursionlimit(4100000)
def gcd(a,b):
    if(a%b==0):return(b)
    return (gcd(b,a%b))
input=lambda :sys.stdin.readline().rstrip()

N,K=map(int,input().split())
A=list(map(int,input().split()))
for i in  range(K,N):
    print("Yes" if A[i]>A[i-K] else "No")

Submission status: Accepted

Solution code:
N, K, *A = map(int, open(0).read().split())
for i in range(N):
    unko = A[i]
    if i + K < N:
        S = A[i + K]
        if S > unko:
            print("Yes")
        else:
            print("No")
    else:
        exit

Submission status: Accepted

Solution code:
N,K = map(int,input().split(' '))
A = list(map(int,input().split(' ')))
cnt = 0
for k in range(K,N):
    if A[k] > A[cnt]:
        print("Yes")
    else:
        print("No")
    cnt += 1

Submission status: Accepted

Solution code:
N,K = map(int, input().split())
A = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
N,K = map(int,input().split())
A = list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
a = list(map(int,input().split()))
for i in range(k,n): print('Yes' if a[i] > a[i-k] else 'No')

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
A = list(map(int, input().split()))
point = 0
for i in range(k):
    point += A[i]
for i in range(k,n):
    x = point-A[i-k]+A[i]
    if point < x: print("Yes")
    else: print("No")
    point = x

Submission status: Accepted

Solution code:
N,K = map(int, input().split())
A = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
# = int(input())
# = str(input())
N, K = map(int, input().split())
A = list(map(int, input().split()))
# = [int(input()) for i in range(N)]
# = [list(map(int, input().split())) for i in range(N)]

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

Submission status: Accepted

Solution code:
N,K = map(int,input().split())
A = [int(a) for a in input().split()]

n = 0

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

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
a = list(map(int, input().split()))
for i in range(k, n):
    if a[i-k] < a[i]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり

N,K = MI()
A = [0] + LI()

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

Submission status: Accepted

Solution code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

N,K = MI()

A = LI()

for j in range(K, N+1):
    if j == K:
        continue
    if A[j-K-1] < A[j-1]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
NK = list(map(int, input().split(' ')))
N = NK[0]
K = NK[1]
A = list(map(int, input().split(' ')))

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

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
A = list(map(int, input().split()))
for i in range(K, N):
    if A[i] > A[i - K]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
a = list(map(int,input().split()))
for i in range(n-k):
    if a[k+i] > a[i]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
N,K = map(int,input().split())
a = list(map(int,input().split()))


for i in range(N-K):
  if a[i]<a[i+K]:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#c
n,k = map(int,input().split())
a = list(map(int,input().split()))

for i in range(n-k):
    if a[i]<a[i+k]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# スペース区切りの整数の入力
n, k = map(int, input().split())
#配列の入力
data = list(map(int, input().split()))

for i in range(n-k):
    if data[i] < data[k+i]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
n, k= map(int, input().split())
a = list(map(int, input().split()))

for i in range(k, n):
    if a[i] > a[i-k]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
N,K = map(int,input().split())
A = list(map(int,input().split()))
grade=[]
oldest=[]
result = [0] * (N+1-K)
for i in range(K,N+1):
    oldest.append(A[i-K])
    if i!=K:
        if A[i-1] > oldest[i-K-1]:
            print("Yes")
        else:
            print("No")

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
a = list(map(int, input().split()))

for i in range(k, n):
    if a[i]/a[i-k] > 1:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
import numpy as np
n, k = map(int, input().split())
A = list(map(int, input().split()))
A = np.array(A)

for i in range(n-k):
    if A[k+i] > A[i]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
score = list(map(int, input().split()))
for i in range(K, N):
    print("Yes" if score[i - K] < score[i] else "No")

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
a=list(map(int,input().split()))
 
for i in range(k,n):
    if(a[i] > a[i-k]):
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
A = tuple(map(int, input().split()))
for i in range(N - K): print('Yes' if A[K + i] > A[i] else 'No')

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
AA =[int(a) for a in input().split()]


for b, t in zip(AA, AA[k:]):
    if t > b:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:

n, k = (int(x) for x in input().split())
a = input().split()

for i in range(1,n-k+1):
    if(int(a[i-1]) >= int(a[k+i-1])):
        print("No")
    else:
        print("Yes")

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
lst_1=list(map(int,input().split()))
# print(lst_1)
lst_2=[]
for i in range(n-k):
    temp=1
    temp=lst_1[i+k]/lst_1[i]
    lst_2.append(temp)
for i in lst_2:
    if i>1:
        print("Yes")
    else:print("No")