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:
n,k=map(int, input().split())
*a,=map(int, input().split())

from collections import deque
d=deque([])
zeros=0
for i in range(k):
    if a[i]==0:
        zeros+=1
    d.append(a[i])

for i in range(k, n):
    tmp=d.popleft()
    if tmp==0:
        zeros-=1
    if zeros==0 and a[i]>tmp:
        print('Yes')
    else:
        print('No')
    d.append(a[i])
    if a[i]==0:
        zeros+=1

Submission status: Accepted

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

for i, j in zip (a[:n-k], a[k:n]):
    if j/i > 1:
        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(K,N):
        if(A[i-K] < A[i]):
            print('Yes')
        else:
            print('No')
if __name__ == '__main__':
    main()

Submission status: Accepted

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

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


solve()

Submission status: Accepted

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

i = k
# while i < k:
#     now *= a[i]
#     i += 1
while i < n:
    old = a[i-k]
    now = a[i]
    print("Yes" if now > old else "No")
    i += 1
    # old = now
    # now = (now / a[i-k]) * a[i]
    # print("Yes" if now > old else "No")
    # i += 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[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[i + K]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n,k=(int(x) for x in input().split())
a=[int(x) for x in 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+1,N+1):
    if A[i-1]>A[i-K-1]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

for i in range(k, n):
    if score[i-k] < score[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 sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))
ZIP = lambda: zip(*(MAP() for _ in range(n)))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
    N, K = MAP()
    A = LIST()

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n,k = list(map(int, input().split(" ")))
#a = list(map(int, input().split(" ")))
a = []
for i, a_i in enumerate(input().split(" ")):
    a_i = int(a_i)
    a.append(a_i)
    if i<k:
        continue
    #print(a[i-k], a_i)
    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()]
res = 0
for i in range(n-k):
  if a[i+k] - a[i] > 0:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

for k in range(K, N):
    if A[k] > A[k-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(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 = [int(a) for a in 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())
score = list(map(int,input().split()))
for i in range(n-k):
  if score[i] >= score[k+i]:
    print('No')
  else:
    print('Yes')

Submission status: Accepted

Solution code:
import sys
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().strip().split())
A = list(map(int, input().strip().split()))

text=""
for i in range(K,N):
    if A[i]>A[i-K] :
        text+="Yes\n"
    else:
       text+="No\n"
print("{}".format(text))

Submission status: Accepted

Solution code:
n,k = map(int, input().split())
a = [0]+[int(x) for x in input().split()]
 
def hyouka(gakki):
    if a[gakki-k]<a[gakki]:
        print("Yes")
    else:
        print("No")

for i in range(k+1,n+1):
    hyouka(i)

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 - K + i] >= A[K + i]:
        print('No')
    else:
        print('Yes')

Submission status: Accepted

Solution code:
# 入力
N,K = list(map(int, input().split()))
A_list = list(map(int, input().split()))

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

Submission status: Accepted

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

    for i in range(K, N):
        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()))
j = 0
for i in range(K,N):
    if A[j] < A[i]:
        print("Yes")
    else:
        print("No")
    j += 1

Submission status: Accepted

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

nums = [0]*n
nums[k-1] = sum(a[:k])
for i in range(k,n):
  nums[i] = nums[i-1] + a[i] - a[i-k]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def TUPLE(): return tuple(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7 
#mod = 998244353
#from decimal import *
#import numpy as np
#decimal.getcontext().prec = 10

def main():
	N, K = MAP()
	A = LIST()

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

if __name__ == '__main__':
	main()

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):
        print("Yes" if a[i] < a[i+k] else "No")

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = sum(a[0:k])
for i in range(1, n-k+1):
    nxt = ans - a[i-1] + a[i+k-1]
    if ans < nxt:
        print('Yes')
    else:
        print('No')
    ans = nxt

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("No")
    else:
        print("Yes")

Submission status: Accepted

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

c=1

