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 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 = [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] = np.prod(a[i - k + 1:i + 1])
    if result[i-1] < result[i]:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

    for i, k in enumerate(range(K, N)):

        total1 = 1
        for i in scores[i + 1:k + 1]:
            total1 *= i

        total2 = 1
        for i in scores[i:k]:
            total2 *= i

        if total1 > total2:
            print('Yes')
        else:
            print('No')

if __name__ == '__main__':
    marks_C()

Submission status: Wrong Answer

Solution code:
import math
from decimal import *


def _run(n, k, a_list):
    integral_windows = [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:
            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: Wrong Answer

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

k_1 = 1
k = 1

for i in range(N):
    if i < K:
        k *= b[i]
    else:
        k_1 = k
        k *= (b[i] / b[i-K])
        # if k > k_1:
        #     print("Yes")
        # else:
        #     print("No")

Submission status: Wrong Answer

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

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

score = [0]*N
dq = []

score_now = 1
for i in range(0, K):
    score_now *= A[i]
    score_now %= 10**9 + 7
left = A[0]
index = 0

for j in range(K-1, N-1):
    score[j] = score_now

    score_now /= left
    index += 1
    left = A[index]
    score_now *= A[j+1]
    score_now %= 10**9 + 7
score[N-1] = score_now % (10**9 + 7)

print(score)
for k in range(K, N):
    if score[k] > score[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()))

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+1
    else:
        # S.append(A[n]*S[-1]/A[n-K])
        dictS[n]=A[n]*dictS[n-1]/A[n-K]/10**9+1

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

Submission status: Wrong Answer

Solution code:
import math
import collections
import fractions
import itertools
import functools
import operator

def solve():
    n, k = map(int, input().split())
    a = [1] + list(map(int, input().split()))
    hoge = 1
    ruiseki = []
    for i in range(k):
        hoge *= a[i+1]
    for i in range(k, n+1):
        ruiseki.append(hoge//a[i-k]*a[i])
    print(ruiseki)
    for i in range(n-k):
        if ruiseki[i] < ruiseki[i+1]:
            print("Yes")
        else:
            print("No")
    return 0

if __name__ == "__main__":
    solve()

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-2,N-1):
  if(point[i]>=point[i+1]):
    print("No")
  else:
    print("Yes")

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] = result[i-1]*a[i]/a[i-k]
    if result[i-1] < result[i]:
        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(x1)] < grade_list[int(x2)]:
        print("yes2")
    else:
        print("no")
    x1 += 1
    x2 += 1

Submission status: Wrong Answer

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

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 = []
for i in range(n-k+1):
    aList_kai.append(np.prod(aList[i:i+k]))
ptr = 0
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

def main():
    n,k = map(int, input().split())
    a = list(map(int, input().split()))
    a_sum = [1]*n

    for i in range(0,n+1-k):
        a_sum[i] = np.prod(a[i:k+i])
        if i != 0:
            if a_sum[i] > a_sum[i-1]:
                print("Yes")
            else:
                print("No")
   
if __name__ == "__main__":
    main()

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)

ans = [0]*len(a[k-1:])
for i in range(len(a[k-1:])):
    ans[i]=np.prod(a[i:k+i])
    
for i in range(len(a[k-1:])-1):
    if ans[i]<ans[i+1]:
        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()))
hyouten = []


for i in range(k, n+1):
    soten = a[i-k:i]
    hyouten.append(np.prod(soten))

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

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 = []

s = N - K

for i in range(N + 1):
    if i - K < 0:
        continue
    res.append(np.cumprod(risu[i - K: i]))

for j in range(len(res) - 1):
  if res[j + 1][K - 1] > res[j][K - 1] :
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
res_mem = {}

def dot(arr):
  try:
    if(res_mem[str(tuple(arr))] != None):
      return res_mem[tuple(arr)]
  except:
    res = 1
    for i in arr:
      res=(res*i)%1000000000
    res_mem[str(tuple(arr))] = res
    return res
    
