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:
import sys, os, math, bisect, itertools, collections, heapq, queue, copy, array

# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
# from decimal import Decimal
# from collections import defaultdict, deque

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N, K = il()
    A = il()

    tmp = 0
    for k in range(K, N + 1):
        ret = 1
        for a in A[k - K:k]:
            ret *= a
            ret %= MOD

        if tmp != 0 and tmp < ret:
            print('Yes')
        elif tmp != 0 and tmp >= ret:
            print('No')

        tmp = ret


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import numpy as np

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

ans=A[0]
for i in range(1,K):
   ans*=A[i]


for i in range(K,N):
    preans=ans
    ans=ans//A[i-K]*A[i]
    if ans>preans:
        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
for i  in range(k):
    wknum *= A[i]

score[0] = wknum

for i in range(n - k):
    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:
def main():
	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 = np.prod(score[i:K+i])
			grade[i] = temp
		temp = np.prod(score[i+1:K+i+1])
		grade[i+1] = temp
		if(grade[i] < grade[i + 1]):
			print("Yes")
		else:
			print("No")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

sum =[0]*n
ans =[0]*n

for i in range(n):
    if i==0:
        sum[i]=a[i]
    else:
        sum[i]=sum[i-1]*a[i]
        if i==k-1:
            ans[i]=sum[i]
        elif i>k-1:
            ans[i]=int(sum[i]/sum[i-k])
            if ans[i]>ans[i-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:
    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 numpy as np

n, k = map(int, input().split()) 
a_list = list(map(int, input().split()))
a_list.insert(0, 0)
# print(a_list)

pre = 0
for i in range(n - k + 1):
    # print(f"{1 + i} {k + i}")
    # p[1 + i]
    start = 1 + i
    end = k + i
    p = np.prod(a_list[start:end + 1])
    # print(p)
    
    if i == 0:
        pre = p
    else:
        if p > pre:
            print("Yes")
        else:
            print("No")
        pre = p

Submission status: Wrong Answer

Solution code:
m=list(map(int,input().split()))
n,k=m[0],m[1]
a=list(map(int,input().split()))
new =[]
for i in range(k-1,n):
    b=a[i]
    for j in range(1,n-k+1):
        if i-j < 0:
            break
        b*=a[i-j]
        
    
    new.append(b)
for i in range(1,len(new)):
    if new[i]>new[i-1]:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
import numpy as np

data = input().split(" ")
N = int(data[0])
K = int(data[1])
score = input().split(" ")

num = N-K+1
ten = [1]*(num)
for i in range(num):
  temp = []
  for j in range(K):
    temp.append(int(score[K+i-1-j]))
  ten[i] = temp
ten_n = np.array(ten)
p = np.prod(ten_n, axis = 1)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np

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

scores = []
scores.append(a[0:k].prod())

for j in range(k, n):
    scores.append(a[j:j-k:-1].prod())
    #scores.append(scores[-1] * a[j] / a[j-k])
    if scores[-1] > scores[-2]:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

length = len(a)
res = [1] * length
for i in range(n-k-1, n):
    if i < 0:
        continue
    for j in range(k):
        if i-k+1 < 0:
            break
        res[i] *= a[i-j]

ans = []
for i in range(n-k):
    if res[n-i-1] > res[n-i-2]:
        cur = 'Yes'
    else:
        cur = 'No'
    ans.append(cur)
for i in reversed(ans):
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

score = []
for i in range(len(A)-K+1):
    score.append(np.prod(A[i:K+i]))

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8

import itertools
from functools import reduce
from collections import deque

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

seiseki = deque([])
seiseki2 = []
now_seiseki = 1
before_seiseki = 0
for i in range(N+1):
    if i < K:
        now_seiseki *= A[i]
    elif i == K:
        before_seiseki = now_seiseki
    elif i > K - 2:
        now_seiseki = (now_seiseki // A[i - (N-K) - 2]) * A[i-1]
        if before_seiseki < now_seiseki:
            print("Yes")
        else:
            print("No")
        before_seiseki = now_seiseki

Submission status: Wrong Answer

Solution code:
import numpy as np
n, k = [int(k) for k in input().split()]
a = np.array([int(k) for k in input().split()], dtype=int)
before = 0
for i in range(k, n + 1):
    t = 1
    for j in range(i - k, i):
        t *= a[j]
    if i != k:
        # print(t)
        if before < t:
            print('Yes')
        else:
            print('No')
    before = t

Submission status: Wrong Answer

Solution code:
N, K = input().split()
N = int(N)
K = int(K)
scores = [int(s) for s in input().split()]
sums = []
for i in range(K,N):
    c1 = c2 = 1
    j = i
    while (j>i-K): 
        c1 *= scores[j-1]
        c2 *= scores[j]
        j -= 1
    print(c1, c2)
    if c1 < c2:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

fff = 0

for i in range(k, n+1):
    soten = a[i-k:i]
    hyouten_ima = np.prod(soten)
    if fff == 0:
        fff = 1
        hyouten_mae = hyouten_ima
        continue
    if hyouten_ima > hyouten_mae:
        print("Yes")
    else:
        print("No")
    hyouten_mae = hyouten_ima

Submission status: Wrong Answer

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

def main():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    tmp = np.prod(a[:k])
    for i in range(k, n):
        if tmp < tmp//a[i-k]*a[i]:
            print('Yes')
        else:
            print('No')
        tmp = tmp//a[i-k]*a[i]    
            
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
M = 10 ** 9 + 7

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) % M

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def ip():
  	return list(map(int, input().split()))
[n,k]=ip()
arr=ip()
res=1
u=k-1
for i in range(k):
  res*=arr[i]
s=0
e=k
while u:
  temp=(res//arr[s])*arr[e]
#   print(temp, res, arr[s], arr[e])
  if res<temp:
    print("Yes")
  else:
    print("No")
  res=temp
  s+=1
  u-=1
  e+=1

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(n-k):
    a_i = np.prod(a[i:k+i])
    a_i2 = np.prod(a[i+1:k+i+1])

    if a_i < a_i2:
        print('Yes')
    else:
        print('No')

        a.pop(0)

Submission status: Wrong Answer

Solution code:
import numpy as np
n,k = map(int, input().split())
a = np.array([int(i) for i in input().split()])
a = np.concatenate([a,np.ones(k)])
for i in range(1,k):
    a = a * np.roll(a,i)
a = a[k-1:n]
for i in range(len(a)-1):
    if a[i] - a[i+1] < 0:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

A = list(map(int, input().split()))
A = np.array(A)
sc = np.prod(A[0:K])
for i in range(N-K):
  tmp = sc
  sc = sc * A[K+i] / A[i]
  if tmp < sc:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

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

dictS={}
dictS[0]=1

for n in range (1,N):
    if n<K:
        # S.append(A[n]*S[-1])
        dictS[n]=(A[n]*dictS[n-1])%(10**9+7)

    else:
        # S.append(A[n]*S[-1]/A[n-K])
        dictS[n]=(A[n]*dictS[n-1]/A[n-K])%(10**9+7)

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

Submission status: Wrong Answer

Solution code:
import numpy as np
from collections import deque
n,k=map(int,input().split())
a=list(map(int, input().split()))
def func1(lst, value):
    return [i for i, x in enumerate(lst) if x == value]
zero=deque(func1(a,0))
if len(zero)>0:
    tmp=zero.popleft()
else:
    tmp=-1
a=np.array(a)
hyou=np.zeros(n)
hyou[k-1]=np.prod(a[:k])
for i in range(k,n):
    if i-k==tmp:
        hyou[i]=np.prod(a[tmp+1:i+1])
        if len(zero)>0:
            tmp=zero.popleft()
    else:
        hyou[i]=hyou[i-1]*a[i]//a[i-k]
    if hyou[i]>hyou[i-1]:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
terms, graded_terms = input().split(" ")
grade_list = [i for i in input().split(" ")]
x1 = 0
x2 = int(graded_terms)
for i in range(int(terms)-int(graded_terms)):
    if grade_list[int(x2)] > grade_list[int(x1)]:
        print("yes")
    else:
        print("no")
    x1 += 1
    x2 += 1

Submission status: Wrong Answer

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

b = []

ans = 1
prev = 1
once = 1
for i in range(k - 1, n):
    prev = ans
    ans = a[i] * a[i - 1] * a[i - 2]
    if(once):
        once = 0
    else:
        if(ans > prev):
            once = 0
            # b.append("Yes")
            print("Yes")
        else:
            # b.append("No")
            print("No")

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

Submission status: Wrong Answer

Solution code:
import numpy as np

N, K = map(int, input().split())
risu = np.array(list(map(int, input().split())))

res = np.cumprod(risu[0: K])

for i in range(K + 1, N +1):
    if np.cumprod(risu[i - K: i])[K - 1] > res[K - 1]:
        print('Yes')
    else:
        print('No')
    res = np.cumprod(risu[i - K: i])

Submission status: Wrong Answer

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

ans = []
g = 0
for i in range(K):
  k = 1
  for s in range(K):
    k *= a[s+i] 
  ans.append(k)
  if len(ans)>1:
    if ans[0]<ans[1]:
      print("Yes")
    else:
      print("No")
    del ans[0]

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[0: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 numpy as np

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

result = [0]*n
result[k-1] = np.prod(a[0:k])

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

Submission status: Wrong Answer

Solution code:
N, K = map(int, input().split())
A = tuple(map(int, input().split()))
pre = 1
for i in range(K):
  pre *= A[i]
for i in range(1,N - K + 1):
  z = (pre // A[i - 1]) * A[i + K - 1]
  if pre < z:
    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)], dtype = np.int64)
wknum = 1
for i  in range(k):
    wknum *= A[i]

score[0] = wknum

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

Solution code:
N, K = map(int, input().split())
A_list = list(map(int, input().split()))
tmp = [1] * 200010

for i in range(K, N+1):
    for j in A_list[i-K:i]:
        tmp[i] *= j
print(tmp)
for i in range(K+1, K+1+N-K):
    if tmp[i] > tmp[i-1]:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np

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

A_past = np.prod(A[:K])

for i in range(N-K):
  A_now = A_past*A[i+K]/A[i]
  if A_now > A_past:
    print("Yes")
  else:
    print("No")
  A_past = A_now

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

n,k = map(int,input().split())
A = list(map(int,input().split()))
b=[]
s=0
for x in range(k):
    c=A[s:k+s:1]
    s+=1
    d=1
    for y in c:
      d=d*y
    b.append(d)

q=0
for z in range(k-1):
  if b[q]<b[q+1]:
    print("Yes")
  else:
    print("No")
  q+=1

Submission status: Wrong Answer

Solution code:
import numpy as np

N, K = map(int, input().split())
A = np.array([int(i) for i in input().split()])
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:
n, k = map(int, input().split(' '))
a = list(map(int, input().split(' ')))
score = 1
for i in range(k, n):
    if score < score*a[i]/a[i-k]:
        print('Yes')
    else:
        print('No')
    score = score*a[i]/a[i-k]

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import numpy as np
n, k = map(int, input().split())
a = list(map(int, input().split()))
hyouten = []
fff = 0

for i in range(k, n+1):
    soten = a[i-k:i]
    hyouten.append(np.prod(soten))
    if fff == 0:
        fff = 1
        continue
    if hyouten[-1] > hyouten[-2]:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

ai = N-K

for i in range (ai):
    if A[K+i]>A[K+i-1]:
        print('Yes')
    elif A[K+i]==A[K+i-1]:
        print('No')
    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()))
 
