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

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(int(ans))
for j in range(len(p)-1):
    if p[j]<p[j+1]:
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

# In[13]:


import sys
input = sys.stdin.readline


# In[26]:


NK = list(map(int, input()))
A = list(map(int, input()))
N = NK[0]
K = NK[1]


# In[16]:


def main():
    x0 = 1
    for i in range(K):
        x0 *= A[i]
    x = x0
    for j in range(K,N):
        score = x*A[j]//A[j-K]
        if score > x:
            print("Yes")
        else:
            print("No")
        x = score


# In[17]:


if __name__ == '__main__':
    main()


# In[ ]:

Submission status: Runtime Error

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

for n in range(N-K):
  Tgt1 = A[n]
  Tgt2 = A[K+n+1]
  if Tgt1 < Tgt2:
    print('Yes')
  else:
    print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
i = 0
for x in input().split():
    A = int(x)
    l.append(A)
    if i >= K:
        if l.pop(0) < A:
            print("Yes")
        else:
            print("No")
    i = i + 1

Submission status: Runtime Error

Solution code:
N=int(input(1))
K=int(input(1))
a=[int(input(i)) for i in range(N)]

b=[]

for i in range(N-K):
    for n in range(K):
        b[i]=a[i+n]

for i in range(N-K):
    if(b[i]-b[i-1]>0):
        print('Yes')
    if(b[i]-b[i-1]<=0):
        print('No')

Submission status: Runtime Error

Solution code:
import sys, os, math, bisect, itertools, collections, heapq, queue, copy, array

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

sys.setrecursionlimit(10000000)

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

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

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

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


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

    N, K = il()
    A = il()
    for n in range(1, N):
        A[n] *= A[n - 1]
        if n == K:
            A[n] //= A[n - K]
        elif n > K:
            A[n] //= A[n - K] // A[n - K - 1]

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


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
n,k = map(int,input().split())
a = list(map(int,input().split()))
index = 2
result=[]
for i in range(n-k):
    score1 = a[i]*a[i+1]*a[i+2]
    score2 = a[i+1]*a[i+2]*a[i+3]
    if score1<score2:
        result.append(True)
    else:
        result.append(False)
for j in result:
    if j:
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

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

# In[13]:


import sys
input = sys.stdin.readline


# In[24]:


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


# In[16]:


def main():
    x0 = 1
    for i in range(K):
        x0 *= A[i]
    x = x0
    for j in range(K,N):
        score = x*A[j]//A[j-K]
        if score > x:
            print("Yes")
        else:
            print("No")
        x = score


# In[17]:


if __name__ == '__main__':
    main()


# In[ ]:

Submission status: Runtime Error

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

# In[24]:


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


# In[16]:


def main():
    x0 = 1
    for i in range(K):
        x0 *= A[i]
    x = x0
    for j in range(K,N):
        score = x*A[j]//A[j-K]
        if score > x:
            print("Yes")
        else:
            print("No")
        x = score


# In[17]:


if __name__ == '__main__':
    main()


# In[ ]:

Submission status: Runtime Error

Solution code:
import sys, os, math, bisect, itertools, collections, heapq, queue, copy, array

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

sys.setrecursionlimit(10000000)

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

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

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

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


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

    N, K = il()
    A = il()
    for n in range(1, N):
        A[n] *= A[n - 1]
        if n == K:
            A[n] //= A[n - K]
        elif n > K:
            A[n] //= A[n - K] // A[n - K - 1]
    for k in range(K, N):
        if A[k - 1] < A[k]:
            print('Yes')
        else:
            print('No')


if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

num = 1
for i in range(k):
	num *= arr[i]
res = [num]
f = True
for i in range(k,n):
	num *= arr[i]
	num //= arr[k-i]
	res.append(num)
	if res[-1] <= res[-2]:
		f = False:
		break

if f:
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:
import os
import sys
from io import BytesIO, IOBase

