Problem:


Score: 300 points

Problem Statement

M-kun is a student in Aoki High School, where a year is divided into N terms.

There is an exam at the end of each term. According to the scores in those exams, a student is given a grade for each term, as follows:

For the first through (K-1)-th terms: not given.

For each of the K-th through N-th terms: the multiplication of the scores in the last K exams, including the exam in the graded term.

M-kun scored A_i in the exam at the end of the i-th term.

For each i such that K+1 \leq i \leq N, determine whether his grade for the i-th term is strictly greater than the grade for the (i-1)-th term.

Constraints

2 \leq N \leq 200000

1 \leq K \leq N-1

1 \leq A_i \leq 10^{9}

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N K
A_1 A_2 A_3 \ldots A_N

Output

Print the answer in N-K lines.

The i-th line should contain Yes if the grade for the (K+i)-th term is greater than the grade for the (K+i-1)-th term, and No otherwise.

Sample Input 1

5 3
96 98 95 100 20

Sample Output 1

Yes
No

His grade for each term is computed as follows:

3-rd term: (96 \times 98 \times 95) = 893760

4-th term: (98 \times 95 \times 100) = 931000

5-th term: (95 \times 100 \times 20) = 190000

Sample Input 2

3 2
1001 869120 1001

Sample Output 2

No

Note that the output should be No if the grade for the 3-rd term is equal to the grade for the 2-nd term.

Sample Input 3

15 7
3 1 4 1 5 9 2 6 5 3 5 8 9 7 9

Sample Output 3

Yes
Yes
No
Yes
Yes
No
Yes
Yes



Sample input:
5 3
96 98 95 100 20


Sample output:
Yes
No

Submission status: Accepted

Solution code:
import sys,bisect,string,math,time,functools,random,fractions
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
from itertools import permutations,combinations,groupby
rep=range;R=range
def Golf():n,*t=map(int,open(0).read().split())
def I():return int(input())
def S_():return input()
def IS():return input().split()
def LS():return [i for i in input().split()]
def MI():return map(int,input().split())
def LI():return [int(i) for i in input().split()]
def LI_():return [int(i)-1 for i in input().split()]
def NI(n):return [int(input()) for i in range(n)]
def NI_(n):return [int(input())-1 for i in range(n)]
def StoLI():return [ord(i)-97 for i in input()]
def ItoS(n):return chr(n+97)
def LtoS(ls):return ''.join([chr(i+97) for i in ls])
def RA():return map(int,open(0).read().split())
def GI(V,E,ls=None,Directed=False,index=1):
    org_inp=[];g=[[] for i in range(V)]
    FromStdin=True if ls==None else False
    for i in range(E):
        if FromStdin:
            inp=LI()
            org_inp.append(inp)
        else:
            inp=ls[i]
        if len(inp)==2:
            a,b=inp;c=1
        else:
            a,b,c=inp
        if index==1:a-=1;b-=1
        aa=(a,c);bb=(b,c);g[a].append(bb)
        if not Directed:g[b].append(aa)
    return g,org_inp