x=np.prod(A[0:K])
y=np.prod(A[1:K+1])
 
for i in range(N-K):
    if i == 0:
        print('Yes' if x < y else 'No')
    else:
        x = int(x*A[K+i-1]/A[i-1])
        y = int(y*A[K+i]/A[i])
        print('Yes' if x < y else 'No')

Submission status: Wrong Answer

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

Ki_sum1 = np.prod(A[:K])

for i in range(N-K):
  Ki_sum2 = np.prod(A[i+1:K+i+1])
    
  if Ki_sum1 < Ki_sum2:
    print("Yes")
  else:
    print("No")
  
  Ki_sum1 = Ki_sum2

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np
import math
import collections
import copy
from collections import deque 
from functools import reduce
from itertools import product

N, K = map(int, input().split())
An = [list(map(int, input().split()))]
An_np = np.array(An).reshape(-1)
for i in range(K, N):
#     print(i)
    t1 = np.prod(An_np[i-K:i])
    t2 = np.prod(An_np[i-K+1:i+1])
#     print(t1, t2)
    if t2 > t1:
        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()))
s=int(np.prod(a[:k]))
for i in range(n-k):
    if a[i]!=0:
        ns=int(s/a[i]*a[i+k])
    else:
        ns=int(np.prod(a[i+1:i+1+k]))
    if ns>s:
        print("Yes")
    else:
        print("No")
    s=ns