def modularInverse(n, prime) : 
    dp =[0]*(n+1) 
    dp[0] = dp[1] = 1
    for i in range( 2, n+1) : 
        dp[i] = dp[prime % i] *(prime - prime // i) % prime  
    return dp

def main():
    t = 1
    MOD = 10089886811898868001
    dp = modularInverse(2 * 10**5, MOD)
    for _ in range(t):
        # n = int(input)
        n, k = map(int, input().split())
        nums = list(map(int, input().split()))

        prod = 1
        for i in range(k):
            prod = (prod*nums[i])%MOD
        
        prev = prod
        start = 0
        for ind in range(k, n):
            # new = (prev * nums[ind] * modInverse(nums[start], MOD))%MOD
            new = (prev * nums[ind] * dp[nums[start]])%MOD

            if new > prev:
                print("Yes")
            else:
                print("No")

            start += 1
            prev = new






# def gcd(a, b) : 
#     if (a == 0) : 
#         return b 
          
#     return gcd(b % a, a)

# def modInverse(a, m) : 
#     g = gcd(a, m) 
#     if (g != 1) : 
#         return 1/a
#     else : 
#         return power(a, m-2, m)
      
# # To compute x^y under modulo m 
# def power(x, y, m) : 
#     if (y == 0) : 
#         return -1
          
#     p = power(x, y // 2, m) % m 
#     p = (p * p) % m 
  
#     if(y % 2 == 0) : 
#         return p  
#     else :  
#         return ((x * p) % m) 





































# region fastio
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
 
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
 
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
 
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
# endregion
 
if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

# In[13]:


import sys
input = sys.stdin.readline


# In[14]:


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


# In[16]:


def main():
    x0 = 1
    for i in range(K):
        x0 *= A[i]
    x = x0
    for j in range(K,N):
        score = x*A[j]//A[j-K]
        if score > x:
            print("Yes")
        else:
            print("No")
        x = score


# In[17]:


if __name__ == '__main__':
    main()


# In[ ]:

Submission status: Runtime Error

Solution code:
import os
import sys
from io import BytesIO, IOBase

def modularInverse(n, prime) : 
    dp =[0]*(n+1) 
    dp[0] = dp[1] = 1
    for i in range( 2, n+1) : 
        dp[i] = dp[prime % i] *(prime - prime // i) % prime  
    return dp

def main():
    t = 1
    MOD = 10**9 + 7
    dp = modularInverse(2 * 10**5, MOD)
    for _ in range(t):
        # n = int(input)
        n, k = map(int, input().split())
        nums = list(map(int, input().split()))

        prod = 1
        for i in range(k):
            prod = (prod*nums[i])%MOD
        
        prev = prod
        start = 0
        for ind in range(k, n):
            # new = (prev * nums[ind] * modInverse(nums[start], MOD))%MOD
            new = (prev * nums[ind] * dp[nums[start]])%MOD

            if new > prev:
                print("Yes")
            else:
                print("No")

            start += 1
            prev = new






# def gcd(a, b) : 
#     if (a == 0) : 
#         return b 
          
#     return gcd(b % a, a)

# def modInverse(a, m) : 
#     g = gcd(a, m) 
#     if (g != 1) : 
#         return 1/a
#     else : 
#         return power(a, m-2, m)
      
# # To compute x^y under modulo m 
# def power(x, y, m) : 
#     if (y == 0) : 
#         return -1
          
#     p = power(x, y // 2, m) % m 
#     p = (p * p) % m 
  
#     if(y % 2 == 0) : 
#         return p  
#     else :  
#         return ((x * p) % m) 





































# region fastio
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
 
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
 
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
 
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
# endregion
 
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
def main():
    N, K = list(map(int, input().split(' ')))
    Ai = list(map(int, input().split(' ')))
    # print(Ai)
    P = []
    prev = 0
    now = 0
    
    S = [1]
    for index, i in enumerate(range(len(Ai)-K*2, len(Ai))):
        S.append(S[index] * Ai[i])
    # print(S, len(S))
    
    for n in range(K-1,N-1):
        # print(n, S[n], n-K, S[n-K])
        a1 = S[n] // S[n-K]
        a2 = S[n+1] // S[n-K+1]
        
        if a2 > a1:
            print('Yes')
        else:
            print('No')
        

main()

Submission status: Runtime Error

Solution code:
/*

_/\_


*/


#include "bits/stdc++.h"
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;

using namespace std;
#define pb push_back
#define F first
#define S second
//#define biGinf 9e+18
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define inpv(v) for(auto &x:v) cin>>x
#define otpv(v) for(auto &x:v) cout<<x<<nwl
#define otpv2(v) for(auto &x:v) cout<<x<<" "
#define CASES int tt;cin>>tt; while(tt--)
#define for0(i,n) for(int i=0; i<n; i++)
#define for1(i,n) for(int i=1; i<=n; i++)
#define forr(i,r,n) for(int i=r; i<=n; i++)
#define sz(v) (int)(v).size()
#define vec(x) vector < x >
using vi = vector < int >;
using mii = map <int , int >;
using vvi = vector < vi >;
using pii = pair < int , int >;
using vpii = vector < pii >;
using int64 = long long;
using unt64 = unsigned long long;

const int inf = 2e9 + 7;
const char nwl = '\n';
const int mxx = 1e6 + 3;
int64 sumV(vi &v) {
	int64 s = 0;
	for (int x : v) {
		s += (int64)x;
	}
	return s;
}
int gcd(int a, int b) {
	if (!b) return a;
	return gcd(b, a % b);
}
//const int64 biGinf = 9e+18;
const string yo = "Yes", no = "No";

// using i128 = int128_t;


// int128_t product(long long A, long long B)
// {
// 	int128_t ans = (int128_t) A * B;
// 	return ans;
// }


int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	//ur code
	int n, k;
	cin >> n >> k;
	vec(unt64) v(n);
	inpv(v);
	unt64 p = 1;
	for0(i, k) {
		p *= (unt64)v[i];
	}
	unt64 tmp = p;
	vec(string) r;
	for (int i = k; i < n; i++) {
		p = (unt64)v[i] * (tmp / ((unt64)v[i - k]));
		if (p > tmp) r.pb(yo);
		else r.pb(no);
		tmp = p;
	}
	otpv(r);


	return 0;
}

Submission status: Runtime Error

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

ans = []
for i in range(K):
  k = 1
  for s in range(K):
    k *= a[s+i] 
  ans.append(k)
  

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

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
A = list(map(int, input().split()))
P = list()
for i in range(len(A) - K + 1):
  x = A[i] * A[i + 1] * A[i + 2]
  P.append(x)
pre = P[0]
for p in P[1:]:
  if pre < p:
    print("Yes")
  else:
    print("No")
  pre = p

Submission status: Runtime Error

Solution code:
import numpy as np


def main():
    N, K = (int(x) for x in input().split(" "))
    A = [int(x) for x in input().split(" ")]
    lastest_score = np.array(A[0:K]).prod()
    for i in range(1, N-K+1):
        current_score = np.array(A[i:i+K]).prod()
        if lastest_score < current_score:
            print("Yes")
        else:
            print("No")
        lastest_score = current_score


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import os
import sys
from io import BytesIO, IOBase

def modularInverse(n, prime) : 
  
    dp =[0]*(n+1) 
    dp[0] = dp[1] = 1
    for i in range( 2, n+1) : 
        dp[i] = dp[prime % i] *(prime - prime // i) % prime  
   
    return dp

# def gcd(a, b) : 
#     if (a == 0) : 
#         return b 
          
#     return gcd(b % a, a)

# def modInverse(a, m) : 
#     g = gcd(a, m) 
#     if (g != 1) : 
#         return 1/a
#     else : 
#         return power(a, m-2, m)
      
# # To compute x^y under modulo m 
# def power(x, y, m) : 
#     if (y == 0) : 
#         return -1
          
#     p = power(x, y // 2, m) % m 
#     p = (p * p) % m 
  
#     if(y % 2 == 0) : 
#         return p  
#     else :  
#         return ((x * p) % m) 

MOD = 10**9 + 7

dp = modularInverse(2 * 10**5, MOD)
def main():
    t = 1
    for _ in range(t):
        # n = int(input)
        n, k = map(int, input().split())
        nums = list(map(int, input().split()))

        prod = 1
        for i in range(k):
            prod = (prod*nums[i])%MOD
        
        prev = prod
        start = 0
        for ind in range(k, n):
            # new = (prev * nums[ind] * modInverse(nums[start], MOD))%MOD
            new = (prev * nums[ind] * dp[nums[start]])%MOD

            if new > prev:
                print("Yes")
            else:
                print("No")
            start += 1
            prev = new



        




































# region fastio
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
 
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
 
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
 
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
# endregion
 
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
from itertools import product
import numpy as np

H, W, K = [int(n) for n in input().split()]
arr = np.zeros((H, W))
count = 0

for h in range(H):
    row = input()
    arr[h, :] = np.array([0 if mark=='.' else 1 for mark in row])

for row_onehot, col_onehot in product(product(range(2), repeat=H), product(range(2), repeat=W)):
    row_indexes = np.argwhere(np.array(row_onehot)==1).flatten()
    col_indexes = np.argwhere(np.array(col_onehot)==1).flatten()
    arr_ = arr.copy()
    for row_idx in row_indexes:
        arr_[row_idx, :] = 0
    for col_idx in col_indexes:
        arr_[:, col_idx] = 0
    if arr_.sum() == K:
        count += 1

print(count)

Submission status: Runtime Error

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

H0 = 1
H1 = 1

for i in range(N-K):
    for j in range(K):
        H0 = int(H0 * A[j])

    H1 = int(H0/A[i] * A[K+i])

    if H1 > H0:
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import sys
import numpy

YES = "Yes"
NO = "No"

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

scores = [0] * K
pre = 0
for i in range(N):
    scores[i % K] = A[i]
    cur = numpy.prod(scores)

    if i >= K:
        if cur > pre:
            print(YES)
        else:
            print(NO)
    pre = cur

Submission status: Runtime Error

Solution code:
import math
A, B, C = list(map(int, input().split()))
K = int(input())
#A, B, C = [7, 4, 2]
#K = 3

i = math.floor(A/(B+1))
K -= i
B = B * (2 ** i)
j = math.floor(B/(C+1))
K -= j
C = C * (2 ** j)
if K >= 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
from sys import stdin,stdout
from numba import njit
@njit
def fn(i):
    return pro[i]//(pro[i-k] if i-k>=0 else 1)
n,k=map(int,stdin.readline().split())
a=list(map(int,stdin.readline().split()))
pro=[a[0]]
for v in a[1:]:
    pro+=[pro[-1]*v]
for i in range(k,n):
    #print(fn(i),fn(i-1))
    if fn(i)>fn(i-1):print('Yes')
    else:print('No')

Submission status: Runtime Error

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

for i in range(N-K):
    score1 = A_list[i] * A_list[i+1] * A_list[i+2]
    score2 = A_list[i+1] * A_list[i+2] * A_list[i+3]
    if((score1 - score2) > 0):
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

Solution code:
N, K=map(int,input().split())
scores=input().split()
for i in range(N):
  scores[i]=int(scores[i])
new=K
old=0
for new<N:
  if scores[new]>scores[old]:
    print("Yes")
  else:
    print("No")
  new+=1
  old+=1

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
#define trace1(a)                    cout<<#a<<": "<<a<<endl
#define trace2(a,b)                  cout<<#a<<": "<<a<<" | ", trace1(b)
#define trace3(a,b,c)                cout<<#a<<": "<<a<<" | ", trace2(b,c)
#define trace4(a,b,c,d)              cout<<#a<<": "<<a<<" | ", trace3(b,c,d)
#define trace5(a,b,c,d,e)            cout<<#a<<": "<<a<<" | ", trace4(b,c,d,e)
#define trace6(a,b,c,d,e,f)          cout<<#a<<": "<<a<<" | ", trace5(b,c,d,e,f)
#define trace7(a,b,c,d,e,f,g)        cout<<#a<<": "<<a<<" | ", trace6(b,c,d,e,f,g)
#define trace8(a,b,c,d,e,f,g,h)      cout<<#a<<": "<<a<<" | ", trace7(b,c,d,e,f,g,h)
#define trace9(a,b,c,d,e,f,g,h,i)    cout<<#a<<": "<<a<<" | ", trace8(b,c,d,e,f,g,h,i)
#define trace10(a,b,c,d,e,f,g,h,i,j) cout<<#a<<": "<<a<<" | ", trace9(b,c,d,e,f,g,h,i,j)
#define rep(i,a,b)      for(int (i)=(int)(a);(i)<(int)(b); ++(i))
#define reps(i,a,b,c)   for(int (i)=(int)(a);(i)<(int)(b); (i)+=(c))
#define rrep(i,a,b)     for(int (i)=(int)(a);(i)>=(int)(b);--(i))
#define rreps(i,a,b,c)  for(int (i)=(int)(a);(i)>=(int)(b);(i)-=(c))
#define fore(x,a)       for(auto &x:a)
#define foreach(i,a)    for(auto i=(a).begin(); i!=(a).end(); ++i)
#define rforeach(i,a)   for(auto i=(a).rbegin();i!=(a).rend();++i)
#define all(a)  (a).begin(), (a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define isin(i,a,b) ((a) <= (i) && (i) <= (b))
#define uni(a) (a).erase(unique(all(a)),(a).end())
#define dup(x,y) (((x)+(y)-1)/(y))
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(a) ((long long)(a).size())
using namespace std;
struct FastIO { FastIO(){ cin.tie(0); ios::sync_with_stdio(false); cout<<fixed<<setprecision(20); }; } fast_io_;
template <class T> using v  = vector<T>;
template <class T> using vv = v<v<T>>;
template <class T> using upq= priority_queue<T,v<T>,greater<T>>;
template <class T> using dpq= priority_queue<T,v<T>,less<T>>;
using ll  = long long;          using vi  = v<int>;
using ld  = long double;        using vl  = v<ll>;
using unit= unsigned;           using vvi = v<vi>;
using ull = unsigned long long; using vvl = v<vl>;
using pii = pair<int,int>;      using vpii= v<pii>;
using pil = pair<int,ll>;       using vpil= v<pil>;
using pli = pair<ll,int>;       using vpli= v<pli>;
using pll = pair<ll,ll>;        using vpll= v<pll>;
template<class T> ostream& operator<<(ostream&o,const v<T>&v);
template<class T,size_t N> ostream& operator<<(ostream&o,const array<T,N>&v);
template<class T> ostream& operator<<(ostream&o,const deque<T>&v);
template<class T> ostream& operator<<(ostream&o,const queue<T>&v);
template<class T> ostream& operator<<(ostream&o,const set<T>&v);
template<class T> ostream& operator<<(ostream&o,const unordered_set<T>&v);
template<class T> ostream& operator<<(ostream&o,const multiset<T>&v);
template<class T> ostream& operator<<(ostream&o,const unordered_multiset<T>&v);
template<class T,class U> ostream& operator<<(ostream&o,const pair<T,U>&v);
template<class T,class U> ostream& operator<<(ostream&o,const map<T,U>&v);
template<class T,class U> ostream& operator<<(ostream&o,const unordered_map<T,U>&v);
template<class T> ostream& out_with_iter(ostream&o,const T&v){o<<"{"; foreach(x,v)o<<*x<<(next(x)==v.end()?"":","); return o<<"}";}
template<class T> istream& operator>>(istream&i,v<T>&v){fore(x,v)i>>x; return i;}
template<class T> ostream& operator<<(ostream&o,const v<T>&v){return out_with_iter(o,v);}
template<class T,size_t N> ostream& operator<<(ostream&o,const array<T,N>&v){return out_with_iter(o,v);}
template<class T> ostream& operator<<(ostream&o,const deque<T>&v){return out_with_iter(o,v);}
template<class T> ostream& operator<<(ostream&o,const queue<T>&v){queue<T> q(v); o<<"{"; while(sz(q)){o<<q.front()<<(sz(q)==1?"":","); q.pop();} return o<<"}";}
template<class T> ostream& operator<<(ostream&o,const set<T>&v){return out_with_iter(o,v);}
template<class T> ostream& operator<<(ostream&o,const unordered_set<T>&v){return o<<set<T>(all(v)); }
template<class T> ostream& operator<<(ostream&o,const multiset<T>&v){return out_with_iter(o,v);}
template<class T> ostream& operator<<(ostream&o,const unordered_multiset<T>&v){return o<<multiset<T>(all(v));}
template<class T,class U> ostream& operator<<(ostream&o,const pair<T,U>&v){return o<<"("<<v.fi<<","<<v.se<<")";}
template<class T,class U> ostream& operator<<(ostream&o,const map<T,U>&v){o<<"{"; foreach(x,v)o<<x->fi<<"=>"<<x->se<<(next(x)==v.end()?"":","); return o<<"}";}
template<class T,class U> ostream& operator<<(ostream&o,const unordered_map<T,U>&v){return o<<map<T,U>(all(v));}
template<class T> string join(const T&v,char c=' '){stringstream s; foreach(x,v)s<<c<<*x; return sz(s.str())?s.str().substr(1):"";}
template<class T> void YES(T c){if(c) cout<<"YES"<<endl; else cout<<"NO"<<endl;}
template<class T> void Yes(T c){if(c) cout<<"Yes"<<endl; else cout<<"No"<<endl;}
template<class T> void POSS(T c){if(c) cout<<"POSSIBLE"<<endl; else cout<<"IMPOSSIBLE"<<endl;}
template<class T> void Poss(T c){if(c) cout<<"Possible"<<endl; else cout<<"Impossible"<<endl;}
template<class T> bool chmax(T& a,const T& b){ return a<b ? (a=b,true) : false;}
template<class T> bool chmin(T& a,const T& b){ return a>b ? (a=b,true) : false;}
template<class T> T gcd(T a,T b){return b?gcd(b,a%b):a;}
template<class T> T lcm(T a,T b){return a/gcd(a,b)*b;}
constexpr ll TEN(int n){return n==0 ? 1 : 10*TEN(n-1);}
constexpr ld  EPS = 1e-10;
const     ld  PI  = acos(-1.0);
constexpr int INF = 1001002003;
constexpr ll  LINF= 1001002003004005006LL;
constexpr int DX[] = { -1, 0, 1, 0 , -1,-1, 1, 1 };
constexpr int DY[] = {  0, 1, 0,-1 , -1, 1,-1, 1 };

int main() {
  int n, k;
  cin >> n >> k;
  vi a(n);  cin >> a;

  int ans = 0;
  cout << ans << endl;
}

Submission status: Runtime Error

Solution code:
from collections import deque

n, k = map(int, input().split())
a = list(map(int, input().split()))
queue = deque()
for i in range(n):
    if i < k - 1:
        queue.append(a[i])
    elif i >= k:
        x = queue.popleft()
        if x < a[i]:
            print("Yes")
        else:
            print("No")
        queue.append(a[i])

Submission status: Runtime Error

Solution code:
from copy import deepcopy

nk = input().split()
n = int(nk[0])
k = int(nk[1])
ajs = input().split()
ajs = np.array([int(aj) for aj in ajs])

ak_current = ajs[:k].cumprod()[-1]

for i in range(k, n):
  ak_tmp = deepcopy(ak_current)
  ak_tmp = ak_tmp * ajs[i] / ajs[i-k]
  
  if ak_tmp > ak_current:
    print('Yes')
  else:
    print('No')
    
  ak_current = ak_tmp

Submission status: Runtime Error

Solution code:
#m-solutions2020 c
import sys,
input = sys.stdin.readline

N,K = list(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:
from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))

n,k=nii()
a=lnii()

for i in range(k,n):
  old=a[i-k]
  new=a[i]
  if old<p:
    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[k+i]>a[i]:
    print("Yes")
  else:
    print("No")