def GGI(h,w,search=None,replacement_of_found='.',mp_def={'#':1,'.':0},boundary=1):
    #h,w,g,sg=GGI(h,w,search=['S','G'],replacement_of_found='.',mp_def={'#':1,'.':0},boundary=1) # sample usage
    mp=[boundary]*(w+2);found={}
    for i in R(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[boundary]+[mp_def[j] for j in s]+[boundary]
    mp+=[boundary]*(w+2)
    return h+2,w+2,mp,found
def TI(n):return GI(n,n-1)
def accum(ls):
    rt=[0]
    for i in ls:rt+=[rt[-1]+i]
    return rt
def bit_combination(n,base=2):
    rt=[]
    for tb in R(base**n):s=[tb//(base**bt)%base for bt in R(n)];rt+=[s]
    return rt
def gcd(x,y):
    if y==0:return x
    if x%y==0:return y
    while x%y!=0:x,y=y,x%y
    return y
def YN(x):print(['NO','YES'][x])
def Yn(x):print(['No','Yes'][x])
def show(*inp,end='\n'):
    if show_flg:print(*inp,end=end)

mo=10**9+7
inf=float('inf')
FourNb=[(-1,0),(1,0),(0,1),(0,-1)];EightNb=[(-1,0),(1,0),(0,1),(0,-1),(1,1),(-1,-1),(1,-1),(-1,1)];compas=dict(zip('WENS',FourNb));cursol=dict(zip('LRUD',FourNb))
l_alp=string.ascii_lowercase
#sys.setrecursionlimit(10**7)
read=sys.stdin.buffer.read;readline=sys.stdin.buffer.readline;input=lambda:sys.stdin.readline().rstrip()

########################################################################################################################################################################

show_flg=False
show_flg=True

ans=0

n,k=LI()
a=LI()
for i in range(n-k):
    if a[i]<a[i+k]:
        Yn(1)
    else:
        Yn(0)


#show(n,m)

Submission status: Accepted

Solution code:

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

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

for i in range(N-K):

    if A[i] < A[i+K]:
        print ("Yes")
    else:
        print ("No")

Submission status: Accepted

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# cook your dish here
n,k=input().split()
n=int(n)
k=int(k)
l=list(map(int,input().split()))
for j in range(n):
	if l[k+j]>l[j]:
    	print("Yes")
	else:
      print("No")
    if k+j==n-1:
      break

Submission status: Runtime Error

Solution code:
n, k = 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: Runtime Error

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

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

Submission status: Runtime Error

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

for i in range(n):
    if k-1 == n:
        break
    elif score_list[i] < score_list[k]:
        print('Yes')
    else:
        print('No')
    k += 1

Submission status: Runtime Error

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

for i in range(n):
    if k-1 == n:
        break
    elif score_list[i] < score_list[k]:
        print('Yes')
    else:
        print('No')
    k += 1

Submission status: Runtime Error

Solution code:
from collections import defaultdict
n ,k = map(int,input().split())
a = list(map(int,input().split()))
b = k-1

while k <= n:
    if(a[k] >a[b]):
        print("yes")
    else:
        print("no")
    k+=1

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
scores = list(map(int, input().split()))
right = k - 1
left = right - k + 1
prev = 1
now = 0
for i in range(left, right + 1):
    prev *= scores[left]
left += 1
right += 1

while right < n:
    now = prev / (scores[left - 1]) * scores[right]
    if now > prev:
        print("Yes")
    else:
        print("No")
    
    prev, now = now, 1

    right += 1
    left += 1

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
#define ll long long
#define MAX 1000005
using namespace std;

void solve()	{
	int n,k;
	cin >> n >> k;
	ll a[n];
	for(int i=0; i<n; i++)	cin >> a[i];
	for(int i=k; i<n; i++)	{
		if(a[i]>a[i-k])	cout << "Yes\n";
		else cout << "No\n";
	}
}

int main()	
{
	
	int t=1;
	//cin >> t;
	for(int i=1; i<=t; i++)	{
		solve();
	}
	return 0;
}

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(1000000000)
import numpy as np
import numba


@numba.jit('void(int32, int32, int32[:])', nopython=True)
def calc(n, k, A):
    tmp: int = 1
    for i in range(1, k):
        tmp *= A[i]

    prev: int = 0
    for i in range(k, n + 1):
        prev = tmp
        tmp //= A[i - k]
        tmp *= A[i]
        if i == k:
            continue
        if tmp > prev:
            print('Yes')
        else:
            print('No')


def main():
    n, k = map(int, input().split())
    A = np.array([1] + list(map(int, input().split())) + [1], int)
    calc(n, k, A)


if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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


scores = list_a[0:k]
score_first_time = list_a
score = 1
for each in scores:
    score *= each
    
for i, next_score in enumerate(list_a[k:]):
    score_before = score
    score = score_before * next_score / list_a[i]
    if score > score_
    before:
        print('Yes')
        continue
    print('No')

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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<n):
        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: Runtime Error

Solution code:
#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int n, k;
    cin >> n >> k ;
    int a[n];
    int m = 1, j = 0;
    for(int i = 0; i < n; i++){
        cin >> a[i];
        m*=a[i];
        if (i>=k){
            int n1 = m/a[i];
            m/=a[j]; j++;
            if (n1<m) cout << "Yes" << '\n';
            else cout<< "No" << '\n';
        }
    }

    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, K= input().split()
N = int(N)
K = int(K)
A = list((input().split()))
o = 0
b = list()
count = 0
l = 0
z = list()
for i in range (N - K + 1):
    c = count 
    i = len(b)
    for i in range(i):
        del b[0]
    for i in range(N - K + 1):
        b.append(A[c])
        c = c + 1
    d = 1
    for i in range (len(b)):
        d = d * int(b[0])
        del b[0]
    z.append(d)
    count += 1
for i in range(N - K):
    g = int(z[l])
    h = int(z[l + 1])
    if g < h:
        print('Yes')
    else:
        print('No')
    l = l + 1

Submission status: Runtime Error

Solution code:
N, K = input().split()
N = int(N)
K = int(K)
A = list((input().split()))
o = 0
b = list()
count = 0
l = 0
z = list()
for i in range(N - K + 1):
    c = count
    for i in range(len(b)):
        del b[0]
    for i in range(N - K):
        b.append(A[c])
        c = c + 1
    d = 1
    for i in range(len(b)):
        d = d * int(b[0])
        del b[0]
    z.append(d)
    count += 1
for i in range(N - K):
    g = int(z[l])
    h = int(z[l + 1])
    if g < h:
        print('No')
    else:
        print('Yes')
    l = l + 1

Submission status: Runtime Error

Solution code:
N, K= input().split()
N = int(N)
K = int(K)
A = list((input().split()))
o = 0
b = list()
count = 0
l = 0
z = list()
for i in range (N - K + 1):
    c = count
    for i in range(len(b)):
        del b[0]
    for i in range(N - K + 1):
        b.append(A[c])
        c = c + 1
    d = 1
    for i in range (len(b)):
        d = d * int(b[0])
        del b[0]
    z.append(d)
    count += 1
for i in range(N - K):
    g = int(z[l])
    h = int(z[l + 1])
    if g < h:
        print('Yes')
    else:
        print('No')
    l = l + 1

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N,K = map(int, input().split())
A = list(map(int, input().split()))
num = 1
num_b = None
data = []
for j in range(K):
    for t in range(j, j+3):
        num = num*A[t]
    data.append(num)
    num_b = num
    num = 1
for i in range(N - K):
    if data[i+1] > data[i]:
        print("Yes")
    elif data[i+1] <= data[i]:
        print("No")

Submission status: Runtime Error

Solution code:

n, k = [int(x) for x in input().strip().split()]
arr = [int(x) for x in input().strip().split()]
arr = [math.log(x) for x in arr]


last = 0
for i in range(k):
    last += arr[i]

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

Submission status: Runtime Error

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

dictS={}
dictS[0]=1

P=475856**524288+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: Runtime Error

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

Submission status: Runtime Error

Solution code:
from operator import mul
from functools import reduce

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
r = [0] * (n - k + 1)
for i in range(n - k + 1):
    if a[i + k] > a[i]:
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

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: Runtime Error

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: Runtime Error

Solution code:
r, g, b = map(int, input().split())
t = 0
while r >= g: g *= 2; t += 1
while g >= b: b *= 2; t += 1
print('No' if t > int(input()) else 'Yes')

Submission status: Runtime Error

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

answers = ["Yes" if A[i] > A[i-K] else "No" for i in range(K, N)]
print("\n".join(answers))

Submission status: Runtime Error

Solution code:
import numpy as np
N,K=map(int,input().split())
A=list(map(int,input().split()))
hyoutei=[0]*(N+1)
for i in range(K,N):#K+1-N
    if A[i]/A[i-K]>1:
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,K=map(int,input().split())
a=list[map(int,input().split())]
for v in range(K):
  if a[1+v]<=a[K+1+v]:
    print("No")
  else:
    print("Yes")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main(){
    int a, b, c, num, eq=0;
    scanf("%d %d %d", &a, &b, &c);
    scanf("%d", &num);
    for(int i=0; i<num; ++i){
    if(a>=b && c>=a)
        b=b*2;

    else
        c=c*2;
    }
    if(b>a && c >b)
        printf("YES");
    else    
        printf("NO");
    
    ///printf("%d %d %d\n", a, b, c);
    printf("\n");
    
    return 0;
}

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

N = ii()
A = li()

yen = 1000
kabu = 0

for i in range(1, N):
    if A[i] > A[i-1]:
        kabu = (yen//A[i-1])
        yen = kabu * A[i] + (yen - kabu * A[i-1])

print(yen)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import numpy as np

n, k = map(int, input().split())
A = np.array(list(map(int, input().split())))
S = A.cumprod().tolist()
#print(S)

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

    tmp = S[k+i]//S[i]

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n):
    res = [None] * n
    for i in range(n):
        res[i] = II()
    return res
def LIR(n):
    res = [None] * n
    for i in range(n):
        res[i] = LI()
    return res
def FR(n):
    res = [None] * n
    for i in range(n):
        res[i] = IF()
    return res
def LIR(n):
    res = [None] * n
    for i in range(n):
        res[i] = IF()
    return res
def LIR_(n):
    res = [None] * n
    for i in range(n):
        res[i] = LI_()
    return res
def SR(n):
    res = [None] * n
    for i in range(n):
        res[i] = S()
    return res
def LSR(n):
    res = [None] * n
    for i in range(n):
        res[i] = LS()
    return res
mod = 1000000007
inf = float('INF')

#solve
def solve():
    n, k = LI()
    a = LI()
    for i in range(k - 1):
        if a[i] > a[i + k]:
            print("No")
        else:
            print("Yes")
    return


#main
if __name__ == '__main__':
    solve()

Submission status: Runtime Error

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

        if calc_score(scores[i + 1:k + 1]) > calc_score(scores[i:k]):
            print('Yes')
        else:
            print('No')



if __name__ == '__main__':
    marks_C()

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import functools
import operator


n, k = map(int, input().split())
l = list(map(int, input().split()))
a = 0
ans = []

for _ in range(n-k):
  li = l[a:k + a]
  ex = result
  result = functools.reduce(operator.mul, li)
  if ex < result:
    ans.append("Yes")
  else:
    ans.append("No")

pprint.pprint(ans)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
N,K=map(int,input().split())
A=list(map(int,input().split()))
point=[1.0]*(N+1)
RON=0
for i in range(K):
    point[K]=point[K]*A[i]
M=N-K+1
for i in range(1,M):
    RON=Decimal(str(point[K+i-1]/A[i-1])).quantize(Decimal('0'), rounding=ROUND_HALF_UP)
#    point[K+i]=round(point[K+i-1]/A[i-1])*A[K+i-1]
    point[K+i]=RON*A[K+i-1]
for i in range(M-1):
    if point[K+i]<point[K+i+1]:
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

Solution code:
import numpy as np

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

S = A.cumprod().tolist()
#print(S)
tmp = S[k-1]
for i in range(n-k):
    if tmp < S[k+i]/S[i]:
        print("Yes")
    else:
        print("No")
    #print(tmp, S[k+i]/S[i])

    tmp = S[k+i]/S[i]

Submission status: Runtime Error

Solution code:
import numpy as np

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

S = A.cumprod().tolist()
#print(S)
tmp = S[k-1]
for i in range(k-1):
    if tmp < S[k+i]/S[i]:
        print("Yes")
    else:
        print("No")
    #print(tmp, S[k+i]/S[i])

    tmp = S[k+i]/S[i]

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input().split())
K = int(input())