Submission status: Wrong Answer

Solution code:
import numpy as np

N, K = map(int, input().split())
risu = np.array(list(map(int, input().split())))

res = np.cumprod(risu[0: K])

s = N - K

for i in range(N + 1):
    if i - K <= 0:
        continue
    if np.cumprod(risu[i - K: i])[K - 1] > res[K - 1]:
        print('Yes')
    else:
        print('No')
    res = np.cumprod(risu[i - K: i])

Submission status: Wrong Answer

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**15)+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: Wrong Answer

Solution code:
M = 10**9 + 7


def prod(A):
    ans = 1
    for a in A:
        ans *= a % M
    return ans


def solve():
    N, K = [int(x) for x in input().split()]
    A = [int(x) for x in input().split()]
    p = prod(A[0:K + 1])  # K学期目の評点
    for i in range(K + 1, N):
        if p * A[i] % M * (1 / A[i - (K + 1)]) % M > p:
            print('Yes')
        else:
            print('No')
        p *= (1 / A[i - (K + 1)]) % M


if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

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

M = N-K

if M == 1:
  if score_list[K-1] < score_list[K]:
    print("Yes")
  else:
    print("No")

else:
  for i in range(M):
    if sum(score_list[i:i+K]) < sum(score_list[i+1:i+K+1]):
      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 = np.prod(score[i:K+i])
    grade[i] = temp/1000
  temp = np.prod(score[i+1:K+i+1])
  grade[i+1] = temp/1000
  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:
