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:
# coding: utf-8
# Your code here!
# 幅優先探索（行きがけ）

import sys


def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())


def main():
    N, K = LI()
    Aarray = LI()

    # start = 1
    # for i in range(K):
    #     start *= Aarray[i]

    # for i in range(K, N):
    #     now = start/Aarray[i-K]*Aarray[i]
    #     if now > start:
    #         print("Yes")
    #     else:
    #         print("No")
    #     start = now

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))

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

N,K = LI()
A = LI()

ans = []

for i in range(N-K):
    if A[i] < A[K+i]:
        ans.append('Yes')
    else:
        ans.append('No')

for a in ans:
    print(a)

Submission status: Accepted

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

a = [0 for _ in range(n)]

a = [int(s) for s in input().split()]

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    N, K = map(int, rl().split())
    A = list(map(int, rl().split()))
    
    l_i = 0
    ans = []
    for ai in A[K:]:
        ans.append('Yes' if A[l_i] < ai else 'No')
        l_i += 1
    print(*ans, sep='\n')


if __name__ == '__main__':
    solve()

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[k+i] > a[i]:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

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

#0, 1
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())
Alst = list(map(int, input().split()))
for i in range(N-K):
    if Alst[i] < Alst[i+K]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

c=1

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

Submission status: Accepted

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




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

Submission status: Accepted

Solution code:
import numpy as np
N, K = map(int,input().split())
A = tuple(map(int,input().split()))
for p in range(1,N-K+1):
    if A[K+p-1] > A[p-1]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
N, K = list(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())
x = list(map(int, input().split()))


for i in range(K+1, N+1):
  

  if x[i-K-1]<x[i-1]:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
from itertools import accumulate
N, K = map(int, input().split())
A = list(map(int, input().split()))
acc = [0]
acc.extend(list(accumulate(A)))
#print(acc)
scores = []
for i in range(K, N + 1):
  scores.append(acc[i] - acc[i - K])
#print(scores)
for i in range(1, N - K + 1):
  if scores[i] > scores[i - 1]:
    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+1):
	if i+k<n:
		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: Accepted

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

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(N: int, K: int, A: "List[int]"):
    for i in range(N-K):
        if A[i]<A[i+K]:
            print(YES)
        else:
            print(NO)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, K, A)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def solve(): 
    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")
if __name__=="__main__":
    solve()

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
s = input().split()
N = int(s[0])
K = int(s[1])
A = input().split()

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

flag = 1
for i in range(N):
    if a[i] < a[i + K]:
        print('Yes')
    else:
        print("No")
    flag += 1
    if flag == N-K+1:
        break

Submission status: Accepted

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

ans = []
flag = 1
for i in range(N):
    if a[i] < a[i + K]:
        print('Yes')
    else:
        print("No")
    flag += 1
    if flag == N-K+1:
        break

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0

n,k = map(int,readline().split())
lst1 = list(map(int,readline().split()))

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

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

a_lst = list(map(int, input().split(" ")))

for i in range(k, n):
    if a_lst[i] > a_lst[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(k, n):
    if a[i - k] / a[i] < 1:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,K = [int(i) for i in input().split()]
A = [int(i) for i in input().split()]
ans = ["Yes" if A[i] > A[i - K] else "No" for i in range(K,N)]
print("\n".join(ans))

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(K,N):
    if A[i-K] < A[i]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
N, K = input().split()
N = int(N)
K = int(K)
scores = [int(s) for s in input().split()]
sums = []
k = K-1
for i in range(k,N-1):
    if(scores[i-k] < scores[i+1]):
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# N,M = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# N = int(sys.stdin.readline())
# INF = float("inf")
import sys
from functools import reduce
N,K = map(int,sys.stdin.readline().split())

A = tuple(map(int,sys.stdin.readline().split())) # single line with multi param

#pre = reduce((lambda x, y: x * y), [A[i] for i in range(K)])
for i in range(K,N):
    #print(i)
    # cur = (pre//A[i-K])*A[i]
    if A[i-K] < A[i]:
        print("Yes")
    else:
        print("No")
    # if pre < cur:
    #
    # else:
    #     print("No")
    # pre = cur

Submission status: Accepted

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

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

#X学期の評点
for i in range(K+1,N+1):
    iscore = a[i]
    jscore = a[i-1-K+1]
    if iscore > jscore:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N,K=map(int,input().split())
A=list(map(int,input().split()))
V=list()
for i in range(N-K):
  if A[i]<A[K+i]:
    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(0,N-K):
    if A[i] < A[i+K]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
# coding: utf-8

import itertools
from functools import reduce
from collections import deque

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

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

Submission status: Accepted

Solution code:
def main():
    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')
main()

Submission status: Accepted

Solution code:
N,K = list(map(int,input().split()))
A = list(map(int,input().split()))
S = K
for K in range(K,N):
    if A[K-S] < A[K]:
        print("Yes")
    else :
        print("No")

Submission status: Accepted

Solution code:
def resolve():
    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]:
            print("Yes")
        else:
            print("No")


    
if '__main__' == __name__:
    resolve()

Submission status: Accepted

Solution code:
from sys import stdin


def readline_from_stdin() -> str:
    return stdin.readline().rstrip


if __name__ == '__main__':
    N, K, = input().split()
    A = [int(i) for i in input().split()]
    N, K = int(N), int(K)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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 k in range(K, N):
        if A[k - K] < A[k]:
            print('Yes')
        else:
            print('No')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python
"""M-SOLUTIONS プロコンオープン 2020: C - Marks
https://atcoder.jp/contests/m-solutions2020/tasks/m_solutions2020_c
"""


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

    for i in range(0, N-K):
        prev_score = As[i]
        score = As[K + i]
        if prev_score < score:
            print('Yes')
        else:
            print('No')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

