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:
# input()
# int(input())
# map(int, input().split())
# list(map(int, input().split()))
# list(map(int, list(input()))) # スペースがない数字リストを読み込み
import math
import fractions
import sys
import bisect
import heapq  # 優先度付きキュー(最小値取り出し)
import collections
from collections import Counter
from collections import deque
import pprint
import itertools

sr = lambda: input()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""


def factorization(n):
    arr = []
    temp = n
    if n == 1:
        return arr

    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


# a^n
def power(a, n, mod):
    x = 1
    while n:
        if n & 1:
            x *= a % mod
        n >>= 1
        a *= a % mod
    return x % mod


# n*(n-1)*...*(l+1)*l
def kaijo(n, l, mod):
    if n == 0:
        return 1
    a = n
    tmp = n - 1
    while (tmp >= l):
        a = a * tmp % mod
        tmp -= 1
    return a

# Union Find
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

# 約数生成
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors


inf = 10 ** 18
mod = 10 ** 9 + 7

n,k = lr()
a = lr()
pre1 = a[0]
pre2 = a[k]
for i in range(n-k):
    if pre2 > pre1:
        print('Yes')
    else:
        print('No')
    if i < n-k-1:
        pre1 = a[i+1]
        pre2 = a[i+1+k]

Submission status: Accepted

Solution code:
import sys,queue,math,copy,itertools,bisect,collections,heapq

def main():
    sys.setrecursionlimit(10**7)
    INF = 10**18
    MOD = 10**9 + 7
    LI = lambda : [int(x) for x in sys.stdin.readline().split()]
    _LI = lambda : [int(x)-1 for x in sys.stdin.readline().split()]
    NI = lambda : int(sys.stdin.readline())
    SI = lambda : sys.stdin.readline().rstrip()

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

    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:
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:
N,K=map(int, input().split())
A=list(map(int, input().split()))
l,r=0,K
for i in range(N-K):
  s,ne=A[l],A[r]
  if ne>s:
    print('Yes')
  else:
    print('No')
  l+=1
  r+=1

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import collections as cl
import sys


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


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


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


def main():
    n, k = MI()
    scores = LI()

    score_now = 1

    for i in range(k, n):
        next_score = scores[i] / scores[i - k]
        print("Yes" if next_score > 1 else "No")


main()

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

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
import math
import heapq
from decimal import *
from io import BytesIO, IOBase
from collections import defaultdict, deque

def r():
    return int(input())
def rm():
    return map(int,input().split())
def rl():
    return list(map(int,input().split()))

