Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n, a, b = [int(i) for i in input().split()]
s = []
for _ in range(n//(a+b)+1):
    s += [1 for _ in range(a)] + [0 for _ in range(b)]
print(sum(s[:n]))


Fixed submission:

n, a, b = [int(i) for i in input().split()]
sy = n // (a+b)
am = n % (a+b)
print(sy*a + min(am, a))

Buggy python submission (verdict: Time Limit Exceeded):
n, a, b = [int(i) for i in input().split()]
c = 0
s = []
while c < n:
  s += [1 for _ in range(a)]
  s += [0 for _ in range(b)]
  c = len(s)
print(sum(s[:n]))

Fixed submission:

n, a, b = [int(i) for i in input().split()]
sy = n // (a+b)
am = n % (a+b)
print(sy*a + min(am, a))

Buggy python submission (verdict: Runtime Error):
n, a, b = [int(i) for i in input().split()]
c = 0
while c <= n:
  s += [1 for _ in range(a)]
  s += [0 for _ in range(b)]
  c = len(s)
print(sum(s))

Fixed submission:

n, a, b = [int(i) for i in input().split()]
sy = n // (a+b)
am = n % (a+b)
print(sy*a + min(am, a))
Buggy python submission (verdict: Time Limit Exceeded):
def main():
  s = input()
  for _ in range(int(input())):
      q = input().split()
      if q[0] == '1':
          s = s[::-1]
      else:
          if q[1] == '1':
              s = q[2] + s
          else:
              s += q[2]
  print(s)

if __name__ == '__main__':
  main()

Fixed submission:
def main():
    c = 0
    s = input()
    f = ''
    b = ''
    for _ in range(int(input())):
        q = input().split()
        if q[0] == '1':
            c += 1
        else:
            if (q[1] == '1' and c%2 == 0) or (q[1]=='2' and c%2==1):
                f = q[2] + f
            else:
                b += q[2]
    if c % 2 == 0:
        print(f+s+b)
    else:
        print(b[::-1]+s[::-1]+f[::-1])

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
for _ in range(int(input())):
    q = input().split()
    if q[0] == '1':
        s = s[::-1]
    else:
        if q[1] == '1':
            s = ''.join([q[2], s])
        else:
            s += q[2]
print(s)

Fixed submission:
def main():
    c = 0
    s = input()
    f = ''
    b = ''
    for _ in range(int(input())):
        q = input().split()
        if q[0] == '1':
            c += 1
        else:
            if (q[1] == '1' and c%2 == 0) or (q[1]=='2' and c%2==1):
                f = q[2] + f
            else:
                b += q[2]
    if c % 2 == 0:
        print(f+s+b)
    else:
        print(b[::-1]+s[::-1]+f[::-1])

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):

s = input()
for _ in range(int(input())):
    q = input().split()
    if q[0] == '1':
        s = s[::-1]
    else:
        if q[1] == '1':
            s = ''.join([q[2], s])
        else:
            s += q[2]
print(s)

Fixed submission:
def main():
    c = 0
    s = input()
    f = ''
    b = ''
    for _ in range(int(input())):
        q = input().split()
        if q[0] == '1':
            c += 1
        else:
            if (q[1] == '1' and c%2 == 0) or (q[1]=='2' and c%2==1):
                f = q[2] + f
            else:
                b += q[2]
    if c % 2 == 0:
        print(f+s+b)
    else:
        print(b[::-1]+s[::-1]+f[::-1])

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
n = int(input())
for _ in range(n):
    q = input().split()
    if q[0] == '1':
        s = s[::-1]
    else:
        if q[1] == '1':
            s = q[2] + s
        else:
            s += q[2]
    # print(s)

print(s)


Fixed submission:
def main():
    c = 0
    s = input()
    f = ''
    b = ''
    for _ in range(int(input())):
        q = input().split()
        if q[0] == '1':
            c += 1
        else:
            if (q[1] == '1' and c%2 == 0) or (q[1]=='2' and c%2==1):
                f = q[2] + f
            else:
                b += q[2]
    if c % 2 == 0:
        print(f+s+b)
    else:
        print(b[::-1]+s[::-1]+f[::-1])

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import numpy as np

n, d = map(int, input().split())
x = np.array([[int(i) for i in input().split()] for _ in range(n)])

