ZhenlongDai/ACPR huggingface dataset:
Problem: p03231
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


def gcd(a,b):
    
    while b > 0:
        a, b = b, a % b
    return a

def lcm(a, b):
    
    return a * b / gcd(a, b)


def main():
    N,M = map(int,input().split())
    S=input()
    T=input()

    L=int(lcm(N,M))

    N_ = int(L/N)
    M_ = int(L/M)

    L_ = int(lcm(N_,M_))

    for i in range(0,L-1,L_):
        if(S[int(i/N_)] != T[int(i/M_)]):
            print(-1)
            return 0;

    print(L)
    return 0;

main()

Failing test case input:
2 2
acq
ae

Expected output:
-1


Actual output:
2


Fixed submission (verdict: Accepted):


def gcd(a,b):
    
    while b > 0:
        a, b = b, a % b
    return a

def lcm(a, b):
    
    return a * b / gcd(a, b)


def main():
    N,M = map(int,input().split())
    S=input()
    T=input()

    L=int(lcm(N,M))

    N_ = int(L/N)
    M_ = int(L/M)

    L_ = int(lcm(N_,M_))

    for i in range(0,L,L_):
        if(S[int(i/N_)] != T[int(i/M_)]):
            print(-1)
            return 0;

    print(L)
    return 0;

main()

Problem: p03231
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, M = map(int, input().split())
S = input()
T = input()

lenS = len(S)
lenT = len(T)


def gcd(x, y):
    while y != 0:
        x, y = y, x % y
    return x


def lcm(x, y):
    return x * y 


lcmnum = lcm(lenS, lenT)

if S[0] != T[0]:
    print(-1)
    exit()

if lcmnum == lenS or lcmnum == lenT:
    print(-1)
else:
    print(lcmnum)


Failing test case input:
5 2
aar
ae

Expected output:
10


Actual output:
6


Fixed submission (verdict: Accepted):
N, M = map(int, input().split())
S = input()
T = input()


def gcd(x, y):
    while y != 0:
        x, y = y, x % y
    return x


def lcm(x, y):
    return x * y 


n_lcm = lcm(len(S), len(T))
gcd_nm = gcd(N, M)

s_step = N 
t_step = M 

for i in range(gcd_nm):
    if S[i * N 
        print(-1)
        exit()
print(n_lcm)

Problem: p03231
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)

def lcm(a, b):
    return (a * b) 

n, m = map(int, input().split())
s = input()
t = input()
if max(n, m) % min(n, m) == 0:
    print(-1)
else:
    print(lcm(n, m))

Failing test case input:
3 4
dniatrayvkuuisa
aumnudjus

Expected output:
-1


Actual output:
12


Fixed submission (verdict: Accepted):
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)

def lcm(a, b):
    return (a * b) 

