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:
#
#    ------------------------------------------------
#           ____          _     Generatered using
#          / ___|        | |
#         | |    __ _  __| | ___ _ __  ______ _
#         | |   / _` |/ _` |/ _ \ '_ \|_  / _` |
#         | |__| (_| | (_| |  __/ | | |/ / (_| |
#          \____\____|\____|\___|_| |_/___\____|
#
#      GNU Affero General Public License v3.0
#    ------------------------------------------------
#    Author   : prophet
#    Created  : 2020-07-25 08:11:03.732018
#    UUID     : ZonihA5OmAzqBLgc
#    ------------------------------------------------
#
production = True

import sys, math, collections

def input(f = 0, m = 0):

    if m > 0: return [input(f) for i in range(m)]
    else:
        l = sys.stdin.readline()[:-1]

        if f >= 10:
            u = False
            f = int(str(f)[-1])
        else: u = True

        if f == 0: p = [l]
        elif f == 1: p = list(map(int, l.split()))
        elif f == 2: p = list(map(float, l.split()))
        elif f == 3: p = list(l)
        elif f == 4: p = list(map(int, list(l)))
        elif f == 5: p = l.split()

        return p if u else p[0]

def out(l, f = 0, n = True):

    if f == 0: p = str(l)
    elif f == 1: p = " ".join(map(str, l))
    elif f == 2: p = "\n".join(map(str, l))
    elif f == 3: p = "".join(map(str, l))

    print(p, end = "\n" if n else "")

def log(*args):
    if not production:
        print("$$$", end = "")
        print(*args)

enu = enumerate
ter = lambda a, b, c: b if a else c
ceil = lambda a, b: -(-a // b)
flip = lambda a: (a + 1) & 1

def mapl(i, f = 0):

    if f == 0: return list(map(int, i))
    elif f == 1: return list(map(str, i))
    elif f == 2: return list(map(list, i))

#
#   >>>>>>>>>>>>>>> START OF SOLUTION <<<<<<<<<<<<<<
#


def solve():

    n, k = input(1)
    a = input(1)

    for i in range(n - k):
        out(ter(a[i + k] > a[i], "Yes", "No"))

    return


solve()

#
#   >>>>>>>>>>>>>>>> END OF SOLUTION <<<<<<<<<<<<<<<
#

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,K = 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()))
m = n-k

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code
def resolve():
    N,K=pin()
    A=[*pin()]

    
    for i in range(N-K):
        print(["No","Yes"][A[i]<A[i+K]])
            
#%%submit!
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("Yes" if a[i + k] > a[i] else "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] > A[k-K]:
    print("Yes") 
  else:
    print("No")

Submission status: Accepted

Solution code:
# Contest No.: M-SOLUTIONS Programming Contest 2020
# Problem No.: C
# Solver:      JEMINI
# Date:        20200725

import sys
import heapq

def main():
    n, k = map(int, input().split())
    nums = list(map(int, sys.stdin.readline().split()))
    for i in range(n - k):
        if nums[i] < nums[k + i]:
            print("Yes")
        else:
            print("No")
    return

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))

N, K = inm()
A = inl()


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


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

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

Submission status: Accepted

Solution code:
LI = lambda: list(map(int, input().split()))

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


def main():
    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()))
d=1
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()))
answer = 'Yes'
score = 0
for i in range(K):
    score += A[i]

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

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:
#!/usr/bin/env python3
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections
from decimal import Decimal # 10進数で考慮できる

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  #空白なし
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし

N,K = MI()
A = [0] + LI()

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

Submission status: Accepted

Solution code:
import heapq
t = 1
def max(a,b):
	if a > b:
		return a
	return b
while t > 0:
	t -= 1
	n,k = map(int,input().split())
	# k = int(input())
	v = list(map(int,input().strip().split()))[0:n]
	for i in range(k,n):
		if v[i] > v[i-k]:
			print("Yes")
		else:
			print("No")
	# for i in range(q):
	# 	p = int(input().strip())
	# 	v.append(p)
	# for i in range(n):
	# 	l.append(0)
	# for i in v:
	# 	l[i-1] += 1
	# for i in range(n):
	# 	if(l[i] <= q-k):
	# 		print("No")
	# 	else:
	# 		print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#入るp学期と、外されるp-k学期の比較
n,k=map(int,input().split())
ls=list(map(int,input().split()))
for i in range(n-k):
  if ls[i]<ls[i+k]:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n-k):
    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()))

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

