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

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

Submission status: Wrong Answer

Solution code:
N, K = map(int, input().split())
A = list(map(int, input().split()))
ACC = []
ACC.append(0)
sum = 0
for a in A:
    sum += a
    ACC.append(sum)


L = N-K
prev = ACC[K] - ACC[0]
for i in range(1, L):
    score = ACC[i+K] - ACC[i] 
    if prev < score:
        print("Yes")
    else:
        print("No")
    prev = score

Submission status: Wrong Answer

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

point = 1
for i in range(n-k+1):
    point *= al[i]

for i in range(n-k+1, n):
    i_point = point/al[i-k]*al[i]
    if point < i_point:
        print('Yes')
    else:
        print('No')
    point = i_point

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,k =map(int,input().split())
a=[int(x ) for x in 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())
lis = list(map(int, input().split()))
lis_score = []


for i in range(n):

  if i < k-1:
    continue
  else:
    ans = 1
    
    for x in range(k):
      ans *= lis[i-x]
      ans = ans % (10**9+7)
      
    lis_score.append(ans)


for y in range(len(lis_score)-1):

  if lis_score[y] < lis_score[y+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 = 1
for i in range(K + 1, N):
  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()))
checker = 1
score = 1
r = 'Yes'
for i in range(n):
    score *= a[i]
    if i-k+1 < 0:
        continue
    if i-k+1==0:
        checker = score
        continue
    score //= a[i-k]
    if checker < score:
        checker = score
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def marks():
    N, K = map(int, input().split())
    A = list(map(int,input().split()))
    std = 1
    for i in range(K):
        std *= A[i]
    lis = [std]
    for i in range(N - K):
        a = (lis[i] / A[i]) * A[K+i]
        if std < a:
            print("Yes")
        else:
            print("No")
        lis.append(a)
        
marks()

Submission status: Wrong Answer

Solution code:
_, count = [int(x) for x in input().split()]
nums = [int(x) for x in input().split()]
current = []
lst = []
lst2 = []
a = None

def check(input1, input2):
    if input1 < input2:
        print("Yes")
    else:
        print("No")

def times(list):
    count = 1
    for x in list:
        count *= x

    return count

try:
    for x in range(len(nums) - 1):
        for i in range(count):
            current.append(nums[x + i])
            a = current[:]
        lst.append(a)
        current.clear()
except IndexError:
    pass

if __name__ == "__main__":
    for x in lst:
        lst2.append(times(x))
    for x in range(len(lst2) - 1):
        check(lst2[x], lst2[x + 1])

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

hyoten = 1
mae = 1
for i in range(n-k+1):
    mae = hyoten
    hyoten = 1
    for j in range(i, i+k):
        hyoten *= a[j]
    if mae == 1:
        continue
    else:
        if hyoten > mae:
            print("Yes")
        else:
            print("No")

Submission status: Wrong Answer

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

