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()))
seiseki = []

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 = [] 
lst2 = []
sum=0
j=0
lst = [int(item) for item in input().split()]
i=0 
while i<n:
	if i==0:
		while i<k-1:
			sum=sum+lst[i]
			i=i+1
	else:
		sum=sum-lst[j]
		sum=sum+lst[i]
		j=j+1
	lst2.append(sum)
	i=i+1

x=len(lst2)
for i in range(1,x):
	if lst2[i]>lst2[i-1]:
		print("Yes")
	else:
		print("No")

Submission status: Accepted

Solution code:
import math
N,K=map(int,input().split())
A=list(map(int,input().split()))
count=0
before=0
now=1


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

Submission status: Accepted

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

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

count = 0

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

Submission status: Accepted

Solution code:
temp = input().split()
N = int(temp[0])
K = int(temp[1])
data = list(map(int, input().split()))

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

Submission status: Accepted

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

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



main()

Submission status: Accepted

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

#print(N)
#print(K)
#print(A)

preX = 0
nowX = 1

for i in range(K+1,N+1):
#  print(str(i)+'学期')
#  if i == K:
#    for x in range(K):
#      nowX *= A[x]
#  else:
#    nowX = int(preX / A[i-K-1]) * A[i-1]
#    print(str(preX) +', '+ str(nowX))
#    if preX < nowX:
#      print('Yes')
#    else:
#      print('No')
#  preX = nowX

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def ip():
  	return list(map(int, input().split()))
[n,k]=ip()
arr=ip()
s=0
e=k
u=n-k
while u:
  if arr[s]<arr[e]:
      print("Yes")
  else:
      print("No")
  s+=1
  u-=1
  e+=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]>1:
    print ('Yes')
  else:
    print ('No')

Submission status: Accepted

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

n = a[0]
k = a[1]

c = []
bfr = 0
aft = 0
for i in range(k-1, n):
    if i != k-1:
        if b[i - k] < b[i]:
            c.append("Yes")
        else:
            c.append("No")
    
            
s_n = '\n'.join(c)
print(s_n)

Submission status: Accepted

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

k_idx = K - 1
ans_arr = []
for i in range(N - K):
    if a_arr[i] < a_arr[k_idx + 1]:
        ans_arr.append('Yes')
    else:
        ans_arr.append('No')
    k_idx += 1
for i in ans_arr:
    print(i)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
l = list(map(int,input().split()))
n, k = l[0], l[1]
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:
line1 = input()
line2 = input()

n, k = tuple([int(val) for val in line1.split()])
a_list = [int(val) for val in line2.split()]

prev_sum = sum(a_list[0:k])
for i in range(k, n):
    current_sum = prev_sum - a_list[i-k] + a_list[i]
    if current_sum > prev_sum:
        print("Yes")
    else:
        print("No")
    prev_sum = current_sum

Submission status: Accepted

Solution code:
def solve():
    n,k=input().split()
    A=list(map(int,input().split()))
    n=int(n)
    k=int(k)
    for i in range(n-k):
        if A[i+k]>A[i]:
            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()))
memo = {}

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(v) for v in input().split(" ") ]
points = [ int(v) for v in input().split(" ") ]

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

Submission status: Accepted

Solution code:
"""
AtCoder :: M-Solutions Programming Contest 2020 :: Marks
https://atcoder.jp/contests/m-solutions2020/tasks/m_solutions2020_c
"""
import sys
from functools import reduce
from operator import add
from math import log


def solve(A, K):
    """Solve puzzle."""
    solns = []
    grade = reduce(add, A[:K])
    for i in range(K, len(A)):
        grade0 = (grade - A[i-K]) + A[i]
        if grade0 > grade:
            solns.append('Yes')
        else:
            solns.append('No')
        grade = grade0
    return(solns)


def main():
    """Main program."""
    N, K = (int(i) for i in sys.stdin.readline().split())
    A = [log(float(i)) for i in sys.stdin.readline().split()]
    print("\n".join(solve(A, K)))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

for i in range(n-k):
    # if data[i:i+k][0] < data[i+1:i+k+1][-1]:
    # print("-----------------")
    # print( data[i:i+k] )
    # print( data[i+1:i+k+1] )

    # print( data[i] )
    # print( data[k+i] )
    # print("-----------------")

    if data[i] < data[k+i]:
        print("Yes")
        # print( data[i:i+k] )
        # print( data[i+1:i+k+1] )
    else:
        print("No")

