Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
l = range(a, b + 1) if b - a + 1 <= k else sorted(set(range(a, a + k)) | set(range(b - k + 1, b + 1))):
for i in l: 
  print(i)

Fixed submission:
a,b,k=map(int,input().split())
l = range(a, b + 1) if b - a + 1 <= k else sorted(set(range(a, a + k)) | set(range(b - k + 1, b + 1)))
for i in l: 
  print(i)

Buggy python submission (verdict: Time Limit Exceeded):
a,b,k=map(int,input().split())
for x in sorted(set(range(a, b + 1)) & (set(range(a, a + k)) | set(range(b - k + 1, b + 1)))):
  print(x)

Fixed submission:
a,b,k=map(int,input().split())
l = range(a, b + 1) if b - a + 1 <= k else sorted(set(range(a, a + k)) | set(range(b - k + 1, b + 1)))
for i in l: 
  print(i)

Buggy python submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
for x in sorted(set(a, b + 1) & (set(range(a, a + k)) | set(range(b - k + 1, b + 1)))):
  print(x)

Fixed submission:
a,b,k=map(int,input().split())
l = range(a, b + 1) if b - a + 1 <= k else sorted(set(range(a, a + k)) | set(range(b - k + 1, b + 1)))
for i in l: 
  print(i)
Buggy python submission (verdict: Runtime Error):
from collections import deque
from itertools import dropwhile

alphabet = set('abcdefghijklmnopqrstuvwxyz')

if __name__ == '__main__':
    s = input()
    l = [c for c in alphabet - set(s)]
    if l != []:
        print(s + min(l))
        quit(0)

    deq = deque()
    deq.append(s[-1])
    for i in range(24, -1, -1):
        if s[i] < s[i + 1]:
            small = next(dropwhile(lambda c <= s[i], deq))
            print(s[:i] + small)
            quit(0)
        else:
            deq.append(s[i])

    print(-1)





Fixed submission:
from collections import deque
from itertools import dropwhile

alphabet = set('abcdefghijklmnopqrstuvwxyz')

if __name__ == '__main__':
    s = input()
    l = [c for c in alphabet - set(s)]
    if l != []:
        print(s + min(l))
        quit(0)

    deq = deque()
    deq.append(s[-1])
    for i in range(24, -1, -1):
        if s[i] < s[i + 1]:
            small = next(dropwhile(lambda c: c <= s[i], deq))
            print(s[:i] + small)
            quit(0)
        else:
            deq.append(s[i])

    print(-1)

Buggy python submission (verdict: Runtime Error):
from collections import deque
from itertools import dropwhile

alphabet = set('abcdefghijklmnopqrstuvwxyz')

if __name__ == '__main__':
    s = input()
    l = [c for c in alphabet - set(s)]
    if l != []:
        print(s + min(l))
        quit(0)

    deq = deque()
    deq.append(s[-1])
    for i in range(24, -1, -1):
        if s[i] < s[i + 1]:
            small = dropwhile(lambda c <= s[i], deq)
            print(s[:i] + small)
            quit(0)
        else:
            deq.append(s[i])

    print(-1)





Fixed submission:
from collections import deque
from itertools import dropwhile

alphabet = set('abcdefghijklmnopqrstuvwxyz')

if __name__ == '__main__':
    s = input()
    l = [c for c in alphabet - set(s)]
    if l != []:
        print(s + min(l))
        quit(0)

    deq = deque()
    deq.append(s[-1])
    for i in range(24, -1, -1):
        if s[i] < s[i + 1]:
            small = next(dropwhile(lambda c: c <= s[i], deq))
            print(s[:i] + small)
            quit(0)
        else:
            deq.append(s[i])

    print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
def solve(n, xs, k):
    ss = [0] + [abs(a - b) for (a, b) in zip(xs + [0], [0] + xs)]
    for i in range(1, n + 1):
        ss[i + 1] += ss[i]
    cost2 = [abs(a - b) for (a, b) in zip(xs[1:] + [0], [0] + xs[:n - 1])]
    return ss[n + 1] - ss[k + 2] + ss[k] + cost2[k]

if __name__ == "__main__":
    n = int(input())
    xs = [int(s) for s in input().split()]
    for i in range(n):
        print(solve(n, xs, i))


