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: Wrong Answer

Solution code:
n,*a=map(int,open(0).read().split())
ans=1000
num= 0
for i in range(n):
  if i == n-1:
    if a[i-1]<a[i]:
      ans += a[i]*num
  elif a[i]<a[i+1] and a[i+1]<ans:
    num = ans//a[i]
    ans = ans%a[i]
  elif a[i]<a[i+1] and a[i+1]>ans:
    continue
  elif a[i] == a[i+1]:
    continue
  else:
    ans += num*a[i]
  
print(ans)

Submission status: Wrong Answer

Solution code:
def main():
    from decimal import Decimal, getcontext

    getcontext().prec = 10

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

    def accumulate(a):
        s = Decimal(0)
        for x in a:
            s += x.log10()
            yield s

    *acc, = accumulate(A)
    for i in range(N - 1, K - 1, -1):
        acc[i] -= acc[i - K]

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    from decimal import Decimal, getcontext

    getcontext().prec = 15

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

    def accumulate(a):
        s = Decimal(0)
        for x in a:
            s += x.log10()
            yield s

    *acc, = accumulate(A)
    for i in range(N - 1, K - 1, -1):
        acc[i] -= acc[i - K]

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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


for i in range(N-K):
    score = 1
    p_score = 1

    for j in range(i, i+K):
        score = score * A[j]
        p_score = p_score * A[j-1]

    if score > p_score:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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 - 1]:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import numpy as np

n, k = map(int, input().split())
A = np.array(input().split(), dtype=np.int64)
score = np.array([0 for i in range(n- k + 1)], dtype = np.int64)
wknum = 1
zeroflg = -1
for i  in range(k):
    wknum *= A[i]
    if A[i] == 0:
        zeroflg = i
        wknum = 0
        break
score[0] = wknum

for i in range(n - k):
    point = k + i
    if zeroflg != -1:
        if i + k >= zeroflg + k:
            wknum = 1
            for j in range(k):
                wknum *= A[point - k + 1 + j]
            score[i  + 1] = wknum
            zeroflg = -1
        else:
            score[i + 1] = 0
    else:
        if A[k + i] == 0:
            zeroflg = k + i
            score[i + 1] = 0
        else:
            wknum //= A[i]
            wknum *= A[k + i]
            score[i + 1] = wknum
    if score[i + 1] <= score[i]:
        print('No')
    else:
        print('Yes')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import numpy as np
import math

N, K = map(int, input().split())
A = np.array([1] + list(map(lambda x: math.log(int(x)), input().split())))

PA = np.cumsum(A)

B = []
for i in range(K, N + 1):
    b = PA[i] - PA[i - K]
    B.append(float(b))

ans = [['No', 'Yes'][B[i - 1] < B[i]] for i in range(1, len(B))]

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import numpy as np
import math

N, K = map(int, input().split())
A = np.array(list(map(lambda x: math.log(int(x)), input().split())))

PA = np.cumsum(A)

B = []
for i in range(K - 1, N):
    b = PA[i] - PA[i - K]
    B.append(float(b))

ans = [['No', 'Yes'][B[i - 1] + 1e-10 < B[i]] for i in range(1, len(B))]

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

Submission status: Wrong Answer

Solution code:
import numpy as np
import math

N, K = map(int, input().split())
A = np.array(list(map(lambda x: math.log(int(x)), input().split())))

PA = np.cumsum(A)

B = []
for i in range(K - 1, N):
    b = PA[i] - PA[i - K]
    B.append(float(b))

ans = [['No', 'Yes'][B[i - 1] < B[i]] for i in range(1, len(B))]

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

Submission status: Wrong Answer

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

n = 0

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

Submission status: Wrong Answer

Solution code:
N,K=[int(r) for r in input().split()]
ins=[int(r) for r in input().split()]
sumx=[1]
for i in range(K):
	sumx[0]=sumx[0]*ins[i]


for i in range(K,N): 
	sumx.append(sumx[i-K]*ins[i]/ins[i-K])

for r in range(1,K):
	if sumx[r-1] < sumx[r] :
		print('Yes')
	else:
		print('No')

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
A = list(map(int, input().split()))
B=[]
tot=1
for x in range(m):
    tot*=A[x]
