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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    n, k = i_map()
    num_list = i_list()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from math import sqrt,ceil,gcd
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())


# for _ in range(ii()):

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

Submission status: Accepted

Solution code:
N,K=map(int,input().split())
A=list(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 = [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 = 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 - K):
    if A[K + i] > A[i]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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


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

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

Submission status: Accepted

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

Submission status: Accepted

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

'''

'''

def solve(n, k, a):
    res = []

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

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

res = solve(n, k, a)
for r in res:
    print(r)

Submission status: Accepted

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

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


if __name__ == '__main__':
    inputs = read()
    solve(*inputs)

Submission status: Accepted

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

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

# K + 1 ～ Nについて、i - K < iであればYes

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):
    # next_sum_val = now_sum_val // A[i - K] * A[i]
    if A[i] > A[i - K]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
ma = lambda :map(int,input().split())
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
import collections
import math
import itertools
import heapq as hq
n,k = ma()
A = list(ma())
s = 1
zeros = [0 for i in range(n+1)]
for i in range(k):
    if A[i] ==0:
        zeros[i] +=1
        zeros[min(n,i+k)] -=1
for i in range(1,n+1):
    zeros[i] += zeros[i-1]
for i in range(k,n):
    if zeros[i] >0:
        f = False
        yn(f)
        continue
    if A[i] > A[i-k]:
        f =True
    else:
        f=False
    yn(f)

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
a=list(map(int,input().split()))
s=sum(a[:k])
for i in range(n-k):
	t=s-a[i]+a[k+i]
	print('YNeos'[s>=t::2])
	s=t

Submission status: Accepted

Solution code:
from collections import Counter
from collections import defaultdict
from collections import deque
from functools import reduce
import math
import itertools
import heapq
#import numpy as np
import bisect
import sys
#import sympy
sys.setrecursionlimit(10**6)


def bfs(s, n, node):
    # 頂点が探索済みかどうかのチェック配列
    check = [False for _ in range(n)]
    check[s] = True
    # 次見る頂点を格納するキュー
    queue = deque([s])
    visited_num = 1

    # 問題固有の配列
    #color_check=[[True for _ in range(l)] for _ in range(n)]
    color = [-1 for _ in range(n)]
    color[s] = 0

    while visited_num < n:
        # グラフが全連結ではない場合
        if len(queue) == 0:
            # 空配列を返す
            # 現状までの計算済み配列を返してもいいと思う
            return color

        now_vertex = queue.popleft()
        # インデックスがない場合は
        for next_vertex in node[now_vertex]:

            if check[next_vertex] == True:
                continue

            queue.append(next_vertex)
            check[next_vertex] = True

            # 問題固有の計算
            color[next_vertex] = color[now_vertex]+1
            visited_num += 1

    return color


mod = 10**9+7
# n=int(input())
# n,m=list(map(int,input().split()))
# a=list(map(int,input().split()))
def ceil(x, y): return (x+y-1)//y
def input_list(): return list(map(int, input().split()))


