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


def solve(*args: str) -> str:
    n, k = map(int, args[0].split())
    A = list(map(int, args[1].split()))

    ret = ['Yes' if A[i-k] < A[i] else 'No' for i in range(k, n)]
    return '\n'.join(ret)


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

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 decimal import Decimal
n, k = map(int, input().split())
A = tuple(map(int, input().split()))

pa = Decimal(1)
#for i in range(k):
#    pa *= A[i]

for kk in range(k, n):
    ppa = pa*A[kk]/A[kk-k]
    if ppa > pa:
        print('Yes')
    else:
        print('No')
    pa = ppa

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:
#dt = {} for i in x: dt[i] = dt.get(i,0)+1
import sys;input = sys.stdin.readline
inp,ip = lambda :int(input()),lambda :[int(w) for w in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

final = []
for i in range(1, n+1):
    if i <= k:
        final.append("Yes")
        continue
    j = i - k
    if(a[i-1]/a[j-1] > 1):
        final.append("Yes")
    else:
        final.append("No")
    
# print(final)
for i in range(k, n):
    print(final[i])

Submission status: Accepted

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

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:
def resolve():
    n,k = list(map(int, input().split()))
    A = list(map(int, input().split()))

    for i in range(0, n-k):
        pre = A[i]
        curr = A[i+k]
        if curr > pre:
            print("Yes")
        else:
            print("No")

resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,K = map(int, input().split())
line = list(map(int, input().split()))
# output = [1 for i in range(N-K+1)]
# print(output)
for i in range(N-K):
    if line[i] < line[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 x in range(k,n):
    if a[x]>a[x-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())))
b = a[:n-k]
c = a[k:]
for i in range(n-k):
    if b[i]<c[i]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

k -= 1

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

Submission status: Accepted

Solution code:
n,k = map(int , raw_input().split())
ais = map(int, raw_input().split())
for ii in range(k, n):
	print 'Yes' if ais[ii] > ais[ii - k] else 'No'

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
a = list(map(int, input().split()))
"""
point = 1
points = []

for i in range(n):
    point *= a[i]
    if i >= k - 1:
        points.append(point)
        if i >= k:
            if points[-1] > points[-2]:
                print("Yes")
            else:
                print("No")
        point //= a[i - k + 1]
"""
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, *a = map(int, open(0).read().split())
for i, j in zip(a, a[k:]):
  print("Yes" if i < j else "No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,K = [int(hoge) for hoge in input().split()]
A = [1] + [int(hoge) for hoge in input().split()]
ZeroIndex = [n for n,m in enumerate(A) if m==0]
Zeronum = []
curz = 0
for n,a in enumerate(A):
    if a==0:
        curz += 1
    Zeronum.append(curz)

for gakki in range(K+1,N+1):
    #gakki学期が入り、
    #gakki-K学期がなくなる
    #gakki-K+1学期 ~ gakki-1学期が共通
    if Zeronum[gakki-1] > Zeronum[gakki-K]:
        print("No")
    elif A[gakki] > A[gakki-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()))


cnt = 0
bi = 0

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

Submission status: Accepted

Solution code:
#関数リスト
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
n, k = MI()
mylist = LI()

for i in range(n-k):
    last = mylist[i]
    update = mylist[k+i]
    if update > last:
        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:
def LI():
  return list(map(int,input().split()))
  
n,k=LI()
a=LI()

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

Submission status: Accepted

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

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

# import sys
# input = sys.stdin.readline
# 
# sys.setrecursionlimit(10 ** 7)
# 
# (int(x)-1 for x in input().split())
# rstrip()
#
# def binary_search(*, ok, ng, func):
#     while abs(ok - ng) > 1:
#         mid = (ok + ng) // 2
#         if func(mid):
#             ok = mid
#         else:
#             ng = mid
#     return ok

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
### ----------------
### ここから
### ----------------

import sys
from io import StringIO
import unittest

def yn(b):
    print("Yes" if b==1 else "No")
    return

def resolve():
    readline=sys.stdin.readline

    n,k=map(int, readline().rstrip().split())
    arr=list(map(int, readline().rstrip().split()))
    
    score=1
    for i in range(n):
        #score*=arr[i]
        if (i+1) > k:
            #score = score//arr[i-k]
            if arr[i] > arr[i-k]:
                print("Yes")
            else:
                print("No")
        #bef=score

    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

### ----------------
### ここまで 
### ----------------

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    
    N_all, K_part = map(int, input().split())
    scores = list(map(int, input().split()))

    init = 1

    for i in range(N_all - K_part):
        index = i + K_part
        after = scores[index]
        before = scores[i]
        
        if (before < after):
            print('Yes')
        else:
            print('No')
        
if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
import numpy as np

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

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

for ii in np.arange(k+1-1,n):
	if a[ii]>a[ii-k]:
		print("Yes")
	else:
		print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def listseki(A,start,end):
    ans=A[end]/A[start-1]
    return ans
N,K=map(int,input().split())
A=list(map(int,input().split()))
for i in range(1,N-K+1):
    nowseki=listseki(A,i,i+K-1)
    if nowseki>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):
    print('Yes' if A[i]>A[i-K] 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-k] < a_list[i]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