Fixed submission:
def solve(n, xs):
    ss = [0] + [abs(a - b) for (a, b) in zip(xs + [0], [0] + xs)]
    for i in range(1, n + 1):
        ss[i + 1] += ss[i]
    cost2 = [abs(a - b) for (a, b) in zip(xs[1:] + [0], [0] + xs[:n - 1])]
    for k in range(n):
        yield ss[n + 1] - ss[k + 2] + ss[k] + cost2[k]

if __name__ == "__main__":
    n = int(input())
    xs = [int(s) for s in input().split()]
    for ans in solve(n, xs):
        print(ans)
Buggy python submission (verdict: Runtime Error):
from collections import defaultdict
dd = defaultdict(int)
n = int(input())
for s in (input() for _ in range(n)):
  dd[s] += 1
m = int(input())
for s in (input() for _ in range(m)):
  dd[s] -= 1
print(max(0, dd.values()))

Fixed submission:
from collections import defaultdict
dd = defaultdict(int)
n = int(input())
for s in (input() for _ in range(n)):
  dd[s] += 1
m = int(input())
for s in (input() for _ in range(m)):
  dd[s] -= 1
print(max(0, max(dd.values())))
Buggy python submission (verdict: Runtime Error):
print(''.join(s[i][i] for i, s in enumerate(input() for _ in range(3))))

