Problem:


Score: 300 points

Problem Statement

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

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

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

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

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

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

Constraints

2 \leq N \leq 200000

1 \leq K \leq N-1

1 \leq A_i \leq 10^{9}

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N K
A_1 A_2 A_3 \ldots A_N

Output

Print the answer in N-K lines.

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

Sample Input 1

5 3
96 98 95 100 20

Sample Output 1

Yes
No

His grade for each term is computed as follows:

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

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

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

Sample Input 2

3 2
1001 869120 1001

Sample Output 2

No

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

Sample Input 3

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

Sample Output 3

Yes
Yes
No
Yes
Yes
No
Yes
Yes



Sample input:
5 3
96 98 95 100 20


Sample output:
Yes
No

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    N,K = list(map(int, sys.stdin.readline().split()))
    A_list = list(map(int, sys.stdin.readline().split()))
    

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



if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
INF = 10**18
def li():
    return [int(x) for x in input().split()]

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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

n, k = map(int, input().split())
*a, = 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 = 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:
# cook your dish here
n,k=input().split()
n=int(n)
k=int(k)
l=list(map(int,input().split()))
for j in range(n):
    if k+j==n:
        break
    if l[k+j]>l[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(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] = [int(i) for i in input().split()]
point_list = [int(i) for i in input().split()]

for i in range(N):
    if i >= K:
        if point_list[i-K] < point_list[i]:
            print("Yes")
        else:
            print("No")

Submission status: Accepted

Solution code:
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

from math import log10

n,k=nm()
a=nl()
b=[1]*(n+1)

for i in range(n):
  b[i+1] = log10(a[i])+b[i]

for i in range(n-k):
  if b[i+k+1]-b[i+1] > b[i+k]-b[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 = input().split()
scores = [int(s) for s in input().split()]

N = int(N)
K = int(K)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

idx = K-1

while(idx < N-1):
  idx += 1
  if A[idx] / A[idx-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 j in range(n-k):
    if a[j] < a[j+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_nums = list(map(int, input().split()))

f_point = sum(a_nums[:k])
for i in range(n - k):
  if a_nums[i] < a_nums[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):
    ab = a[i]
    aa = a[k+i]
    if aa > ab:
        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:
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:
#template
def inputlist(): return [int(j) for j in input().split()]
#template
N,K = inputlist()
A = inputlist()
A = [0]+A
for i in range(1,N-K+1):
    if A[i+K] > A[i]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# でつoO(YOU PLAY WITH THE CARDS YOU'RE DEALT..)
import sys
def main(N, K, A):
    for i in range(K, N):
        print('Yes' if A[i] > A[i - K] else 'No')

if __name__ == '__main__':
    input = sys.stdin.readline
    N, K = map(int, input().split())
    *A, = 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, j in zip(a[:n-k], a[k:]):
    if i < j:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
from sys import stdin, stdout 
n,k=map(int,input().split())
a=[int(o) for o in input().split()]
prod=1
for i in range(k,n):
    prev=a[i-k]
    if a[i]>prev: stdout.write("Yes\n")
    else: stdout.write("No\n")

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect


def LI(): return [int(x) for x in sys.stdin.readline().split()]


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


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


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


# Solve
if __name__ == "__main__":
    solve()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin, stdout
import math,sys,heapq
from itertools import permutations, combinations
from collections import defaultdict,deque,OrderedDict
from os import path
import bisect as bi
def yes():print('YES')
def no():print('NO')
if (path.exists('input.txt')): 
    #------------------Sublime--------------------------------------#
    sys.stdin=open('input.txt','r');sys.stdout=open('output.txt','w');
    def I():return (int(input()))
    def In():return(map(int,input().split()))
else:
    #------------------PYPY FAst I/o--------------------------------#
    def I():return (int(stdin.readline()))
    def In():return(map(int,stdin.readline().split()))

def dict(a):
    d={}
    for x in a:
        if d.get(x,-1)!=-1:
            d[x]+=1
        else:
            d[x]=1
    return d

def find_gt(a, x):
    'Find leftmost value greater than x'
    i = bi.bisect_right(a, x)
    if i != len(a):
        return i
    else:            
        return -1

def main():
    try:
        n,k=In()
        l=list(In())   
        ans=[]
        t=1
        last=1
        for x in range(k,n):
            if l[x-k]>=l[x]:
                print('No')
            else:
                print('Yes')


    except:
        pass
        
M = 998244353
P = 1000000007
 
if __name__ == '__main__':
    #for _ in range(I()):main()
    for _ in range(1):main()

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0

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

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

# stdnについては、@kusynaさんの記事が詳しい
N, K = [int(_) for _ in stdin.readline().rstrip().split()]
L = [int(_) for _ in stdin.readline().rstrip().split()]

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

Submission status: Accepted

Solution code:
from sys import stdin
N, K = [int(_) for _ in stdin.readline().rstrip().split()]
L = [int(_) for _ in stdin.readline().rstrip().split()]
for i in range(K+1, N+1):
	if L[i-K-1] < L[i-1]:
		print("Yes")
	else:
		print("No")

Submission status: Accepted

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

Submission status: Accepted

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

    ans = []
    for i in range(K, N):
        cond = A[i] > A[i - K]
        ans.append('Yes' if cond else 'No')

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


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:
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:
import copy

# a = get_int()
def get_int():
    return int(input())

# a = get_string()
def get_string():
    return input()

# a_list = get_int_list()
def get_int_list():
    return [int(x) for x in input().split()]

# a_list = get_string_list():
def get_string_list():
    return input().split()

# a, b = get_int_multi()
def get_int_multi():  # a, b = get_int_multi()
    return map(int, input().split())

# a_list = get_string_char_list()
def get_string_char_list():
    return list(str(input()))

# print("{} {}".format(a, b))
# for num in range(0, a):
# a_list[idx]
# a_list = [0] * a
'''
while (idx < n) and ():

    idx += 1
'''

def main():
    n, k = get_int_multi()
    a_list = get_int_list()

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




if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    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")
if __name__=='__main__':
    main()

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

def main():
    mod=10**9+7
    N,K=MI()
    A=LI()
    ans=[]
    for i in range(K,N):
        if A[i]>A[i-K]:
            ans.append("Yes")
        else:
            ans.append("No")
            
    for s in ans:
        print(s)

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:
n,k=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n-k):
    print("Yes")if a[i]<a[k+i] 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(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:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**6)
INF = 10 ** 9 + 1  # sys.maxsize # float("inf")
MOD = 10 ** 9 + 7


def debug(*x):
    print(*x, file=sys.stderr)


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


def main():
    # parse input
    N, K = map(int, input().split())
    AS = list(map(int, input().split()))
    solve(N, K, AS)


# tests
T1 = """
5 3
96 98 95 100 20
"""
TEST_T1 = """
>>> as_input(T1)
>>> main()
Yes
No
"""

T3 = """
15 7
3 1 4 1 5 9 2 6 5 3 5 8 9 7 9
"""
TEST_T3 = """
>>> as_input(T3)
>>> main()
Yes
Yes
No
Yes
Yes
No
Yes
Yes
"""


def _test():
    import doctest
    doctest.testmod()
    g = globals()
    for k in sorted(g):
        if k.startswith("TEST_"):
            doctest.run_docstring_examples(g[k], g)


def as_input(s):
    "use in test, use given string as input file"
    import io
    f = io.StringIO(s.strip())
    g = globals()
    g["input"] = lambda: bytes(f.readline(), "ascii")
    g["read"] = lambda: bytes(f.read(), "ascii")


input = sys.stdin.buffer.readline
read = sys.stdin.buffer.read

if sys.argv[-1] == "-t":
    print("testing")
    _test()
    sys.exit()

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:
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
sys.setrecursionlimit(10**8)
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-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):
    if i < K:
        continue

    if A[i-K] < A[i]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
# Problem C - Marks
# input
N, K = map(int, input().split())
a_nums = list(map(int, input().split()))

# initialization
cumulative_sum = 1
for i in range(K):
    cumulative_sum += a_nums[i]
cumulative_list = [0] * N
cumulative_list[K-1] = cumulative_sum

# cumulative sum calc
for i in range(K, N):
    cumulative_sum = cumulative_sum - a_nums[i-K]
    cumulative_sum = cumulative_sum + a_nums[i]
    cumulative_list[i] = cumulative_sum
    if cumulative_list[i]>cumulative_list[i-1]:
        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):
    print("Yes" if a[i] > a[i - k] else "No")

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(k, 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:
nk=list(map(int, input().split()))
a=list(map(int, input().split()))

n=nk[0]
k=nk[1]

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

Submission status: Accepted

Solution code:
def main():
    N, K = 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')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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


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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
sem, per = map(int, input().split())
scores = list(map(int, input().split()))

for i in range(sem - per):
    if scores[i] < scores[i + per] :
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
scores = list(map(int, input().split()))
right = k
left = right - k + 1

while right < n:
    if scores[right] > scores[left-1]:
        print("Yes")
    else:
        print("No")

    right += 1
    left += 1

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
import  math
import fractions
from collections import defaultdict
import copy
stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

N,K=nm()
A=nl()
h=0
for i in range(K):
    h+=A[i]

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

Submission status: Accepted

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

    first, last = 0, K-1

    while last < N-1:
        last += 1
        if scores[first] < scores[last]: print('Yes')
        else: print('No')
        first += 1

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:
import sys
input=lambda: sys.stdin.readline().rstrip()
n,k=map(int,input().split())
A=[int(i) for i in input().split()]
for i in range(k,n):
  if A[i]>A[i-k]:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

main()

Submission status: Accepted

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


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
A = list(map(int, input().split()))  # i学期のテストの点

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

Submission status: Accepted

Solution code:
def main():
    n,k = map(int,input().split())
    a = [int(i) for i in input().split()]
    """
    ruiseki = [1]
    for i in range(n):
        ruiseki.append(ruiseki[-1]*a[i])
    #ruiseki.pop(0)
    
    ans = [ruiseki[k]/ruiseki[0]]
    for i in range(k+1,n+1):
        tmp = ruiseki[i]/ruiseki[i-k]
        if ans[-1] >= tmp:
            print('No')
        else:
            print('Yes')
        ans.append(tmp)
    """
    for i in range(k,n):
        if a[i]>a[i-k]:
            print('Yes')
        else:
            print('No')
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

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:
from collections import deque

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

A = [int(i) for i in input().split()]

B = deque(A[:K])

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

Submission status: Accepted

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

for i in range(n-k):

  if  a[i]<a[i+k]:
    print("Yes")
  else:
    print("No")