c = [1 if np.linalg.norm(x[i]-x[i-1]).is_integer() else 0 for i in range(len(x)) ]
print(sum(c))

Fixed submission:
import numpy as np

n, _ = map(int, input().split())
x = np.array([[int(i) for i in input().split()] for _ in range(n)])

c = [1 if np.linalg.norm(x[i]-x[j]).is_integer() else 0 for i in range(1, len(x)) for j in range(i)]
print(sum(c))
Buggy python submission (verdict: Runtime Error):
def cul_num(key):
    if key == 0:
        return 0
    if key <= 2:
        return 1
    if key == 3:
        return 2
    return cul_num(key-1)+cul_num(key-2)+1

n, m = map(int, input().split())
a = []
res = 1

[a.append(int(input())) for _ in range(m)]
a.append(n+1)

for index,i in enumerate(a):
    if i == a[0]:
        res *= cul_num(i)
    else:
        res *= cul_num(i-a[index-1]-1)
    if res > 1000000007:
        res = res % 1000000007

print(res)


Fixed submission:
n, m = map(int,input().split())

b = [0]*(n+2)
b[0] = 1

for i in range(m):
    b[int(input())] = -1

for i in range(n):
    if b[i] != -1:
        if b[i+1] != -1:
            b[i+1] += b[i]
        if b[i+2] != -1:
            b[i+2] += b[i]
        b[i] %= 1000000007

print(b[n]%1000000007)
Buggy python submission (verdict: Runtime Error):
a,b = [int(i) for i in input().split()]
A = max(a,b)
B = max(a,b)
a_list=[]
for k in range(b):
	a_list.append(a)
print(''.join(map(str,a_list))

Fixed submission:
a,b = [int(i) for i in input().split()]
A = max(a,b)
B = min(a,b)
a_list=[]
for _ in range(A):
	a_list.append(B)
print(''.join(map(str,a_list)))
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
P=[int(i) for i in input().split()]

num = 0
#print(min(P[:1]))
for k in range(0,N):
	if min(P[:k+1]) == P[k]:
		num+=1
print(num)

Fixed submission:
num = int(input())
A = list(map(int, input().split()))

a_min = 200001
count = 0
for a in A:
    if a < a_min:
        count += 1
        a_min = a

print(count)
Buggy python submission (verdict: Runtime Error):
n,a,b = list(map(int, input().split()))

q=n//(a+b)
mod=n%(a+b)
ans=a*q
if a < mod:
    ans+=a
else:
    ans+=mod
print(ans)

Fixed submission:

a = input()

if a == 'AAA' or a == 'BBB':
    print('No')
else:
    print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
n,a,b = list(map(int, input().split()))

l=[]
while len(l) < n:
    for i in range(a):
        if len(l) < n:
            l.append('b')
        else:
            break
    for j in range(b):
        if len(l) < n:
            l.append('r')
        else:
            break

print(l.count('b'))

Fixed submission:
n,a,b = list(map(int, input().split()))

q=n//(a+b)
mod=n%(a+b)
ans=a*q
if a < mod:
    ans+=a
else:
    ans+=mod
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,a,b = list(map(int, input().split()))

l=[]
while len(l) < n:
    for i in range(a):
        if len(l) < n:
            l.append('b')
    for j in range(b):
        if len(l) < n:
            l.append('r')

print(l.count('b'))

Fixed submission:
n,a,b = list(map(int, input().split()))

q=n//(a+b)
mod=n%(a+b)
ans=a*q
if a < mod:
    ans+=a
else:
    ans+=mod
print(ans)
Buggy python submission (verdict: Runtime Error):
#coding: utf-8
input = input().split()
r = input[0]
g = input[1]
b = input[2]
x = r+g+b
if x%4==0:
  print('YES')
else:
  print('NO')

Fixed submission:
#coding: utf-8
input = input().split()
r = input[0]
g = input[1]
b = input[2]
x = int(r+g+b)
if x%4==0:
  print('YES')
else:
  print('NO')
Buggy python submission (verdict: Runtime Error):
N, R = [int(x) for x in input()]

if N > 9:
  print(R)
else:
  print(R - 100 * (10 - N))


Fixed submission:
N, R = [int(x) for x in input().split(' ')]

if N > 9:
  print(R)
else:
  print(R + 100 * (10 - N))

Buggy python submission (verdict: Runtime Error):
N, R = [int(x) for x in input().split(' ')]

if N > 9:
  print(R)
else:
  print(R - 100 * (10 - K))


Fixed submission:
N, R = [int(x) for x in input().split(' ')]

if N > 9:
  print(R)
else:
  print(R + 100 * (10 - N))

Buggy python submission (verdict: Runtime Error):
N, R = [int(x) for x in input()]

if N > 9:
  print(R)
else:
  print(R - 100 * (10 - K))

Fixed submission:
N, R = [int(x) for x in input().split(' ')]

if N > 9:
  print(R)
else:
  print(R + 100 * (10 - N))
Buggy python submission (verdict: Time Limit Exceeded):
N, K = [int(x) for x in input().split(' ')]

x = 0

while True:
  if N < (K ** x):
    print(x)
  x+=1

Fixed submission:
N, K = [int(x) for x in input().split(' ')]
 
x = 0
 
while True:
  if N < (K ** x):
    print(x)
    break
  x+=1
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())

