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:
"""
    こんにちは。これはクシャルです
    
    Author : thekushalghosh (クシャル)
    Team   : CodeDiggers
 
    I prefer Python language over the C++ language :p :D
        
    Visit my website : thekushalghosh.github.io
"""
import sys,math,cmath,time
start_time = time.time()
##########################################################################
################# ---- THE ACTUAL CODE STARTS BELOW ---- #################
    
def solve():
    n,k = invr()
    a = inlt()
    for i in range(len(a)):
        if i >= k:
            if a[i] > a[i - k]:
                qw = "Yes"
            else:
                qw = "No"
            print(qw)
    
################## ---- THE ACTUAL CODE ENDS ABOVE ---- ##################
##########################################################################
 
def main():
    global tt
    if not ONLINE_JUDGE:
        sys.stdin = open("input.txt","r")
        sys.stdout = open("output.txt","w")
    t = 1
    for tt in range(t):
        solve()
    if not ONLINE_JUDGE:
        print("Time Elapsed :",time.time() - start_time,"seconds")
        sys.stdout.close()
    
#---------------------- USER DEFINED INPUT FUNCTIONS ----------------------#
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    return(input().strip())
def invr():
    return(map(int,input().split()))
 
#------------------ USER DEFINED PROGRAMMING FUNCTIONS ------------------#
def counter(a):
    q = [0] * max(a)
    for i in range(len(a)):
        q[a[i] - 1] = q[a[i] - 1] + 1
    return(q)

def counter_elements(a):
    q = dict()
    for i in range(len(a)):
        if a[i] not in q:
            q[a[i]] = 0
        q[a[i]] = q[a[i]] + 1
    return(q)

def string_counter(a):
    q = [0] * 26
    for i in range(len(a)):
        q[ord(a[i]) - 97] = q[ord(a[i]) - 97],1
    return(q)
 
def factors(n):
    q = []
    for i in range(1,int(n ** 0.5) + 1):
        if n % i == 0: q.append(i); q.append(n // i)
    return(list(sorted(list(set(q)))))
 
def prime_factors(n):
    q = []
    while n % 2 == 0: q.append(2); n = n // 2
    for i in range(3,int(n ** 0.5) + 1,2):
        while n % i == 0: q.append(i); n = n // i
    if n > 2: q.append(n)
    return(list(sorted(q)))

def transpose(a):
    n,m = len(a),len(a[0])
    b = [[0] * n for i in range(m)]
    for i in range(m): 
        for j in range(n): 
            b[i][j] = a[j][i]
    return(b)

#-----------------------------------------------------------------------#
        
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
    input = sys.stdin.readline
main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

import sys

input = sys.stdin.readline

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

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

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

Submission status: Accepted

Solution code:
import numpy as np

if __name__ == "__main__":
    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:
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:
inp = list(map(int,input().split()))
k=inp[1]
inp = list(map(int,input().split()))
for i in range(k,len(inp)):
    if inp[i]>inp[i-k]:
        print ('Yes')
        continue
    else:
        print ('No')

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]:
        ans = "Yes"
    else:
        ans = "No"
    print(ans)

    idx += 1

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:


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

A=str(K)
i=int(A)
j=0
while j<=N-K:
    #BList=AList[j:i]
    if j==0:
        MAE=AList[j]
    elif MAE>=AList[i-1]:
        print("No")
        MAE=AList[j]
    elif MAE<AList[i-1]:
        print("Yes")
        MAE=AList[j]
    i+=1
    j+=1

Submission status: Accepted

Solution code:
def resolve():
    '''
    code here
    '''
    N, K = [int(item) for item in input().split()]
    As = [int(item) for item in input().split()]

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

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

f = 0
d = 1
e = 1
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(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()))


s0=A[0]


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

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
A = list(map(int,input().split()))
#print(A)
L = []
ave = sum(A[:k])

L.append(ave)

for i in range(n-k):
    #print(A[i],A[k+i])
    ave = ave - A[i] + A[k+i]
    L.append(ave)

for i in range(len(L)-1):
    if L[i] < L[i+1]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

num = n-k

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

