Problem:


Score: 300 points

Problem Statement

M-kun is a student in Aoki High School, where a year is divided into N terms.

There is an exam at the end of each term. According to the scores in those exams, a student is given a grade for each term, as follows:

For the first through (K-1)-th terms: not given.

For each of the K-th through N-th terms: the multiplication of the scores in the last K exams, including the exam in the graded term.

M-kun scored A_i in the exam at the end of the i-th term.

For each i such that K+1 \leq i \leq N, determine whether his grade for the i-th term is strictly greater than the grade for the (i-1)-th term.

Constraints

2 \leq N \leq 200000

1 \leq K \leq N-1

1 \leq A_i \leq 10^{9}

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N K
A_1 A_2 A_3 \ldots A_N

Output

Print the answer in N-K lines.

The i-th line should contain Yes if the grade for the (K+i)-th term is greater than the grade for the (K+i-1)-th term, and No otherwise.

Sample Input 1

5 3
96 98 95 100 20

Sample Output 1

Yes
No

His grade for each term is computed as follows:

3-rd term: (96 \times 98 \times 95) = 893760

4-th term: (98 \times 95 \times 100) = 931000

5-th term: (95 \times 100 \times 20) = 190000

Sample Input 2

3 2
1001 869120 1001

Sample Output 2

No

Note that the output should be No if the grade for the 3-rd term is equal to the grade for the 2-nd term.

Sample Input 3

15 7
3 1 4 1 5 9 2 6 5 3 5 8 9 7 9

Sample Output 3

Yes
Yes
No
Yes
Yes
No
Yes
Yes



Sample input:
5 3
96 98 95 100 20


Sample output:
Yes
No

Submission status: Accepted

Solution code:
import sys
input_ = input()
n = int(input_.split(' ')[0])
k = int(input_.split(' ')[1])
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:
n,k=map(int,input().split())
a=list(map(int,input().split()))
m=k
d=0
for i in range(k+1,n+1):
    if a[m]<=a[d]:
        print("No")
    else:
        print("Yes")
    m+=1
    d+=1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def main():
    n, k = MI()
    A = LI()
    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(0,N-K):
  if A[i] < A[i+K]:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import sys


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


def main():
    n, k = get_ints()
    a = list(get_ints())

    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:
from sys import stdin
readline = stdin.readline

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

prev = 0
point = 1
ans = []
for i in range(N):
    if i >= K:
        if A[i-K] < A[i]:
            ans.append("Yes")
        else:
            ans.append("No")
print(*ans, sep='\n')

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

score = 1

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

Submission status: Accepted

Solution code:
# coding: utf-8
import sys
#from operator import itemgetter
sysread = sys.stdin.buffer.readline
read = sys.stdin.buffer.read
#from heapq import heappop, heappush
from collections import defaultdict
sys.setrecursionlimit(10**7)
import math
#from itertools import product, accumulate, combinations, product
#import bisect# lower_bound etc
#import numpy as np
#from copy import deepcopy
#from collections import deque


def run():
    N, K, *A = map(int, read().split())
    A = [-1] + A
    INF = 1 << 50
    X = [INF, 1, 1]
    for i in range(K, N):
        if A[i+1] > A[i-K+1]:
            print('Yes')
        else:
            print('No')




if __name__ == "__main__":
    run()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# cook your dish here
n, k = list(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,*A = map(int, open(0).read().split())

for i,n in enumerate(range(K-1, N)):
    if i == 0:
        continue
    if A[n-K] < A[n]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def inN():
    return int(input())
def inL():
    return list(map(int,input().split()))

n,k = inL()
a = inL()

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):
	point = A[i]
	point_ = A[i + K]
	if point < point_:
		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:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
import copy
import bisect
mod = 10**9+7

n,k = map(int,input().split())
a = list(map(int,input().split()))
d = 1
mina = min(a)+1
for i in range(n-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())
l = list(map(int,input().split()))
#print(l)
cnt = l[k-1]
p = 1
g = 0
g = g+1
pr = l[g-1]
while(k < n):
    if l[k] > pr:
        sys.stdout.write("Yes")
        print("")

    else:
        sys.stdout.write("No")
        print("")

    g = g+1
    pr = l[g-1]
    k = k+1

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))
    # tmp = 1
    # for i in range(K):
    #     tmp *= A[i]
    # print(tmp)

    for i in range(K,N):
        # n = tmp * A[i] / A[i-K]
        n = A[i]/A[i-K]
        if n > 1:
            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()))