temp=tot
for x in range(m,n):
    tot=tot//A[x-m]
    temp1=tot*A[x]
    if(temp1>temp):
        print("Yes")
    print("No")
    temp=temp1

Submission status: Wrong Answer

Solution code:
import numpy as np

# = int(input())
# = str(input())
N, K = map(int, input().split())
A = list(map(int, input().split()))
# = [int(input()) for i in range(N)]
# = [list(map(int, input().split())) for i in range(N)]

A = np.asarray(A)
Aq, Am = divmod(A, 10)

firstq = np.asarray(Aq[:K])
firstm = np.asarray(Am[:K])
scoreq = np.prod(firstq)
scorem = np.sum(firstm)


for i in range(K, N):
    nextscoreq = scoreq * Aq[i] //Aq[i-K]
    nextscorem = scorem + Am[i] - Am[i-K]
    if nextscoreq > scoreq:
        print("Yes")
    elif scoreq == nextscoreq and scorem < nextscorem:
        print("Yes")
    else:
        print("No")
    scoreq = nextscoreq
    scorem = nextscorem

Submission status: Wrong Answer

Solution code:
import numpy as np


N, K = map(int, input().split())
A = np.array([1] + list(map(int, input().split())), np.int64)

PA = np.cumprod(A)
ans = []
f = ['No', 'Yes']

B = []
for i in range(K, N + 1):
    b = PA[i] // PA[i - K]
    B.append(int(b))

ans = [['No', 'Yes'][B[i - 1] < B[i]] for i in range(1, len(B))]

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import numpy as np

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

dp = [0] * (N+1)

for i in range(K,N+1):

    if i == K:
        na = np.array(A[K-i:K])
        dp[i] = na.prod()
        continue

    dp[i] = int(dp[i-1] / A[i-1-K] * A[i-1])
    if i > K:
        if dp[i-1] < dp[i]:
            print('Yes')
        else:
            print('No')

Submission status: Wrong Answer

Solution code:
import numpy as np
A = [int(x) for x in input().split()]
N = A[0]
K = A[1]
A = [int(x) for x in input().split()]
score = np.array(A)
grade = np.zeros(N - K + 1)

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

Submission status: Wrong Answer

Solution code:
import numpy as np
n, k = map(int, input().split())
a = list(map(int, input().split()))
_array = np.array([a[i] for i in range(n)])
cast = _array[0:k].prod()
for i in range(k, n):
  tmp = cast
  cast = _array[i-k+1:i+1].prod()
  if cast > tmp:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
import numpy as np

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


# N = 200000
# K = 10000
# A = [10000] * N

dp = [0] * (N+1)

for i in range(K,N+1):

    if i == K:
        na = np.array(A[K-i:K])
        dp[i] = na.prod()
        continue

    dp[i] = int(dp[i-1] // A[i-1-K] * A[i-1])
    # print(dp)
    if i > K:
        if dp[i-1] < dp[i]:
            print('Yes')
        else:
            print('No')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
# 幅優先探索（行きがけ）

import sys


def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())


def main():
    N, K = LI()
    Aarray = LI()

    start = 1

    for i in range(K, N):
        now = Aarray[i]
        now2 = Aarray[i-K-1]
        if now < now2:
            print("Yes")
        else:
            print("No")
        start = now


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:

n, k = (int(x) for x in input().split())
a = input().split()

#print(a[2])
#print(type(a[2]))

point = []

temp = int(a[0])
for i in range(1,k):
    temp = temp * (int(a[i]))
point.append(temp)

for i in range(k,n):
    point.append(int(point[i-k] * int(a[i]) / int(a[i-k])))

"""
for j in range(n-k+1):
    temp = int(a[j])
    for i in range(j+1,k+j):
        temp = temp * (int(a[i]))
    point.append(temp)
"""
print(point)

for i in range(1,n-k+1):
#    print(i)
#    print(point[i-1])
#    print(point[i])

    if(point[i-1] >= point[i]):
        print("No")
    else:
        print("Yes")

Submission status: Wrong Answer

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

s1 = a[k-3] * a[k-2] * a[k-1]
s2 = a[k-2] *  a[k-1] * a[k]

if s1 < s2:
  print("Yes")
else:
  print("No")
  