print((A-1)*(B-1))

Fixed submission:

A,B =  [int(x) for x in input().split()]


print((A-1)*(B-1))

Buggy python submission (verdict: Runtime Error):

A = int(input())
B=int(input())

print((A-1)*(B-1))

Fixed submission:

A,B =  [int(x) for x in input().split()]


print((A-1)*(B-1))
Buggy python submission (verdict: Runtime Error):

N = int(input())

if N => 195:
    print("4")
elif N => 165:
    print("3")
elif N => 135:
    print("2")
elif N => 105:
    print("1")
else:
    print("0")

Fixed submission:
N = int(input())

if N >= 195:
    print("5")
elif N >= 189:
    print("4")
elif N >= 165:
    print("3")
elif N >= 135:
    print("2")
elif N >= 105:
    print("1")
else:
    print("0")
Buggy python submission (verdict: Runtime Error):
a,b = [int(x) for x in input().split()]

if b =>a:
  print(a)
else:
  print(a-1)

Fixed submission:
a,b = [int(x) for x in input().split()]
 
if b >= a:
  print(a)
else:
  print(a-1)
Buggy python submission (verdict: Time Limit Exceeded):
H,W,D = [int(x) for x in input().split()]

d = {}

masu = [[int(x) for x in input().split()] for _ in range(H)]


for y in range(H):
    for x in range(W):
        v=masu[y][x]
        d[v] = (x,y)

Q = int(input())

for _ in range(Q):
    f,t = [int(x) for x in input().split()]
    n = int((t-f)/D)
    mp = 0
    currentV = f
    for _ in range(n):
        prev = d[currentV]
        nxt = d[currentV+D]
        mp += abs(prev[0]-nxt[0])+abs(prev[1]-nxt[1])
        currentV += D
    print(mp)


Fixed submission:
H,W,D = [int(x) for x in input().split()]

d = {}

masu = [[int(x) for x in input().split()] for _ in range(H)]


for y in range(H):
    for x in range(W):
        v=masu[y][x]
        d[v-1] = (x,y)

mpDict = {}

for i in range(D):
    
    modD = i
    mpDict[modD] = {}
    index = modD
    acc = 0
    mpDict[modD][i] = 0
    index+=D
    while index<H*W:
        #print()
        #print("i",i)
        #print(index)
        prev = d[index-D]
        #print(prev)
        nxt = d[index]
        #print(nxt)
        acc += abs(prev[0]-nxt[0])+abs(prev[1]-nxt[1])
        mpDict[modD][index] = acc
        index+=D



Q = int(input())

for _ in range(Q):
    f,t = [int(x) for x in input().split()]
    modD = (f-1)%D
    mp = mpDict[modD][t-1] - mpDict[modD][f-1]
    print(mp)
Buggy python submission (verdict: Time Limit Exceeded):
S = input()
Q = int(input())

for _ in range(Q):
    query = input()
    if query[0] == "1":
        S = S[::-1]
    else:
        T,F,C = query.split()
        if F=="1":
            S = C + S
        else:
            S = S + C
print(S)


Fixed submission:
class Node:
    def __init__(self, v):
        self.v = v
        self.p = None
        self.n = None