if __name__ == "__main__":
  n,k = map(int,input().split())
  arr = list(map(int,input().split()))
  for i in range(n-k):
    if(dot(arr[i:k+i])<dot(arr[i+1: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()))
S =[1]*N
# int S
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")

Submission status: Wrong Answer

Solution code:
import numpy as np

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

for j,i in enumerate(range(a-b)):
        tmp1 = np.prod(c[i:k+j])
        tmp2 = np.prod(c[i+1:k+1+j])
        if tmp2 > tmp1:
            print("Yes")
        else:
            print("No")

Submission status: Wrong Answer

Solution code:
n,k= list(map(int, input().strip().split()))
a = list(map(int, input().strip().split()))
b=[1]*n
for j in range(0,k):
        b[k-1]*=a[j]
for i in range(k+1,n+1):
    b[i-1]*=b[i-2]*a[i-1]//a[i-k-1]
print(b)
    

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

Submission status: Wrong Answer

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):
        current = previous // a[i-k] * a[i]
        if debug:
            log("previous=%d, current=%d" % (previous, current))

        if current > previous:
            result.append('Yes')
        else:
            result.append('No')

        current = previous          

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

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[g]<ans[g+1]:
      print("Yes")
    else:
      print("No")
    g+=1

Submission status: Wrong Answer

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

scores = [A[i] * A[i-1] * A[i-2] for i in range(K-1, N)]
for i, S in enumerate(scores):
    if i == 0:
        continue
    if S > scores[i - 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")
    else:
        print("No")
    base = base1

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+K]:
        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 = []
for i in range(N):
    seiseki.append(A[i])
    if i == K-1:
        seiseki2.append(reduce(lambda a, b: a * b, seiseki, 1))
    elif i > K - 2:
        seiseki2.append(
            seiseki2[-1] // A[i - (N-K) + 1] * A[i])

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

Submission status: Wrong Answer

Solution code:
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**9)+0.1
#for i in range(K):
 #   a*=A[i]
#print(a)   
ten[0]=a
for i in range(1,(N-K+1)):
    ten[i]=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:
import numpy as np

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

for i in range(N-K):
  if np.prod(A[i:i+K]) < np.prod(A[i+1:i+K+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):
  score[i]=np.prod(tmp_s[i:i+tmp[1]])
  if i>0:
    if score[i-1]<score[i]:
      print('Yes')
    else:
      print('No')
0

Submission status: Wrong Answer

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

k_1 = 1
k = 1

for i in range(a[0]):
    print(i)
    if i < a[1]:
        k = k * b[i]
    else:
        k_1 = k
        k = k * b[i] / b[i-a[1]]
        if k > k_1:
            print("Yes")
        else:
            print("No")

Submission status: Wrong Answer

Solution code:
import numpy as np

n, k = map(int, input().split())
a = tuple(map(int, input().split()))
i = 1
prev = np.prod(a[:k])

while i+k <= n:
  tmp = np.prod(a[i:i+k])
  if tmp > prev:
    print('Yes')
  else:
    print('No')
  prev = tmp
  i += 1

Submission status: Wrong Answer

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

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

score = [0]*N
dq = []

score_now = 1
for i in range(0, K):
    score_now *= A[i]
    score_now %= 10**9 + 7
left = A[0]
index = 0

for j in range(K-1, N-1):
    score[j] = score_now

    score_now /= left
    index += 1
    left = A[index]
    score_now *= A[j+1]
    score_now %= 10**9 + 7
score[N-1] = score_now % (10**9 + 7)


for k in range(K, N):
    if score[k] > score[k-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()))
scores = []

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

for i in range(len(scores)-1):
    if scores[i] < scores[i+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()]

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

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

Submission status: Wrong Answer

Solution code:
#MSOL C
import numpy as np

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

def checker(i):
  l = A[i-K:i:]
  return np.prod(l)

bscore = checker(K)
for i in range(K+1,N+1):
  ascore = checker(i)
  if (bscore < ascore):
    print("Yes")
  else:
    print("No")
  bscore = ascore

Submission status: Wrong Answer

Solution code:
import numpy as np
n,k=map(int,input().split())
a=list(map(int,input().split()))
s=np.prod(a[:k])
for i in range(0,n-k):
    if a[i]!=0:
        ns=s/a[i]*a[i+k]
    else:
        ns=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 = 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 = np.prod(a[i+1:k+i+1])
    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,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]
    tot=tot*A[x]
    if(tot>temp):
        print("Yes")
    print("No")
    temp=tot

Submission status: Wrong Answer

Solution code:
import sys
import itertools