n, m = map(int, input().split())
s = input()
t = input()
L = lcm(n, m)
l = lcm(L 
for i in range(0, L, l):
    if s[i 
        print(-1)
        exit()
print(L)
Problem: p03231
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import fractions
def lcm(x, y):
    return (x * y) 

n,m = map(int, input().split())
s = input()
t = input()

if s[0] != t[0]:
    print(-1)
    exit()

g = lcm(n,m)

if g == n or g == m:
    if n < m:
        sm = n
        ls = s
        bs = t
    else:
        sm = m
        ls = t
        bs = s
    a = g
    flg = False
    for i in range(sm):
        if bs[i * a] != ls[i]:
            flg = True
            break
    if flg:
        print(-1)
    else:
        print(g)
else:
    print(g)


Failing test case input:
2 2
acq
ae

Expected output:
-1


Actual output:
4


Fixed submission (verdict: Accepted):
import fractions
def lcm(x, y):
    return (x * y) 

n,m = map(int, input().split())
s = input()
t = input()

if s[0] != t[0]:
    print(-1)
    exit()

g = lcm(n,m)

if n < m:
    sm = n
    bi = m
    ls = s
    bs = t
else:
    sm = m
    bi = n
    ls = t
    bs = s
a = g
b = g
flg = False
for i in range(sm):
    p = i * a
    if p % b == 0:
        if bs[p
            flg = True
            break
if flg:
    print(-1)
else:
    print(g)

Problem: p03231
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b 


def resolve():
    n, m = map(int, input().split())
    s = input()
    t = input()

    L = lcm(n, m)

    if L > max(n, m):
        print(L)
    else:
        print(-1)


if __name__ == '__main__':
    resolve()


Failing test case input:
3 6
dniusr`yukuaisa
amunudjur

Expected output:
-1


Actual output:
18


Fixed submission (verdict: Accepted):
import sys
from collections import defaultdict

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b 


def resolve():
    n, m = map(int, input().split())
    s = input()
    t = input()

    L = lcm(n, m)

    X = dict()
    for i in range(n):
        idx = (L 
        X[idx] = s[i]

    for i in range(m):
        idx = (L 
        if X.get(idx) != None and X[idx] != t[i]:
            print("-1")
            break
    else:
        print(L)


if __name__ == '__main__':
    resolve()
Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k = map(int,input().split())
A = list(map(int,input().split()))

L = []
ave = sum(A[:k])

L.append(ave)

for i in range(n-k-1):
    
    ave = ave - A[i] + A[k+i]
    L.append(ave)

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

Failing test case input:
15 5
3 1 9 1 5 5 0 8 1 5 2 8 9 7 15

Expected output:
Yes
No
No
No
No
No
Yes
Yes
Yes
Yes


Actual output:
Yes
No
No
No
No
No
Yes
Yes
Yes


Fixed submission (verdict: Accepted):
n,k = map(int,input().split())
A = list(map(int,input().split()))

L = []
ave = sum(A[:k])

L.append(ave)

for i in range(n-k):
    
    ave = ave - A[i] + A[k+i]
    L.append(ave)

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

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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("N0")

Failing test case input:
15 6
3 0 17 1 3 9 2 8 9 11 9 5 0 3 18

Expected output:
No
Yes
No
Yes
Yes
No
No
No
Yes


Actual output:
N0
Yes
N0
Yes
Yes
N0
N0
N0
Yes


Fixed submission (verdict: Accepted):
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")

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k=map(int,input().split())
l=list(map(int,input().split()))

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


Failing test case input:
15 3
3 1 8 1 5 9 1 8 5 8 13 7 9 3 18

Expected output:
No
Yes
Yes
No
Yes
No
Yes
Yes
Yes
Yes
No
Yes


Actual output:
No
Yes
Yes
No
Yes
No
Yes
Yes
No
Yes
No
Yes


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
l=list(map(int,input().split()))

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

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k=map(int,input().split())
a=list(map(int, input().split()))

for i in range(k,n):
    if a[i-3]*a[i-2]*a[i-1]<a[i-2]*a[i-1]*a[i]:
        print("Yes");
    else :
        print("No");


Failing test case input:
15 7
3 2 4 1 5 2 4 2 4 10 10 0 7 4 11

Expected output:
No
Yes
Yes
Yes
No
Yes
No
Yes


Actual output:
No
Yes
Yes
Yes
No
No
No
Yes


Fixed submission (verdict: Accepted):
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");
Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = map(int, input().split())
A = [int(i) for i in input().split()]
i_list = [0] * N

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

Failing test case input:
15 6
3 1 8 1 5 12 1 6 5 5 9 1 0 7 9

Expected output:
No
Yes
No
Yes
Yes
No
No
Yes
Yes


Actual output:
[3, 1, 8, 1, 5, 12, 1, 6, 5, 5, 9, 1, 0, 7, 9]
No
Yes
No
Yes
Yes
No
No
Yes
Yes


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
A = [int(i) for i in input().split()]
i_list = [0] * N

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

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = map(int,input().split())
A = [int(x) for x in input().split()]

def solve(N, K, A):
    
    P = 1
    for i in range(K-1):
        P *= A[i]

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

solve(N, K, A)



Failing test case input:
15 7
9 1 9 1 5 17 0 9 1 5 9 7 9 7 1

Expected output:
No
No
No
Yes
Yes
No
Yes
No


Actual output:
Yes
No
Yes
Yes
Yes
Yes
Yes
No


Fixed submission (verdict: Accepted):
import sys
N, K = map(int,input().split())
A = [int(x) for x in input().split()]

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

solve(N, K, A)

Problem: p02602
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
def solve(): 
    N,K=map(int,input().split())
    A=list(map(int,input().split()))
    for i in range(N-K):
        if A[i-1]<A[i+K-1]:
            print("Yes")
        else:
            print("No")
if __name__=="__main__":
    solve()

Failing test case input:
3 2
1001 869120 1001

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
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()

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, k = map(int,input().split())
a = input().split()
for i in range(n-k):
    if a[i] < a[i+k]:
        print('Yes')
    else:
        print('No')

Failing test case input:
15 7
3 2 8 1 3 17 2 11 1 6 9 10 11 7 3

Expected output:
Yes
No
No
Yes
Yes
No
Yes
No


Actual output:
No
No
No
Yes
No
No
Yes
Yes


Fixed submission (verdict: Accepted):
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')
Problem: p02602
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n,k = map(int,input().split())
a = list(map(int,input().split()))

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

Failing test case input:
15 13
3 2 8 1 3 9 1 11 1 5 9 10 11 7 16

Expected output:
Yes
Yes


Actual output:
No
Yes


Fixed submission (verdict: Accepted):
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")

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,K = list(map(int, input().split()))
A = [int(i) for i in input().split()]

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

Failing test case input:
15 9
2 2 8 1 3 9 2 11 1 5 9 10 11 7 16

Expected output:
Yes
Yes
Yes
Yes
Yes
Yes


Actual output:
No
Yes
No
Yes
Yes
No
Yes
No
Yes
Yes
Yes
Yes
No
Yes


Fixed submission (verdict: Accepted):
N,K = list(map(int, input().split()))
A = [int(i) for i in input().split()]

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

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
import math
sys.setrecursionlimit(int(1e6))

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



i_l = 0
for i_r in range(k, n):
  
  if A[i_l] > A[i_r]:
    print('No')
  else:
    print('Yes')

  i_l = i_l + 1


Failing test case input:
15 7
6 1 11 1 5 9 4 6 5 5 10 0 7 4 7

Expected output:
No
Yes
No
Yes
No
No
No
Yes


Actual output:
Yes
Yes
No
Yes
No
No
Yes
Yes


Fixed submission (verdict: Accepted):
import sys
import math
sys.setrecursionlimit(int(1e6))

def dprint(*args):
  pass

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

i_l = 0
for i_r in range(k, n):
  dprint('i_l, i_r = ', i_l, i_r)
  if A[i_l] >= A[i_r]:
    print('No')
  else:
    print('Yes')

  i_l = i_l + 1

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, k = list(map(int, input().split()))
a = list(map(int, input().split()))

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

Failing test case input:
15 7
3 1 2 1 5 5 0 8 1 5 2 8 9 2 15

Expected output:
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes


Actual output:
Yes
No
Yes
No
Yes
Yes
No
Yes


Fixed submission (verdict: Accepted):
n, k = list(map(int, input().split()))
a = list(map(int, input().split()))

for i in range(k, n):
    if i >= k and a[i - k] < a[i]:
        print("Yes")
    else:
        print("No")
Problem: p02602
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n,k = map(int,input().split())
a = list(map(int,input().split()))

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

Failing test case input:
15 7
3 1 4 1 6 9 2 6 5 6 5 7 3 1 9

Expected output:
Yes
Yes
Yes
Yes
Yes
No
No
Yes


Actual output:
No
Yes
No
No
Yes
No
No
Yes


Fixed submission (verdict: Accepted):
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")

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
terms, graded_terms = input().split(" ")
grade_list = [i for i in input().split(" ")]
x1 = 0
x2 = int(graded_terms)
for i in range(int(terms)-int(graded_terms)):
    if grade_list[int(x1)] < grade_list[int(x2)]:
        print("yes2")
    else:
        print("no")
    x1 += 1
    x2 += 1


Failing test case input:
15 7
3 2 8 2 5 9 4 6 2 5 10 0 7 4 7

Expected output:
Yes
No
No
Yes
No
No
No
Yes


Actual output:
yes2
no
no
no
no
no
no
yes2


Fixed submission (verdict: Accepted):
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

Problem: p02602
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n,k = map(int,input().split())
a = list(map(int,input().split()))

for i in range(k-3,n-3):
    score1 = a[i]*a[i+1]*a[i+2]
    score2 = a[i+1]*a[i+2]*a[i+3]
    if score1<score2:
        print("Yes")
    else:
        print("No")

Failing test case input:
15 7
3 1 4 1 5 9 2 6 5 3 5 7 9 1 9

Expected output:
Yes
Yes
No
Yes
Yes
No
No
Yes


Actual output:
Yes
No
Yes
No
Yes
Yes
No
Yes


Fixed submission (verdict: Accepted):
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")

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import copy

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

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

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

Failing test case input:
15 4
3 0 17 1 3 9 2 8 9 11 9 5 0 3 18

Expected output:
No
Yes
No
Yes
Yes
Yes
Yes
No
No
No
Yes


Actual output:
No
No
No
No
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
nk=list(map(int, input().split()))
a=list(map(int, input().split()))

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

for i in range(n-k):
  if(a[i]<a[i+k]):
    print("Yes")
  else:
    print("No")
Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k = map(int,input().split())
e = list(map(int,input().split()))
c = -1
for i in range(k-1,n):
    b = e[i]+e[i-1]+e[i]
    if i> k-1 and b>c:
        print('Yes')
    elif i > k-1:
        print('No')
    c = b

Failing test case input:
15 7
1 1 8 1 5 8 1 6 5 5 9 8 9 7 1

Expected output:
Yes
Yes
No
Yes
Yes
Yes
Yes
No


Actual output:
Yes
Yes
No
Yes
Yes
Yes
No
No


Fixed submission (verdict: Accepted):
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')

Problem: p02602
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N, K = map(int, input().split())
A = list(map(int, input().split()))
ACC = []
ACC.append(0)
sum = 0
for a in A:
    sum += a
    ACC.append(sum)


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

Failing test case input:
5 0
96 98 162 100 39

Expected output:
No
No
No
No
No


Actual output:
No
No
No
No


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


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

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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")

Failing test case input:
15 7
3 1 9 1 5 5 0 8 1 5 9 8 9 7 15

Expected output:
Yes
No
No
Yes
Yes
Yes
Yes
Yes


Actual output:
Yes
No
Yes
Yes
No
Yes
No
Yes


Fixed submission (verdict: Accepted):
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+n[1]]>m[i]):
        print("Yes")
    else:
        print("No")

Problem: p02602
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n,k = map(int,input().split())
a = list(map(int,input().split()))

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

Failing test case input:
15 2
4 1 4 0 6 9 2 6 5 3 5 7 9 1 9

Expected output:
No
No
Yes
Yes
No
No
Yes
No
No
Yes
Yes
No
No


Actual output:
No
No
No
Yes
Yes
No
No
Yes
No
No
Yes
Yes
No


Fixed submission (verdict: Accepted):
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")
Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k=map(int,input().split())
I=list(map(int,input().split()))
for i in range(k,n):
    if I[i-1]<I[i]:
        print("Yes")
    else:
        print("No")


Failing test case input:
15 2
0 1 8 0 2 9 3 3 8 8 4 7 3 7 54

Expected output:
Yes
No
No
Yes
Yes
No
Yes
Yes
No
No
No
No
Yes


Actual output:
Yes
No
Yes
Yes
No
No
Yes
No
No
Yes
No
Yes
Yes


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
I=list(map(int,input().split()))
for i in range(k,n):
    if I[i-k]<I[i]:
        print("Yes")
    else:
        print("No")

Problem: p02602
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n, k = map(int, input().split())
a = list(map(int, input().split()))
for i in range(k, n):
    if a[i] > a[i - 1]:
        print("Yes")
    else:
        print("No")


Failing test case input:
15 7
-2 1 8 1 4 9 1 10 8 16 5 0 4 7 24

Expected output:
Yes
Yes
Yes
Yes
No
No
Yes
Yes


Actual output:
Yes
No
Yes
No
No
Yes
Yes
Yes


Fixed submission (verdict: Accepted):
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")

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = map(int, input().split())
A = list(map(int, input().split()))

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

result = []
for i in range(K, N):
    t = p 
    if t > p:
        result.append('Yes')
    else:
        result.append('No')
print(*result, sep='\n')


Failing test case input:
15 10
3 1 9 1 5 9 0 8 1 5 9 8 9 7 15

Expected output:
Yes
Yes
No
Yes
Yes


Actual output:
No
No
No
No
No


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
A = list(map(int, input().split()))

result = []
for i in range(K, N):
    if A[i] > A[i - K]:
        result.append('Yes')
    else:
        result.append('No')
print(*result, sep='\n')

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = map(int, input().strip().split(" "))
scores = input().strip().split(" ")

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

Failing test case input:
15 7
4 1 9 2 0 5 0 8 1 5 4 0 17 2 54

Expected output:
Yes
No
No
Yes
No
Yes
Yes
Yes


Actual output:
Yes
No
No
Yes
No
No
Yes
No


Fixed submission (verdict: Accepted):
N, K = map(int, input().strip().split(" "))
scores = input().strip().split(" ")

for i in range(K, N):
    if (int(scores[i]) > int(scores[i-K])):
        print("Yes")
    else:
        print("No")
Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,K = map(int,input().split())
A = [int(a) for a in input().split()]

n = 0

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




Failing test case input:
15 7
2 1 1 2 5 9 0 2 1 5 17 7 9 4 15

Expected output:
No
No
Yes
Yes
Yes
No
Yes
Yes


Actual output:
No
Yes
Yes
Yes
Yes
No
Yes


Fixed submission (verdict: Accepted):
N,K = map(int,input().split())
A = [int(a) for a in input().split()]

n = 0

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

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k=map(int,input().split())
a=list(map(int,input().split()))

for j in range(k-1,n-1):
	sum=a[j]*a[j-1]*a[j-2]
	sum1=a[j+1]*a[j]*a[j-1]
	if sum1>sum:
		print("Yes")
	else:
		print("No")

Failing test case input:
15 7
2 1 9 1 5 9 1 8 1 0 9 7 17 0 15

Expected output:
Yes
No
No
Yes
Yes
Yes
No
Yes


Actual output:
Yes
No
No
No
No
Yes
No
No


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
a=list(map(int,input().split()))

cnt=0

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

	cnt+=1

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, k = map(int, input().split())
a = list(map(int, input().split()))
for i in range(n-k-1):
    ab = a[i]*a[k-1+i]
    aa = a[i+1]*a[k+i]
    if aa > ab:
        print("Yes")
    else:
        print("No")




    
    


Failing test case input:
15 7
2 1 1 2 5 9 0 2 1 5 17 7 9 4 15

Expected output:
No
No
Yes
Yes
Yes
No
Yes
Yes


Actual output:
Yes
No
Yes
Yes
No
No
Yes


Fixed submission (verdict: Accepted):
n, k = map(int, input().split())
a = list(map(int, input().split()))
for i in range(n-k):
    ab = a[i]
    aa = a[k+i]
    if aa > ab:
        print("Yes")
    else:
        print("No")

Problem: p02602
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n,k =map(int,input().split())
a=[int(x ) for x in input().split()]
for i in range(k,n):
    if a[i]>a[i-1]:
        print("Yes")
    else:
        print("No")


Failing test case input:
15 7
9 1 9 1 5 17 0 9 1 5 9 7 9 7 1

Expected output:
No
No
No
Yes
Yes
No
Yes
No


Actual output:
Yes
No
Yes
Yes
No
Yes
No
No


Fixed submission (verdict: Accepted):
n,k =map(int,input().split())
a=[int(x ) for x in input().split()]
for i in range(k,n):
    if a[i-k]<a[i]:
        print("Yes")
    else:
        print("No")

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k=map(int,input().split())
I=list(map(int,input().split()))
for i in range(k+1,n):
    if I[i-k]<I[i]:
        print("Yes")
    else:
        print("No")
    


Failing test case input:
15 7
3 2 8 2 5 9 4 6 2 5 10 0 7 4 7

Expected output:
Yes
No
No
Yes
No
No
No
Yes


Actual output:
No
No
Yes
No
No
No
Yes


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
I=list(map(int,input().split()))
for i in range(k,n):
    if I[i-k]<I[i]:
        print("Yes")
    else:
        print("No")
Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = map(int, input().split())
A = list(map(int, input().split()))
ans = []

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

Failing test case input:
15 11
3 1 8 1 5 9 1 6 5 5 9 7 9 7 16

Expected output:
Yes
Yes
No
Yes


Actual output:
Yes
Yes
Yes
Yes


Fixed submission (verdict: Accepted):
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")

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = list(map(int, input().split()))
A = list(map(int, input().split()))

results = list()
for first, second in zip(A[0:N - K], A[K:N]):
    print(first, second)
    if second > first:
        results.append(True)
    else:
        results.append(False)

for res in results:
    if res:
        print('Yes')
    else:
        print('No')


Failing test case input:
15 4
3 0 17 1 5 9 2 8 9 11 9 5 0 3 18

Expected output:
Yes
Yes
No
Yes
Yes
Yes
Yes
No
No
No
Yes


Actual output:
3 5
0 9
17 2
1 8
5 9
9 11
2 9
8 5
9 0
11 3
9 18
Yes
Yes
No
Yes
Yes
Yes
Yes
No
No
No
Yes


Fixed submission (verdict: Accepted):
N, K = list(map(int, input().split()))
A = list(map(int, input().split()))

results = list()
for first, second in zip(A[0:N - K], A[K:N]):
    if second > first:
        results.append(True)
    else:
        results.append(False)

for res in results:
    if res:
        print('Yes')
    else:
        print('No')

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, k = map(int, input().split())
a = list(map(int, input().split()))
cnt = 1
for i in range(n):
    cnt*=a[i]
    cnt%=10**9
    if i>=k:
        m = cnt
        cnt
        if cnt>m: print('Yes')
        else: print('No')


Failing test case input:
15 7
3 1 4 1 5 9 2 6 5 5 5 7 9 7 9

Expected output:
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes


Actual output:
No
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
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')

Problem: p02602
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N, K = map(int, input().split())
X = list(map(int, input().split()))
f,e=0,K
for i in range(N-K):
    if X[e]>X[f]:
        print("YES")
    else:
        print("NO")
    f+=1
    e+=1



Failing test case input:
15 7
3 1 9 1 5 5 0 8 1 5 9 8 9 7 15

Expected output:
Yes
No
No
Yes
Yes
Yes
Yes
Yes


Actual output:
YES
NO
NO
YES
YES
YES
YES
YES


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
X = list(map(int, input().split()))
f,e=0,K
for i in range(N-K):
    if X[e]>X[f]:
        print("Yes")
    else:
        print("No")
    f+=1
    e+=1
Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, k = map(int, input().split())
a = list(map(int, input().split()))
for i in range(k, n):
  if a[i-k] < a[k]: print("Yes")
  else: print("No")

Failing test case input:
15 4
3 0 17 1 5 9 2 8 9 11 9 5 0 3 18

Expected output:
Yes
Yes
No
Yes
Yes
Yes
Yes
No
No
No
Yes


Actual output:
Yes
Yes
No
Yes
No
No
Yes
No
No
No
No


Fixed submission (verdict: Accepted):
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")

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = map(int, input().split())
A = list(map(int, input().split()))

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

Failing test case input:
15 5
3 2 8 2 5 9 4 6 2 5 10 0 7 4 7

Expected output:
Yes
Yes
No
No
No
Yes
No
Yes
Yes
Yes


Actual output:
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes


Fixed submission (verdict: Accepted):
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')

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = map(int, input().split())
A_list = list(map(int, input().split()))

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

Failing test case input:
15 7
2 1 4 1 6 9 2 10 5 3 5 7 9 2 9

Expected output:
Yes
Yes
No
Yes
Yes
No
No
No


Actual output:
Yes
Yes
No
Yes
Yes
Yes
Yes
No


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
A_list = list(map(int, input().split()))

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

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k=map(int,input().split())
a=list(map(int,input().split()))
for i in range(k,n):
  if a[k]>a[i-k]:
    print('Yes')
  else:
    print('No')

Failing test case input:
15 5
3 1 4 1 2 9 1 -1 8 3 0 8 9 7 16

Expected output:
Yes
No
No
Yes
Yes
No
Yes
Yes
No
Yes


Actual output:
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes


Fixed submission (verdict: Accepted):
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')

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, k = map(int, input().split())
a = list(map(int, input().split()))
g = 1
c = 0
for i in range(n):
    g*=a[i]
    if i>k:
        if g>c: print('Yes')
        else: print('No')
    c=g

Failing test case input:
15 2
3 1 9 2 6 9 1 8 1 5 9 13 9 3 28

Expected output:
Yes
Yes
No
Yes
No
No
No
No
Yes
Yes
No
No
Yes


Actual output:
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes


Fixed submission (verdict: Accepted):
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')
Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k=map(int, input().split())
a=list(map(int, input().split())) 
cnt = 0
tmp = 1

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

Failing test case input:
15 5
3 1 9 1 5 5 0 8 1 5 2 8 9 7 15

Expected output:
Yes
No
No
No
No
No
Yes
Yes
Yes
Yes


Actual output:
Yes
No
No
No
No


Fixed submission (verdict: Accepted):
n,k=map(int, input().split())
a=list(map(int, input().split())) 

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

Problem: p02602
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N,K = map(int,input().split())
T = list(map(int,input().split()))

for p in range(N-K):
    if T[p] - T[p+K] >0:
        print('Yes')
    else:
        print('No')
    

Failing test case input:
15 11
3 1 0 0 6 9 1 6 5 5 9 7 9 7 16

Expected output:
Yes
Yes
Yes
Yes


Actual output:
No
No
No
No


Fixed submission (verdict: Accepted):
N,K = map(int,input().split())
T = list(map(int,input().split()))
for p in range(N-K):
    if T[p] - T[p+K] <0:
        print('Yes')
    else:
        print('No')

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k=map(int,input().split())
a=list(map(int,input().split()))
print(a)
for i in range(n-k):
    if a[k+i]>a[i]:
        print('Yes')
    else:
        print('No')

Failing test case input:
15 2
3 1 9 2 6 9 1 0 1 5 9 13 9 3 28

Expected output:
Yes
Yes
No
Yes
No
No
No
Yes
Yes
Yes
No
No
Yes


Actual output:
[3, 1, 9, 2, 6, 9, 1, 0, 1, 5, 9, 13, 9, 3, 28]
Yes
Yes
No
Yes
No
No
No
Yes
Yes
Yes
No
No
Yes


Fixed submission (verdict: Accepted):
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')

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k = map(int, input().split())
a = list(map(int, input().split()))

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

Failing test case input:
15 7
3 1 9 2 5 5 0 8 1 5 2 8 17 0 28

Expected output:
Yes
No
No
No
Yes
Yes
No
Yes


Actual output:
No
No
Yes
No
Yes
Yes
No
No


Fixed submission (verdict: Accepted):
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")

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K= map(int,input().split())
A = list(map(int,input().split()))

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

Failing test case input:
15 7
1 1 9 2 0 5 0 16 1 5 5 0 0 2 54

Expected output:
Yes
No
No
Yes
No
No
Yes
Yes


Actual output:
No
No
Yes
No
No
No
No
Yes


Fixed submission (verdict: Accepted):
N, K= map(int,input().split())
A = list(map(int,input().split()))

for i in range(K+1, N+1):
    if A[i-1]>A[i-K-1]:
        print('Yes')
    else:
        print('No')
Problem: p02602
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N , K = list(map(int, input().split()))
A = list(map(int, input().split()))
score = 1
for i in range(K + 1, N):
  if(A[i] > A[i - K]): print("Yes")
  else: print("No")

Failing test case input:
15 7
9 1 9 1 5 17 0 9 1 5 9 7 9 7 1

Expected output:
No
No
No
Yes
Yes
No
Yes
No


Actual output:
No
No
Yes
Yes
No
Yes
No


Fixed submission (verdict: Accepted):
N , K = list(map(int, input().split()))
A = list(map(int, input().split()))
score = 1
for i in range(K, N):
  if(A[i] > A[i - K]): print("Yes")
  else: print("No")

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
nk=list(map(int, input().split()))
a=list(map(int, input().split()))

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

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

Failing test case input:
15 4
3 0 17 1 5 9 1 8 5 11 9 5 0 3 18

Expected output:
Yes
Yes
No
Yes
No
Yes
Yes
No
No
No
Yes


Actual output:
No
No
No
No
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
nk=list(map(int, input().split()))
a=list(map(int, input().split()))

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

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

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
terms, graded_terms = input().split(" ")
grade_list = [i for i in input().split(" ")]
x1 = 0
x2 = int(graded_terms)
for i in range(int(terms)-int(graded_terms)):
    if grade_list[int(x2)] > grade_list[int(x1)]:
        print("Yes")
    else:
        print("No")
    x1 += 1
    x2 += 1


Failing test case input:
15 7
0 1 8 1 10 9 1 10 5 5 5 7 4 7 9

Expected output:
Yes
Yes
No
Yes
No
No
Yes
No


Actual output:
Yes
Yes
No
Yes
Yes
No
Yes
Yes


Fixed submission (verdict: Accepted):
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

Problem: p02602
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n,k =map(int,input().split())
a=[int(x ) for x in input().split()]
for i in range(k,n):
    if a[i-k]>a[i-1]:
        print("Yes")
    else:
        print("No")


Failing test case input:
15 7
3 2 6 1 5 1 4 6 5 5 10 0 7 4 7

Expected output:
Yes
Yes
No
Yes
No
Yes
No
Yes


Actual output:
No
No
Yes
No
No
Yes
No
Yes


Fixed submission (verdict: Accepted):
n,k =map(int,input().split())
a=[int(x ) for x in input().split()]
for i in range(k,n):
    if a[i-k]<a[i]:
        print("Yes")
    else:
        print("No")
Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, k = map(int, input().split())
a = list(map(int, input().split()))
for i in range(n-k-1):
    ab = a[i]
    aa = a[k+i]
    if aa > ab:
        print("Yes")
    else:
        print("No")


Failing test case input:
15 2
3 1 8 1 5 9 1 8 1 5 9 13 9 3 28

Expected output:
Yes
No
No
Yes
No
No
No
No
Yes
Yes
No
No
Yes


Actual output:
Yes
No
No
Yes
No
No
No
No
Yes
Yes
No
No


Fixed submission (verdict: Accepted):
n, k = map(int, input().split())
a = list(map(int, input().split()))
for i in range(n-k):
    ab = a[i]
    aa = a[k+i]
    if aa > ab:
        print("Yes")
    else:
        print("No")

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = map(int, input().split())
A = []
for i, a in enumerate(input().split()):
  if i < K:
    A.append(a)
    continue
  else:
    A.append(a)
    x = A.pop(0)
    if x < a:
      print('Yes')
    else:
      print('No')

Failing test case input:
15 5
3 0 17 1 3 9 2 10 9 11 9 5 0 3 18

Expected output:
Yes
Yes
No
Yes
Yes
No
Yes
No
No
Yes


Actual output:
Yes
Yes
No
Yes
No
No
Yes
No
No
Yes


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
A = []
for i, a in enumerate(list(map(int, input().split()))):
  if i < K:
    A.append(a)
    continue
  else:
    A.append(a)
    x = A.pop(0)
    if x < a:
      print('Yes')
    else:
      print('No')

Problem: p02602
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n,k=map(int,input().split())
a=list(map(int,input().split()))
for i in range(1,k):
  if a[i]>a[i-1]:
    print("Yes")
  else:
    print("No")

Failing test case input:
15 7
3 6 6 1 5 1 4 6 5 5 10 0 7 0 7

Expected output:
Yes
No
No
Yes
No
Yes
No
Yes


Actual output:
Yes
No
No
Yes
No
Yes


Fixed submission (verdict: Accepted):
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")

Problem: p02602
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys


def handler():
    n, m = [int(i) for i in input().strip().split()]
    a = [int(i) for i in input().strip().split()]
    for i in range(m, n):
        if a[i] <= a[i - m]:
            sys.stdout.write('NO\n')
        else:
            sys.stdout.write('YES\n')


def main():
    while True:
        try:
            handler()
        except ValueError:
            continue
        except EOFError:
            break


if __name__ == '__main__':
    main()

Failing test case input:
15 4
3 0 17 1 3 9 2 8 9 11 9 5 0 3 18

Expected output:
No
Yes
No
Yes
Yes
Yes
Yes
No
No
No
Yes


Actual output:
NO
YES
NO
YES
YES
YES
YES
NO
NO
NO
YES


Fixed submission (verdict: Accepted):
import sys


def handler():
    n, m = [int(i) for i in input().strip().split()]
    a = [int(i) for i in input().strip().split()]
    for i in range(m, n):
        if a[i] <= a[i - m]:
            sys.stdout.write('No\n')
        else:
            sys.stdout.write('Yes\n')


def main():
    while True:
        try:
            handler()
        except ValueError:
            continue
        except EOFError:
            break


if __name__ == '__main__':
    main()
Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
l = list(map(int,input().split()))
n, k = l[0], l[1]
a = list(map(int,input().split()))

for i in range(k, n):
    bef = a[i-1] * a[i-2] * a[i-3]
    cur = a[i] * a[i-1] * a[i-2]
    if cur > bef:
        print('Yes')
    else:
        print('No')

Failing test case input:
15 7
-2 1 8 1 4 9 1 10 8 16 5 0 4 7 24

Expected output:
Yes
Yes
Yes
Yes
No
No
Yes
Yes


Actual output:
Yes
No
Yes
No
No
No
No
Yes


Fixed submission (verdict: Accepted):
l = list(map(int,input().split()))
n, k = l[0], l[1]
a = list(map(int,input().split()))

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

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
terms, graded_terms = input().split(" ")
grade_list = [i for i in input().split(" ")]
x1 = 0
x2 = int(graded_terms)
for i in range(int(terms)-int(graded_terms)):
    if grade_list[int(x2)] > grade_list[int(x1)]:
        print("yes")
    else:
        print("no")
    x1 += 1
    x2 += 1


Failing test case input:
15 7
3 1 9 1 5 5 0 8 1 5 9 8 9 7 15

Expected output:
Yes
No
No
Yes
Yes
Yes
Yes
Yes


Actual output:
yes
no
no
yes
yes
yes
yes
no


Fixed submission (verdict: Accepted):
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

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, k = map(int, input().split())
al = list(map(int, input().split()))
for i in range(k, n):
    print('yes' if al[i] > al[i - k] else 'No')

Failing test case input:
15 11
3 1 8 1 5 9 1 6 5 5 9 7 9 7 16

Expected output:
Yes
Yes
No
Yes


Actual output:
yes
yes
No
yes


Fixed submission (verdict: Accepted):
n, k = map(int, input().split())
al = list(map(int, input().split()))
for i in range(k, n):
    print('Yes' if al[i] > al[i - k] else 'No')

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
l = list(map(int,input().split()))
n, k = l[0], l[1]
a = list(map(int,input().split()))

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

Failing test case input:
15 7
3 1 4 1 5 9 2 12 5 5 5 0 9 7 9

Expected output:
Yes
Yes
Yes
Yes
No
No
Yes
No


Actual output:
Yes
No
Yes
No
No
Yes
Yes
Yes


Fixed submission (verdict: Accepted):
l = list(map(int,input().split()))
n, k = l[0], l[1]
a = list(map(int,input().split()))

for i in range(k, n):
    if a[i] > a[i-k]:
        print('Yes')
    else:
        print('No')
Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k = map(int,input().split())
a = list(map(int,input().split()))
temp = sum(a[:k])
i = k
for _ in range(n-k):
    score = (temp*a[i])
    print("Yes" if score>temp else "No")
    temp = score
    i+=1

Failing test case input:
15 2
6 1 8 2 12 9 1 8 1 6 9 15 9 3 28

Expected output:
Yes
Yes
Yes
Yes
No
No
No
No
Yes
Yes
No
No
Yes


Actual output:
Yes
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes


Fixed submission (verdict: Accepted):
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

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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')  

Failing test case input:
15 7
3 1 4 1 5 9 2 6 5 3 5 7 9 1 9

Expected output:
Yes
Yes
No
Yes
Yes
No
No
Yes


Actual output:
yes
yes
No
yes
yes
No
No
yes


Fixed submission (verdict: Accepted):
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')

Problem: p02602
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N,K = map(int,input().split())
A = list(map(int,input().split()))
if K==1:
  for i in range(N):
    print('No')
else:
  left = 0
  right = K
  while True:
    if right>=N:
      break
    else:
      if A[right]>A[left]:
        print('Yes')
      else:
        print('No')

      left += 1
      right += 1

Failing test case input:
15 1
4 1 4 0 6 9 2 6 5 3 5 7 9 1 9

Expected output:
No
Yes
No
Yes
Yes
No
Yes
No
No
Yes
Yes
Yes
No
Yes


Actual output:
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
N,K = map(int,input().split())
A = list(map(int,input().split()))
left = 0
right = K
while True:
  if right>=N:
    break
  else:
    if A[right]>A[left]:
      print('Yes')
    else:
      print('No')

    left += 1
    right += 1

Problem: p02602
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

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

prod = 1

for A in As[:K]:
    prod *= A

for i in range(K, N):
    next_prod = prod 
    if next_prod > prod:
        print('Yes')
    else:
        print('No')
    next_prod = prod



Failing test case input:
15 5
3 2 8 2 5 9 4 6 2 5 10 0 7 4 7

Expected output:
Yes
Yes
No
No
No
Yes
No
Yes
Yes
Yes


Actual output:
No
No
No
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):

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

for i in range(K, N):
    
    if As[i-K] < As[i]:
        print('Yes')
    else:
        print('No')
Problem: p02939
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())
ans_1 = 1
ans_2 = 1
i = 0
while i < len(s)-1:
  
  if i == len(s)-2 and s[i] == s[i+1]:
    break
    
  elif s[i] == s[i+1]:
    i += 3
    ans_1 += 2
  else:
    i += 1
    ans_1 +=1
    
k = 1
while k < len(s)-1:
  
  if k == len(s)-2 and s[k] == s[k+1]:
    break
    
  elif s[k] == s[k+1]:
    k += 3
    ans_2 += 2
  else:
    k += 1
    ans_2 +=1
print(max(ans_1,ans_2))

Failing test case input:
`bbbc``abbaabbb

Expected output:
11


Actual output:
12


Fixed submission (verdict: Accepted):
s = list(input())
ans_1 = 1
ans_2 = 1
i = 0
while i < len(s)-1:
  
  if i == len(s)-2 and s[i] == s[i+1]:
    break
    
  elif i == len(s)-3 and s[len(s) - 3] == s[len(s) - 2]:
    ans_1 += 1
    break
  elif s[i] == s[i+1]:
    i += 3
    ans_1 += 2
  else:
    i += 1
    ans_1 +=1
    
k = 1
while k < len(s)-1:
  
  if k == len(s)-2 and s[k] == s[k+1]:
    break
  elif k == len(s)-3 and s[len(s) - 3] == s[len(s) - 2]:
    ans_2 += 1
    break
  elif s[k] == s[k+1]:
    k += 3
    ans_2 += 2
  else:
    k += 1
    ans_2 +=1
print(max(ans_1,ans_2))

Problem: p02939
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=list(input())
pre=S[0]
ans=1
for c in S:
    if pre!=c:
        pre=c
        ans+=1
        continue
    pre+=c
print(ans)

Failing test case input:
``b^`^

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):
S=list(input())
if len(S)==1:
    print(1)
    exit()
pre=S[0]
now=""
ans=1
for c in S[1:]:
    now+=c
    if pre!=now:
        pre=now
        now=""
        ans+=1
print(ans)

Problem: p02939
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
result = ["0"]
hoge = []

i=0
while( i<len(S)-1 ):
    hoge = S[i]
    if result[-1] == hoge :
        result.append(S[i]+S[i+1])
        i+=1
    else:
        result.append(S[i])
    i+=1


if result[-1]==S[-1]:
    result[-1]+=S[-1]
else:
    result.append(S[-1])

print(len(result)-1)

Failing test case input:
`^c``^

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):
S = input()
result = ["0"]
hoge = []

i=0
while( i<len(S)-1 ):
    hoge = S[i]
    if result[-1] == hoge :
        result.append(S[i]+S[i+1])
        i+=1
    else:
        result.append(S[i])
    i+=1


if len(S)!=i:
    if result[-1]==S[-1]:
        result[-1]+=S[-1]
    else:
        result.append(S[-1])

print(len(result)-1)

Problem: p02939
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
S0 = S[-1]
i = -1
j = 0
ans = 1

while i > -len(S) + 1:
    if S0 != S[i + j - 1:i]:
        S0 = S[i + j - 1:i]
        ans = ans + 1
        i = i - 1 + j
        j = 0
    else:
        j = j - 1

print(ans)

Failing test case input:
abbbc`aabcababa

Expected output:
13


Actual output:
12


Fixed submission (verdict: Accepted):
S = input()
S0 = S[-1]
i = -1
j = 0
ans = 1

while i > -len(S) + 1:
    if S0 != S[i - (j + 1):i]:
        S0 = S[i - (j + 1):i]
        ans = ans + 1
        i = i - (1 + j)
        j = 0
    else:
        j = j + 1

if i == -len(S) + 1 and S[-len(S)] != S0:
    ans = ans + 1

print(ans)