class LinkedList:
    def __init__(self, v):
        self.head = Node(v)
        self.tail = self.head
        self.d = 1

    def reverse(self):
        self.d = self.d * -1

    def insertTail(self, v):
        node = Node(v)
        if self.d == 1:
            self.tail.n = node
            node.p = self.tail
            self.tail = node
        else:
            self.head.p = node
            node.n = self.head
            self.head = node

    def insertHead(self, v):
        self.reverse()
        self.insertTail(v)
        self.reverse()

    def toString(self):
        res = ""
        if self.d == 1:
            pos = self.head
            while pos != None:
                res = res + pos.v
                pos = pos.n
        else:
            pos = self.tail
            while pos != None:
                res = res + pos.v
                pos = pos.p
        return res

S = input()
Q = int(input())

l = LinkedList(S[0])
for i in range(1,len(S)):
    l.insertTail(S[i])

for _ in range(Q):
    query = input()
    if query[0] == "1":
        l.reverse()
    else:
        T,F,C = query.split()
        if F=="1":
            l.insertHead(C)
        else:
            l.insertTail(C)
print(l.toString())
Buggy python submission (verdict: Time Limit Exceeded):
N, P = [int(x) for x in input().split()]
S = input()

res = 0

if P in [2,5]:
    for i in range(N):
        if int(S[i])% P == 0:
            res += i+1
else:
    dic = {0:1}
    for i in range(N-1,-1,-1):
        tmp = int(S[i:N])
        t = tmp % P
        if t in dic:
            res += dic[t]
            dic[t] += 1
        else:
            dic[t] = 1

print(res)


Fixed submission:
N, P = [int(x) for x in input().split()]
S = input()

res = 0

if P in [2,5]:
    for i in range(N):
        if int(S[i])% P == 0:
            res += i+1
else:
    dic = {0:1}
    t1 = 0
    t2 = 1
    for i in range(N):
        t2 = (10*t2) % P
        t1 = (int(S[N-1-i])*t2 + t1) % P
        if t1 in dic:
            res += dic[t1]
            dic[t1] += 1
        else:
            dic[t1] = 1

print(res)

Buggy python submission (verdict: Time Limit Exceeded):
N, P = [int(x) for x in input().split()]
S = input()

res = 0

if P in [2,5]:
    for i in range(N):
        if int(S[i])% P == 0:
            res += i+1
else:
    dic = {0:1}
    for i in range(N-1,-1,-1):
        tmp = int(S[i:N])
        t = tmp % P
        if t in dic:
            res += dic[t]
            dic[t] += 1
        else:
            dic[t] = 1

print(res)


Fixed submission:
N, P = [int(x) for x in input().split()]
S = input()

res = 0

if P in [2,5]:
    for i in range(N):
        if int(S[i])% P == 0:
            res += i+1
else:
    dic = {0:1}
    t1 = 0
    t2 = 1
    for i in range(N):
        t2 = (10*t2) % P
        t1 = (int(S[N-1-i])*t2 + t1) % P
        if t1 in dic:
            res += dic[t1]
            dic[t1] += 1
        else:
            dic[t1] = 1

print(res)
Buggy python submission (verdict: Runtime Error):
str = input()

ct = str.count('A')

if ct == 0 or ct == 3:
  print('No')
else :
  pritn('Yes')

Fixed submission:
str = input()

ct = str.count('A')

if ct == 0 or ct == 3:
  print('No')
else:
  print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
a,b = map(int, input().split())
c = str(input())
d = [list(map(int, input().split())) for i in range(0,b)]

for i in d:
    moji = c[i[0]-1:i[1]]
    count = 0
    for t in range(0,len(moji)-1):
        if moji[t]+moji[t+1] == "AC":
            count = count + 1
    print(count)

Fixed submission:
# -*- coding: utf-8 -*-
from itertools import accumulate
a,b = map(int, input().split())
c = str(input())
d = [list(map(int, input().split())) for i in range(0,b)]

flg = []
for i in range(a-1):
    moji = c[i:i+2]
    if moji == "AC":
        flg.append(1)
    else:
        flg.append(0)

flg2 = [0] + flg
flg2 = list(accumulate(flg2))

for a in d:
    print(flg2[a[1]-1] - flg2[a[0]-1])

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
a,b = map(int, input().split())
c = str(input())

for i in range(0,b):
    d,e = map(int, input().split())
    moji = c[d-1:e]
    
    count = 0
    for t in range(0,len(moji)-1):
        if moji[t]+moji[t+1] == "AC":
            count = count + 1
    print(count)