Submission status: Accepted

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

for i in range(0,N-K):

    if(Ai[i] < Ai[i+K]):
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

s = 0

for i in range(k, n):
  before = arr[s]
  after = arr[i]
  if after > before:
    print("Yes")
  else:
    print("No")
  s += 1

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

[N,K] = list(map(int,input().split()))
A = list(map(int,input().split()))
# print('A:',A)

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

Submission status: Accepted

Solution code:
[n,k] = list(map(int,input().split()))
li = list(map(int,input().split()))

orl = li[0]

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

Submission status: Accepted

Solution code:

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

res = list()

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

for r in res:
    print(r)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n, k = map(int, input().split())
a = list(map(int, input().split()))

for s, e in zip(a[:-k], a[k:]):
    if s < e:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
def main():
    n,k = tuple([int(t)for t in input().split()])

    a = tuple([int(t)for t in input().split()])

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#n=int(input())
n,k=map(int,input().split())
al=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]
def f(l):
    res=1
    for li in l:
        res=res*li
    return res
sc=[]
alr=0
for i in range(k-1,n):
    if i==k-1:
        #score=f(al[i-k+1:i+1])
        first=al[i-k+1]
        alr=1
    else:
        #first=al[i-k]
        last=al[i]
        if last>first :
            print('Yes')
        else:
            print('No')
        first=al[i-k+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:
N, K = map(int, input().split())
A = list(map(int, input().split()))
judge = 1
for i in range(N-K):
  if A[K+i] > A[i]:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

Solution code:
word1 = input()
word2 = input()

NK = word1.split()
NKs = [0,0]
N = int(NK[0])
K = int(NK[1])
score = word2.split()
scli = [0]*N

for i in range(N):
    scli[i] = int(score[i])

#for j in range(K):
#    test *= scli[j]
#ue ga i-1 banme

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import *
n,k = map(int,stdin.readline().split())
arr = list(map(int,stdin.readline().split()))
for i in range(n-k):
    if arr[i+k] > arr[i]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
import math

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

    # dp=[1]*202020
    # for i in range(K):
    #     dp[K]*=A[i]

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

Submission status: Accepted

Solution code:
import os
import heapq
import sys
import math
import bisect
import operator
from collections import defaultdict
from io import BytesIO, IOBase
def gcd(a,b):
    if b==0:

        return a
    else:
        return gcd(b,a%b)
def power(x, p,m):
    res = 1
    while p:
        if p & 1:
            res = (res * x) % m
        x = (x * x) % m
        p >>= 1
    return res
def inar():
    return [int(k) for k in input().split()]


# def bubbleSort(arr,b):
#     n = len(arr)
#     for i in range(n):
#         for j in range(0, n - i - 1):
#             if arr[j] > arr[j + 1] and b[j]!=b[j+1]:
#                 arr[j], arr[j + 1] = arr[j + 1], arr[j]
#                 b[j],b[j+1]=b[j+1],b[j]
def lcm(num1,num2):
    return (num1*num2)//gcd(num1,num2)

def main():
    #for _ in range(int(input())):
    #n=int(input())
    n,k=inar()
    arr=inar()
    res=[]
    for i in range(k,n):
        if arr[i]>arr[i-k]:
            res.append("Yes")
        else:
            res.append("No")

    for i in range(len(res)):
        print(res[i])














BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

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

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

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

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


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


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N,K=map(int,input().strip().split())
A=list(map(int,input().strip().split()))
for k in range(K,N):
    if A[k]/A[k-K]>1:
        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:
# -*- coding: utf-8 -*-
"""
@author: H_Hoshigi
"""
def main():
    N, K = map(int, input().split())
    A_lsit = list(map(int, input().split()))

    answer_list = []
    for i in range(N-K):
        if A_lsit[i+K] > A_lsit[i]:
            answer_list.append("Yes")
        else:
            answer_list.append("No")
    for answer in answer_list:
        print(answer)

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

Submission status: Accepted

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

for i in range(N-K):
  target_1 = LIST_A[i+K]-LIST_A[i]  
  if target_1 > 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, a in enumerate(A):
  if i + 1 > K:
    if a > 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())) 