def combinations(k):
    result = []
    for a in range(k + 1):
        for b in range(k + 1):
            for c in range(k + 1):
                if a + b + c <= k:
                    result.append([a, b, c])

    return result


def magic(A, B, C, K):
    if A < B < C:
        return True

    for l in combinations(K):
        a, b, c = A, B, C
        a_count, b_count, c_count = l
        if a_count > 0:
            a *= 2 * a_count
        if b_count > 0:
            b *= 2 * b_count
        if c_count > 0:
            c *= 2 * c_count

        if a < b < c:
            return True

    return False


if (magic(A, B, C, K)):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
N, K= input().split()
N = int(N)
K = int(K)
A = list((input().split()))
         
o = 0
b = list()
c = 0
z = list()
for i in range (N - K):
    for i in range(len(b)):
        del b[0]
    for i in range(N - K + 1):
        b.append(A[c])
        c = c + 1
    c = 0
    o = o + 1
    d = 1
    print(len(b))
    for i in range (N - K + 2):
        d = d * int(b[0])
        del b[0]
    z.append(d)
    del A[0]
l = 0
print(len(z))
for i in range(N - K):
    g = int(z[l])
    h = int(z[l + 1])
    print(g)
    print(h)
    if g < h:
        print('Yes')
    else:
        print('No')
    l = l + 1

