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 = 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=[int(s) for s in input().split()]
ls=[int(s) for s in input().split()]
for i in range(K,N):
  if ls[i]>ls[i-K]:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import decimal

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    N, K = [int(x) for x in input().split()]
    A = [int(x) for x in input().split()]
    ans = []
    x = decimal.Decimal(1)
    for i in range(N - K):
        prev = x
        x *= decimal.Decimal(A[i + K])
        x /= decimal.Decimal(A[i])
        if x > prev:
            print("Yes")
        else:
            print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

for i in range(len(a_list)):
    if i+k > len(a_list)-1:
        break
    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=[int(x) for x in input().rstrip().split()]

ruiseki=[a[0]]
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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n,k = LI()
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(map(int,input().split()))
hyoutei=[0]*(N+1)
for i in range(K,N):#K+1-N
    if A[i]/A[i-K]>1:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
import math
import collections
import fractions
import itertools
import functools
import operator

def solve():
    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 print("No")
    return 0

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
def solve():
    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 print("No")
    return 0

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
import math as mt
import sys, string
from collections import Counter, defaultdict
input = sys.stdin.readline

MOD = 1000000007

# input functions
I = lambda : int(input())
M = lambda : map(int, input().split())
Ms = lambda : map(str, input().split()) 
ARR = lambda: list(map(int, input().split()))

def main():
    n, k = M()
    arr = ARR()
    for i in range(n - k):
        # print(arr[i], arr[k+i])
        if arr[k + i] > arr[i]:
            print("Yes")
        else:
            print("No")
        


# testcases
tc = 1
for _ in range(tc):
    main()

Submission status: Accepted

Solution code:
import math
import collections
import fractions
import itertools
import functools
import operator

def solve():
    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")
    return 0

if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,K = map(int,input().split())
a = list(map(int,input().split()))
for i in range(1,N-K+1):
    if a[K+i-1]>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()))

score=1
for i in range(K):
    score+=A[i]

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

Submission status: Accepted

Solution code:
nk = input().split()
n = int(nk[0])
k = int(nk[1])
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):
    if a[i] < a[i+k]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007

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

    for i in range(K + 1, N + 1): # K + 1 から N までのループ
        if (A[i - K - 1] < A[i - 1]):
            print("Yes")
        else:
            print("No")
    return

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007

def calcSum(n, A):
    return n

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

    for i in range(K + 1, N + 1): # K + 1 から N までのループ
        if (A[i - K - 1] < A[i - 1]):
            print("Yes")
        else:
            print("No")
    return

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

N, K = map(int,input().split())
A = list(map(int,input().split()))
B = [0] * (N + 1)
M = [0] * (N + 1)

for i in range(N):
    B[i + 1] = B[i] + math.log10(A[i])

for i in range(K, N + 1):
    M[i] = B[i] - B[i - K]

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

Submission status: Accepted

Solution code:
#0 はない
n,k=map(int, input().split())
*a,=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:
def main():
    N,K=map(int,input().split())
    A=[int(_) for _ in input().split()]
    for i in range(K, N):
        if A[i-K] < A[i]:
            print('Yes')
        else:
            print('No')
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("No")
    else:
        print("Yes")

Submission status: Accepted

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

for a,b in zip(A,A[K:]):
    print("Yes" if b>a 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):
    print('Yes') if A[i - K] < A[i] 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()))
b = [1] * (n-k+1)
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(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()))

result = []
for i in range(K, N):
    if A[i] > A[i - K]:
        result.append('Yes')
    else:
        result.append('No')
print(*result, sep='\n')

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(len(A)-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()))
print(*['Yes' if a[i] < a[k + i] else 'No' for i in range(n - k)], sep='\n')

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

Submission status: Accepted

Solution code:
# coding: utf-8
#import math
#import numpy
#N = int(input())
def main():
    import sys
    input = sys.stdin.readline
    N, K = map(int,input().split())
    A = list(map(int,input().split()))
    #K =int(input())
    ANS = []
    
    #ANS.append(a)
    for i in range(K,N):
        if A[i-K] < A[i]:
            print("Yes")
        else:
            print("No")
        
        
        #ANS.append(a)
    #print(ANS)
    

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