Fixed submission:
# -*- coding: utf-8 -*-
from itertools import accumulate
a,b = map(int, input().split())
c = str(input())
d = [list(map(int, input().split())) for i in range(0,b)]

flg = []
for i in range(a-1):
    moji = c[i:i+2]
    if moji == "AC":
        flg.append(1)
    else:
        flg.append(0)

flg2 = [0] + flg
flg2 = list(accumulate(flg2))

for a in d:
    print(flg2[a[1]-1] - flg2[a[0]-1])

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
a,b = map(int, input().split())
c = str(input())

for i in range(0,b):
    d,e = map(int, input().split())
    print(c[d-1:e].count("AC"))

Fixed submission:
# -*- coding: utf-8 -*-
from itertools import accumulate
a,b = map(int, input().split())
c = str(input())
d = [list(map(int, input().split())) for i in range(0,b)]

flg = []
for i in range(a-1):
    moji = c[i:i+2]
    if moji == "AC":
        flg.append(1)
    else:
        flg.append(0)

flg2 = [0] + flg
flg2 = list(accumulate(flg2))

for a in d:
    print(flg2[a[1]-1] - flg2[a[0]-1])
Buggy python submission (verdict: Runtime Error):
l=list(input())
N=int(l[0])
A=int(l[1])

B=int(l[2])
syou=N//(A+B)
amari=N%(A+B)
kotae=syou*A+amari
print(kotae)


Fixed submission:
l=list(input().split())
N=int(l[0])
A=int(l[1])

B=int(l[2])
syou=N//(A+B)
amari=N%(A+B)
kotae=syou*A+min(amari,A)
print(kotae)

Buggy python submission (verdict: Runtime Error):
l=list(input())
N=l[0]
A=l[1]
B=l[2]
syou=N//(A+B)
amari=N%(A+B)
kotae=syou*B+max(amari-A,0)
print(kotae)

Fixed submission:
l=list(input().split())
N=int(l[0])
A=int(l[1])

B=int(l[2])
syou=N//(A+B)
amari=N%(A+B)
kotae=syou*A+min(amari,A)
print(kotae)
Buggy python submission (verdict: Runtime Error):
l=list(input().split())
A=int(l[0])
B=int(l[1])
c=0
for i in range(1,1009):
	if int(i*0.08)==A and int(i**0.1)==B:
  		print(i)
        c=1
        break
if c==1:
	print(-1)

Fixed submission:
l=list(input().split())
A=int(l[0])
B=int(l[1])
c=0
for i in range(1,100001):
  if int(i*0.08)==A and int(i*0.1)==B:
    print(i)
    c=1
    break
if c==0:
	print(-1)

Buggy python submission (verdict: Runtime Error):
l=list(input().split())
A=int(l[0])
B=int(l[1])
c=0
for i in range(1,100001):
	if int(i*0.08)==A and int(i**0.1)==B:
  		print(i)
        c=1
        break
if c==1:
	print(-1)



Fixed submission:
l=list(input().split())
A=int(l[0])
B=int(l[1])
c=0
for i in range(1,100001):
  if int(i*0.08)==A and int(i*0.1)==B:
    print(i)
    c=1
    break
if c==0:
	print(-1)
Buggy python submission (verdict: Runtime Error):
import numpy as np
S=input()
Q=int(input())
q=[[0 for i in range(3)] for j in range(Q)]
onecntr=0
for i in range(Q):
    tmp=input().split()
    if(tmp[0]=="1"):
        q[i][0]=1
    else:
        q[i][0]=2
        q[i][1]=int(tmp[1])
        q[i][2]=tmp[2]
    

for i in range(Q):
    if(q[i][0]==1):
        onecntr+=1
    else:
        
        if(onecntr%2==0):
            if(q[i][1]==1):
                S=q[i][2]+S
            else:
                S=S+q[i][2]
        else:
            if(q[i][1]==2):
                S=q[i][2]+S
            else:
                S=S+q[i][2]
    
if(onecntr%2==1):
    S=S[::-1]

print(S)
            

Fixed submission:
S=input()
cntr=0
if(S=="AAA" or S=="BBB"):
    print("No")
else:
    print("Yes")