for i in range(k, n):
    center=a[i]
    left=a[c]
    right=a[i+1]

    if left<right:
        print("Yes")
        c+=1
    else:
        print("No")
        c+=1

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] > A[i-K]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

    for i, _a in enumerate(a[k:]):
        if a[i] < _a:
            print("Yes")
        else:
            print("No")
    
    return


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-k] < a[i]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n, k, *a = map(int, read().split())

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

Submission status: Accepted

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

tmp = a[0]
for i in range(n-k):
    ans = 'Yes' if a[i] < a[i+k] else 'No'
    print(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-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()))
hikaku = a[0]
i = k
t=0
while i <= n - 1:
    if hikaku < a[i]:
        print("Yes")
    else:
        print("No")
    t += 1
    i+=1
    hikaku=a[t]

Submission status: Accepted

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

prev_a = []
for i in range(n):
    prev_a.append(alist[i])
    if i >= k:

        if prev_a.pop(0) < alist[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+K]>A[i] else "No")

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
A = list(map(int, input().split()))
a = K
b = 0
for _ in range(N-K):
    if A[a] > A[b]:
        print('Yes')
    else:
        print('No')
    a += 1
    b += 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('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(K-1,N-1):
  if A[i+1-K] < A[i+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]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
N, K  = map(int, input().split())
A_list = list(map(int, input().split()))
'''
#print(A_list)
ans_list = [ 0 for n in range(N)]
tmp = 1
for k in range(K):
    tmp *= A_list[k]
    #print(tmp)
ans_list[K-1] = tmp
#print(ans_list)
for k in range(K, N):
    ans_list[k] = ans_list[k-1]//A_list[k-K] * A_list[k]
'''
#print(ans_list)

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

Submission status: Accepted

Solution code:
from collections import defaultdict
from collections import deque
from collections import Counter
import itertools
import math

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()

n,k = readInts()
a = readInts()


t = a[0]

for i in range(k,n):
	be = a[i-k]
	af = a[i]
	#print(base)
	if be>=af:
		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")
    elif A[i]>=A[i+K] :
        print("No")

Submission status: Accepted

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

x = 1
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()))
# s = 1
# for i in range(k):
#     s *= a[i]
# # s = sum(a[:k])
# pre = s
for i in range(1,n-k+1):
    if a[i+k-1]/a[i-1]>1:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

for j in range(K, N):
    if A[j] > A[j-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(1, n-k+1):
        if a[i - 1] < a[k+ i -1]:
            print('Yes')
        else:
            print('No')
            
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n,k = list(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()))

# a = []
# tmp = 1
# r = 0
# for l in range(n):
#     tmp *= A[l]
#     if l >= k - 1:
#         a.append(tmp)
#         tmp //= A[r]
#         r += 1

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()))

# import numpy as np

# N = 200000
# K = 9999
# A = np.random.randint(1, 10 ** 9, N)

i = 0

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

Submission status: Accepted

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

for i in range(N - K):
    if list_A[i] < list_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())
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[i+K]:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

results = [0]*(n+1)
for i in range(n-k):
  if a[i] < a[i+k]:
    results[i+k+1] = 'Yes'
  else:
    results[i+k+1] = 'No'

for i in range(k+1,n+1):
  print(results[i])

Submission status: Accepted

Solution code:
import math 

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

for i in l:
  print(i)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    n,k = map(int, input().split())
    a = [int(i) for i in 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 sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def main():
    N, K, *A = map(int, read().split())
    for i in range(N-K):
        if A[i] < A[K+i]:
            print('Yes')
        else:
            print('No')
    return

if __name__ == '__main__':
    main()

Submission status: Accepted

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


for gakki in range(k+1,n+1):
    #pre = A[gakki-k-1:gakki-1]
    pre = A[gakki-k-1]
    #pre_ = 1
    #for p in pre:
        #pre_ *= p

    
    #k_gakki = A[gakki-k:gakki]
    k_gakki = A[gakki-1]
    #print(k_gakki)
    #k_gakki_ = 1
    #for ga in k_gakki:
        #k_gakki_ *= ga
    
    #if pre_ < k_gakki_:
    if pre < k_gakki:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
n, k = map(int, 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())
li = list(map(int, input().split()))

for i in range(n-k):
    if li[i] >= li[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:
def main():
    N, K = list(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()))
temp_1 = 1 #今
temp_2 = 1 #昔

for i in range(N):
    if i>(K-1):
        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()))