def buy(buy_cost, sell_cost, money):
    return money % buy_cost+(money//buy_cost)*sell_cost


n, k = input_list()
a = input_list()

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

Submission status: Accepted

Solution code:
#import numpy as np
import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial#, gcd
from bisect import bisect_left, bisect_right #bisect_left(list, value)
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
pl = lambda x: print(*x, sep='\n')

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

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

Submission status: Accepted

Solution code:
def solve():
    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__':
    solve()

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

Submission status: Accepted

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

for i in range(K, N):
    print('Yes' if A[i] - A[i - K] > 0 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:
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
    return random.randint(ran1, ran2)
def rand_List(ran1, ran2, rantime):
    return [random.randint(ran1, ran2) for i in range(rantime)]
def rand_ints_nodup(ran1, ran2, rantime):
  ns = []
  while len(ns) < rantime:
    n = random.randint(ran1, ran2)
    if not n in ns:
      ns.append(n)
  return sorted(ns)

def rand_query(ran1, ran2, rantime):
  r_query = []
  while len(r_query) < rantime:
    n_q = rand_ints_nodup(ran1, ran2, 2)
    if not n_q in r_query:
      r_query.append(n_q)
  return sorted(r_query)

from collections import defaultdict, deque, Counter
from sys import exit
from decimal import *
import heapq
from math import sqrt, pi
from fractions import gcd
import random
import string
import copy
from itertools import combinations, permutations, product
from operator import mul, itemgetter
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7

#############
# Main Code #
#############

N, K = getNM()
A = getList()

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):
#  syaku*=a[i]
#now=syaku
for i in range(k,len(a)):
  #pre=now
  #now=now*a[i]//a[i-k]
  if a[i]>a[i-k]:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
#c

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(N-K):
    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:
from sys import stdin
import sys
import math
import random
from decimal import Decimal
import itertools as it


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

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:
# 結局出ていくのと入ってくるのを比較すればいいのか？
N,K = map(int,input().split())
A = list(map(int,input().split()))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = []
for rem_ix in range(0, N-K):
    remove = A[rem_ix]
    insert = A[K+rem_ix]
    # print("rem: ", remove)
    # print("ins: ", insert)
    if remove < insert:
        ans.append("Yes")
    else:
        ans.append("No")

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

Submission status: Accepted

Solution code:
N, K=map(int,input().split())
scores=input().split()
for i in range(N):
  scores[i]=int(scores[i])
new=K
old=0
while new<N:
  if scores[new]>scores[old]:
    print("Yes")
  else:
    print("No")
  new+=1
  old+=1

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:
from numpy import *
N,K = map(int,input().split())
A = log(array(list(map(int,input().split()))))
B = [sum(A[:K])]

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import copy
N, K = map(int, input().split())
A = list(map(int, input().split()))

before = 0
for i in range(K, 0, -1):
    before += A[K-i]
for i in range(K, N):
    after = (before-A[i-K])+A[i]
    if before < after:
        print('Yes')
    else:
        print('No')
    before = copy.deepcopy(after)

Submission status: Accepted

Solution code:
N, K = map(lambda x: int(x), input().split(" "))
As = list(map(lambda x: int(x), input().split(" ")))

for i in range(len(As)):
    if i >= K:
        if As[i] > As[i-K]:
            print("Yes")
        else:
            print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import log2
n,k=map(int,input().split())
ar=list(map(int,input().split()))
for i in range(n):
    ar[i]=log2(ar[i])
prod=0
for i in range(k):
    prod+=ar[i]
for i in range(k,n):
    x=prod+ar[i]-ar[i-k]
    if x>prod:
        print('Yes')
    else:
        print('No')
    prod=x

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
ls = [int(x) for x in input().split()]
dp = sum(ls[0:k])
for i in range(0,len(ls)-k):
    tmp = dp + ls[i+k] - ls[i]
    if tmp > dp:
        print("Yes")
    else:
        print("No")
    dp = tmp

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

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

score = sum(A[:K])
old_score = score
# print(score)
for i, j in enumerate(range(K, N)):
    score = score - A[i] + A[j]
    # print("new_score: {}".format(score))
    if score > old_score:
        print('Yes')
    else:
        print('No')
    old_score = score

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(K,N):
#    print(i)
    if(As[i] > As[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:
def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))
    div_i = 0
    for i in range(N):
        if i <= K - 1:
            pass
        else:
            if A[i] > A[div_i]:
                print("Yes")
            else:
                print("No")
            div_i += 1


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import numpy as np

readline = sys.stdin.readline
read = sys.stdin.read

n, k = map(int, input().split())
a = np.array(readline().split(), dtype=np.int64)
for i in range(k, n):
    if a[i] > a[i-k]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

for idx in range(k, n):
    small = idx - k
    large = idx
    if A[small] < A[large]:
        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:
from collections import deque, Counter, defaultdict
from itertools import chain, combinations
import json
# import numpy as np
import bisect
import sys
import math
import bisect
from functools import lru_cache
import itertools

sys.setrecursionlimit(10 ** 8)

M = 10 ** 9 + 7
INF = 10 ** 17


def main():
    N, K = [int(a) for a in input().split()]
    A = [int(a) for a in input().split()]
    # X = int(input())
    # A = [int(a) for a in input().split()]
    # T1, T2, T3 = [int(a) for a in input().split()]

    for i in range(K+1, N + 1):
        ii = i - 1
        old = A[ii - K]
        new = A[ii]
        if old < new:
            print('Yes')
        else:
            print('No')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from collections import deque

n, k = map(int, input().split())
a = list(map(int, input().split()))
queue = deque()
for i in range(n):
    if i <= k - 1:
        queue.append(a[i])
    elif i >= k:
        x = queue.popleft()
        if x < a[i]:
            print("Yes")
        else:
            print("No")
        queue.append(a[i])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
n,k=map(int,input().split())
arr=list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
# Template 1.0
import sys, re
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n,k = MAP()

a = LIST()

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[0+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()))

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:
import sys
sys.setrecursionlimit(10**6)


def main(input, print):
    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(sys.stdin.readline, print)

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

Submission status: Accepted

Solution code:
import math
import collections
import bisect
from collections import deque
from copy import copy, deepcopy


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

for p,n in zip(a, a[k:]):
    if p < n:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin, stdout
import heapq
import cProfile
from collections import Counter, defaultdict, deque
from functools import reduce
import math
import string

def get_int():
    return int(stdin.readline().strip())


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


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

n,k = get_tuple()
ls = get_list()
j = 0
i = k
while i<n:
    if ls[j]>=ls[i]:
        print("No")
    else:
        print("Yes")
    i += 1
    j += 1

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
A = []
for i, a in enumerate(list(map(int, input().split()))):
  if i < K:
    A.append(a)
    continue
  else:
    A.append(a)
    x = A.pop(0)
    if x < a:
      print('Yes')
    else:
      print('No')

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
N,K = map(int,input().split())
A = list(map(int,input().split()))
val = 1
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:
N, K = map(int, input().split())
A = list(map(int, input().split()))
ans = [0] * (N)
temp = 1
# for i in range(K):
#     temp *= A[i]
# ans[K - 1] = temp
for i in range(K, N):
    if A[i] > A[i - K]:
        # ans[i] = ans[i - 1] * A[i] // A[i - K]
        # if ans[i] > ans[i - 1]:
        print('Yes')
    else:
        print('No')

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

Submission status: Accepted

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

now = a[0]
idx = 0
gabbege = a[idx]
length = 1
for i in range(1, n):
    if length < k:
        length += 1
        now += a[i]
    else:
        if now < now - gabbege + a[i]:
            print("Yes")
        else:
            print("No")
        now = now - gabbege + a[i]
        idx += 1
        gabbege = a[idx]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
#ceilevenoddformula
import math
import bisect
import copy
import time
from collections import Counter
#map(int,input().split())
#int(x) for x in input().split()
n,k=map(int,input().split())
l=[int(x) for x in input().split()]
x=[]
for i in range(n-k):
	if l[i]<l[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(n - k):
    if a[i] < a[i + k]:
        print("Yes")
    else:
        print("No")