def get_input() -> tuple:
    """
    標準入力を取得する.

    Returns:\n
        tuple: 標準入力
    """
    N, K = list(map(int, input().split()))
    A = list(map(int, input().split()))

    return N, K, A

def main(N: int, K: int, A: list) -> None:
    """
    メイン処理.

    Args:\n
        N (int): 学期数（2 <= N <= 200000）
        K (int): 直近何回分までの点数を考慮するか（1 <= K <= N - 1）
        A (list): i学期の期末テストの点数
    """
    # 求解処理
    for i in range(K, N):
        if A[i] > A[i - K]:
            print("Yes")
        else:
            print("No")

if __name__ == "__main__":
    # 標準入力を取得
    N, K, A = get_input()

    # メイン処理
    main(N, K, A)

Submission status: Accepted

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

Submission status: Accepted

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

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] > 1 :
        print("Yes")

    else :
        print("No")

Submission status: Accepted

Solution code:
 
# from math import factorial as fac
from collections import defaultdict
# from copy import deepcopy
import sys, math
f = None
try:
	f = open('q1.input', 'r')
except IOError:
	f = sys.stdin
if 'xrange' in dir(__builtins__):
	range = xrange
# print(f.readline())
# sys.setrecursionlimit(10**6)

	
def print_case_iterable(case_num, iterable):
	print("Case #{}: {}".format(case_num," ".join(map(str,iterable))))

def print_case_number(case_num, iterable):
	print("Case #{}: {}".format(case_num,iterable))

def print_iterable(A):
	print (' '.join(A))

def read_int():
	return int(f.readline().strip())
def read_int_array():
	return [int(x) for x in f.readline().strip().split(" ")]
def rns():
	a =  [x for x in f.readline().split(" ")]
	return int(a[0]), a[1].strip()
def read_string():
	return list(f.readline().strip())
def ri():
	return int(f.readline().strip())
def ria():
	return [int(x) for x in f.readline().strip().split(" ")]
def rns():
	a =  [x for x in f.readline().split(" ")]
	return int(a[0]), a[1].strip()
def rs():
	return list(f.readline().strip())
def bi(x):
	return bin(x)[2:]





from collections import deque
import math
NUMBER = 10**9 + 7
# NUMBER = 998244353
def factorial(n) : 
	M = NUMBER
	f = 1
  
	for i in range(1, n + 1):  
		f = (f * i) % M # Now f never can  
						# exceed 10^9+7  
	return f
def mult(a,b):
	return (a * b) % NUMBER

def minus(a , b):
	return (a - b) % NUMBER

def plus(a , b):
	return (a + b) % NUMBER