Submission status: Accepted

Solution code:
import sys
from math import sqrt, gcd, ceil, log
from bisect import bisect, bisect_left
from collections import defaultdict, Counter, deque
from heapq import heapify, heappush, heappop
inp = sys.stdin.readline
read = lambda: list(map(int, inp().strip().split()))

def main():
	n, k = read(); arr = read()
	for i in range(k, n):
		print("YNeos"[arr[i] <= arr[i-k]::2])






if __name__ == "__main__":
	main()

Submission status: Accepted

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

c = N - K
l = []

for j in range(K, N):
        l.append(A[j - K])
        l.append(A[j])

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

Submission status: Accepted

Solution code:
# vim: fileencoding=utf-8


def main():
    n, k = map(int, input().split())
    aList = list(map(int, input().split()))
    hyoukaList = []
    c = 1
    for i in range(n):
        if i < k:
            continue
        b = aList[i - k]
        a = aList[i]

        if b < a:
            print("Yes")
        else:
            print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

for i in range(n):
    if i + k >= n:
        exit()
    pre = A[i]
    aft = A[i+k]
    if pre >= aft:
        print('No')
    else:
        print('Yes')

Submission status: Accepted

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

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

i = 0
while i < N - K:
    if A[i] < A[i + K]:
        print("Yes")
    else:
        print("No")
    i = i + 1

Submission status: Accepted

Solution code:
from collections import deque

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

now = deque(a[0:k])
next = deque(a[k:])

for i in range(n-k):
    if now[0]<next[0]:
        print('Yes')
    else:
        print('No')
    now.append(next[0])
    now.popleft()
    next.popleft()

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()))
pre_score = 1
for i in range(k, n):
  after_score = pre_score*a[i]/a[i-k]
  if after_score > pre_score:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

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

def main():
    import sys
    import math

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

    for i in range(len(A_list)):
        A_list[i] = math.log10( A_list[i] )


    point_K = 0
    
    for i in range(K):
        point_K += A_list[i]


    prev = point_K

    for i in range(K, len(A_list)):
        current = prev - A_list[i-K] + A_list[i]

        if current > prev:
            print("Yes")
        else:
            print("No")
        
        prev = current


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

    ans = ['No'] * (N - K)
    for i in range(N - K):
        tmp = A[K + i] / A[i]
        if 1 < tmp:
            ans[i] = 'Yes'
    print("\n".join(ans))


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(K, N):
    if lst[i-K] >= lst[i]:
        print('No')
    else:
        print('Yes')

Submission status: Accepted

Solution code:
N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
#N, K = 5, 3
#A = [96, 98, 95, 100, 20]
#N, K = 3, 2
#A = [1001, 869120, 1001]
#N, K = 15, 7
#A = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9]

def getA(i):
    if i < 0:
        return 1
    elif i >= N:
        return 1
    else:
        return A[i]
# 
for i in range(K,N):
    #print(i,getA(i-K), getA(i))
    if getA(i-K) < getA(i):
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

answers = []

prev_score = scores[0]

for i in range(k, n):
    if prev_score < scores[i]:
        answers.append('Yes')
    else:
        answers.append('No')

    prev_score = scores[i - (k - 1)]

for answer in answers:
    print(answer)

Submission status: Accepted

Solution code:
N,K = map(int,input().split( ))
A = list(map(int,input().split( )))
for tail,head in zip(A,A[K:]):
    if tail < head:
        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(n-k):
    if a[i+k] <= a[i]:
        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:
from sys import stdin
input = stdin.readline


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

  # S = [1]*(N+1)
  # for i in range(1, N+1):
  #   S[i] = S[i-1] * A[i-1]

  # pre = S[K]/S[0]
  # out = []
  for i in range(K+1, N+1):
    if A[i-K-1] < A[i-1]:
      print('Yes')
    else:
      print('No')
    # temp = S[i]/S[i-K]
    # if pre < temp:
    #   # print('Yes')
    #   out.append('Yes')
    # else:
    #   # print('No')
    #   out.append('No')
    # pre = temp

  # print(*out, 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):
    score = 1
    if score < score*a[i]/a[i-k]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:

a,b = map(int,input().split())
c = list(map(int,input().split()))
j = 0