from collections import deque
scores=deque()

for i in range(0,K):
    scores.append(A[i])

for j in range(K,N):
#     if 0 in scores:
#         scores.pop(0)
#         scores.append(A[j])
#         if 0 in scores:
#             print("No")
#         else:
#             print("Yes")
    if scores.popleft()<A[j]:
        print("Yes")
        scores.append(A[j])
    else:
        print("No")
        scores.append(A[j])

Submission status: Accepted

Solution code:

import numpy as np
from functools import *
import sys
sys.setrecursionlimit(100000)
input = sys.stdin.readline


def array(size, init=0):
    return [[init for j in range(size[1])] for i in range(size[0])]


def acinput():
    return list(map(int, input().split(" ")))


def II():
    return int(input())


N, K = acinput()
A = acinput()


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

Submission status: Accepted

Solution code:
def main(N, K, A):
    for i in range(K, N): # 0 から数えるから K-1
        this = A[i]
        before = A[i-K]

        if this > before:
            print('Yes')
        else:
            print('No')



if __name__ == '__main__':
    N, K = list(map(int, input().split()))
    A = list(map(int, input().split()))
    main(N, K, A)

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


if __name__ == '__main__':
    numbers = input().split()
    N = int(numbers[0])
    K = int(numbers[1])
    A = input().split()
    A = [int(a) for a in A]
    function(N, K, A)

Submission status: Accepted

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

judge_str = {True: "Yes", False: "No"}

for i in range(K+1, N+1):
    print(judge_str[A[i-K-1] < A[i-1]])

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N,K = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
for j in range(N-K):
    if A[j+K] > A[j]:
        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(N-K):
  if A[x]<A[K+x]:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
mod = 10**9 +7
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):
    # print(A[i], A[i+K])
    if A[i] < A[i+K]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

now = 1
# for i in range(k):
#     now *= a[i]
# before = now

for i in range(n - k):
    # now *= a[i + k]
    # now /= a[i]
    if a[i] < a[i + k]:
        print('Yes')
    else:
        print('No')
    # before = now

Submission status: Accepted

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

# import functools
# import operator
# prod = functools.partial(functools.reduce, operator.mul)

# i=K+1の時、直近K回の期末テストの点数
# p_K = prod(A[:K])
p_K = 1

for i in range(K, N):
    t = A[i] / A[i-K]
    p_Kp1 = p_K * t
    if p_K < p_Kp1:
        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()))
prod  = 1
# for i in range(k-1):
#     prod *= a[i]
j = 0
for i in range(k,n):
    
    if a[i] > a[j]:
        print("Yes")
    else:
        print("No")
    j += 1
    #print(prod, prod//a[j] * a[i+1])

Submission status: Accepted

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

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

Submission status: Accepted

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

def input():
    return sys.stdin.readline()[:-1]
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:
#coding: UTF-8
import copy
 
N,K = map(int, input().split())
A = list(map(int, input().split()))


for i in range(N-K):
  #i=0 = i+K学期判定
  scr1 = 1
  scr2 = 1
  #手前
  scr1 *= A[i]
  #print(scr1)
  scr2 *= A[i+K]
  #print(scr2)
  if scr1<scr2:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
As = list(map(int, input().split()))
ans2=0
for n in range(K+1, N+1):
    ans1 = As[n-K-1]
    ans2 = As[n-1]
    if ans1 < ans2:
        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()))
A_prod = np.cumprod(A)
bef = A_prod[K - 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()))

p_score = 0
score = 0
tmp = []

for n in range(K-1, N):
    if n > K-1:
        score -= A[n-K]
        score += A[n]
        if score > p_score:
            print('Yes')
        else:
            print('No')
    else:
        tmp = A[n-(K-1):n+1]
        # print(tmp)
        score = sum(tmp)
    p_score = score

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N, K = [int(n) for n in input().split()]
scores = [int(n) for n in input().split()]
min_pointer = 0
max_pointer = K
for i, score in enumerate(scores, start=1):
    if i > K:
        if scores[max_pointer] > scores[min_pointer]:
            print('Yes')
        else:
            print('No')
        min_pointer += 1
        max_pointer += 1

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