Buggy python submission (verdict: Runtime Error):
import numpy as np
S=input()
Q=int(input())
q=[[0 for i in range(3)] for j in range(Q)]
onecntr=0
for i in range(Q):
    tmp=input().split()
    if(tmp[0]=="1"):
        q[i][0]=1
    else:
        q[i][0]=2
        q[i][1]=int(tmp[1])
        q[i][2]=tmp[2]
    

for i in range(Q):
    if(q[i][0]==1):
        onecntr+=1
    else:
        
        if(onecntr%2==0):
            if(q[i][1]==1):
                S=q[i][2]+S
            else:
                S=S+q[i][2]
        else:
            if(q[i][1]==2):
                S=q[i][2]+S
            else:
                S=S+q[i][2]
        onecntr=0
    
if(onecntr%2==1):
    S=S[::-1]

print(S)

Fixed submission:
S=input()
cntr=0
if(S=="AAA" or S=="BBB"):
    print("No")
else:
    print("Yes")

Buggy python submission (verdict: Runtime Error):
import numpy as np
S=input()
Q=int(input())
q=[[0 for i in range(3)] for j in range(Q)]
onecntr=0
for i in range(Q):
    tmp=input().split()
    if(tmp[0]=="1"):
        q[i][0]=1
    else:
        q[i][0]=2
        q[i][1]=int(tmp[1])
        q[i][2]=tmp[2]
    

for i in range(Q):
    if(q[i][0]==1):
        onecntr+=1
    else:
        
        if(onecntr%2==0):
            if(q[i][1]==1):
                S=q[i][2]+S
            else:
                S=S+q[i][2]
        else:
            S=S[::-1]
            if(q[i][1]==1):
                S=q[i][2]+S
            else:
                S=S+q[i][2]
        onecntr=0
    
if(onecntr%2==1):
    S=S[::-1]

print(S)
            
    
    

Fixed submission:
S=input()
cntr=0
if(S=="AAA" or S=="BBB"):
    print("No")
else:
    print("Yes")
Buggy python submission (verdict: Runtime Error):
a=input().split()
N=int(a[0])
K=int(a[1])
zantei=0
P=list(map(float,input().split()))

P_ex=list(map(lambda x: (x+1)/2,P))


for i in range(0,K):
    
    zantei+=P_ex[i]
zanans=0
buffer=P_ex[0]
beforeans=zantei
for i in range(1,N-K+1):
    if(beforeans-buffer+P_ex[K+i-1]>zantei):
        zantei=beforeans+P_ex[K+i-1]-buffer
    buffer=P_ex[i]
    beforeans+=P_ex[K+i-1]-buffer

print(zantei)

Fixed submission:
S,T=(input().split())
A,B=(input().split())
U=input()
if(U==S):
    print(int(A)-1,int(B))
if(U==T):
    print(int(A),int(B)-1)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
flag=0
for i in range(N):
    for j in range(i+1,N):
        if(A[i]==A[j]):
            flag=1
            break
    if(flag==1):
        break

if(flag==1):
    print("NO")
if(flag==0):
    print("YES")

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
ans={}
flag=0

for i in A:
    if(ans.get(i)!=None):
        flag=1
        break
    else:
        ans[i]=1
        
if(flag==0):
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
a=input().split()
N=int(a[0])
K=int(a[1])
zantei=0
P=list(map(float,input().split()))

P_ex=list(map(lambda x: (x+1)/2,P))


for i in range(0,K):
    
    zantei+=P_ex[i]
zanans=0
buffer=P_ex[0]
beforeans=zantei
for i in range(1,N-K+1):
    if(beforeans-buffer+P_ex[K+i-1]>zantei):
        zantei=breforeans+P_ex[K+i-1]-buffer
    buffer=P_ex[i]
    beforeans+=P_ex[K+i-1]-buffer

print(zantei)
    
    



Fixed submission:
a=input().split()
N=int(a[0])
K=int(a[1])
zantei=0
P=list(map(float,input().split()))

P_ex=list(map(lambda x: (x+1)/2,P))


for i in range(0,K):
    
    zantei+=P_ex[i]
zanans=0
buffer=P_ex[0]
beforeans=zantei
for i in range(1,N-K+1):
    if(beforeans-buffer+P_ex[K+i-1]>zantei):
        zantei=beforeans+P_ex[K+i-1]-buffer
    beforeans+=(P_ex[K+i-1]-buffer)
    buffer=P_ex[i]

print(zantei)