hyoten = [1]*(n-k+1)
for i in range(n-k+1):
    for j in range(i, i+k):
        hyoten[i] *= a[j]

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for i in range(len(clist[k:])):
  i=i+k
  x=np.prod(clist[i-k:i])
  if(x<((x*clist[i])//clist[i-k])):
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

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

for i in range(len(clist[k:])):
  i=i+k
  if(np.prod(clist[i-k:i])<np.prod(clist[i-k+1: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(x) for x in input().split()])
p = np.cumprod(a)

results = []
for i in range(k + 1, n + 2):
  res = p[i - 2]
  res = res if i - k - 1 == 0 else res / p[i - k - 2]
  results.append(res)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from functools import reduce
N, K = map(int, input().split())
A = list(map(int, input().split()))
A.insert(0, 1)
N = N + 1
K = K + 1
print(A)
si = 0
ei = K - 1
before = reduce(lambda x, y: (x * y), A[si:ei])
after = before / A[si] * A[ei]
print(before, after)
for _ in range(N - K):
  si = si + 1
  ei = ei + 1
  before = after
  after = after / A[si] * A[ei]
  if before < after:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

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

N = int(N)
K = int(K)

for i in range(K,N):
    if scores[i] <= scores[i-(K-1)]:
        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(n-k-1):
    ab = a[i]
    aa = a[k+i]
    if aa > ab:
        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(n-k-1):
    ab = a[i]*a[k-1+i]
    aa = a[i+1]*a[k+i]
    if aa > ab:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    n, k = LI()
    a = LI()
    ans = [1]*n
    for i in range(k-1, n):
        for j in range(k):
            ans[i] *= a[i-j]
        #ans[i] = a[i] * a[i-1] * a[i-2]
        print(ans)
        if i > k-1:
            if i == 0 or ans[i] > ans[i-1]:
                print('Yes')
            else:
                print('No')
    return


# Solve
if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
[n, k] = raw_input().split();
n = int(n)
k = int(k)
l = raw_input().split();
for i in range(len(l)):
	l[i] = int(l[i])
grades = []
mul = 1;
for i in range (k):
	mul *= l[i]
be = 0;
grades.append(mul)
for i in range(k, n):
	mul /= l[be]
	mul *= l[i]
	grades.append(mul)
	be += 1
print grades
for i in range(1, len(grades)):
	if (grades[i] <= grades[i-1]):
		print "No"
	else:
		print "Yes"

Submission status: Wrong Answer

Solution code:
import numpy as np

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

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

for i in range(K+1, N+1) :
  now = np.prod(A[i-K:i])
  if now > before :
    print("Yes")
  else :
    print("No")
  before = now

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

Submission status: Wrong Answer

Solution code:
import copy

nk=list(map(int, input().split()))
a=list(map(int, input().split()))

n=nk[0]
k=nk[1]

b=1
for i in range(k):
  b=b*a[i]
for i in range(k,n,1):
  c=copy.deepcopy(b)
  b=b//a[i-1]*a[i]
  if(c<b):
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

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

n=nk[0]
k=nk[1]

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

Submission status: Wrong Answer

Solution code:
import numpy as np

def solve():
    dp = [0]*(N-K+1)
    for i in range(N-K+1):
        dp[i] = np.prod(A[i:K+i])
    for i in range(N-K):
        if dp[i] < dp[i+1]:
            print("Yes")
        else:
            print("No")
#    print(dp)



if __name__ == "__main__":
    N,K = list(map(int, input().split()))  
    A = list(map(int, input().split()))  
    solve()

Submission status: Wrong Answer

Solution code:
def main():
    n, k = map(int, input().split())
    A = [int(a) for a in input().split()]

    score = 1
    # for i in range(k):
    #     score *= A[i]

    for i in range(n - k):
        tmp = ((score // A[i]) * A[k + i])

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

        score = tmp

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def main():
    n, k = map(int, input().split())
    A = [int(a) for a in input().split()]

    score = 1
    for i in range(k):
        score *= A[i]

    score = score % 10**9

    for i in range(n - k):
        tmp = ((score // A[i]) * A[k + i]) % 10**9

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

        score = tmp

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def main():
    n, k = map(int, input().split())
    A = [int(a) for a in input().split()]

    score = 1
    for i in range(k):
        score *= A[i]

    print(score)

    for i in range(n - k):
        tmp = (score // A[i]) * A[k + i]

        if tmp > score:
            print("Yes")
        else:
            print("No")
            
        score = tmp

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-


def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))
    tmp = 1
    for k in A[:K]:
        tmp += k

    for i in range(N - K):
        if tmp < tmp / A[i] * A[i + K]:
            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().strip().split()))[:n]
c = 1
for i in range(k):
    c = c * a[i]
for i in range(k, n):
    if (c // a[i - k]) * a[i] > c:
        print("Yes")
    else:
        print("No")
        c = (c // a[i - k]) * a[i]

Submission status: Wrong Answer

Solution code:
input_line = input()
input2 = input_line.rstrip().split(" ")
a,b = [int(i) for i in input2]

input_line = input()
input2 = input_line.rstrip().split(" ")
X = [int(i) for i in input2]

for i in range(a-b):
  print(X[i],X[i+b])
  if X[i] >= X[i+b] or 0 in X[i+1:i+b]:
    print("No")
  else:
    print("Yes")

Submission status: Wrong Answer

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

for p in range(K-1,N):
    hyouka = 1
    for q in range(K):
        hyouka *= A[p-q]
    hyoukaL += [hyouka]
print(hyoukaL)

for r in range(1,N-K+1):
        if hyoukaL[r-1] < hyoukaL[r]:
            print("Yes")
        else:
            print("No")

Submission status: Wrong Answer

Solution code:
from numpy import prod

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

first_term = prod(a[:k])

for i in range( n-k ):
    term = first_term // a[i]
    term *= a[k+i]

    if term > first_term:
        print('Yes')
    else:
        print('No')
    first_term = term

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,k =map(int,input().split(' '))
l=[]
l=list(map(int,input().split(' ')))

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

Submission status: Wrong Answer

Solution code:
n,k =map(int,input().split(' '))
l=[]
l=list(map(int,input().split(' ')))

for i in range(k-1,len(l)-1):
    if(l[i+1]>l[i]):
        print('Yes')
    else: 
        print('NO')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n,k=map(int,input('').split())
A=list(map(int,input('').split()))
prev=A[k-1]*A[0]
for i in range(k,n):
    j=i-k+1
    while(A[i]*A[j]==prev and j<i):
        j+=1
        prev=A[k-1]*A[j+k-1-i]
    if A[i]*A[j]>prev:
        print('Yes')
    else:
        print('No')
    prev=A[i]*A[i-k+1]

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

val = 1
for i in range(K-1):
  val *= A[i]

for i in range(K-1, N):
  if i != K-1:
    val /= A[i-K]
  val *= A[i]
  if val > K:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
# C - Marks
import numpy as np


def marks(n, k, a):
    scores = []
    results = []
    for i, name in enumerate(a):
        if i < k - 1:
            continue
        scores.append(np.prod(a[i - k + 1:i + 1]))
        if len(scores) > 1:
            results.append("Yes" if scores[-1] > scores[-2] else "No")
    return results


if __name__ == "__main__":
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    results = marks(n, k, a)
    for i in results:
        print(i)

Submission status: Wrong Answer

Solution code:
# C - Marks
import numpy as np


def marks(n, k, a):
    scores = []
    for i, name in enumerate(a):
        if i < k - 1:
            continue
        scores.append(np.prod(a[i - k + 1:i + 1]))
    results = []
    for j, score in enumerate(scores):
        if j == 0:
            continue
        results.append("Yes" if score > scores[j - 1] else "No")
    return results


if __name__ == "__main__":
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    results = marks(n, k, a)
    for i in results:
        print(i)

Submission status: Wrong Answer

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

aa=k[:b]
gou=1
while aa:
  gou*=aa.pop()
for i in range(1,a-b+1):
  goub=(gou/k[i-1])*k[b+i-1]
  print(gou,goub)
  if gou<goub:
    print("Yes")
  else:
    print("No")
  gou=goub

Submission status: Wrong Answer

Solution code:
import numpy as np
a,b=map(int,input().split())
k=list(map(int,input().split()))
aa=k[:b]

gou=np.prod(aa)
for i in range(1,a-b+1):
  #c=k[i:b+i]
  #goub=np.prod(c)
  goub=(gou/k[i-1])*k[b+i-1]
  print(gou,goub)
  if gou<goub:
    print("Yes")
  else:
    print("No")
  gou=goub

Submission status: Wrong Answer

Solution code:
import numpy as np
a,b=map(int,input().split())
k=list(map(int,input().split()))
aa=k[:b]

gou=np.prod(aa)
for i in range(1,a-b+1):
  c=k[i:b+i]
  goub=np.prod(c)
  if gou<goub:
    print("Yes")
  else:
    print("No")
  gou=goub

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,K = map(int,input().split())
A = [1]+list(map(int,input().split()))
MOD = 10**9+7
for i in range(1,N+1):
  A[i] = (A[i-1]*A[i])%MOD

for i in range(K+1, N+1):
  prev = A[i-1] // A[i-K-1]
  now = A[i] // A[i-K]
  if now > prev:
    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(n-k):
	if a[k+i-1] < a[k+i]:
		print('Yes') 
	else:
		print('No')

Submission status: Wrong Answer

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

for r in range(n-k-1, n):
  m, l = 1, 1
  for s in range(r-k, r):
    m = m * a[s]
    l = l * a[s+1]
  if m < l:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

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

sei=[1]*2
cou=0
while True:
  if cou==n-k:
    break
  for i in range(cou,cou+k):
    sei[0]*=a[i]
    sei[1]*=a[i+1]
    print(sei)
  if sei[0]<sei[1]:
    print("Yes")
    sei=[1]*2
  else:
    print("No")
    sei=[1]*2
  cou+=1

Submission status: Wrong Answer

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

dictS={}
dictS[0]=1

P=180*170141183460469231731687303715884105727**2+1
# P=10**9+7


for n in range (1,N+1):
    if n-1<K:
        dictS[n]=(A[n-1]*dictS[n-1])%P
    else:
        dictS[n]=(A[n-1]*dictS[n-1]/A[n-1-K])%P

    if n>K:
        if dictS[n]>dictS[n-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

P=20988936657440586486151264256610222593863921
# P=10**9+7


for n in range (1,N+1):
    if n-1<K:
        dictS[n]=(A[n-1]*dictS[n-1])%P
    else:
        dictS[n]=(A[n-1]*dictS[n-1]/A[n-1-K])%P

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

Submission status: Wrong Answer

Solution code:
num = [int(x) for x in input().split()]
num3 = [int(x) for x in input().split()]
sum1 = 0
sum2 = 0

for i in range(num[1], num[0]):
    sum1 = num3[i-1]
    sum2 = num3[i]
    for j in range(num[1]-1, 0, -1):
        sum1 = sum1 * num3[i-j-1]
        sum2 = sum2 * num3[i-j]
    if sum1 < sum2:
        print("yes")
    else:
        print("no")

Submission status: Wrong Answer

Solution code:
num = [int(x) for x in input().split()]
num3 = [int(x) for x in input().split()]
sum1 = 0
sum2 = 0

for i in range(num[1], num[0]):
    sum1 = num3[i-1]
    sum2 = num3[i]
    for j in range(num[1]-1, 0, -1):
        sum1 = sum1 * num3[i-j-1]
        sum2 = sum2 * num3[i-j]
    if sum1 < sum2:
        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

P=170141183460469231731687303715884105727
# P=10**9+7


for n in range (1,N+1):
    if n-1<K:
        dictS[n]=(A[n-1]*dictS[n-1])%P
    else:
        dictS[n]=(A[n-1]*dictS[n-1]/A[n-1-K])%P

    if n>K:
        if dictS[n]>dictS[n-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

# p=170141183460469231731687303715884105727
P=10**9+7


for n in range (1,N+1):
    if n-1<K:
        dictS[n]=(A[n-1]*dictS[n-1])%P
    else:
        dictS[n]=(A[n-1]*dictS[n-1]/A[n-1-K])%P

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

Submission status: Wrong Answer

Solution code:
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations

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

    tmp = 1

    for i in range(N):
        prev_tmp = tmp
        tmp *= A[i]

        if i > K - 1:
            tmp *= A[i-K]**-1

            if tmp > prev_tmp:
                print('Yes')
            else:
                print('No')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n, k = map(int, input().split(' '))
a = [int(tmp) for tmp in input().split(' ')]
f_idx = k
b_idx = 0
point = 1
for i in range(k):
    point *= a[i]

for i in range(n - k):
    f_point = point // a[b_idx] * a[f_idx]
    if point < f_point:
        print('Yes')
    else:
        print('No')
    
    b_idx += 1
    f_idx += 1

Submission status: Wrong Answer

Solution code:
n,k,*a=map(int,open(0).read().split())
for i in range(n-k):print('YNeos'[a[i+k]>a[i]::2])

Submission status: Wrong Answer

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

for i in range(k,n):
  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 = list(map(int, input().split()))
b = np.prod(a[:k])
for i in range(k, n):
  c = a[i - k]
  d = a[i]
  if b < b * d / c:
    print('Yes')
  else:
    print('No')
  b = b * d / c

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,K=map(int,input().split())
A=list(map(int,input().split()))
hyoutei=[0]*(N+1)
import numpy as np
for i in range(K,N+1):#K学期からN学期までの評定を計算
    hyoutei[i]=np.prod(np.array(A[i-K:i]))##K回目＝1回目ーK回目
    if i>K and hyoutei[i]>hyoutei[i-1]:
        print("Yes")
    elif i>K and hyoutei[i]<=hyoutei[i-1]:
        print("No")

Submission status: Wrong Answer

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

for p in range(N-K):
    if T[p] - T[p+K] >0:
        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(a)
    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:
import numpy as np

n, k = map(int, input().split())
a = np.array([1] + list(map(int, input().split())))

prod_a = np.cumprod(a)

for i in range(k+1, n+1):
    score = prod_a[i] // prod_a[i-k]
    past_score = prod_a[i-1] // prod_a[i-1-k]
    print('Yes' if score > past_score else 'No')

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

prod_a = np.cumprod(a)

for i in range(k+1, n+1):
    score = prod_a[i] / prod_a[i-k]
    past_score = prod_a[i-1] / prod_a[i-1-k]
    print('Yes' if score > past_score else 'No')

Submission status: Wrong Answer

Solution code:
n=list(map(int,input().strip().split()))
m=list(map(int,input().strip().split()))
for i in range(n[1],n[0]):
    if(m[i]>m[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()))

# 累積積
AC = [1]
for a in A:
    AC.append(AC[-1]*a)
AC.pop(0)

prev = AC[k-1]
now = AC[k] / AC[0]
if prev < now:
    print("Yes")
else:
    print("No")

for i in range(k+1,n):
    prev = prev * A[i-1] / A[i-1-k-1]
    now = now * A[i] / A[i-k-1]
    if prev < now:
        print("Yes")
    else:
        print("No")
    # print("----------")

Submission status: Wrong Answer

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

S = []
for i in range(K-1,N):
    s = 1
    for j in range(i,i-K,-1):
        s *= A[j]
    S.append(s)

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

Submission status: Wrong Answer

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

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

    print("/n".join(ans))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

for i in range(n):
    if i < k:
        total *= A[i]
    else:
        if total < total // A[i-k] * A[i]:
            print("Yes")
        else:
            print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from collections import deque
from functools import lru_cache
import bisect
import re
import queue
import copy
import decimal


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [Scanner.string() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [Scanner.int() for i in range(n)]


def solve():
    N, K = Scanner.map_int()
    A = Scanner.map_int()
    S = 1
    for i in range(K - 1):
        S *= A[i]
    for i in range(K, N):
        t = S // A[i - K] * A[i]
        if t > S:
            print('Yes')
        else:
            print('No')


def main():
    # sys.setrecursionlimit(1000000)
    # sys.stdin = open("sample.txt")
    solve()


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

sei=[0]*(n-k+1)
for i in range(n-k+1):
  for j in range(i,i+k):
    sei[i]+=a[j]

for i in range(n-k):
  if sei[i]<sei[i+1]:
    print("yes")
  else:
    print("no")

Submission status: Wrong Answer

Solution code:
# 初期入力
import sys
input = sys.stdin.readline  #文字列では使わない
N,K = map(int, input().split())
A = list(map(int, input().split()))
aa =1
DP =[0]*(N-K+1)
for i in A[:K]:
    aa *=i
DP[0] =aa

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

Submission status: Wrong Answer

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

gakki = [[i-j for j in range(K)] for i in range(K - 1, N)]
hyoka = []
for G in gakki:
  Hyo = 1
  for i in range(K):
    Hyo *= A[G[i]]
  hyoka.append(Hyo)
for i in range(K - 1):
  if hyoka[i + 1] > hyoka[i]:
    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(1,n - k):
    score = 1
    p_score = 1
    for j in range(i,i+k):
        score *= a[j]
        p_score *= a[j-1]
    if score > p_score:
        print("Yes")
    else:
        print("No")