def egcd(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		g, y, x = egcd(b % a, a)
		return (g, x - (b // a) * y, y)

def modinv(a):
	m = NUMBER
	g, x, y = egcd(a, m)
	if g != 1:
		raise Exception('modular inverse does not exist')
	else:
		return x % m
def choose(n,k):
	if n < k:
		assert false
	return  mult(factorial(n), modinv(mult(factorial(k),factorial(n-k)))) % NUMBER
from collections import deque, defaultdict 
import heapq


from types import GeneratorType
def bootstrap(f, stack=[]):
	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to

	return wrappedfunc


def dfs(g, timeIn, timeOut,depths,parents): 
	# assign In-time to node u 
	cnt = 0
	# node, neig_i, parent, depth
	stack = [[1,0,0,0]]
	while stack:
		v,neig_i,parent,depth = stack[-1]
		parents[v] = parent
		depths[v] = depth
		# print (v)
		if neig_i == 0:
			timeIn[v] = cnt    
			cnt+=1
		while neig_i < len(g[v]):
			u = g[v][neig_i]
			if u == parent:
				neig_i+=1
				continue
			stack[-1][1] = neig_i + 1
			stack.append([u,0,v,depth+1])
			break
		if neig_i == len(g[v]):
			stack.pop()
			timeOut[v] = cnt
			cnt += 1
  
# def isAncestor(u: int, v: int, timeIn: list, timeOut: list) -> str: 
# 	return timeIn[u] <= timeIn[v] and timeOut[v] <= timeOut[u] 

cnt = 0
@bootstrap
def dfs(v,adj,timeIn, timeOut,depths,parents,parent=0,depth=0):
	global cnt
	parents[v] = parent
	depths[v] = depth
	timeIn[v] = cnt
	cnt+=1
	for u in adj[v]:
		if u == parent:
			continue
		yield dfs(u,adj,timeIn,timeOut,depths,parents,v,depth+1)
	timeOut[v] = cnt
	cnt+=1
	yield 

def gcd(a,b): 
	if a == 0: 
		return b 
	return gcd(b % a, a) 
  
# Function to return LCM of two numbers 
def lcm(a,b): 
	return (a*b) / gcd(a,b) 
def get_num_2_5(n):
	twos = 0
	fives = 0
	while n>0 and n%2 == 0:
		n//=2
		twos+=1
	while n>0 and n%5 == 0:
		n//=5
		fives+=1
	return (twos,fives)
def shift(a,i,num):
	for _ in range(num):
		a[i],a[i+1],a[i+2] = a[i+2],a[i],a[i+1]

def equal(x,y):
	return abs(x-y) <= 1e-9
# def leq(x,y):
# 	return x-y <= 1e-9
def getAngle(a, b, c):
	ang = math.degrees(math.atan2(c[1]-b[1], c[0]-b[0]) - math.atan2(a[1]-b[1], a[0]-b[0]))
	return ang + 360 if ang < 0 else ang
def getLength(a,b):
	return math.sqrt((a[0]-b[0])**2 + (a[1]-b[1])**2)


from heapq import heapify, heappush, heappop

def bfs(adj):
	s = set()
	d = defaultdict(set)
	# print('\n'.join(map(str,E.items())))
	q = deque([])
	s.add(0)
	d[0].add(0)
	q.append((0,0))
	while len(q) > 0:
		v,depth = q.popleft()
		for u in adj[v]:
			if u not in s:
				s.add(u)
				d[depth+1].add(u)
				q.append((u,depth+1))
		# print(q)
	return d



def isSubsetSum(arr, n, summ): 
	  
	# The value of subarr[i][j] will be  
	# true if there is a 
	# subarr of arr[0..j-1] with summ equal to i 
	subarr =([[False for i in range(summ + 1)]  
			for i in range(n + 1)]) 
	  
	# If summ is 0, then answer is true  
	for i in range(n + 1): 
		subarr[i][0] = True
		  
	# If summ is not 0 and arr is empty,  
	# then answer is false  
	for i in range(1, summ + 1): 
		 subarr[0][i]= False
			  
	# Fill the subarr table in botton up manner 
	for i in range(1, n + 1): 
		for j in range(1, summ + 1): 
			if j<arr[i-1]: 
				subarr[i][j] = subarr[i-1][j] 
			if j>= arr[i-1]: 
				subarr[i][j] = (subarr[i-1][j] or 
								subarr[i - 1][j-arr[i-1]]) 
	  
	# uncomment this code to print table  
	# for i in range(n + 1): 
	# for j in range(summ + 1): 
	# print (subset[i][j], end =" ") 
	# print() 
	return subarr[n][summ] 

@bootstrap
def dfs(v,adj,vis,black):
	vis[v] = 1
	for u in adj[v]:
		if vis[u]==2:
			continue
		if vis[u] == 1:
			black.add((v,u)) 
			continue
		yield dfs(u,adj,vis,black)
	vis[v] = 2
	yield


def solution(a,n,k):
	res = [] 
	for i in range(k,n):
		res.append("Yes" if a[i] > a[i-k] else "No")
	return '\n'.join(res)

def main():
	T = 1
	# T = ri()
	for i in range(T):
		# n = ri()
		# n,m = ria()
		# a = ria()
		n,k = ria()
		a = ria()
		# s = rs()
		# b = rs()
		# n,k,l	= ria()
		# a = ria()
		# adj = [list() for _ in range(n)]
		# for _ in range(m):
		# 	a,b=ria();
		# 	a-=1; b-=1
		# 	adj[a].append(b)

		x = solution(a,n,k)

		# continue
		if 'xrange' not in dir(__builtins__):
			print(x) # print("Case #"+str(i+1)+':',x)
		else:
			print >>output,str(x)
	if 'xrange' in dir(__builtins__):
		print(output.getvalue())
		output.close()

if 'xrange' in dir(__builtins__):
	import cStringIO
	output = cStringIO.StringIO()
#example usage:
#    for l in res:
#       print >>output, str(len(l)) + ' ' +  ' '.join(l)

if __name__ == '__main__':
	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()]
    # zip にすると2つのリストを作るのか，これよりも少し時間とメモリ増。
    print('\n'.join('Yes' if scores[index] < new else 'No'
                    for index, new in enumerate(scores[k:])))


if __name__ == '__main__':
    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 index, new in enumerate(scores[k:]):
        # zip にすると2つのリストを作るのか，これよりも少し時間とメモリ増。
        print('Yes' if scores[index] < new else 'No')


if __name__ == '__main__':
    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()]
    # zip にすると2つのリストを作るのか，これよりも少し時間とメモリ増。
    {
        print('Yes' if scores[index] < new else 'No')
        for index, new in enumerate(scores[k:])}


if __name__ == '__main__':
    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 index, new in enumerate(scores[k:]):
        if scores[index] < new:
            print('Yes')
        else:
            print('No')


if __name__ == '__main__':
    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 index in range(n - k):
        if scores[index] < scores[index + 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+k]>A[i] else '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):
        ans.append("Yes" if a[i] > a[i-k] else "No")

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
"""
    Satwik_Tiwari ;) .
    24th july , 2020  - Friday
"""

#===============================================================================================
#importing some useful libraries.
from __future__ import division, print_function

from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase

from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter  # Counter(list)  return a dict with {key: count}
from itertools import combinations as comb # if a = [1,2,3] then print(list(comb(a,2))) -----> [(1, 2), (1, 3), (2, 3)]
from itertools import permutations as permutate
from bisect import bisect_left as bl
#If the element is already present in the list,
# the left most position where element has to be inserted is returned.
from bisect import bisect_right as br
from bisect import bisect
#If the element is already present in the list,
# the right most position where element has to be inserted is returned

#==============================================================================================
#fast I/O region
BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

# inp = lambda: sys.stdin.readline().rstrip("\r\n")

#===============================================================================================
#some shortcuts

mod = 1000000007
def inp(): return sys.stdin.readline().rstrip("\r\n") #for fast input
def out(var): sys.stdout.write(str(var))  #for fast output, always take string
def lis(): return list(map(int, inp().split()))
def stringlis(): return list(map(str, inp().split()))
def sep(): return map(int, inp().split())
def strsep(): return map(str, inp().split())
# def graph(vertex): return [[] for i in range(0,vertex+1)]
def zerolist(n): return [0]*n
def nextline(): out("\n")  #as stdout.write always print sring.
def testcase(t):
    for p in range(t):
        solve()
def printlist(a) :
    for p in range(0,len(a)):
        out(str(a[p]) + ' ')
def lcm(a,b): return (a*b)//gcd(a,b)
def power(a,b):
    ans = 1
    while(b>0):
        if(b%2==1):
            ans*=a
        a*=a
        b//=2
    return ans
def ncr(n,r): return factorial(n)//(factorial(r)*factorial(max(n-r,1)))
def isPrime(n) :
    if (n <= 1) : return False
    if (n <= 3) : return True
    if (n % 2 == 0 or n % 3 == 0) : return False
    i = 5
    while(i * i <= n) :
        if (n % i == 0 or n % (i + 2) == 0) :
            return False
        i = i + 6
    return True

#===============================================================================================
# code here ;))

def solve():
    n,k = sep()
    a = lis()

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




testcase(1)
# testcase(int(inp()))

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(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] > 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()))
now = 1000
for i in range(k, n):
    #print(A[i], A[i-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:
import sys
input = sys.stdin.readline

# C - Marks
N, K = map(int, input().split())
A = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
from sys import stdin,stdout
n,k=map(int,stdin.readline().split())
a=list(map(int,stdin.readline().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()))

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

Submission status: Accepted

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

total = 1
A = list(map(int, input().split()))

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

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