for i in range(a-b):
    if int(c[i]) < int(c[b+j]):
        print("Yes")
        j += 1
    else:
        print("No")
        j += 1

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

st = 0
la = K

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

Submission status: Accepted

Solution code:
n, k = list(map(int, input().split()))
an = list(map(int, input().split()))
            
ank = an[:k]
for i in range(k, n):
    print(['No', 'Yes'][an[i] > ank[0]])
    ank.pop(0)
    ank.append(an[i])

Submission status: Accepted

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


for i in range(n - k):
    if a[i] < a[i + k]:
        ans[i] = 'Yes'


for i in ans:
    print(i)

Submission status: Accepted

Solution code:
import math
from decimal import *


def _run(n, k, a_list):
    integral_windows = [Decimal(0)] * (len(a_list) + 1)
    for i in range(len(a_list)):
        integral_windows[i + 1] = integral_windows[i] + Decimal(math.log10(a_list[i]))
    sliding_size = n - k
    for i in range(sliding_size):
        sum_value_a = integral_windows[k + i] - integral_windows[i]
        sum_value_b = integral_windows[k + i + 1] - integral_windows[i + 1]
        if sum_value_a < sum_value_b and (math.fabs(sum_value_b - sum_value_a) > 5e-25):
            print("Yes")
        else:
            print("No")


def _main():
    N, K = map(int, input().split())
    A_list = list(map(int, input().split()))
    _run(N, K, A_list)


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:
#!/usr/bin/env python
# coding: utf-8

# In[2]:


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


# In[9]:


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


# In[10]:


if __name__ == '__main__':
    main()


# In[ ]:

Submission status: Accepted

Solution code:
n,k= list(map(int, input().strip().split()))
a = list(map(int, input().strip().split()))
b=[1]*n

    
for i in range(k+1,n+1):
    b[i-1]=a[i-1]/a[i-k-1]

    

for i in range(k,n):
    if 1<b[i]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
N,K = map(int, input().split())
A = list(map(int, input().split()))
# S =[1]*N
# for j in range(N-K+1):
#   for i in range(j,K+j):
#     S[j]*=A[i]
#     # print(S[j])
#   if j!=0:
#     if S[j-1]<S[j]:
#       print("Yes")
#     else:
#       print("No")
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 deque
N,K = map(int,input().split())
C = deque(map(int,input().split()))
D = C.copy()
#print(C)
ans = 1
for i in range(K):
  C.popleft()
  #ans *= C.popleft()

for i in range(N-K):
  preans = D.popleft()
  ans = C.popleft()
  #preans = ans
  #ans *= C.popleft()
  #ans /= D.popleft()
  if preans < ans:
    print("Yes")
  if preans >= ans:
    print("No")

Submission status: Accepted

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

for i in range(n - k):
    if a[i] <= a[i + k]:
        lists.append(0)
    else:
        lists.append(1)
lists.reverse()

for i in range(n - k):
    if lists[i] == 1:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
from decimal import Decimal
N, K = map(int, input().split())
A = list(map(int, input().split()))
#N,K=5 ,3
#A=[96, 98, 95, 100, 20]
ten=[0]*(N-K+1)
a=100000*(10**20)+0.1
#for i in range(K):
 #   a*=A[i]
#print(a)
#a=1
ten[0]=Decimal(a)
for i in range(1,(N-K+1)):
    ten[i]=Decimal(ten[i-1]*A[K+i-1]/A[i-1])