def resolve(in_, out):
    n, k = map(int, next(in_).split())
    a = tuple(map(int, next(in_).split()))

    b, c = itertools.tee(a)
    c = itertools.islice(c, k, None)
    for v, w in zip(b, c):
        s = 'Yes' if v < w else 'No'
        print(s, file=out)
        


def main():
    answer = resolve(sys.stdin.buffer, sys.stdout)
    print(answer)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

now = 1
pre = 0
for i in range(0,n[1]):
    now *= a[i]

now %= 100019

for i in range(n[1],n[0]):
    pre = now
    if a[i-n[1]] == 0:
        now = 1
    else:
        now /= a[i-n[1]]
    now *= a[i]

    now %= 100019
    if now > pre:
        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=[]
leng=tmp[0]-tmp[1]+1
for i in range(leng):
  t=np.prod(tmp_s[i:i+tmp[1]])
  score.append(t)
  if i>0:
    if score[i-1]<score[i]:
      print('Yes')
    else:
      print('No')
0

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**10)
    nextfscore = fscore * A[i] //A[i-K]
    q, nextscore = divmod(nextfscore, 10**10)
    if q > fq or (q == fq and nextscore > score):
        print("Yes")
    else:
        print("No")
    fscore = nextfscore

Submission status: Wrong Answer

Solution code:
import numpy as np

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

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

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

Submission status: Wrong Answer

Solution code:
#C
N, K = map(int, input().split())
A = list(map(int, input().split()))
p=[]
import numpy as np
for i in range(N-K+1):
    if i==0:
        ans=np.prod(A[i:i+K])
    else:
        ans=(ans*A[i+K-1])//A[i-1]
    p.append(ans)

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

Submission status: Wrong Answer

Solution code:
import numpy as np
n, k=map(int, input().split())
plist = list(map(int, input().split()))
last = 0
for i in range(n - k + 1):
  point = np.prod(plist[i:k+i])
  if i > 0:
    if point > last:
      print("Yes")
    else:
      print("No")
  last = point

Submission status: Wrong Answer

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

res = N - K
last = A[K-3] * A[K-2] * A[K-1]

for i in range(1, res+1):
  mul = 1
  for j in range(1, K+1):
    mul = mul * A[K+i-j]
  if mul > last:
    print("Yes")
  else:
    print("No")
  last = mul

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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**10)
#for i in range(K):
 #   a*=A[i]
#print(a)   
ten[0]=a
for i in range(1,(N-K+1)):
    ten[i]=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:
import numpy as np
N, K = map(int, input().split())
A = list(map(int, input().split()))
A = np.array(A)

scores = []

for i in range(0, N - K + 1):
    scores.append(A[i:i+K].prod())

for i in range(0, len(scores)-1):
    if scores[i] < scores[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 = x*A[K+i-1]/A[i-1]
        y = x*A[K+i]/A[i]
        print('Yes' if x < y else 'No')

Submission status: Wrong Answer

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

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

for i in range(N):
    A[i] /= (10**9 + 7)

score = [0]*N
dq = []

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

for j in range(K-1, N-1):
    score[j] = score_now

    score_now /= left
    index += 1
    left = A[index]
    score_now *= A[j+1]
score[N-1] = score_now


for k in range(K, N):
    if score[k] > score[k-1]:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

k_1 = 1
k = 1

for i in range(a[0]-1):
    if i < a[1]:
        k = k * b[i]
    else:
        k_1 = k
        k = k * b[i] / b[i-a[1]]
        if k > k_1:
            print("Yes")
        else:
            print("No")

Submission status: Wrong Answer

Solution code:
n,k = map(int,input().split())
a = list(input().split())
count = 0
tmp = 1
check = []
for _ in range(n - k + 1):
    for i in range(k):
        tmp *= int(a[i + count])
    check.append(tmp)
    tmp = 1
    count += 1

for j in range(n - k):
    if check[j] > check[j + 1]:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

for n in range(N-K):
    if AA[n]<AA[n+1]:
        print('Yes')
    elif AA[n]>=AA[n+1]:
        print('No')

Submission status: Wrong Answer

Solution code:
from functools import reduce

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

hyouten = reduce(lambda x,y:x*y, a[0:k])

for i in range(k+1, n+1):
    hyouten_next = reduce(lambda x,y:x*y, a[i-k:i])
    if hyouten_next>hyouten:
        print('Yes')
        hyouten = hyouten_next
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
#C
N, K = map(int, input().split())
A = list(map(int, input().split()))
p=[]
import numpy as np
for i in range(N-K+1):
    if i==0:
        ans=np.prod(A[i:i+K])
    else:
        ans=ans*A[i+K-1]/A[i-1]
    p.append(ans)

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

Submission status: Wrong Answer

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

    tmp = 1
    for i in range(k):
        tmp = tmp * a[i]
    
    previous = tmp
    result = []
    for i in range(k, n):
        current = previous // a[i-k] * a[i]
        if debug:
            log("previous=%d, current=%d" % (previous, current))

        if current > previous:
            result.append('Yes')
        else:
            result.append('No')

        current = previous          

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

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**10)
    nextfscore = np.prod(A[i-K+1:i+1])
    q, nextscore = divmod(nextfscore, 10**10)
    if q > fq or (q == fq and nextscore > score):
        print("Yes")
    else:
        print("No")
    fscore = nextfscore