for i in range(K, N):
    if a_list[i] > a_list[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 = 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:
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
#import numpy as np
import math
#from fractions import Fraction
import itertools
from collections import deque
from collections import Counter
#import heapq
from fractions  import gcd
#input=sys.stdin.readline
import bisect
n,k=map(int,input().split())
a=list(map(int,input().split()))
check=[0]*n
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()))

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

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


p1=0
p2=k

for i in range(k,n):
    if a[p2]>a[p1]:
        print('Yes')
    else:
        print('No')
    p1+=1
    p2+=1

Submission status: Accepted

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

*arr, = map(int, input().split())

ans = []
for i in range(k, len(arr)):
    if arr[i - k] < arr[i]:
        ans.append("Yes")
    else:
        ans.append("No")

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

for i in range(K, N): # [K, N - 1] 0 indexed => [K + 1, N] 1 indexed
  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()))  # (N,)

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

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

Submission status: Accepted

Solution code:
#n, m, q = map(int, input().split())
#List = list(map(int, input().split()))
#req = [list(map(int, input().split())) for _ in range(q)]
#t = t[:-1]
#print(ans[j], end = "") 改行無しで出力
#[0]*n
#sort = sorted(a)[::-1] 降順
n, k = map(int, input().split())
a = list(map(int, input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import deque
N,K = map(int,input().split(" "))
q = deque()
line = input().split(" ")
for i in range(K):
  q.append(int(line[i]))
for i in range(K,N):
  x = q.popleft()
  y = int(line[i])
  if x < y:
    print("Yes")
  else:
    print("No")
  q.append(y)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
A = list(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 = [int(v) for v in input().split(' ')]
    lst_a = [int(v) for v in input().split(' ')]

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
from io import StringIO
import unittest


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

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

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """5 3
96 98 95 100 20"""
        output = """Yes
No"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """3 2
1001 869120 1001"""
        output = """No"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """15 7
3 1 4 1 5 9 2 6 5 3 5 8 9 7 9"""
        output = """Yes
Yes
No
Yes
Yes
No
Yes
Yes"""
        self.assertIO(input, output)


if __name__ == "__main__":
    # unittest.main()
    resolve()

Submission status: Accepted

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
	return list(map(int,input().split()))
def m(): #複数文字
	return map(int,input().split())
def onem(): #Nとかの取得
	return int(input())
def s(x): #圧縮
	a = []
	if len(x) == 0:
		return []
	aa = x[0]
	su = 1
	for i in range(len(x)-1):
		if aa != x[i+1]:
			a.append([aa,su])
			aa = x[i+1]
			su = 1
		else:
			su += 1
	a.append([aa,su])
	return a
def jo(x): #listをスペースごとに分ける
	return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
	return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
	ll = 0
	rr = r
	while True:
		mid = (ll+rr)//2

	if rr == mid:
		return ll
	if (ここに評価入れる):
		rr = mid
	else:
		ll = mid+1
"""

n,k = m()

a = l()

for i in range(k,n):
	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()))
_ = [ print('No') if ( y <= x) else print('Yes') for x,y in zip( a[:n-k],a[k:]) ]

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

Submission status: Accepted

Solution code:
import sys, math
from collections import defaultdict
from itertools import product
sys.setrecursionlimit(500000)
MOD = 10**9+7

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

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    N, K = mi()
    A = list(mi())
    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:
def solve(ns, k):
    n = len(ns)
    tot = 1
    for i in xrange(k):
        tot += ns[i]
    res = []
    pre = tot
    for i in xrange(k, n):
        a = ns[i - k]
        b = ns[i]
        if a > b:
            # tot = tot / a * b
            tot = tot - 1
        elif a < b:
            tot = tot + 1
        else:
            pass
        if tot > pre:
            res.append(True)
        else:
            res.append(False)
        pre = tot
    return res

assert solve([1001, 869120, 1001], 2) == [False]
assert solve([96, 98, 95, 100, 20], 3) == [True, False]
assert solve([3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9], 7) == [True, True, False, True, True, False, True, True]


n, k = map(int, raw_input().split())
ns = map(int, raw_input().split())

res = solve(ns, k)
for item in res:
    print 'Yes' if item else 'No'

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N, K = map(int, readline().split())
A = list(map(int,readline().split()))
for i in range(N-K):
    if A[i] >= A[i+K]:
        print('No')
    else:
        print('Yes')

Submission status: Accepted

Solution code:
#X = int(input())
#S = str(input())
N, K= map(int, input().split())
A = list(map(int, input().split()))
  
for i in range(N - K):
  #print(start, now)
  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()))
P = [0]*(N - K)
P0 = 1
for i in range(N-K):
  if A[i+K] > A[i] : 
    P[i] = 1
for i in range(N-K):
  if P[i] == 1:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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("i", i)
        j = i - k  # 比較対象
        #print("j", j)
        if A[i] > A[j]:
            print("Yes")
        else:
            print("No")




if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

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