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:
import sys, math, itertools, collections, bisect 
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') 
inf = float('inf') ;mod = 10**9+7 
mans = inf ;ans = 0 ;count = 0 ;pro = 1

import sys, math, itertools, collections, bisect 
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') 
inf = float('inf') ;mod = 10**9+7 
mans = inf ;ans = 0 ;count = 0 ;pro = 1
 
n, k = map(int, input().split())
A = list(map(int, input().split()))
for i in range(k-1, n):
    if i == k-1:
        continue
    else:
        if A[i] > A[i-k]:
            print("Yes")
        else:
            print("No")
        #print(A[i], A[i-k])

Submission status: Accepted

Solution code:
import numpy as np
n, k=map(int, input().split())
plist = list(map(int, input().split()))
for i in range(n - k):
  if plist[i] < plist[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 n in range(K, N):
    print('Yes' if A[n] > A[n-K] else 'No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin, stdout,stderr
import time,math
from collections import defaultdict as dd
 
def pn(ob):stdout.write(str(ob))
def inp():return stdin.readline()

def process():
	n, k = map(int, inp().split())
	arr = list(map(int, inp().split()));
	pref = [0]
	pref[0] = arr[0]

	
	for i in range(k, n, 1):
		if(arr[i] > arr[i-k]):
			pn("Yes\n")
		else:
			pn("No\n");
		
 
def main():
	t=1
	#t=int(inp())
	start = time.time()
 
	while (t>0):
		t-=1
		process()
	end = time.time()
	#stderr.write('\nelapsed time'+str(end - start))
  
if __name__ == '__main__':
	main()
	
#n,m=map(int,input().split()) 
# for i in range(n):
#     t=int(stdin.readline()) # input using fast i/p method 
#     if t%m == 0:
#         stdout.write(str(t)+'\n') #input using fast o/p method
 
# take line of integers as input
# 	arr = list(map(int, inp().split()))

Submission status: Accepted

Solution code:
#C
N, K = map(int, input().split())
A = list(map(int, input().split()))
p=[]
for i in range(N-K):
    if A[i+K]>A[i]:
        p.append(1)
    else:
        p.append(0)

for j in range(len(p)):
    if p[j]==1:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
N, K = map(int,input().split())
A = list(map(int, input().split()))
tmp = [0]*(N-K)
for i in range(N-K):
    tmp[i] = A[i]/A[K+i]

for i in range(N-K):
    if tmp[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(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:
terms = [int(i) for i in input().split(" ")]
scores = [int(i) for i in input().split(" ")]

N = terms[0]
K = terms[1]

tempScore = []
scoreSet = []

for i in range(N-K):
    if scores[i] < scores[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):
    if i+1 > k:
        if a[i-k] < a[i]:
            print('Yes')
        else:
            print('No')

Submission status: Accepted

Solution code:
# @uthor : Kaleab Asfaw
import sys

input = sys.stdin.readline

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

Submission status: Accepted

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

output = []
count = 0
for i in range(k, n):
    if A[i] > A[count]:
        output.append("Yes")
    else:
        output.append("No")
    count += 1
    
print(*output, 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] < A[i+K]:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(4100000)
import math
import itertools
INF = float('inf')
from heapq import heapify, heappop, heappush

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:
n,k=map(int,input().split())
ar=list(map(int,input().split()))
for i in range(k,n):
	if ar[i]>ar[i-k]:
		print("Yes")
	else:
		print("No")

Submission status: Accepted

Solution code:
def main():
    N, K = map(int, input().split())
    As = list(map(int, input().split()))
    hyouka = [0]*(N-K+1)
    """
    kekka = 1
    for i in range(N-K+1):
        if i == 0:
            for j in As[i:i+K]:
                kekka *= j
                hyouka[i]=kekka
        else:
            kekka = kekka/As[i-1]*As[i+K-1]
            hyouka[i]=int(kekka)
    #print(hyouka)
    for j in range(len(hyouka)):
        if j>0:
            if hyouka[j] > hyouka[j-1]:
                print('Yes')
            else:
                print("No")
    """
    for i in range(N-K):
        if As[i] < As[i+K]:
            print("Yes")
        else:
            print("No")


if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
import sys
from collections import deque
from collections import defaultdict
import heapq
import collections
import itertools
import bisect
from scipy.special import comb
import copy
sys.setrecursionlimit(10**6)


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


def z():
    return int(sys.stdin.readline())


def S():
    return sys.stdin.readline()[:-1]


def C(line):
    return [sys.stdin.readline() for _ in range(line)]


N, K = zz()
A = zz()

for i in range(K, N):
    # print(i, 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, 1):
  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())
Ai = list(map(int, input().split()))

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

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

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

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

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

Submission status: Accepted

Solution code:
#尺取り法的な……
#

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import os
import sys
from io import BytesIO, IOBase

def main():
    t = 1
    for _ in range(t):
        # n = int(input)
        n, k = map(int, input().split())
        nums = list(map(int, input().split()))
        
        start = 0
        for ind in range(k, n):
            if nums[ind] > nums[start]:
                print("Yes")
            else:
                print("No")
            start += 1



        




































# region fastio
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")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
# endregion
 
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

for i in reversed(range(N-K)):
    i = N-i
    if C[i-K-1] < C[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 - k] < a[i]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#Problem 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:
import sys
import math
def get_array(): return list(map(int, sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
n,k=get_ints()
a=get_array()
ans1=[a[0]]
for i in range(1,n):
    ans1.append(a[i]+ans1[-1])
ans=[ans1[k-1]]
x=0
for j in range(k,n):
    ans.append(ans1[j]-ans1[x])
    x=x+1
for i in range(len(ans)-1):
    if ans[i+1]>ans[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-1)-1] < a[i] :
        print("Yes")
    else :
        print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
n,k = map(int, sys.stdin.readline().rstrip("\n").split())
a = [int(s) for s in sys.stdin.readline().rstrip("\n").split()]
p = 1
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=[0]*(n+1)

for i in range(k):
	b[k]+=a[i]

for i in range(k+1,n+1):
	#print(i,b[i],b[i-1],a[i-1],a[i-k-1])
	b[i]=b[i-1]+a[i-1]-a[i-k-1]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

n,k = list(map(int, list(input().split())))
scores = list(map(int, list(input().split())))

for i in range(k + 1, n + 1):
    remove = scores[i - k - 1]
    add    = scores[i - 1]

    if remove < add:
        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 = [int(x) for x in input().split()]
A = [int(x) for x 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] <= 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()))
sumf = sum(a[:k])
for i in range(1,n-k+1):
    sumn = sumf - a[i-1] + a[i+k-1]
    print("Yes" if sumn>sumf else "No")
    sumf = sumn

Submission status: Accepted

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

    start = 0
    end = K
    mark = sum(A[start:end])

    for i in range(end, N):
        prev_head = i - K
        curr_tail = i
        new_mark = mark - A[prev_head] + A[curr_tail]

        if new_mark > mark:
            print('Yes')
        else:
            print('No')

        mark = new_mark


##########
if __name__ == "__main__":
    c()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import itertools


def resolve(in_, out):
    n, k = map(int, next(in_).split())
    a = tuple(map(int, next(in_).split()))

    b, c = itertools.tee(a)
    c = itertools.islice(c, k, None)
    for v, w in zip(b, c):
        s = 'Yes' if v < w else 'No'
        print(s, file=out)
        


def main():
    resolve(sys.stdin.buffer, sys.stdout)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

old = 0

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

Submission status: Accepted

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

i = k
while i < len(listA):
    if listA[i] > listA[i-k]:
        print("Yes")
    else:
        print("No")
    i+=1

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Jul 25 17:57:31 2020

@author: Paras
"""

n,k = map(int, input().split())
marks = list(map(int, input().split()))
i = 0
j = i+k
while j<n:
    if marks[j]>marks[i]:
        print("Yes")
    else:
        print("No")
    i+=1
    j+=1

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
import math
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math as M
MOD=10**9+7
import sys
#####################################

n,k=INPUT()
A=INPUT()

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

Submission status: Accepted

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

for i in range(N - K):
    if points[i] < points[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(len(a) - k):
    if a[i] < a[i + k]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

points = [1]*(n-k+1)

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N, K = [int(x) for x in input().split()]
A = list([int(x) for x 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:
n, k = map(int, input().split())
a = list(map(int, input().split())) 
seki1 = 1

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().strip().split(" "))
scores = input().strip().split(" ")

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

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

Submission status: Accepted

Solution code:
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd # 最大公約数
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) # 最小公倍数
# list(map(int, input().split()))
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
# sys.setrecursionlimit(100000)

def main():
    n,k = [int(i) for i in input().strip().split()]
    A = [int(i) for i in input().strip().split()] 

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
def IL(): return map(int,sys.stdin.readline().rstrip().split())

if __name__=='__main__':
    n,k = IL()
    a = list(IL())
    l = n-k
    pre = b = 0
    for i in range(l):
        if a[i]<a[i+k]:
            print('Yes')
        else:
            print('No')
    exit()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
n, k = map(int, input().split())
a = [int(_) for _ in list(input().split())]

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

Submission status: Accepted

Solution code:
def resolve():
    N, K = list(map(int, input().split()))
    A = list(map(int, input().split()))
    ans = []
    sta = 0
    end = K
    while end < N:
        # print(sta, end)
        if A[end] > A[sta]:
            print('Yes')
        else:
            print('No')
        sta += 1
        end += 1
    return
resolve()

Submission status: Accepted

Solution code:
nk = input('')
n = int(nk.split()[0])
k = int(nk.split()[1])

alist = list(map(int,input('').split()))

for i in range(1,n-k+1):
    removed = alist[i-1]
    inserted = alist[i+k-1]
    if inserted > removed:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
#M-SOLUTIONS C
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:
def main():
    import sys

    def input(): return sys.stdin.readline().rstrip()

    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')
        
    
        
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

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

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

# hyoten = [1] * (N-K+1)

# for i in range(N-K+1):
#     for q in range(K):
#         hyoten[i] *= A[i+q]


# for j in range(len(hyoten)-1):
#     if (hyoten[j+1]>hyoten[j]):
#         print('Yes')
#     else:
#         print('No')

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

#hyouten = []


for i in range(n-k+1):

    
    if i>0:
        score_old = a[i-1]
        score = a[i+k-1]
#        print(score_old,score)
        if score >score_old:
            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(hoge[i-1],hoge[i],end=" ")
    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()))
j = 0
for i in range(k,n):
    print(['No','Yes'][a[j]<a[i]])
    j+=1

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(k,n):

    if a[i]>a[i-k]:

        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


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

Submission status: Accepted

Solution code:
from collections import deque

n,k=map(int,input().split())
A=deque(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 num, i in enumerate(range(k, n)):
    if a[num] < 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(a[k+i],a[i])
#  if a[n-k+1+i]>a[i]:
  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+1, n+1):
    if a[i-1] > a[i-k-1]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
import sys
#import numpy as np
N, K = map(int, sys.stdin.readline().split())
A = list(map(int, sys.stdin.readline().split()))
# DP = [1] * (2 * 10 ** 6)
# DP[K - 1] = np.prod(A[0:K])

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

Submission status: Accepted

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

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

	if l[i]>l[j]:
		print("Yes")
	else:
		print("No")
	j+=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:
n, k = map(int, input().split())
a = list(map(int, input().split()))
for i in range(1, n - k + 1):
    print('Yes' if 1 < a[k + i - 1] / a[i - 1] else 'No')