H0 = 1
H1 = 1

for i in range(N-K):
    # for j in range(K):
    #     H0 = int(H0 * A[j])
    # H1 = int(H0/A[i] * A[K+i])
    H0 = A[i]
    H1 = A[K+i]

    if H1 > H0:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

for i in range(N-K):
  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):
  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()))

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

Submission status: Accepted

Solution code:
N,K = map(int,input().split())
score =[0 for i in range(N)]

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

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

Submission status: Accepted

Solution code:
N, K = 5, 3
ARR = [96, 98, 95, 100, 20]


N, K = 3, 2
ARR = [1001, 869120, 1001]

N ,K = 15, 7
ARR = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9]

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


def calculate(n, k, arr):
    for i in range(k, n):
        s = arr[i] / arr[i-k]
        if s > 1:
            print("Yes")
        else:
            print("No")

calculate(N, K, ARR)

Submission status: Accepted

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


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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 標準入力を取得
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 = [int(i) for i in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

def a():
    x = int(input())
    
    if x < 600:
        print(8)
    elif x<800:
        print(7)
    elif x<1000:
        print(6)
    elif x<1200:
        print(5)
    elif x<1400:
        print(4)
    elif x<1600:
        print(3)
    elif x<1800:
        print(2)
    else:
        print(1)

def b():
    a,b,c = map(int,input().split())
    k = int(input())
    count = 0
    
    while b<= a:
        b *= 2
        count += 1
    
    while c<=b:
        c *= 2
        count += 1
    if count <= k:
        print('Yes')
    else:
        print('No')
    


def c():
    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')



def d():
    pass


# a()
# b()
c()
# d()

Submission status: Accepted

Solution code:
def solve(N, K, As):
    for i in range(N - K):
        if As[i] >= As[K + i]:
            print('No')
        else:
            print('Yes')


if __name__ == '__main__':
    # S = input()
    # N = int(input())
    N, K = map(int, input().split())
    As = [int(i) for i in input().split()]
    # Bs = [int(i) for i in input().split()]
    solve(N, K, As)

Submission status: Accepted

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

#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode()

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

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



if __name__ == "__main__":
	main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
al=list(map(int,input().split()))
for b,c in zip(al,al[k:]):
    print('Yes'if b<c else'No')

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)

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

#val = 1
#for a in A[:k]:
#    val *= a
#ans = [val]
#pos = k
#while pos < n:
#    tmp = ans[-1]*A[pos]//A[pos-k]
#    ans.append(tmp)
#    pos += 1
#
#for i in range(len(ans)-1):
#    if ans[i] < ans[i+1]:
#        print('Yes')
#    else:
#        print('No')
        
for i in range(n-k):
    pos = k+i
    if A[pos] > A[pos-k]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
import math

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

ans = 0

for i in range(1, n - k + 1):
    j = i + k - 1
    if aL[i - 1] < aL[j]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import math
def gcd(a,b):
    return b if not a%b else gcd(b,a%b)
def lcm(a,b):
    return (a*b)//gcd(a,b)

def main():
    n,k=map(int, input().split())
    a=[int(i) for i in input().split()]
    tmp = 0
    res = []
    ind = 0
    for i in range(n-k):
        if(a[ind] < a[ind+k]):
            res.append(1)
        else:
            res.append(0)
        ind += 1

    for i in range(0,len(res)):
        if(res[i]):
            print("Yes")
        else:
            print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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


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

Submission status: Accepted

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from sys import stdin, stdout
input = stdin.readline
print = stdout.write
from functools import reduce
n, k = map(int,input().split())
a = list(map(int,input().split()))
prod = a[0]
ans = []
for i in range(k,n):
    prod = a[i-k]
    prodt = a[i]
    if prodt>prod:
        ans.append('Yes')
    else:
        ans.append('No')
ans = '\n'.join(ans)
print(ans)

Submission status: Accepted

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

for k in range(N-K):
    if scores[k] >= scores[k+K]:
        print("No")
    else:
        print("Yes")

Submission status: Accepted

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

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