K -= 1
for i in range(K,N-1):
    if A[i-K] < A[i+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(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(K+1,N+1):
    if A[i-K-1]<A[i-1]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
from copy import deepcopy
import numpy as np


nk = input().split()
n = int(nk[0])
k = int(nk[1])
ajs = input().split()
ajs = np.log([int(aj) for aj in ajs])
ajs = ajs / ajs.max()

ak_current = ajs[:k].cumsum()[-1]

for i in range(k, n):
  ak_tmp = deepcopy(ak_current)

  ak_tmp =  ak_tmp - (ajs[i-k]) + (ajs[i])
  
  if ak_tmp > ak_current:
    print('Yes')
  else:
    print('No')
    
  ak_current = ak_tmp

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")

n, k = map(int, input().split())
a = [int(x) for x in input().split()]
a_start = a[0]
a_last = a[k - 1]
for i in range(1, n - k + 1):
    next_start = a[i]
    next_last = a[k + i - 1]
    if next_last > a_start:
        print('Yes')
    else:
        print('No')
    a_start, a_last = next_start, next_last

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[i+k]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

i = 0

while i+K<N:
  if A[i]<A[K+i]:
    print('Yes')
    i += 1
  else:
    print('No')
    i += 1

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-1]>A[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(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[k+i] > a[i]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
import math

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

    left=A[0]

    left_index=0
    right_index=K-1

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


if __name__=="__main__":
    main()

Submission status: Accepted

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


tmp=1
before_score=0
for i in range(K,N):
  if i>=K-1:
    if i>=K:
      print('Yes' if A[i-K]<A[i] else 'No')

Submission status: Accepted

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


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


# 2darray [[0] * 4 for i in range(3)]

Submission status: Accepted

Solution code:
n, k = (int(each) for each in input().split())
a = [int(each) for each in 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
import copy
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
INF = 1000000000000

n,k = LI()
a = LI()

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

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n,k = inpl()
a = inpl()
for i,x in enumerate(a):
    if i < k:
        continue
    else:
        if x > a[i-k]:
            print('Yes')
        else:
            print('No')

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def exit(*argv, **kwarg):
    print(*argv, **kwarg)
    sys.exit()


def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))
# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと


def a_int(): return int(read())


def ints(): return list(map(int, read().split()))


def read_col(H):
    '''H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_tuple(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_matrix(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため


MOD = 10**9 + 7
INF = 2**31  # 2147483648 > 10**9
# default import
from collections import defaultdict, Counter, deque
from operator import itemgetter, xor, add
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  # , insort_left, insort_right
from functools import reduce

# i番目の要素とi+K番目の要素を比較すればok
N, K = ints()
A = ints()
ans = []
for i in range(N):
    if i + K == N:
        break
    if A[i] < A[i + K]:
        ans.append('Yes')
    else:
        ans.append('No')
print(*ans, sep='\n')

Submission status: Accepted

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

# n-k回やる
for i in range(n-k):
    # iこ目をなくしてk+iこめをふやす
    if a[k+i] > a[i]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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 = list(map(int, input().split()))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

    for i in range(len(a) - 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:
num=input().split(" ")
num1=list(map(int, input().split()))
N=int(num[0])
K=int(num[1])
for i in range(N-K):
    if num1[i]<num1[i+K]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import deque

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

K_pts = deque(A[:K])
for i in range(K, N):
  print("Yes" if A[i] > K_pts.popleft() else "No")
  K_pts.append(A[i])

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("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(k, n):
    prev = a[i - k]
    next = a[i]
    if next > prev:
        print('Yes')
    else:
        print('No')