for i in range(1,n-k):
  s1 = s2
  s2 = int(s1 / a[k-3+i] * a[k+i])
  print(s1,s2)
  
  if s1 < s2:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np

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

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

Submission status: Wrong Answer

Solution code:
import decimal
import numpy as np
import sys

def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))

N,K = LI()
_A = LI()

A = np.array(_A, dtype=np.dtype(decimal.Decimal))
A /= 10
# print(A)

Aprod = np.zeros(N + 1, dtype=np.dtype(decimal.Decimal))
Aprod[0] = 1
Aprod[1:] = np.cumprod(A)
# print(Aprod)

result = np.zeros(N+1-K,dtype=np.dtype(decimal.Decimal))
result = Aprod[K:] / Aprod[0:N+1-K]
# print(result)

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
# 幅優先探索（行きがけ）

import sys


def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())


def main():
    N, K = LI()
    Aarray = LI()

    start = 1

    for i in range(K, N):
        now = Aarray[i]
        now2 = Aarray[i-K-1]
        if now > now2:
            print("Yes")
        else:
            print("No")
        start = now


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n,k = map(int,input().split())
e = list(map(int,input().split()))
c = -1
for i in range(k-1,n):
    b = e[i]+e[i-1]+e[i]
    if i> k-1 and b>c:
        print('Yes')
    elif i > k-1:
        print('No')
    c = b

Submission status: Wrong Answer

Solution code:
import numpy as np
tmp=[int(i) for i in input().split(' ')]
tmp_s=np.array([int(i) for i in input().split(' ')])
score=np.zeros(tmp[0]-tmp[1]+1)
for i in range(tmp[0]-tmp[1]+1):
  if i==0:
    score[0]=np.prod(tmp_s[:tmp[1]])
  else:
    if tmp_s[i-1]==0:
      score[i]=np.prod(tmp_s[i:i+tmp[1]])
    else:
      score[i]=tmp_s[i+tmp[1]-1]*score[i-1]/tmp_s[i-1]
    
    if score[i-1]<score[i]:
      print('Yes')
    else:
      print('No')

Submission status: Wrong Answer

Solution code:
import time

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

score = 1
for i in range(0, k):
    score *= a[i]

score2 = 0
for i in range(k,n):
    score2 = score // a[i-k] * a[i]
    if score2 > score:
        print("Yes")
    else:
        print("No")
    score = score2
t2 = time.time()
print(t2 - t1)

Submission status: Wrong Answer

Solution code:
n, k = map(int,input().split())
a = input().split()
ls = []
times = 1

for j in range(n-k):
    for i in range(j,j+k):
        times *= int(a[i])
    ls.append(times)
    times = 1
    i += 1

for x in range(len(ls)-1):
    if ls[x] < ls[x+1]:
        print('Yes')
    print('No')

Submission status: Wrong Answer

Solution code:
import numpy as np
 
N,K=map(int, input().split())
A=list(map(int, input().split()))
 
x=np.prod(A[0:K])
MOD = 1000000007

for i in range(N-K):
    y = x*A[K+i] % MOD /A[i]
    print('Yes' if int(x) < int(y) else 'No')
    x = y

Submission status: Wrong Answer

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

S=[1]
P=20988936657440586486151264256610222593863921


for n in range (N):
    if n<K:
        S.append((A[n]*S[-1])%P)
    else:
        S.append(((A[n]*S[-1])%P)/A[n-K]%P)

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

Submission status: Wrong Answer

Solution code:
def marks_C2():
    N, K = map(int, input().split())
    scores = tuple(map(int, input().split()))

    s = [scores[i:k] for i, k in enumerate(range(K, N + 1))]

    for i in range(1, len(s)):
        if s[i] > s[i - 1]:
            print('Yes')
        else:
            print('No')



if __name__ == '__main__':
    marks_C2()

Submission status: Wrong Answer

Solution code:
import numpy as np
n, k = map(int, input().split())
a = list(map(int, input().split()))
cum_a = np.cumprod(a)
cum_a = np.hstack([np.ones(1), cum_a])
for i in range(n - k):
    s = cum_a[i + k] / cum_a[i]
    t = cum_a[i + k + 1] / cum_a[i + 1]
    if s <= t:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:

def Msol_C():
    import numpy as np
    n,k = list(map(int,input().split()))
    a = np.array(list(map(int,input().split())),dtype=np.int64)

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

Msol_C()

Submission status: Wrong Answer

Solution code:
import numpy as np

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

def main():
    list = [np.prod(a[i:i+k]) for i in range(0,n-k+1)]

    for i in range(0, len(list)-1):
        if list[i] < list[i+1]:
            print("Yes")
        else:
            print("No")

main()

Submission status: Wrong Answer

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

# print(a[4 - k: 4])
xs = []


def solve():
    tmp = 1
    for i in range(1, n - k + 1):
        ii = k + i
        if tmp == -1:
            for x in a[ii - k: ii]:
                tmp = x * tmp
            prevTmp = tmp * a[ii - k - 1] / a[ii - 1]
        else:
            prevTmp = tmp
            tmp = tmp / a[ii - k - 1] * a[ii - 1]

        if prevTmp < tmp:
            xs.append('Yes')
        else:
            xs.append('No')


solve()
print(*xs, sep='\n')

Submission status: Wrong Answer

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


def arith_score(nums,x=1):
      for i in range(len(nums)):
            x *= nums[i]
      return x
      
late_data = arith_score(data[k-k:k])
prev_data = 1


for i in range(k+1,n+1):
      late_data = arith_score(data[i-k:i])
      
      if late_data > prev_data:
            print("Yes")
      else:
            print("No")
      prev_data = late_data

Submission status: Wrong Answer

Solution code:
import numpy as np
N, K = map(int, input().split())
P_list = np.array(list(map(int, input().split())))

c1 = 0
c2 = K
while True:
    K1 = np.prod(P_list[c1:c2])
    K2 = np.prod(P_list[c1+1:c2+1])
    c1 += 1
    c2 += 1
    if K2 > K1:
        print('Yes')
    else:
        print('No')
    if c2+1 == N+1:
        break

Submission status: Wrong Answer

Solution code:
n,k = map(int,input().split())
e = list(map(int,input().split()))
c = -1
for i in range(k-1,n):
    b = e[i]+e[i-1]+e[i]
    if i> k-1 and b>=c:
        print('Yes')
    elif i > k-1 and b!=c:
        print('No')
    c = b

Submission status: Wrong Answer

Solution code:
N,K = map(int,input().split())
T = list(map(int,input().split()))
Number = []
for j in range(N-K+1):
    Num=1
    for i in range(K):
        Num *=T[i+j]/10**4
    Number.append(Num)

for p in range(N-K):
    if Number[p+1] - Number[p] >0:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
from operator import mul
from functools import reduce

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

for i in range(k):
        s = i
        e = i + k
        if pre == -1:
                pre = reduce(mul, a[s:e])
        else:
                now = reduce(mul, a[s:e])
                print('Yes' if now > pre else 'No')
                pre = now

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

S=[1]
P=20988936657440586486151264256610222593863921


for n in range (N):
    if n<K:
        S.append((A[n]*S[-1])%P)
    else:
        S.append(((A[n]*S[-1])%P)/A[n-K])

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
import numpy as np

def main():
	readline = stdin.readline
	A = [list(map(int, readline().split()))][0]
	N = A[0]
	K = A[1]
	A = [list(map(int, readline().split()))][0]
	score = np.array(A)
	grade = np.zeros(2)

	for i in range(N-K):
		if(i == 0):
			temp = np.prod(score[i:K+i])
			grade[0] = temp
		temp = np.prod(score[i+1:K+i+1])
		grade[1] = temp
		if(grade[0] < grade[1]):
			print("Yes")
		else:
			print("No")
		grade[0] = temp

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:

def Msol_C():
    import numpy as np
    n,k = list(map(int,input().split()))
    a = np.array(list(map(int,input().split())),dtype=np.float64)

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

Msol_C()

Submission status: Wrong Answer

Solution code:
def resolve():
	import numpy as np
	N, K = map(int, input().split())
	A = [int(i) for i in input().split()]
	prd = [1]
	prd.extend(np.cumprod(A))

	for l, r in enumerate(range(K, N)):
		if prd[r] / prd[l] < prd[r+1] / prd[l+1]:
			print("Yes")
		else:
			print("No")