def multiple(A,st,ed):
    res = 1
    for i in range(st,ed):
        res = res * A[i]

    return res

def main():
    n, k = [int(x) for x in stdin.readline().rstrip().split()]
    A = [int(x) for x in stdin.readline().rstrip().split()]

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import numpy as np
N,K = map(int,input().split())
A = np.array(list(map(int,input().split())))
for i,j in enumerate(range(K,N)):
    if(A[j] > A[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-K):
  #print(i,K+i)
  #print(A_list[i],A_list[K+i])
  if(A_list[i]<A_list[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-k]<a[i]:
        print("Yes");
    else :
        print("No");

Submission status: Accepted

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

    l_int = A_int_list[0]

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

        if K + i == N:
            exit()
        l_int = A_int_list[i]


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import itertools
import random
from collections import deque
from decimal import *
import queue

input = sys.stdin.readline

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

def main():
	N,K = inputMap()
	A = inputList()

	ans = 1
	ans_old = 1
	mae = 0
	for i,val in enumerate(A):
		if i < K:
			continue
		tmp = A[i-K]
		if val > tmp:
			print("Yes")
		else:
			print("No")



#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
if __name__ == "__main__":
	main()

Submission status: Accepted

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

    for remover, new_commer in zip(scores, scores[k:]):
        if remover < new_commer:
            print('Yes')
        else:
            print('No')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n,k=map(int,input().split())
alist=list(map(int,input().split()))
for i in range(n-k):
  if alist[i]<alist[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[j+K] > A[j]:
    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


def main():
    input = lambda: stdin.readline()[:-1]
    N, K = map(int, input().split())
    A = tuple(map(int, input().split()))

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


main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = list (map (int, input().strip().split()))
n = num[0]
k = num[1]
v = list (map (int, input().strip().split()))
for i in range(k, n):
    if(v[i - k] < v[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:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

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

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

if __name__ == '__main__':
    resolve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from decimal import *
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[k+i]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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


# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    n, k = input_to_int_map()
    a_array = input_to_int_tuple()

    for k_val, pre_k_val in zip(a_array[k:], a_array[k - k:]):
        if k_val > pre_k_val:
            print("Yes")
        else:
            print("No")

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce
n,k=map(int,input().split())
a=list(map(int,input().split()))
d1,d2=a[:n-k],a[k:n]
dd=list(map(lambda x,y:'Yes' if y>x else 'No',d1,d2))
for i in range(len(dd)):print(dd[i])

Submission status: Accepted

Solution code:
n,k = map(int , input().split())
sum = 0
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,m =[int(i) for i in input().split()]
a =[int(i) for i in input().split()]
l= 0
r= m
while(r<n):
    if a[l]<a[r]:
        print('Yes')
    else:
        print('No')
    l+=1
    r+=1

Submission status: Accepted

Solution code:
def main():
    n,k=map(int,input().split())
    a=list(map(int,input().split()))
    prev=1
    cnt=0
    for i in range(k,n):
        if i==0: continue
        prev=a[cnt]
        crnt=a[i]
        if crnt > prev: print('Yes')
        else: print('No')
        prev=crnt
        cnt+=1
    return

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#C
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:
from math import log2

n, k = map(int, input().split())
ai   = list(map(lambda x: log2(int(x)), input().split()))

before = sum(ai[ 0 : k ])

for i in range(n - k):
    after = before + ai[i + k] - ai[i]

    if before < after:
        print('Yes')

    else:
        print('No')

    before = after

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())
l=list(map(int,input().split()))
ans=1
for i in range(k):
    ans=l[i]

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

Submission status: Accepted

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

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:
def INT():
    return int(input())

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

def LI():
    return list(map(int, input().split()))

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

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

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
c=list(map(int, input().split()))
ans = 0

for l in c[b:a]:
    if c[ans] >= l:
        print('No')
    else:
        print('Yes')
    ans += 1