Submission status: Runtime Error

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):
    if i != k:
        t = np.math.factorial[i -k:i]
        # print(t)
        if before < t:
            print('Yes')
        else:
            print('No')
        before = t

Submission status: Runtime Error

Solution code:
n,k=[int(x) for x in input().split()]
a=[int(x) for x in input().split()]
b=[0]*(k-1)+a[::len(a)-k]
c=1
for i,j in zip(a,b):
    c*=i
    #規定回数+1から
    if i>=k:
        d=c//j
        e=c//i
        print('Yes' if d>e else 'No')
        c=d

Submission status: Runtime Error

Solution code:
v = []
n= int(input())
m =int(input())
for i in range(0, n):
    ele=int(input())
    v.append(ele)

fact=1
for i in range(0,m):
    fact=fact*v[i]

for i in range(m,n):
    fast=fact
    fact=fact/v[i-m]
    fact=fact*v[i]
    if(fact>fast):
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

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

if k+1<=i<=n:
  if a[i-1]>a[i-k-1]:
    print("Yes")
  else:
    print("No")
else:
  print()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import functools
import operator

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

old_score = 1
new_score = 1

for i in range(n - k + 1): #iはスタート地点
    old_score = new_score
    new_score = 1
    
    list_ = A[i, i + k] #Aのj番目の要素をかける
    new_score = functools.reduce(operator.mul, list_)

    if i != 0 and old_score < new_score:
        print("Yes")
    elif i != 0 and old_score >= new_score:    
        print("No")