marks = list(map(int, input().split(' ')))

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
"""M-SOLUTIONS プロコンオープン 2020: C - Marks
https://atcoder.jp/contests/m-solutions2020/tasks/m_solutions2020_c
"""


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

    # N, K = [5, 3]
    # As = [96, 98, 95, 100, 20]

    # N, K = [3, 2]
    # As = [1001, 869120, 1001]

    # N, K = [15, 7]
    # As = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9]
    for i in range(0, N-K):
        # print('i:{}({})'.format(i, i+K))
        prev_score = As[i]
        score = As[K + i]
        # print('{} => {}'.format(prev_score, score))
        if prev_score < score:
            print('Yes')
        else:
            print('No')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
l = [int(x) for x in input().split()]

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

ans=[]
for i in range(k,n):
    if L[i]>L[i-k]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

 
for i in range(k, n):
    l = lis[i-k]
    r = lis[i]
    if r > l:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
def prod(arr):
    s = 0
    for x in arr:
        s += x
    return s


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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('No')
    else:
        print('Yes')

Submission status: Accepted

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

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

Submission status: Accepted

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

B = 0
s = 1
for i, a in enumerate(A):
    if i >= K:
        B = A[i-K]
        s = a
        if B != 0 and B < s:
            print('Yes')
        elif B != 0 and B >= s:
            print('No')

Submission status: Accepted

Solution code:
import numpy as np

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

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

Submission status: Accepted

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

for i in range(N):
    rui[i + 1] = rui[i] + a[i]

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

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
a = list(map(int, input().split()))
#point = 1
t = 0
"""for i in range(t, n):
  point = point*a[i]"""
  
#print(point)
#t = 0
for j in range(k, n):
  #point0 = point
  #point = point*a[j]/a[t]
  if a[j] > a[t]:
    print("Yes")
  else:
    print("No")
  t+=1

Submission status: Accepted

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n,k = readInts()
A = readInts()
for i in range(n-k):
    if A[i] < A[i+k]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

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

wa = [0]
for i in range(n):
    wa.append(wa[i]+a[i])

t = wa[k]-wa[0]
for i in range(k+1,n+1):
    if t < wa[i]-wa[i-k]:
        print("Yes")
    else:
        print("No")
    t = wa[i]-wa[i-k]
    # print(wa[i]-wa[i-k],t)

Submission status: Accepted

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

for i in range(N):
    try:
        if A_l[i] < A_l[i+K]:
            print('Yes')
        else:
            print('No')
    except:
        pass

Submission status: Accepted

Solution code:
# 2020/07/25
# M-SOLUTIONS プロコンオープン 2020 - C

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import functools
import operator

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

# prod = functools.partial(functools.reduce, operator.mul)
# tmp_sum_prod = prod(A[:K])
for i in range(K, N):
    sum_prod = (A[i]/A[i-K])
    if sum_prod > 1.0:
        print('Yes')
    else:
        print('No')
    tmp_sum_prod = sum_prod

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
from collections import deque
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
n, k = M()
A = deque(LI())
ans = deque()
for i in range(k, n):
    if A[i] > A[i-k]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
# import decimal
import time
time1 = time.time()

N, K = map(int, input().split())
# N = 200000
# K = 50000
A_list = list(map(int, input().split()))
# A_list = [2 for i in range(N)]
# Score_list = [1 for i in range(N+1)]

for i in range(K+1, N+1): #KからNの数字が入る
    # print(i-1)
    # print(i-2-K)
    if A_list[i-1] > A_list[i-1-K]:
        print("Yes")
    else:
        print("No")
    # if i == K:
    #     S = 1
    #     for j in range(i-K, i):
    #         S *= A_list[j]
    #     Score_list[i] = S
    # else:
    #     Score_list[i] = int(Score_list[i-1] / A_list[i-1-K])
    #     Score_list[i] *= A_list[i-1]
    # if i > K:
    #     if Score_list[i] > Score_list[i-1]:
    #         print("Yes")
    #     else:
    #         print("No")
    # # print(Score_list)

# print(Score_list)
time2 = time.time()
# print(time2-time1)

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[K + i] > A[i]:
        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(0,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[K + i] >  A[i]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
# import sys
# import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
import time
# from itertools import product,permutations,\
    # combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<50

def readInt():
    return list(map(int,input().split()))

def main():
    n,k = readInt()
    a = readInt()
    ans = ["Yes\n" for i in range(n-k)]
    for i in range(n):
        if i<k:
            continue
        if a[i]>a[i-k]:
            print("Yes")
        else:
            print("No")
    return

if __name__=='__main__':
    main()

Submission status: Accepted

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

for j in range(n-k):
    if x[k+j] > x[j]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:

n,k=map(int,input().split())
x=[int(x) for x in input().split()]
ans=[1]*n
ans[0]=x[0]
c=0
for i in range(k,n):

  if x[c]<x[i]:
    print('Yes')
  else:print('No')
  c+=1

Submission status: Accepted

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

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

Submission status: Accepted

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

score = input().split()

for i in range(semester - K + 1) :
    if i == 0 :
        continue    

    if int(score[K - K + i - 1]) < int(score[K - 1 + i]) :
        print("Yes")
    else :
        print("No")

Submission status: Accepted

Solution code:
import numpy as np

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

Submission status: Accepted

Solution code:
import numpy as np
N,K = list(map(int, input().split()))
A = list(map(int, input().split()))
for i in range(N-K):
  sc = A[K+i] / A[i]
  if sc > 1:
    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: Accepted

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

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