resolve()

Submission status: Wrong Answer

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


for d in range(k-1):
	sum=0
	sum1=0
	for e in reversed(range(k-1)):
		if sum==0:
			sum=a[e+1+d]
		sum*=a[e+d]
	for f in reversed(range(k-1)):
		if sum1==0:
			sum1=a[f+2+d]
		sum1*=a[f+1+d]
	if sum1>sum:
		print("Yes")
	else:
		print("No")

Submission status: Wrong Answer

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-n+k+1]:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
import numpy as np

N, K = map(int, input().split())
A = np.array(input().split(), dtype=int)
score = [np.prod(A[i:i+K]) for i in range(N-K+1)]

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

Submission status: Wrong Answer

Solution code:
import numpy as np
n, k = map(int, input().split())
a = list(map(int, input().split()))
cum_a = np.cumprod(a)
cum_a = np.hstack([np.ones(1), cum_a])
for i in range(n - k):
    s = cum_a[i + k] / cum_a[i]
    t = cum_a[i + k + 1] / cum_a[i + 1]
    if s < t:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

for i in range(k-3,n-3):
    score1 = a[i]*a[i+1]*a[i+2]
    score2 = a[i+1]*a[i+2]*a[i+3]
    if score1<score2:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
import numpy as np

# = int(input())
# = str(input())
N, K = map(int, input().split())
A = list(map(int, input().split()))
# = [int(input()) for i in range(N)]
# = [list(map(int, input().split())) for i in range(N)]

first = np.asarray(A[:K])
fscore = np.prod(first)


for i in range(K, N):
    fq, score = divmod(fscore, 10**6)
    nextfscore = fscore * A[i] //A[i-K]
    q, nextscore = divmod(nextfscore, 10**6)
    if q > fq:
        print("Yes")
    elif q == fq and score < nextscore:
        print("Yes")
    else:
        print("No")
    fscore = nextfscore

Submission status: Wrong Answer

Solution code:
n,k=map(int,input().split())
lst_1=list(map(int,input().split()))
# print(lst_1)
lst_2=[]
for i in range(n-k+1):
    temp=1
    temp=lst_1[i+k-1]/lst_1[i]
    lst_2.append(temp)
for i in range(len(lst_2)-1):
    if lst_2[i]<lst_2[i+1]:
        print("Yes")
    else:print("No")

Submission status: Wrong Answer

Solution code:
M = 1000000007

N, K = map(int, input().split())
A = list(map(int, input().split()))
prefix = [1] * (N + 1)
for i, a in enumerate(A, 1):
    prefix[i] = prefix[i - 1] * a
    prefix[i] %= M

prev = prefix[K]
for i in range(K + 1, N + 1):
    cur = prefix[i] * pow(prefix[i - K], M - 2, M)
    cur %= M
    if cur > prev:
        print('Yes')
    else:
        print('No')
    prev = cur

Submission status: Wrong Answer

Solution code:
N, K, *A = map(int, open(0).read().split())
S = 1
for i in range(K):
    S *= A[i]
for i in range(N):
    unko = S
    if i + K < N:
        if i > 0:
            S = S * A[i + K] / A[i]
            if S > unko:
                print("Yes")
            else:
                print("No")
    else:
        exit

Submission status: Wrong Answer

Solution code:
import numpy as np
import sys
input = sys.stdin.readline
print = sys.stdout.write
N, K = map(int, input().split())
A = np.array(tuple(map(int, input().split())))
temp = np.prod(A[:K])
for i in range(1, N - K + 1):
  scr = np.prod(A[i:i+K])
  print('Yes\n' if scr > temp else 'No\n')
  temp = scr

Submission status: Wrong Answer

Solution code:
N, K = map(int, input().split())
A = list(map(int, input().split()))
stdlist = []
for i in range(K, N+1):
    std = 1
    for j in range(K):
        std *= A[i-j-1]
    stdlist.append(std)

X = stdlist

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

Submission status: Wrong Answer

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-n+k+2]:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
N,K=map(int,input().split())
A=list(map(int,input().split()))
point=[1.0]*(N+1)
for i in range(K):
    point[K]=point[K]*A[i]
M=N-K+1
for i in range(1,M):
    point[K+i]=point[K+i-1]*round(A[K+i-1]/A[i-1])