#print(ten)
for i in range(1,N-K+1):
    #print(ten[i])
    if ten[i]>ten[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:
n, k = list(map(int, input().split()))
a = list(map(int, input().split()))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

YES = "Yes"
NO = "No"

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

scores = [0] * K
scores[0] = A[0]
i = 1
while i < K:
    scores[i] = A[i]
    i += 1

while i < N:
    if A[i] > scores[i % K]:
        print(YES)
    else:
        print(NO)
    scores[i % K] = A[i]
    i += 1

Submission status: Accepted

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

    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

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(1, n-k+1):
    print("Yes" if A[i+k-1]>A[i-1] else "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce

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

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

Submission status: Accepted

Solution code:
from math import log
from decimal import Decimal

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

B = [Decimal(log(i)) for i in A]

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

Submission status: Accepted

Solution code:
import sys
import math
sys.setrecursionlimit(int(1e6))
#dprint = print
def dprint(*args):
  pass

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

i_l = 0
for i_r in range(k, n):
  dprint('i_l, i_r = ', i_l, i_r)
  if A[i_l] >= A[i_r]:
    print('No')
  else:
    print('Yes')

  i_l = i_l + 1

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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 read():
    N, K = map(int, input().split(' '))
    As = list(map(int, input().split(' ')))
    return N, K, As


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

if __name__ == '__main__':
    N, K, As = read()
    fun(N, K, As)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# m-solutions2020_c.py
# https://atcoder.jp/contests/m-solutions2020 : C

global FLAG_LOG
FLAG_LOG = False


def log(value):
    return
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    import math
    # K = lines[1]
    # K = int(lines[1])
    N, K = list(map(int, lines[0].split()))
    values = list(map(int, lines[1].split()))
    lvalues = [math.log(value) for value in values]
    # values = list(map(int, lines[2].split()))
    # values = list()
    # for i in range(N):
    #     values.append(int(lines[i]))
    # valueses = list()
    # for i in range(N):
    #     valueses.append(list(map(int, lines[i+1].split())))

    # marks = list()
    lmarks = list()

    for i in range(N-K+1):
        if i == 0:
            # targets = values[i:i+K]
            ltargets = lvalues[i:i+K]
            # log(f'targets=[{targets}]')
            log(f'ltargets=[{ltargets}]')
            # mark = 1
            lmark = 0
            # for target in targets:
            #     mark *= target
            # marks.append(mark)
            for ltarget in ltargets:
                lmark += ltarget
            lmarks.append(lmark)
        else:
            lmark = lmark - lvalues[i-1] + lvalues[i+K-1]
            lmarks.append(lmark)

    # rets = list()
    lrets = list()
    # prev = None
    lprev = None
    # for mark in marks:
    #     if prev is None:
    #         prev = mark
    #     else:
    #         if prev < mark:
    #             rets.append('Yes')
    #         else:
    #             rets.append('No')
    #         prev = mark
    for lmark in lmarks:
        if lprev is None:
            lprev = lmark
        else:
            if lprev < lmark:
                lrets.append('Yes')
            else:
                lrets.append('No')
            lprev = lmark

    return lrets


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['5 3', '96 98 95 100 20']
        lines_export = ['Yes', 'No']
    if pattern == 2:
        lines_input = ['3 2', '1001 869120 1001']
        lines_export = ['No']
    if pattern == 3:
        lines_input = ['15 7', '3 1 4 1 5 9 2 6 5 3 5 8 9 7 9']
        lines_export = ['Yes', 'Yes', 'No', 'Yes', 'Yes', 'No', 'Yes', 'Yes']
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(2)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    if mode > 0:
        log(f'lines_input=[{lines_input}]')
        log(f'lines_export=[{lines_export}]')
        log(f'lines_result=[{lines_result}]')
        if lines_result == lines_export:
            log('OK')
        else:
            log('NG')
    finished = time.time()
    duration = finished - started
    log(f'duration=[{duration}]')


# 起動処理
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] > 1:
    print('Yes')
  else:
    print('No')

# sum_A = [0]*N
# sum_A_k = 1
# for i in range(K):
#   sum_A_k = sum_A_k*A[i]
# sum_A[K-1] = sum_A_k

# for i in range(N-K):
#   sum_A[K+i] = sum_A[K-1+i]*A[K+i]/A[i]
#   if sum_A[K+i] > sum_A[K-1+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):
    r = a[i + k] - a[i]
    if r > 0:
        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):
  #print(A[K-3+i] , A[K+i])
  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())
arr = list(map(int, input().split()))
i = k
j = 0
nxt = 0
pre = sum(arr[:k])
while i < len(arr):
    nxt = (pre + arr[i]) - arr[j]
    if nxt > pre:
        print('Yes')
    else:
        print('No')
    j += 1
    i += 1
    pre = nxt

Submission status: Accepted

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

import sys
import math
from decimal import Decimal, ROUND_DOWN
from collections import deque
from itertools import combinations
import copy

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        for line in sys.stdin:
            lines.append(line.strip())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]


    (n, k) = [int(e) for e in lines[0].split(" ")]
    a = [int(e) for e in lines[1].split(" ")]

    return (n, k, a)


def solve(n, k, a):

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

    
    result = []
    for i in range(k, n):

        if a[i-k] < a[i]:
            result.append('Yes')
        else:
            result.append('No')


    return result
    


def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()