n,k=rm()
a=rl()
for i in range(k,n):
    if a[i]-a[i-k] >0:
        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:
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()))
b = [0]*n
for i in range(n):
    if i>=k:
        if a[i]-a[i-k]>0:
            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("NYoe s"[A[i]<A[k+i]::2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import sys
MOD = 10 ** 9 + 7
INFI = 10**10
#input = sys.stdin.readline
import math
from collections import deque
import itertools
import heapq
#import bisect
from fractions import Fraction
import copy
from functools import lru_cache
from collections import defaultdict
import pprint

#oo=list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
# ko=list("abcdefghijklmnopqrstuvwxyz")

def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

#    h,w,a,b = map(int, input().split())
#    c = [[0 for j in range(n)] for i in range(n)]

def ret(a):
    c=[None]*(len(a)-1)
    if len(a)==1:
        return a[0]
    elif len(a)==0:
        return 0
    for i in range(1,len(a)):
        c[i-1]=abs(a[i]-a[i-1])
    return ret(c)

def soinsubunkai(n):
    a = []
    i = 1
    while i*i <= n:
        if n % i == 0 and i!=1:
            a.append(i)
            n=n//i

        if n% i !=0 or i==1:
            i += 1
    nokori=[n]
    return a + nokori

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

def main():
    #l,r,d=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-k]<a[i]:
            print("Yes")
        else:
            print("No")

if __name__ == "__main__":

    main()

Submission status: Accepted

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

k_sum = sum(A[:k])

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

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:
from sys import stdin
N,K = [int(x) for x in stdin.readline().rstrip().split()]
A = [int(x) for x in stdin.readline().rstrip().split()]

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

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

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

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
a = list(map(int, input().split())) # list()でリスト化、それを変数に代入。

for i in range(k,n):
    if a[i-k] < a[i]:
        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()]

now = 1
for i in range(len(a[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+k]>a[i]:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
import sys, math

if(__name__ == "__main__"):
    N, K = map(int, input().strip().split() )
    AList = list( map(int, input().strip().split() ) )

    
    """
    i = K+1 , K+2 ,..., N
    score[i] = i * i-1 * ...* (i-K+1)
    score[i]/score[i-1] = i / (i-K)
    """
    for i in range(K, N):
        if(AList[i] > AList[i-K]):
            print("Yes")
        else:
            print("No")

Submission status: Accepted

Solution code:

from collections import deque

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

q = deque(X[:K])
for i in range(K, N):
    u = q.popleft()
    if u < X[i]:
        print("Yes")
    else:
        print("No")
    q.append(X[i])

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

Submission status: Accepted

Solution code:
def main():
    nk = [int(_x) for _x in input().split()]
    N = nk[0]
    K = nk[1]
    AA = [int(_x) for _x in input().split()]
    A = [0] + AA
    hyoten = 1
    for i in range(N+1):
        if i <= K:
            continue
        if A[i] > A[i-K]:
            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):
    print('Yes' if a[i] > a[i-k] else '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] > A[i-K]:
            print("Yes")
        else:
            print("No")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 19
MOD = 10 ** 9 + 7
EPS = 10 ** -10

N, K = MAP()
A = LIST()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#m-solutions2020 c
import sys
input = sys.stdin.readline


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:
#!usr/bin/env python3
from collections import defaultdict, deque, Counter, OrderedDict
from bisect import bisect_left, bisect_right
from functools import reduce, lru_cache
from heapq import heappush, heappop, heapify

import itertools, bisect
import math, fractions
import sys, copy

def L(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline().rstrip())
def S(): return list(sys.stdin.readline().rstrip())
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LS(): return [list(x) for x in sys.stdin.readline().split()]
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def LIR1(n): return [LI1() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
def LR(n): return [L() for _ in range(n)]

alphabets = "abcdefghijklmnopqrstuvwxyz"

sys.setrecursionlimit(1000000)
dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]
dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
MOD = 1000000007

def main():
    N, K = LI()
    A = LI()

    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:
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:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**8)
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 ZIP(n): return [LIST() for _ in range(n)]
def NSTR(n): return [input() for _ in range(n)]


INF = float("inf")
MOD = 10**9 + 7


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

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


if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Author: S Mahesh Raju
# Username: maheshraju2020
# Date: 25/07/2020

from sys import stdin,stdout
from math import gcd, ceil, sqrt
from collections import Counter
from bisect import bisect_left, bisect_right
ii1 = lambda: int(stdin.readline().strip())
is1 = lambda: stdin.readline().strip()
iia = lambda: list(map(int, stdin.readline().strip().split()))
isa = lambda: stdin.readline().strip().split()
mod = 1000000007

n, k = iia()
arr = iia()
tot = 1
for i in range(k, n):
    if arr[i] > arr[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]>1.0:
    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(0,n-k):
    if a[i] < a[i+k]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf
from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n, k = MAP()
a = [1] + LIST()

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

Submission status: Accepted

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

for ai_k, ai in zip(A, A[K:]):
    print('Yes' if ai_k < ai else 'No')

Submission status: Accepted

Solution code:
import sys

N, K = map(int, sys.stdin.readline().split())
A = list(map(int, sys.stdin.readline().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()))
dp=[0]*n
for i in range(n):
    if i < k:
        dp[i] += dp[i-1] + A[i]
    else:
        dp[i] = dp[i-1] + A[i] - A[i-k]
for i in range(k,n):
    if dp[i-1] < dp[i]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

marks = []
for i, current in enumerate(scores):

    marks.append(current)

    if i < k:
        continue

    if marks[i - k] < current:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
input = sys.stdin.readline
INF = float("inf")


# 処理内容
def main():
    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")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

N,K=map(int,input().split())
A=list(map(int,input().split()))
for i in range(N-K):
    YesNo(A[i]<A[i+K])

Submission status: Accepted

Solution code:
import sys
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
N,K = LI()
A = LI()
for i in range(N-K):
    temp1 = A[i]
    temp2 = A[K+i]
    print('Yes' if temp1<temp2 else 'No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

previ = 0
nowi = k
for _ in range(n-k):
    prev = a[previ]
    now = a[nowi]
    if now > prev:
        print('Yes')
    else:
        print('No')
    previ += 1
    nowi += 1

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import os
from sys import stdin, stdout

def solve(tc):
    n, k = map(int, stdin.readline().split())
    seq = list(map(int, stdin.readline().split()))

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

tcs = 1
tc = 1
while tc <= tcs:
    solve(tc)
    tc += 1

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Jul 25 21:09:40 2020

@author: NEC-PCuser
"""

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 = [int(i) for i in input().split()]
A = [int(i) for i in 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, j in zip(A[:], A[k:]):
  if i < j:
    print("Yes")
  else:        
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys
import collections
import bisect
readline = sys.stdin.readline


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N,K = map(int,input().split())
A = list(map(int,input().split()))
left = 0
right = K
while True:
  if right>=N:
    break
  else:
    if A[right]>A[left]:
      print('Yes')
    else:
      print('No')

    left += 1
    right += 1

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

now = 1
prev = 1
for i in range(K,N): #KからN-1
  if A[i-K] < A[i]:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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