Submission status: Wrong Answer

Solution code:
import numpy as np

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

B = []
for i in range(N - K + 1):
    tmp = np.prod(A[i: i + K])
    B.append(tmp)

    if i > 0:
        if B[i] > B[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()))

old = 0

for i in range(k,n+1):
  if i == k:
    new = 1
  elif i != k:
    new = a[i-1] / a[i-k-1]
    if new > old:
      print("Yes")
    else:
      print("No")
  old = new

Submission status: Wrong Answer

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

def N_score(n):
    Score = 1
    for i in range(n - (K - 1), n + 1):
        Score *= A[i]
    return Score

for i in range(K, N):
    if(N_score(i-1) < N_score(i)):
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
n, k = map(int, input().split())
a = list(map(int, input().split()))
grade_array = []
for i in range(k,n+1) :
        grade = 1
        for j in range(k) :
            grade *= a[i-1-j]
        grade_array.append(grade)

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

Submission status: Wrong Answer

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

now = 0
pre = 0
for i in range(0,n[1]):
    now += a[i]

for i in range(n[1],n[0]):
    pre = now
    if a[i-n[1]] == 0:
        now = 1
    else:
        now /= a[i-n[1]]
    now *= a[i]
    if now > pre:
        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
for i in range(k):
  point = point*a[i]

for j in range(k, n):
  point0 = point
  point = point*a[j]/a[j-1]
  if point > point0:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import numpy as np

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

temp = np.prod(a[0:k])
for i in range(n-k):
    next_temp = (temp * a[i+k])/a[i]
    if temp < next_temp:
        print("Yes")
    else:
        print("No")
    
    temp = next_temp

Submission status: Wrong Answer

Solution code:
#3

n, k = map(lambda x: int(x), input().split())
list_a =  list(map(lambda x: int(x), input().split()))
list_score = []

for i in range(n):
    if i < k - 1:
        continue
    print(i-k, i+1)
    list_score.append(sum(list_a[i-k+1:i+1]))
# print(list_score)

score_before = list_score[0]
for score in list_score[1:]:
    if score_before < score:
        print('Yes')
        score_before = score
        continue
    print('No')
    score_before = score

Submission status: Wrong Answer

Solution code:
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=200000*(10**10)
#for i in range(K):
 #   a*=A[i]
#print(a)   
ten[0]=a
for i in range(1,(N-K+1)):
    ten[i]=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:
import numpy as np

n,k= map(int,input().split())
a = list(map(int,input().split()))
target = a[0:k]
p = np.prod(target)
# print(p)
for i in range(n-k):
    target.pop(0)
    target.append(a[i+k])
    ans = np.prod(target)
    # print(ans)
    if ans > p:
        print("Yes")
    else:
        print("No")
    p = ans

Submission status: Wrong Answer

Solution code:
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=200000*(10**10)
#for i in range(K):
 #   a*=A[i]
#print(a)   
ten[0]=a
for i in range(1,(N-K+1)):
    ten[i]=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:
import numpy as np
n,k=map(int,input().split())
a=list(map(int,input().split()))
s=np.prod(a[:k])
for i in range(1,n-k+1):
    ns=np.prod(a[i:k+i])
    if ns>s:
        print("Yes")
    else:
        print("No")
    s=ns

Submission status: Wrong Answer

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

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