for i in range(M-1):
    if point[K+i]<point[K+i+1]:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(k - 2, n - 2):
    try:
        temp = a[i : i + k]
        count = 1
        for j in temp:
            count *= j
        
        temp = a[i - 1 : i + k - 1]
        count_old = 1
        for j in temp:
            count_old *= j
        
        if count_old < count:
            print("Yes")
            #, count_old, count
        else:
            print("No")
            #, count_old, count
    
    except:
        pass

Submission status: Wrong Answer

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

for i in range(k,n):
  if a[i-1]*a[i-2]*a[i-3] < a[i]*a[i-1]*a[i-2]:
    print('Yes')
    i += 1
  else:
    print('No')
    i += 1

Submission status: Wrong Answer

Solution code:
#標準入力
N,K = map(int,input().split())
lst = list(map(int,input().split()))

from operator import mul
from functools import reduce

# チェック回数
n=N-K

point_lst=[]

for i in range(n+1):
    slice_list = lst[i:(i+K)]
    a=reduce(mul, slice_list)
    point_lst.append(a)

for j in range(len(point_lst)-1):
    print('No') if (point_lst[j]) < (point_lst[j+1]) else print('Yes')

Submission status: Wrong Answer

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

l =[]
for i in range(n-k+1):
  l.append(a[i:i+k])

np.array(l)
lp = np.prod(l, axis = 1)

for j in range(n-k):
  if lp[j]<lp[j+1]:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
import numpy as np
tmp=[int(i) for i in input().split(' ')]
tmp_s=np.array([int(i) for i in input().split(' ')])
score=np.zeros(tmp[0]-tmp[1]+1)
for i in range(tmp[0]-tmp[1]+1):
  if i==0:
    score[0]=np.prod(tmp_s[:tmp[1]])
  else:
    if tmp_s[i-1]==0:
      score[i]=np.prod(tmp_s[i:i+tmp[1]])
      print(i+tmp[1])
    else:
      score[i]=tmp_s[i+tmp[1]-1]*score[i-1]/tmp_s[i-1]
    
    if score[i-1]<score[i]:
      print('Yes')
    else:
      print('No')

Submission status: Wrong Answer

Solution code:
M = 1000000007

N, K = map(int, input().split())
A = list(map(int, input().split()))
if K == 1:
    for a1, a2 in zip(A, A[1:]):
        if a2 > a1:
            print('Yes')
        else:
            print('No')
else:
    prefix = [1] * (N + 1)
    for i, a in enumerate(A, 1):
        prefix[i] = prefix[i - 1] * a
        prefix[i] %= M

    prev = prefix[K]
    for i in range(K + 1, N + 1):
        cur = prefix[i] * pow(prefix[i - K], -1, M)
        cur %= M
        if cur > prev:
            print('Yes')
        else:
            print('No')
        prev = cur

Submission status: Wrong Answer

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

for j in range (n - k):
    if a[j] == 0:
        ev_2 = ev_1     
    else:
        ev_2 = ev_1 * a[k + j] / a[j]
    if ev_1 < ev_2 :
        print("Yes")
    else:
        print("No")
    ev_1 = ev_2

Submission status: Wrong Answer

Solution code:
import numpy as np
 
N,K=map(int, input().split())
A=list(map(int, input().split()))
 
x=np.prod(A[0:K])
 
for i in range(N-K):
    y = x/A[i]*A[K+i]
    print('Yes' if int(x) < int(y) else 'No')
    x = y

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

# N = 200000
# K = 10000
# A = [10000] * N

dp = [0] * (N+1)

for i in range(K,N+1):

    if i == K:
        temp = 1
        for j in range(K):
            temp *= A[i-1-j]
        dp[i] = temp
        continue

    # dp[i] = int(dp[i-1] // A[i-1-K] * A[i-1])
    # print(dp)
    if i > K:
        if dp[i-1] < dp[i]:
            print('Yes')
        else:
            print('No')

Submission status: Wrong Answer

Solution code:
import numpy as np

N,K = map(int,input().split())
A = list(map(float,input().split()))
score = 1
score_list = []

for i in range(N-K+1):
  score_list.append(np.prod(A[i:i+K]))
#print(score_list)

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