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')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n, k = map(int, input().split())
points = list(map(int, input().split()))

base = 1
for i, point in enumerate(points[k:]):
  if point>points[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 = 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:
#!/usr/bin/env python3
import sys
rl = sys.stdin.buffer.readline

N, K = map(int, rl().split())
AS = tuple(map(int, rl().split()))

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import deque
n,k = map(int,input().split())
l = list(map(int,input().split()))

que = deque(l[:k])
for i in range(n-k):
    p = que.popleft()
    que.append(l[k+i])
    if p < l[k+i]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, k, *A = map(int, open(0).read().split())
for i in range(k, n):
    if A[i-k] < A[i]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

scr = 0
for i in A[:K]:
    scr += math.log10(i)

for i in range(K, N):
    scr_new = scr + math.log10(A[i]) - math.log10(A[i-K])
    if scr_new > scr: print('Yes')
    else: print('No')

Submission status: Accepted

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

A_list = [int(n) for n in input().split()]

import numpy as np

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

Submission status: Accepted

Solution code:
import sys
import numpy as np
input = sys.stdin.readline


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


def main():
    np.set_printoptions(threshold=20)
    N, K = map(int, input().split())
    A = list(map(int, input().rstrip().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:
#!/usr/bin python3
# -*- coding: utf-8 -*-

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
sys.setrecursionlimit(10**7) #再帰関数の上限,10**5以上の場合python
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque, defaultdict
#deque(l), pop(), append(x), popleft(), appendleft(x)
#q.rotate(n)で → にn回ローテート
from collections import Counter#文字列を個数カウント辞書に、
#S=Counter(l),S.most_common(x),S.keys(),S.values(),S.items()
from itertools import accumulate,combinations,permutations,product#累積和
#list(accumulate(l))
from heapq import heapify,heappop,heappush
#heapify(q),heappush(q,a),heappop(q) #q=heapify(q)としないこと、返り値はNone
from functools import reduce,lru_cache#pypyでもうごく
#@lru_cache(maxsize = None)#maxsizeは保存するデータ数の最大値、2**nが最も高効率
from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printe(*x):print("## ",*x,file=sys.stderr)
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def binr(x): return bin(x)[2:]
def bitcount(x): #xは64bit整数
    x= x - ((x >> 1) & 0x5555555555555555)
    x= (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x= (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f 
    x+= (x >> 8); x+= (x >> 16); x+= (x >> 32) 
    return x & 0x7f

class SWAG:#funcとself.ideを設定すること
    def __init__(self,func,ide,A):#func:モノイド、ide:単位元、A:ターゲット配列
        self.A=tuple(deepcopy(A))#ターゲット配列
        self.ide=ide#単位元
        self.func=func#モノイド
        self.front=self.ide#frontスタックの総演算結果
        self.fr=0#frontスタックの右端インデックス
        self.fl=0#frontスタックの左端インデックス  
        self.back=deque()#backスタック

    def right(self,step=1):#右端をstep回すすめる
        for i in range(step):
            self.front=self.func(self.front,self.A[self.fr+i])
        self.fr+=step
    
    def left(self,step=1):#左端をstep回すすめる
        back=self.back
        func=self.func
        for _ in range(step):
            if not back:
                for i in range(self.fr-1,self.fl-1,-1):
                    x=self.A[i]
                    if back:
                        z=func(x,back[-1])
                    else:
                        z=x
                    back.append(z)
                self.fl=self.fr
                self.front=self.ide
            back.pop()

    def get(self):#区間funcの計算
        if self.back:
            return self.func(self.back[-1],self.front)
        return self.front



def main():
    mod = 1000000007
    #w.sort(key=itemgetter(1),reverse=True)  #二個目の要素で降順並び替え

    #N = int(input())
    N, K = map(int, input().split())
    A = tuple(map(int, input().split())) #1行ベクトル
    #L = tuple(int(input()) for i in range(N)) #改行ベクトル
    #S = tuple(tuple(map(int, input().split())) for i in range(N)) #改行行列

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

A_1 = np.array(A[K:])
A_2 = np.array(A[:-K])

A_bool = A_1 - A_2

for a_bool in A_bool:
    if a_bool > 0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

grades = [0] * n

'''
5 3
96 98 95 100 20
'''

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
""" C
    https://atcoder.jp/contests/m-solutions2020/tasks/m_solutions2020_c
"""
import sys
import math
from functools import reduce
from bisect import bisect_left

def readString():
    return sys.stdin.readline()

def readInteger():
    return int(readString())

def readStringSet(n):
    return sys.stdin.readline().split(" ")[:n]

def readIntegerSet(n):
    return list(map(int, readStringSet(n)))

def readIntegerMatrix(n, m):
    return reduce(lambda acc, _: acc + [readIntegerSet(m)], range(0, n), [])

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

if __name__ == "__main__":
    _N, _K = readIntegerSet(2)
    _A = readIntegerSet(_N)

    main(_N, _K, _A)

Submission status: Accepted

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

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

Submission status: Accepted

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

def solve(N, K, A):
    """
    N <= 200,000
    """
    for i in range(K,N):
        prev = A[i-K]
        P = A[i]
        if prev >= P:
            print("No")
        else:
            print("Yes")

solve(N, K, A)

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)


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

results = list()
for first, second in zip(A[0:N - K], A[K:N]):
    if second > first:
        results.append(True)
    else:
        results.append(False)

for res in results:
    if res:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N, K = map(int, readline().split())
A = list(map(int, readline().split()))

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

Submission status: Accepted

Solution code:
## necessary imports
import sys
input = sys.stdin.readline
# from math import ceil, floor, factorial;

def ceil(x):
    if x != int(x):
        x = int(x) + 1;
    return x;
    
# swap_array function
def swaparr(arr, a,b):
    temp = arr[a];
    arr[a] = arr[b];
    arr[b] = temp

## gcd function
def gcd(a,b):
    if b == 0:
        return a
    return gcd(b, a % b);

## nCr function efficient using Binomial Cofficient
def nCr(n, k): 
    if(k > n - k): 
        k = n - k 
    res = 1
    for i in range(k): 
        res = res * (n - i) 
        res = res / (i + 1) 
    return int(res) 

## upper bound function code -- such that e in a[:i] e < x;
def upper_bound(a, x, lo=0, hi = None):
    if hi == None:
        hi = len(a);
    while lo < hi:
        mid = (lo+hi)//2
        if a[mid] < x:
            lo = mid+1
        else:
            hi = mid
    return lo

## prime factorization
def primefs(n):
    ## if n == 1    ## calculating primes
    primes = {}
    while(n%2 == 0 and n > 0):
        primes[2] = primes.get(2, 0) + 1
        n = n//2
    for i in range(3, int(n**0.5)+2, 2):
        while(n%i == 0 and n > 0):
            primes[i] = primes.get(i, 0) + 1
            n = n//i
    if n > 2:
        primes[n] = primes.get(n, 0) + 1
    ## prime factoriazation of n is stored in dictionary
    ## primes and can be accesed. O(sqrt n)
    return primes

## MODULAR EXPONENTIATION FUNCTION
def power(x, y, p): 
    res = 1
    x = x % p  
    if (x == 0) : 
        return 0
    while (y > 0) : 
        if ((y & 1) == 1) : 
            res = (res * x) % p 
        y = y >> 1      
        x = (x * x) % p 
    return res 

## DISJOINT SET UNINON FUNCTIONS
def swap(a,b):
    temp = a
    a = b
    b = temp
    return a,b

# find function with path compression included (recursive)
# def find(x, link):
#     if link[x] == x:
#         return x
#     link[x] = find(link[x], link);
#     return link[x];

# find function with path compression (ITERATIVE)
def find(x, link):
    p = x;
    while( p != link[p]):
        p = link[p];
    
    while( x != p):
        nex = link[x];
        link[x] = p;
        x = nex;
    return p;


# the union function which makes union(x,y)
# of two nodes x and y
def union(x, y, link, size):
    x = find(x, link)
    y = find(y, link)
    if size[x] < size[y]:
        x,y = swap(x,y)
    if x != y:
        size[x] += size[y]
        link[y] = x

## returns an array of boolean if primes or not USING SIEVE OF ERATOSTHANES
def sieve(n): 
    prime = [True for i in range(n+1)] 
    p = 2
    while (p * p <= n): 
        if (prime[p] == True): 
            for i in range(p * p, n+1, p):
                prime[i] = False
        p += 1
    return prime

#### PRIME FACTORIZATION IN O(log n) using Sieve ####
MAXN = int(1e5 + 5)
def spf_sieve():
    spf[1] = 1;
    for i in range(2, MAXN):
        spf[i] = i;
    for i in range(4, MAXN, 2):
        spf[i] = 2;
    for i in range(3, ceil(MAXN ** 0.5), 2):
        if spf[i] == i:
            for j in range(i*i, MAXN, i):
                if spf[j] == j:
                    spf[j] = i;
    ## function for storing smallest prime factors (spf) in the array

################## un-comment below 2 lines when using factorization #################
# spf = [0 for i in range(MAXN)]
# spf_sieve();
def factoriazation(x):
    ret = {};
    while x != 1:
        ret[spf[x]] = ret.get(spf[x], 0) + 1;
        x = x//spf[x]
    return ret
    ## this function is useful for multiple queries only, o/w use
    ## primefs function above. complexity O(log n)

## taking integer array input
def int_array():
    return list(map(int, input().strip().split()))
## taking string array input
def str_array():
    return input().strip().split();

#defining a couple constants
MOD = int(1e9)+7;
CMOD = 998244353;
INF = float('inf'); NINF = -float('inf');

################### ---------------- TEMPLATE ENDS HERE ---------------- ###################

n, k = int_array(); a = int_array();
i = 0; j = k;
while(j < n):
    if a[j] > a[i]:
        print('Yes');
    else:
        print('No');
    i += 1; j += 1;

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
#import string
#from collections import defaultdict, deque, Counter
#import bisect
#import heapq
#import math
#from itertools import accumulate
#from itertools import permutations as perm
#from itertools import combinations as comb
#from itertools import combinations_with_replacement as combr
#from fractions import gcd
#import numpy as np

stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)
MIN = -10 ** 9
MOD = 10 ** 9 + 7
INF = float("inf")
IINF = 10 ** 18

def solve():
    #n = int(stdin.readline().rstrip())
    n,k = map(int, stdin.readline().rstrip().split())
    A = list(map(int, stdin.readline().rstrip().split()))
    #numbers = [[int(c) for c in l.strip().split()] for l in sys.stdin]
    #word = [stdin.readline().rstrip() for _ in range(n)]
    #number = [[int(c) for c in stdin.readline().rstrip()] for _ in range(n)]
    #zeros = [[0] * w for i in range(h)]
    for i in range(k,n+1):
        last = A[i-1]
        if i == k:
            pass
        else:
            fi = A[i-k-1]
            if fi < last:
                print("Yes")
            else:
                print("No")


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    import sys
    def input():
        return sys.stdin.readline()[:-1]
    X=list(map(int,input().split()))
    A=list(map(int,input().split()))
    N=X[0]
    K=X[1]
    j=0
    for i in range(N-K):
        j=i+K+1
        if A[i]<A[j-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()))

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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 = [int(n) for n 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 = list(map(int,input().split()))
gakki = list(map(int,input().split()))


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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
from sys import stdin,setrecursionlimit
import heapq,bisect,math,itertools,string,queue,copy
setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, stdin.readline().split()))

N,K = inpl()
Als = inpl()

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:

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

    for i in range(N - K):
        if A[K + i] > 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()))