Fixed submission:
print(''.join(s[i] for i, s in enumerate(input() for _ in range(3))))
Buggy python submission (verdict: Runtime Error):
print(len(set(int(input()) for _ in range(int(input()))))

Fixed submission:
print(len(set(int(input()) for _ in range(int(input())))))
Buggy python submission (verdict: Runtime Error):
def f(x):
  if x <= 0:
    return 0
  return (x%10)+f(x//10)

n = int(input)
fx = f(n)
ans = "Yes" if n % fx == 0 else "No"
print (ans)

Fixed submission:
def f(x):
  if x <= 0:
    return 0
  return (x%10)+f(x//10)

n = int(input())
fx = f(n)
ans = "Yes" if n % fx == 0 else "No"
print (ans)
Buggy python submission (verdict: Runtime Error):
from collections import Counter
c=sorted(Counter(input()).values())
print('YES' if c[0] == c[2] or c[0] + 1 == c[2] else 'NO')

Fixed submission:
from collections import Counter
c=sorted(Counter(input()).values(),reverse=True) + [0] * 2
print('YES' if c[2] == c[0] or c[2] + 1 == c[0] else 'NO')
Buggy python submission (verdict: Runtime Error):
from functools import reduce
n=int(input())
print(3**n-reduce(lambda x, y: x * y, 2-int(s)%2 for s in input().split()))

Fixed submission:
from functools import reduce
n=int(input())
print(3**n-reduce(lambda x, y: x * y, (2-int(s)%2 for s in input().split())))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [0] + [int(input()) for _ in range(n)]
i = 1
c = 0
while True:
  if i == 2:
    print(c)
    quit(0)
  if a[i] == i:
    print(-1)
    quit(0)
  c += 1
  tmp = i
  i = a[tmp]
  a[tmp] = i

Fixed submission:
n = int(input())
a = [0] + [int(input()) for _ in range(n)]
i = 1
c = 0
while True:
  if i == 2:
    print(c)
    quit(0)
  if a[i] == i:
    print(-1)
    quit(0)
  c += 1
  tmp = a[i]
  a[i] = i
  i = tmp

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [0] + [int(input()) for _ in range(n)]
i = 1
c = 0
while True:
  if i == 2:
    print(c)
    quit(0)
  if a[i] == i:
    print(-1)
    quit(0)
  c += 1
  i, a[i] = a[i], i

Fixed submission:
n = int(input())
a = [0] + [int(input()) for _ in range(n)]
i = 1
c = 0
while True:
  if i == 2:
    print(c)
    quit(0)
  if a[i] == i:
    print(-1)
    quit(0)
  c += 1
  tmp = a[i]
  a[i] = i
  i = tmp

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(input()) for _ in range(n)]
i = 1
c = 0
while True:
  if i == 2:
    print(c)
    quit(0)
  if a[i] == i:
    print(-1)
    quit(0)
  c += 1
  i, a[i] = a[i], i

Fixed submission:
n = int(input())
a = [0] + [int(input()) for _ in range(n)]
i = 1
c = 0
while True:
  if i == 2:
    print(c)
    quit(0)
  if a[i] == i:
    print(-1)
    quit(0)
  c += 1
  tmp = a[i]
  a[i] = i
  i = tmp

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(input()) for _ in range(n)]
i = 1
c = 0
while a[i] != i:
  if i == 2:
    print(c)
    quit(0)
  c += 1
  i, a[i] = a[i], i
print(-1)

Fixed submission:
n = int(input())
a = [0] + [int(input()) for _ in range(n)]
i = 1
c = 0
while True:
  if i == 2:
    print(c)
    quit(0)
  if a[i] == i:
    print(-1)
    quit(0)
  c += 1
  tmp = a[i]
  a[i] = i
  i = tmp
Buggy python submission (verdict: Runtime Error):
print('NO' if int(''.join(map(int,input().split())))%4 else 'YES')

Fixed submission:
a,b,c=map(int,input().split())
print('NO' if (b*10+c)%4 else 'YES')

Buggy python submission (verdict: Runtime Error):
print('NO' if int(''.join(map(int,input().split())))%4 else 'YES')

Fixed submission:
a,b,c=map(int,input().split())
print('NO' if (b*10+c)%4 else 'YES')
Buggy python submission (verdict: Runtime Error):
d=[0,1,2,1,0,1,0,1,1,0,1,0,1]
a,b=map(int,input.split())
print('Yes' if d[a]==d[b] else 'No')

Fixed submission:
d=[0,1,2,1,0,1,0,1,1,0,1,0,1]
a,b=map(int,input().split())
print('Yes' if d[a]==d[b] else 'No')
Buggy python submission (verdict: Runtime Error):
def solve(a, b, c):
    if (a, b, c) in s:
        return -1
    if (a % 2) or (b % 2) or (c % 2):
        return 0
    a >>= 1
    b >>= 1
    c >>= 1
    return 1 + solve(b + c , c + a, a + b)

if __name__ == '__main__':
    a, b, c = map(int, input().split())
    s = set()
    print(solve(a, b, c))



Fixed submission:
def solve(a, b, c, ans):
    if (a, b, c) in s:
        return -1
    if (a % 2) or (b % 2) or (c % 2):
        return ans
    s.add((a, b, c))
    a >>= 1
    b >>= 1
    c >>= 1
    return solve(b + c , c + a, a + b, ans + 1)

if __name__ == '__main__':
    a, b, c = map(int, input().split())
    s = set()
    print(solve(a, b, c, 0))
Buggy python submission (verdict: Runtime Error):
import re
m = re.match(r'A.*Z', input())
print(m.end() - m.start())

Fixed submission:
import re
m = re.search(r'A.*Z', input())
print(m.end() - m.start())

Buggy python submission (verdict: Runtime Error):
import re
m = re.match(r'A.*Z', input())
print(m.end - m.start)

Fixed submission:
import re
m = re.search(r'A.*Z', input())
print(m.end() - m.start())
Buggy python submission (verdict: Runtime Error):
h,w=map(int, input().split())
for i in range(h):
  t=input().split().index('snuke')
  if t<0:
    continue
  print('%s%d' % (chr(t+ord('A')), i+1))
  quit(0)

Fixed submission:
h,w=map(int, input().split())
for i in range(h):
  l = input().split()
  if 'snuke' in l:
    t=l.index('snuke')
    print('%s%d' % (chr(t+ord('A')), i+1))
    quit(0)

Buggy python submission (verdict: Runtime Error):
h,w=map(int, input().split())
for i in range(h):
  t=input().split().find('snuke')
  if t<0:
    continue
  print('%s%d' % (chr(t+ord('A')), i+1))
  quit(0)

Fixed submission:
h,w=map(int, input().split())
for i in range(h):
  l = input().split()
  if 'snuke' in l:
    t=l.index('snuke')
    print('%s%d' % (chr(t+ord('A')), i+1))
    quit(0)
Buggy python submission (verdict: Time Limit Exceeded):
from itertools import groupby
from functools import reduce

MOD = 1000000007

def max_t():
    i, t_max = 0, 0
    for j, v in enumerate(t):
        if v < t_max:
            print(0)
            quit(0)
        if v > t_max:
            t_max = v
            i = j
    return i, t_max


def validate_a(i, t_max):
    for v in a[:i + 1]:
        if v != t_max:
            print(0)
            quit(0)
    for v in a[i + 1:]:
        if v > t_max:
            print(0)
            quit(0)


if __name__ == '__main__':
    n = int(input())
    t = [int(s) for s in input().split()]
    a = [int(s) for s in input().split()]
    i, t_max = max_t()
    validate_a(i, t_max)

    highests = [min(x, y) for x, y in zip(a, t)]
    print(reduce(lambda x, y: x * y % MOD, (v ** ((length - 1) if v < t_max else max(length - 2, 0)) for v, length in ((v, len(list(l))) for v, l in groupby(highests)))))


Fixed submission:
from itertools import groupby
from functools import reduce

MOD = 1000000007

def mod_pow(x, k):
    ret = 1
    while k > 0:
        if k & 1:
            ret *= x
            ret %= MOD
        k >>= 1
        x *= x
        x %= MOD
    return ret


def max_t():
    i, t_max = 0, 0
    for j, v in enumerate(t):
        if v < t_max:
            print(0)
            quit(0)
        if v > t_max:
            t_max = v
            i = j
    return i, t_max


def validate_a(i, t_max):
    for v in a[:i + 1]:
        if v != t_max:
            print(0)
            quit(0)
    for v in a[i + 1:]:
        if v > t_max:
            print(0)
            quit(0)


if __name__ == '__main__':
    n = int(input())
    t = [int(s) for s in input().split()]
    a = [int(s) for s in input().split()]
    i, t_max = max_t()
    validate_a(i, t_max)

    highests = [min(x, y) for x, y in zip(a, t)]
    print(reduce(lambda x, y: x * y % MOD, (mod_pow(v, ((length - 1) if v < t_max else max(length - 2, 0))) for v, length in ((v, len(list(l))) for v, l in groupby(highests)))))
Buggy python submission (verdict: Runtime Error):
print((int(input())+(int(input()))*int(input())//2)

Fixed submission:
print((int(input())+int(input()))*int(input())//2)
Buggy python submission (verdict: Runtime Error):
from collections import deque

def solve(top, sa, sb, sc):
  if len(s[top]) == 0:
    return top.upper()
  top = s[top].popleft()
  return solve(top, sa, sb, sc)
  
s = {}
s['a'] = deque(input())
s['b'] = deque(input())
s['c'] = deque(input())

top = s['a'].popleft()
print(solve(top, sa, sb, sc))


Fixed submission:
from collections import deque

def solve(top, sa, sb, sc):
  if len(s[top]) == 0:
    return top.upper()
  top = s[top].popleft()
  return solve(top, sa, sb, sc)
  
s = {}
s['a'] = deque(input())
s['b'] = deque(input())
s['c'] = deque(input())

top = s['a'].popleft()
print(solve(top, s['a'], s['b'], s['c']))

Buggy python submission (verdict: Runtime Error):
from collections import deque

def solve(top, sa, sb, sc):
  if len(s[top]) == 0:
    return top
  top = s[top].popleft()
  return solve(top, sa, sb, sc)
  
s = {}
s['a'] = deque(input())
s['b'] = deque(input())
s['c'] = deque(input())

top = s['a'].popleft()
print(solve(top, sa, sb, sc))

Fixed submission:
from collections import deque

def solve(top, sa, sb, sc):
  if len(s[top]) == 0:
    return top.upper()
  top = s[top].popleft()
  return solve(top, sa, sb, sc)
  
s = {}
s['a'] = deque(input())
s['b'] = deque(input())
s['c'] = deque(input())

top = s['a'].popleft()
print(solve(top, s['a'], s['b'], s['c']))
Buggy python submission (verdict: Runtime Error):
n=int(inout())
k=int(input())
x=int(input())
y=int(input())
print(x*k+y*max(0,n-k))

Fixed submission:
n=int(input())
k=int(input())
x=int(input())
y=int(input())
print(x*min(n,k)+y*max(0,n-k))
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=input()
if len(s)%2==1:
  print('No')
else:
  i=len(s)/2
  j=i//1
  if s[:j]+s[:j]==s:
    print('Yes')

Fixed submission:
n=int(input())
s=input()
if len(s)%2==1:
  print('No')
else:
  i=len(s)//2
  if s[:i]+s[:i]==s:
    print('Yes')
  else :
    print('No')

Buggy python submission (verdict: Runtime Error):
n=int(input())
s=input()
if len(s)%2==1:
  print('No')
else:
  i=len(s)/2
  j=i//1
  if s[:j]+s[:j]==s:
    print(Yes)

Fixed submission:
n=int(input())
s=input()
if len(s)%2==1:
  print('No')
else:
  i=len(s)//2
  if s[:i]+s[:i]==s:
    print('Yes')
  else :
    print('No')

Buggy python submission (verdict: Runtime Error):
n=int(input())
s=input()
if len(s)%2==1:
  print('No')
else:
  i=len(s)/2//1
  if s[:i]*2==s:
    print(Yes)

Fixed submission:
n=int(input())
s=input()
if len(s)%2==1:
  print('No')
else:
  i=len(s)//2
  if s[:i]+s[:i]==s:
    print('Yes')
  else :
    print('No')
Buggy python submission (verdict: Runtime Error):
n=int(input())
x,y=[int(input()) for _ in range(n)],[int(input()) for _ in range(n)]
d=0
for i,j in zip(x,y):
  for k,l in zip(x,y):
    m1,m2=i-k,j-l
    o=m1**2+m2**2
    d+=o**0.5
print(d/n)

Fixed submission:
n=int(input())
x=[0]*n
y=[0]*n
for i in range(n):
  x[i],y[i]=map(int, input().split())
d=0
for i,j in zip(x,y):
  for k,l in zip(x,y):
    m1,m2=i-k,j-l
    o=m1**2+m2**2
    d+=o**0.5
print(d/n)

Buggy python submission (verdict: Runtime Error):
n=int(input())
x,y=[int(input()) for _ in range(int(input()))],[int(input()) for _ in range(int(input()))]
d=0
for i,j in zip(x,y):
  for k,l in zip(x,y):
    m1,m2=i-k,j-l
    o=m1**2+m2**2
    d+=o**0.5
print(d/n)

Fixed submission:
n=int(input())
x=[0]*n
y=[0]*n
for i in range(n):
  x[i],y[i]=map(int, input().split())
d=0
for i,j in zip(x,y):
  for k,l in zip(x,y):
    m1,m2=i-k,j-l
    o=m1**2+m2**2
    d+=o**0.5
print(d/n)

Buggy python submission (verdict: Runtime Error):
n=int(input())
x,y=[int(input()) for _ in range(int(input()))],[int(input()) for _ in range(int(input()))]
d=0
for i,j in zip(x,y):
  for k,l in zip(x,y):
    m=(i-k)**2+(j-l)**2
    d+=m**0.5
print(d/n)

Fixed submission:
n=int(input())
x=[0]*n
y=[0]*n
for i in range(n):
  x[i],y[i]=map(int, input().split())
d=0
for i,j in zip(x,y):
  for k,l in zip(x,y):
    m1,m2=i-k,j-l
    o=m1**2+m2**2
    d+=o**0.5
print(d/n)

Buggy python submission (verdict: Runtime Error):
n=int(input())
x,y=[int(input) for _ in range(int(input()))],[int(input) for _ in range(int(input()))]
d=0
for i,j in zip(x,y):
  for k,l in zip(x,y):
    m=(i-k)**2+(j-l)**2
    d+=m**0.5
print(d/n)

    
  
  
  

Fixed submission:
n=int(input())
x=[0]*n
y=[0]*n
for i in range(n):
  x[i],y[i]=map(int, input().split())
d=0
for i,j in zip(x,y):
  for k,l in zip(x,y):
    m1,m2=i-k,j-l
    o=m1**2+m2**2
    d+=o**0.5
print(d/n)
Buggy python submission (verdict: Runtime Error):
s=input()
if len(s)%2==0:
  for i in range(len(s)//2):
    if s[2*i]!='R' and s[2*i]!='U' and s[2*i]!='D' :
      print('No')
      exit()
    if s[2*i+1]!='L' and s[2*i+1]!='U' and s[2*i+1]!='D':
      print('No')
      exit()
if len(s)%2==1:
  for i in range(len(s)//2+1):
    if s[2*i+1]!='L' and s[2*i+1]!='U' and s[2*i+1]!='D':
      print('No')
      exit()
    if s[2*i]!='R' and s[2*i]!='U' and s[2*i]!='D' :
      print('No')
      exit()
print('Yes')


Fixed submission:
s=input()
if len(s)%2==0:
  for i in range(len(s)//2):
    if s[2*i]!='R' and s[2*i]!='U' and s[2*i]!='D' :
      print('No')
      exit()
    if s[2*i+1]!='L' and s[2*i+1]!='U' and s[2*i+1]!='D':
      print('No')
      exit()
if len(s)%2==1:
  for i in range(len(s)//2):
    if s[2*i+1]!='L' and s[2*i+1]!='U' and s[2*i+1]!='D':
      print('No')
      exit()
  for i in range(len(s)//2+1):
    if s[2*i]!='R' and s[2*i]!='U' and s[2*i]!='D' :
      print('No')
      exit()
print('Yes')

Buggy python submission (verdict: Runtime Error):
s=input()
for i in range(len(s)//2+1):
  if s[2*i]!='R' and s[2*i]!='U' and s[2*i]!='D' :
    print('No')
    exit()
for i in range(len(s)//2):
  if s[2*i+1]!='L' and s[2*i+1]!='U' and s[2*i+1]!='D':
    print('No')
    exit()
if len(s)%2==1:
  if s[-1]!='L' and s[-1]!='U' and s[-1]!='D':
    print('No')
    exit()
print('Yes')


Fixed submission:
s=input()
if len(s)%2==0:
  for i in range(len(s)//2):
    if s[2*i]!='R' and s[2*i]!='U' and s[2*i]!='D' :
      print('No')
      exit()
    if s[2*i+1]!='L' and s[2*i+1]!='U' and s[2*i+1]!='D':
      print('No')
      exit()
if len(s)%2==1:
  for i in range(len(s)//2):
    if s[2*i+1]!='L' and s[2*i+1]!='U' and s[2*i+1]!='D':
      print('No')
      exit()
  for i in range(len(s)//2+1):
    if s[2*i]!='R' and s[2*i]!='U' and s[2*i]!='D' :
      print('No')
      exit()
print('Yes')

Buggy python submission (verdict: Runtime Error):
s=input()
for i in range(len(s)//2+1):
  if s[2*i]!='R' and s[2*i]!='U' and s[2*i]!='D' :
    print('No')
    exit()
  if s[2*i+1]!='L' and s[2*i+1]!='U' and s[2*i+1]!='D':
    print('No')
    exit()
if 
print('Yes')


Fixed submission:
s=input()
if len(s)%2==0:
  for i in range(len(s)//2):
    if s[2*i]!='R' and s[2*i]!='U' and s[2*i]!='D' :
      print('No')
      exit()
    if s[2*i+1]!='L' and s[2*i+1]!='U' and s[2*i+1]!='D':
      print('No')
      exit()
if len(s)%2==1:
  for i in range(len(s)//2):
    if s[2*i+1]!='L' and s[2*i+1]!='U' and s[2*i+1]!='D':
      print('No')
      exit()
  for i in range(len(s)//2+1):
    if s[2*i]!='R' and s[2*i]!='U' and s[2*i]!='D' :
      print('No')
      exit()
print('Yes')
Buggy python submission (verdict: Runtime Error):
n,k,q=map(int,input().split())
a=[int(input()) for _ in range(q)]
point=[-k]*n
for i in range(q):
  point[a[i]]+=1
for i in range(n):
  if point[i]>-2*k+q:
    print('Yes')
  else:
    print('No')
    
  


Fixed submission:
n,k,q=map(int,input().split())
a=[int(input()) for _ in range(q)]
point=[-k]*n
for i in range(q):
  point[a[i]-1]+=1
for i in range(n):
  if point[i]>-2*k+q:
    print('Yes')
  else:
    print('No')

Buggy python submission (verdict: Runtime Error):
n,k,q=map(int,input().split())
a=[int(input()) for _ in range(q)]
point=[-k]*n
for i in range(q):
  point[a[i]]+=1
for i in range(n):
  if point[i]>-2k+q:
    print('Yes')
  else:
    print('No')
    
  


Fixed submission:
n,k,q=map(int,input().split())
a=[int(input()) for _ in range(q)]
point=[-k]*n
for i in range(q):
  point[a[i]-1]+=1
for i in range(n):
  if point[i]>-2*k+q:
    print('Yes')
  else:
    print('No')

Buggy python submission (verdict: Runtime Error):
n,k,q=map(int,input().split())
a=[int(input()) for _ in range(q)]
if q<k:
  print(0)
  exit()
point=[-k]*n
for i in range(q):
  point[a[i]]+=1
for i in range(n):
  if point[i]>-q:
    print('Yes')
  else:
    print('No')
    
  


Fixed submission:
n,k,q=map(int,input().split())
a=[int(input()) for _ in range(q)]
point=[-k]*n
for i in range(q):
  point[a[i]-1]+=1
for i in range(n):
  if point[i]>-2*k+q:
    print('Yes')
  else:
    print('No')

Buggy python submission (verdict: Runtime Error):
n,k,q=map(int,input().split())
a=[int(input()) for _ in range(q)]
if q<k:
  print(0)
  exit()
point=[-k]*n
for i in range(q):
  point[a[i]]+=1
for i in range(n):
  if point[i]>=0:
    print('Yes')
  else:
    print('No')
    
  


Fixed submission:
n,k,q=map(int,input().split())
a=[int(input()) for _ in range(q)]
point=[-k]*n
for i in range(q):
  point[a[i]-1]+=1
for i in range(n):
  if point[i]>-2*k+q:
    print('Yes')
  else:
    print('No')

Buggy python submission (verdict: Runtime Error):
n,k,q=map(int,input().split())
a=[int(input()) for _ in range(q)]
if q<k:
  print(0)
  exit()
point=[-k]*n
for i in range(q):
  point[a[i]]+=1
for i in range(n):
  if point[i]>0:
    print('Yes')
  else:
    print('No')
    
  


Fixed submission:
n,k,q=map(int,input().split())
a=[int(input()) for _ in range(q)]
point=[-k]*n
for i in range(q):
  point[a[i]-1]+=1
for i in range(n):
  if point[i]>-2*k+q:
    print('Yes')
  else:
    print('No')

Buggy python submission (verdict: Runtime Error):
n,k,q=map(int,input().split())
a=[int(input()) for _ in range(q)]
if q<k:
  print(0)
  exit()
point=[-k]*n
for i in range(q):
  point[a[i]]+=1
for i in range(n):
  if point(i)>0:
    print('Yes')
  else:
    print('No')
    
  

Fixed submission:
n,k,q=map(int,input().split())
a=[int(input()) for _ in range(q)]
point=[-k]*n
for i in range(q):
  point[a[i]-1]+=1
for i in range(n):
  if point[i]>-2*k+q:
    print('Yes')
  else:
    print('No')
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[int(i) for i in input().split()]
b=[int(i) for i in input().split()]
c=[int(i) for i in input().split()]
sat=sum(b)
for i in range(n-1):
  if a[i+1]==a[i]+1:
    sat+=c[a[i]]
print(sat)


Fixed submission:
n=int(input())
a=[int(i) for i in input().split()]
b=[int(i) for i in input().split()]
c=[int(i) for i in input().split()]
sat=sum(b)
for i in range(n-1):
  if a[i+1]==a[i]+1:
    sat+=c[a[i]-1]
print(sat)

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[int(i) for i in input().split()]
b=[int(i) for i in input().split()]
c=[int(i) for i in input().split()]
sat=sum(b)
for i in range(n-1):
  if a[i+1]=a[i]+1:
    sat+=c[i]
print(sat)

Fixed submission:
n=int(input())
a=[int(i) for i in input().split()]
b=[int(i) for i in input().split()]
c=[int(i) for i in input().split()]
sat=sum(b)
for i in range(n-1):
  if a[i+1]==a[i]+1:
    sat+=c[a[i]-1]
print(sat)