Submission status: Runtime Error

Solution code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

N,K = MI()

A = LI()

multi = {}

start = 1
for k in range(0,K):
    start = start * A[k]

for j in range(K, N+1):
    if j == K:
        multi[j] = start
        continue
    start = start // A[j-K-1] * A[j-1]
    multi[j] = start

    if j-1 in multi:
        if multi[j] > multi[j-1]:
            print("Yes")
        else:
            print("No")

Submission status: Runtime Error

Solution code:
import numpy
a = list(map(int,input().split()))
b = list(map(int,input().split()))
for v in range(a[0]-a[1]+1):
  c=list(map(numpy.prod(b[0+v:a[0]+v]))
for m in range(a[0]-a[1]):
  if c[m+1]>c[m]:
    print("Yes")
  else:
    print("No")

Submission status: Runtime Error

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

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

for i in range(K, N)
    score = score * A[i] / A[i-K]
    score_list.append(score)

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

Submission status: Runtime Error

Solution code:
import numpy
 
N, K = map(int, input().split())
A = list(map(int, input().split()))
num = N - K
p_list = [0] * (num+1)
 
for i in range(num+1):
    p_list[i] = numpy.prod(A[i:i+K])
    if i > 0:
        if p_list[i] > p_list[i-1]:
            print("Yes")
        else:
            print("No")