ans = [-1] * N

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

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(K+1,N+1):
    hl = A[i-1]/A[i-K-1]
    if hl >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-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:
def resolve():
    from collections import deque
    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 - K] < A[i]:
            print("Yes")
        else:
            print("No")


resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect
import copy
import heapq
import sys
import itertools
import math
from functools import lru_cache
from collections import deque
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
mod = 10 ** 9 + 7 

def read_values(): return map(int, input().split())
def read_index(): return map(lambda x: int(x) - 1, input().split())
def read_list(): return list(read_values())
def read_lists(N): return [read_list() for n in range(N)]


def main():
    N, K = read_values()
    A = read_list()
    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:
s1 = input().split()

N = int(s1[0])
K = int(s1[1])

s2 = input().split()

A = []
for i in range(N):
  A.append(int(s2[i]))
  
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
import sys
from collections import deque

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


def solve(N: int, K: int, A: "List[int]"):

    A = deque(A)
    a = deque()

    p = 1
    for i in range(K):
        t=A.popleft()
        a.append(t)
    
    for i in range(K, N):
        t = A.popleft()
        c = a.popleft()
        if t > c: print(YES)
        else: print(NO)
        a.append(t)

    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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]"
    solve(N, K, A)

if __name__ == '__main__':
    main()

Submission status: Accepted

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