Submission status: Accepted

Solution code:
N,K = list(map(int,input().split()))
A = list(map(int,input().split()))
first = 1
X = K
Y = 0
for i in range(K,N):
    P = A[X]
    Q = A[Y]
    if P>Q:
        print("Yes")
    else:
        print("No")
    X+=1
    Y+=1

Submission status: Accepted

Solution code:
import sys
import math


def input():
    return sys.stdin.readline().rstrip()


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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    import sys
    sys.setrecursionlimit(10**6)
    input = sys.stdin.readline
    N, K = [int(x) for x in input().strip().split()]
    A = [int(x) for x in input().strip().split()]
    p1, p2 = 0, K
    for i in range(N-K):
        if A[p1] < A[p2]:
            print('Yes')
        else:
            print('No')
        p1 += 1
        p2 += 1

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
input = sys.stdin.readline

n, k = map(int, input().split())
a = [int(item) for item in input().split()]

for a1, a2 in zip(a, a[k:]):
    if a1 < a2:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


for a, b in zip(A, A[K:]):
    if a < b:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
if __name__ == "__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")

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


def main():
    N, K = map(int, input().split())
    A = tuple(map(int, input().split()))

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
def main():
    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]:
            ans.append("Yes")
        else:
            ans.append("No")
    for s in ans:
        print(s)

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

anss = []
for i in range(K, N):
    if As[i-K] < As[i]:
        anss.append('Yes')
    else:
        anss.append('No')

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

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

Submission status: Accepted

Solution code:
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(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

'''
Author: andyli
Time: 2020-07-25 19:57:01
'''

import os
from io import BytesIO, IOBase
import sys
import math


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

    return


# region fastio
BUFSIZE = 1048576


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)
def input(): return sys.stdin.readline().rstrip('\r\n')

# endregion


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 = 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:
import bisect
import copy
import heapq
import math
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
sys.setrecursionlimit(500000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

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

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

for i in range(k,n):
    # tmp=cnt
    # cnt*=a[i]
    # cnt//=a[i-k]
    # print(tmp,cnt)
    if a[i-k]<a[i]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import bisect_right
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
from copy import deepcopy
from decimal import Decimal
alf = list("abcdefghijklmnopqrstuvwxyz")
ALF = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
#import numpy as np
INF = float("inf")
#d = defaultdict(int)
#d = defaultdict(list)
N,K = map(int,input().split())
ans = 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,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:
# Fast IO (only use in integer input)

import os,io
input=io.BytesIO(os.read(0,os.fstat(0).st_size)).readline

N,K = map(int,input().split())
a = list(map(int,input().split()))
ans = ""
for i in range(N):
    if i < K:
        continue
    if a[i] <= a[i - K]:
        ans += "No"
    else:
        ans += "Yes"
    if i != N-1:
        ans += "\n"
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub


import sys
# sys.setrecursionlimit(10**6)
# buff_readline = sys.stdin.buffer.readline
buff_readline = sys.stdin.readline
readline = sys.stdin.readline

INF = 2**62-1


def read_int():
    return int(buff_readline())


def read_int_n():
    return list(map(int, buff_readline().split()))


def read_float():
    return float(buff_readline())


def read_float_n():
    return list(map(float, buff_readline().split()))


def read_str():
    return readline().strip()


def read_str_n():
    return readline().strip().split()

def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N, K, A):
    for i, a in enumerate(A[K:]):
        if A[i] < a:
            print('Yes')
        else:
            print('No')


def main():
    N, K = read_int_n()
    A = read_int_n()
    (slv(N, K, A))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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

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

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

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict, Counter, namedtuple, deque
import itertools
import functools
import bisect
import heapq
import math
import copy
# from fractions import gcd

MOD = 10 ** 9 + 7
# MOD = 998244353
# sys.setrecursionlimit(10**8)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy,deepcopy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(map(int,input().split()))
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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


solve()

Submission status: Accepted

Solution code:
f=lambda:[*map(int,input().split())]
n,k=f()
ｌ=f()
for i in range(n-k):
  print('YNeos'[l[i]>=l[i+k]::2])

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(N: int, K: int, A: "List[int]"):
    ans = []
    for a0, a1 in zip(A, A[K:]):
        ans.append(YES if a0 < a1 else NO)
    return ans

# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    print(*solve(N, K, A), sep="\n")

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    #test()
    main()

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