N,M = map(int,input().split())
a = list(map(int,input().split()))
a_list =[]
for i in range(M-1,N):
  a_num =1
  for j in range(i-M+1,i+1):
    a_num = a_num*a[j]
  a_list.append(a_num)
  if i>M-1:
    if a_list[i-M]<a_list[i-M+1]:
      print("YES")
    else:
      print("NO")

Submission status: Wrong Answer

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

base = np.prod(score[:K])
for i in range(K,N):
    base1 = base//score[i-K]*score[i]


    if base<base1:
        print("Yes")
    if base1<=base:
        print("No")
    base = base1

Submission status: Wrong Answer

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

tmp = []

t = 0
for i in range(k - 1, -1, -1):
    if t == 0:
        t = a[n - k - i]
    else:
        t *= a[n - k - i]
tmp.append(t)

c = 0
for i in range(n - k):
    ai = n - (n - k) + i
    t = int(tmp[c] / a[ai - k])
    t *= a[ai]

    if tmp[c] < t:
        print('Yes')
    else:
        print('No')

    tmp.append(t)
    c += 1

Submission status: Wrong Answer

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

score = 0
for i in range(len(A)-K+1):
    t = np.prod(A[i:K+i])
    if i >= 1:
        if score >= t:
            print("No")
        else:
            print("Yes")
    score = t

Submission status: Wrong Answer

Solution code:
import numpy as np
from collections import deque
n,k=map(int,input().split())
a=list(map(int, input().split()))
def func1(lst, value):
    return [i for i, x in enumerate(lst) if x == value]
zero=deque(func1(a,0))
if len(zero)>0:
    tmp=zero.popleft()
else:
    tmp=-1
a=np.array(a)
hyou=np.zeros(n)
hyou[k-1]=np.prod(a[:k])
for i in range(k,n):
    if i-k==tmp:
        hyou[i]=np.prod(a[tmp+1:i+1])
        if len(zero)>0:
            tmp=zero.popleft()
        if i-k<tmp<=i:
            hyou[i]=0
    else:
        hyou[i]=hyou[i-1]*a[i]//a[i-k]
    if hyou[i]>hyou[i-1]:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
def dot(arr):
  res = 1
  for i in arr:
    res=(res*i)%1000000000
  return res
    
if __name__ == "__main__":
  n,k = map(int,input().split())
  arr = list(map(int,input().split()))
  for i in range(n-k):
    if(i == 0):
      if(dot(arr[i:k+i])<dot(arr[i+1:k+i+1])):
        print("Yes")
      else:
        print("No")
    else:
      if(arr[i]<arr[k+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(N-K):
  Ki_sum1 = np.prod(A[i:K+i])
  
  Ki_sum2 = np.prod(A[i+1:K+i+1])
    
  if Ki_sum1 < Ki_sum2:
    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()))
ep = K
fp = 0
bs = np.prod(A[fp:ep])
for i in range(1, N - K + 1):
    s = np.prod(A[fp + i: ep + i])
    if s > bs:
        print('Yes')
    else:
        print('No')
    bs = s

Submission status: Wrong Answer

Solution code:
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
count = 0
ans = "No"

N,K = I()
A = l()

before = 1

for i in range(N-K):
    after = before / A[i] * A[K+i]
    if after > before:
        print("Yes")
    else:
        print("No")
    before = after

Submission status: Wrong Answer

Solution code:
import numpy as np

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

ans = []
point_before = np.prod(a[:k])

for i in range(n-k):
    point = point_before / a[i] * a[k+i]
    if point_before < point:
        ans.append('Yes')
    else:
        ans.append('No')
    point_before = point
    # print(point_before)

for a in ans:
    print(a)

Submission status: Wrong Answer

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

zenki = a[k-1]
#print(zenki)

for i in range(k-1):
  zenki *= a[k-2-i]
  #print(zenki)

count = k

while count < n:
  konki = (zenki / a[count-k] * a[count])
  #print(konki)
  if konki > zenki :print("YES")
  else:print("NO")
  zenki = konki
  count += 1

Submission status: Wrong Answer

Solution code:
# [] = list(map(int, input().split()))
# = map(int, input().split())

import numpy as np
[n, k] = list(map(int, input().split()))
aList = list(map(int, input().split()))
aList_kai = []
aList_kai.append(np.prod(aList[0:0+k]))
for i in range(1,n-k+1):
    aList_kai.append(np.prod(aList[i:i+k]))
    
    if aList_kai[i] > aList_kai[i-1]:
        print("Yes")
    else:
        print("No")
# for i in range(1, n-k+1):
#     if aList_kai[i] > aList_kai[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()))
 
x=np.prod(A[0:K])
y=np.prod(A[1:K+1])

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

Submission status: Wrong Answer

Solution code:
# vim: fileencoding=utf-8


def main():
    n, k = map(int, input().split())
    aList = list(map(int, input().split()))
    hyoukaList = []
    c = 1
    beforeHyouka = 0
    for i in aList:
        hyoukaList = list(map(lambda x: x * i, hyoukaList))
        hyoukaList.append(i)
        hyouka = hyoukaList[0]

        if c <= k:
            c += 1
            if c == k:
                hyoukaList = hyoukaList[1:]
                beforeHyouka = hyouka
            continue

        hyoukaList = hyoukaList[1:]
        if beforeHyouka < hyouka:
            print("Yes")
        else:
            print("No")
        beforeHyouka = hyouka


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n,k = map(int,input().split())
a = list(map(int,input().split()))
temp = sum(a[:k])
i = k
for _ in range(n-k):
    score = (temp*a[i])//a[i-k]
    print("Yes" if score>temp else "No")
    temp = score
    i+=1

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 = np.prod(score[i:K+i])
    grade[i] = temp
  temp = np.prod(score[i+1:K+i+1])
  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()))
grade=[]
result = [0] * (N+1-K)
for i in range(K,N+1):
    grade.append(A[i-K:i])
    result[i-K] = np.prod(grade[i-K])
    if i!= K :
        if result[i-K] > result[i-K-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 j in range(k-1,n-1):
	sum=a[j]*a[j-1]*a[j-2]
	sum1=a[j+1]*a[j]*a[j-1]
	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()))
point=[1]*N
for i in range(K-1,N):
  for j in range(K):
    point[i]*=A[i-j]
for i in range(N-K,N-1):
  if(point[i]>=point[i+1]):
    print("No")
  else:
    print("Yes")

Submission status: Wrong Answer

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

dictS={}
dictS[0]=1


for n in range (1,N):
    
    if n<K:
        # S.append(A[n]*S[-1])
        dictS[n]=A[n]*dictS[n-1]/10**9+7
    else:
        # S.append(A[n]*S[-1]/A[n-K])
        dictS[n]=A[n]*dictS[n-1]/A[n-K]/10**9+7

    if n>=K:
        if dictS[n]>dictS[n-1]:
            print('Yes')
        else:
            print('No')