Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
from numpy import *

n, k, q = map(int, input().split())
a = np.array([])

for i in range(q):
  a = np.append(a, int(input()))

points = [k for i in range(n)]
points = np.array(points)
minus_ones = [-1 for i in range(n)]
minus_ones = np.array(minus_ones)

for i in range(len(a)):
    points += minus_ones
    points[a[i]-1] += 1

for i in range(n):
  if points[i] > 0:
    print("Yes")
  else:
    print("No")

Fixed submission:
n, k, q = map(int, input().split())
a = []

for i in range(q):
  a.append(int(input()))

points = [k for i in range(n)]
minus_ones = [-1 for i in range(n)]

for i in range(q):
    points[a[i]-1] += 1
  
for i in range(n):
    points[i] -= q

for i in range(n):
  if points[i] > 0:
    print("Yes")
  else:
    print("No")

Buggy python submission (verdict: Time Limit Exceeded):
n, k, q = map(int, input().split())
a = []

for i in range(q):
  a.append(int(input()))

points = [k for i in range(n)]

for i in range(len(a)):
  for j in range(n):
    if j != a[i]-1:
      points[j] -= 1

for i in range(n):
  if points[i] > 0:
    print("Yes")
  else:
    print("No")

Fixed submission:
n, k, q = map(int, input().split())
a = []

for i in range(q):
  a.append(int(input()))

points = [k for i in range(n)]
minus_ones = [-1 for i in range(n)]

for i in range(q):
    points[a[i]-1] += 1
  
for i in range(n):
    points[i] -= q

for i in range(n):
  if points[i] > 0:
    print("Yes")
  else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
import bisect

n, m = map(int, input().split())
a = list(map(int, input().split()))

a.sort()

for i in range(m):
  bisect.insort(a, int(a.pop() / 2))
      
print(sum(a))

Fixed submission:
import heapq

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

def minus_int(x):
  return -1 * int(x)

a = list(map(minus_int, input().split()))
heapq.heapify(a)

for i in range(m):
  maxp = heapq.heappop(a)
  maxp = -int(-maxp // 2)
  heapq.heappush(a, maxp)
  
print(-sum(a))

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

for i in range(m):
  max_index = a.index(max(a))
  a[max_index] = int(a[max_index] / 2)
    
print(sum(a))

Fixed submission:
import heapq

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

def minus_int(x):
  return -1 * int(x)

a = list(map(minus_int, input().split()))
heapq.heapify(a)

for i in range(m):
  maxp = heapq.heappop(a)
  maxp = -int(-maxp // 2)
  heapq.heappush(a, maxp)
  
print(-sum(a))

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

a.sort()

for i in range(m):
  a[-1] = int(a[-1] / 2)
  
  if not(a[0:n-1] == []):
    if a[-1] < max(a[0:n-1]):
      a[-1], a[a.index(max(a[0:n-1]))] = a[a.index(max(a[0:n-1]))], a[-1]
    
print(sum(a))

Fixed submission:
import heapq

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

def minus_int(x):
  return -1 * int(x)

a = list(map(minus_int, input().split()))
heapq.heapify(a)

for i in range(m):
  maxp = heapq.heappop(a)
  maxp = -int(-maxp // 2)
  heapq.heappush(a, maxp)
  
print(-sum(a))

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

a.sort()

for i in range(m):
  a[-1] = int(a[-1] / 2)
  if a[-1] < max(a[0:n-2]):
    a[-1], a[a.index(max(a[0:n-2]))] = a[a.index(max(a[0:n-2]))], a[-1]
    
print(sum(a))

Fixed submission:
import heapq

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

def minus_int(x):
  return -1 * int(x)

a = list(map(minus_int, input().split()))
heapq.heapify(a)

for i in range(m):
  maxp = heapq.heappop(a)
  maxp = -int(-maxp // 2)
  heapq.heappush(a, maxp)
  
print(-sum(a))

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

a.sort()

for i in range(m):
  a[-1] = int(a[-1] / 2)
  a.sort()
    
print(sum(a))

Fixed submission:
import heapq

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

def minus_int(x):
  return -1 * int(x)

a = list(map(minus_int, input().split()))
heapq.heapify(a)

for i in range(m):
  maxp = heapq.heappop(a)
  maxp = -int(-maxp // 2)
  heapq.heappush(a, maxp)
  
print(-sum(a))
Buggy python submission (verdict: Runtime Error):
n = int(input())
h = list(map(int, input().split()))

times = []
count = 0
pos = 0

for i in range(n-1):
  if h[pos] >= h[pos+1]:
    count += 1
    pos += 1
  else:
    times.append(count)
    count = 0
    pos += 1

  times.append(count)
    
print(max(times))

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

times = []
count = 0
pos = 0

for i in range(n-1):
  if h[pos] >= h[pos+1]:
    count += 1
    pos += 1
  else:
    times.append(count)
    count = 0
    pos += 1

  times.append(count)
  
if n == 1:
  print(0)
else:
  print(max(times))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
m = 0

for i in range(n-1):
  m += (i+1) % (i+2)
  
print(m)

Fixed submission:
n = int(input())
print(n * (n-1) // 2)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

p = [i + 2 for i in range(n-1)]
p = p + [1]

m = 0

for i in range(n):
  m += (i+1) % p[i]
  
print(m)

Fixed submission:
n = int(input())
print(n * (n-1) // 2)
Buggy python submission (verdict: Time Limit Exceeded):
n, q = map(int, input().split())
parents = [[] for i in range(n)]
points = [0] * n

for i in range(n-1):
  a, b = map(int, input().split())
  parents[a-1].append(b)
  parents[b-1].append(a)
  
for i in range(q):
  p, x = map(int, input().split())
  points[p-1] += x

done = [0] * n
key = [1]

while (0 in done):
  pos = key.pop()
  done[pos-1] = 1
  for j in parents[pos-1]:
    if done[j-1] != 1:
      points[j-1] += points[pos-1]
      key.append(j)
  
print(*points)

Fixed submission:
n, q = map(int, input().split())
parents = [[] for _ in range(n)]
points = [0] * n

for _ in range(n-1):
  a, b = map(int, input().split())
  parents[a-1].append(b)
  parents[b-1].append(a)
  
for _ in range(q):
  p, x = map(int, input().split())
  points[p-1] += x

done = [0] * n
key = [1]

while key:
  pos = key.pop()
  done[pos-1] = 1
  for j in parents[pos-1]:
    if done[j-1] != 1:
      points[j-1] += points[pos-1]
      key.append(j)
  
print(*points)
Buggy python submission (verdict: Time Limit Exceeded):
import collections

n = int(input())
s = []

for _ in range(n):
  s.append(collections.Counter(input()))

count = 0

for i in range(n):
  for j in range(i+1, n):
    if s[i] == s[j]:
      count += 1
      
print(count)

Fixed submission:
n = int(input())
s = dict()

for _ in range(n):
  value = input()
  key = ''.join(sorted(value))
  
  if key in s:
    s[key] += 1
  else:
    s[key] = 1
          
sum = 0

for value in s.values():
  sum += value*(value-1)//2
  
print(sum)
Buggy python submission (verdict: Runtime Error):
n = input()
l = len(n)
count = 0

for i in range(1, l, 2):
  count += 9 * 10 ** (i-1)

if l % 2 == 1:
  count += int(n[1:]) + 1

print(count)

Fixed submission:
n = int(input())
count = 0

for i in range(1, n+1):
  if len(str(i)) % 2 == 1:
    count += 1
    
print(count)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
x = list(map(int, input().split()))

x.sort()
diff = [x[i+1] - x[i] for i in range(len(x)-1)]

if len(diff) != 0:
    pos_edge = []

    for i in range(n-1):
        pos_edge.append(diff.index(max(diff)))
        diff[diff.index(max(diff))] = 0

    intervals = [x[pos_edge[0]] - x[0]]
    for i in range(len(pos_edge)-1):
        intervals.append(x[pos_edge[i+1]] - x[pos_edge[i]+1])

    intervals.append(x[m-1] - x[pos_edge[len(pos_edge)-1]+1])
else:
    intervals = []

print(sum(intervals))

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

x.sort()
diff = [x[i+1] - x[i] for i in range(m-1)]
diff.sort()

print(sum(diff[:max(0, m-n)]))
Buggy python submission (verdict: Runtime Error):
sankaNum, scoreMax, ansCnt = map(int, input().split())

score = []

for i in range(sankaNum):
    score.append(scoreMax)

for n in range(ansCnt):
    ansSanka = input()

    for k in range(sankaNum):
        if int(ansSanka) - 1 != k:
            score[k] -=  1
    
for m in range(sankaNum):

    if score[m]  > 0:
        print('Yes')
    else:
        print('No')

Fixed submission:
weather = input()

list = {'Sunny':'Cloudy', 'Cloudy':'Rainy', 'Rainy':'Sunny'}

print(list[weather])

Buggy python submission (verdict: Runtime Error):
import sys

args = sys.argv

list = {'Sunny':'Cloudy', 'Cloudy':'Rainy', 'Rainy':'Sunny'}

print(list[args[1]])

Fixed submission:
weather = input()

list = {'Sunny':'Cloudy', 'Cloudy':'Rainy', 'Rainy':'Sunny'}

print(list[weather])
Buggy python submission (verdict: Runtime Error):
sankaNum, scoreMax, ansCnt = map(int, input().split())

score = [0]*sankaNum

for n in range(ansCnt):
    ansSanka = input()
    score[int(input()) - 1] +=  1
    
for m in range(sankaNum):

    if scoreMax - score[m] > 0:
        print('Yes')
    else:
        print('No')

Fixed submission:
sankaNum, scoreMax, ansCnt = map(int, input().split())

score = [scoreMax-ansCnt]*sankaNum

for _ in range(ansCnt):
    score[int(input()) - 1] +=  1

for m in range(sankaNum):

    if  score[m] > 0:
        print('Yes')
    else:
        print('No')

Buggy python submission (verdict: Time Limit Exceeded):
sankaNum, scoreMax, ansCnt = map(int, input().split())

score = []

for i in range(sankaNum):
    score.append(scoreMax)

for n in range(ansCnt):
    ansSanka = input()

    for k in range(sankaNum):
        if int(ansSanka) - 1 != k:
            score[k] -=  1
    
for m in range(sankaNum):

    if score[m]  > 0:
        print('Yes')
    else:
        print('No')

Fixed submission:
sankaNum, scoreMax, ansCnt = map(int, input().split())

score = [scoreMax-ansCnt]*sankaNum

for _ in range(ansCnt):
    score[int(input()) - 1] +=  1

for m in range(sankaNum):

    if  score[m] > 0:
        print('Yes')
    else:
        print('No')

Buggy python submission (verdict: Time Limit Exceeded):
sankaNum, scoreMax, ansCnt = map(int, input().split())

score = []

for i in range(sankaNum):
    score.append(scoreMax)

for n in range(ansCnt):
    ansSanka = input()

    for k in range(sankaNum):
        if int(ansSanka) - 1 != k:
            score[k] -=  1
    
for n in range(sankaNum):

    if score[n]  > 0:
        print('Yes')
    else:
        print('No')

Fixed submission:
sankaNum, scoreMax, ansCnt = map(int, input().split())

score = [scoreMax-ansCnt]*sankaNum

for _ in range(ansCnt):
    score[int(input()) - 1] +=  1

for m in range(sankaNum):

    if  score[m] > 0:
        print('Yes')
    else:
        print('No')

Buggy python submission (verdict: Runtime Error):
sankaNum, scoreMax, ansCnt = input().split()

score = []

for i in int(sankaNum):
    score.append(scoreMax)



for n in ansCnt.int():
    ansSanka = input()

    isOk = False
    
    for k in sankaNum.int():
        if ansSanka - 1 != k:
            score[k] -= score[k] -1
            if score[k] < 0:
                isOk = True
    
    

if isOk:
    print('Yes')
else:
    print('No')

Fixed submission:
sankaNum, scoreMax, ansCnt = map(int, input().split())

score = [scoreMax-ansCnt]*sankaNum

for _ in range(ansCnt):
    score[int(input()) - 1] +=  1

for m in range(sankaNum):

    if  score[m] > 0:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Runtime Error):
n = int(input())
h = list(map(int, input().split()))
arr = [0]*10010

for i in range(n):
    arr[i] = h[i]

dp = [1000000]*100010
dp[0] = 0

for i in range(1, n):

    dp[i] = min(dp[i], dp[i - 1] + abs(arr[i] - arr[i - 1]))

    if i > 1:
        dp[i] = min(dp[i], dp[i - 2] + abs(arr[i] - arr[i - 2]))

print(dp[n-1])


Fixed submission:
import sys

n = int(input())
h = list(map(int, input().split()))
arr = [0]*100010

for i in range(n):
    arr[i] = h[i]

dp = [sys.maxsize]*100010
dp[0] = 0

for i in range(1, n):

    dp[i] = min(dp[i], dp[i - 1] + abs(arr[i] - arr[i - 1]))

    if i > 1:
        dp[i] = min(dp[i], dp[i - 2] + abs(arr[i] - arr[i - 2]))

print(dp[n-1])
Buggy python submission (verdict: Runtime Error):
N = int(input())
T, A = map(int, input().split())
nums = list(map(int, input().split()))

diff = [0]*len(nums)

for i in len(nums):
    diff[i] = abs(A - (T - nums[i] * 0.006))

print(diff.index(min(diff[i])) + 1)

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

diff = [0] * n

for i in range(0, n):
    diff[i] = abs(a - (t - nums[i] * 0.006))

print(diff.index(min(diff)) + 1)
Buggy python submission (verdict: Time Limit Exceeded):

N = int(input())
hists = []
for n in range(N):
	line = input()
	h = [0]*27
	for i in range(len(line)):
		h[ord(line[i])-ord('a')] += 1
	hists.append(h)

ans = 0
for n in range(len(hists)):
	for m in range(n+1,len(hists)):
		for i in range(27):
			if hists[n][i]!=hists[m][i]:
				break
		else:
			ans += 1
print(ans)


Fixed submission:

N = int(input())

data = {}
for n in range(N):
	s0 = input()
	s = ''.join(sorted(s0))
	if s in data:
		data[s] += 1
	else:
		data[s] = 1

ans = 0
for n in data.values():
	ans += (n-1)*n//2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):

N = int(input())
s = []
for n in range(N):
	line0 = input()
	line = ''.join(sorted(line0))
	s.append(line)

ans = 0
for n in range(len(s)):
	for m in range(n+1,len(s)):
		if s[n]==s[m]:
			ans += 1
print(ans)


Fixed submission:

N = int(input())

data = {}
for n in range(N):
	s0 = input()
	s = ''.join(sorted(s0))
	if s in data:
		data[s] += 1
	else:
		data[s] = 1

ans = 0
for n in data.values():
	ans += (n-1)*n//2
print(ans)
Buggy python submission (verdict: Runtime Error):
N,X = map(int,input().split())
L = list(map(int,input().split()))

D = 0
i = 0
while D<=X:
  if X<D:
    break
  D += L[i-1]
  i += 1
print(i)


Fixed submission:
N,X = map(int,input().split())
L = list(map(int,input().split()))

D = 0
i = 0
while D<=X and i<N+1:
  #print('   {}'.format(D))
  if i<N:
	  D += L[i]
  i += 1
print(i)

Buggy python submission (verdict: Runtime Error):
N,X = map(int,input().split())
L = list(map(int,input().split()))

i = 0
D = 0
while D<=X:
  D += L[i]
  i += 1
print(i)


Fixed submission:
N,X = map(int,input().split())
L = list(map(int,input().split()))

D = 0
i = 0
while D<=X and i<N+1:
  #print('   {}'.format(D))
  if i<N:
	  D += L[i]
  i += 1
print(i)
Buggy python submission (verdict: Runtime Error):
import numpy as np

N,M = map(int,input().split())

S = np.zeros((M,N),dtype=np.int64)
for m in range(M):
    tokens = input().split()
    K = int(tokens[0])
    for k in range(K):
        s = int(tokens[1+k])
        S[m,s-1] = 1 # s is 1-origin

p = [int(tk) for tk in input().split()]

ans = 0
for bits in range(1<<N):
	x = np.array([(bits>>b)&1 for b in range(N)],dtype=np.int64)
	y = S@x
	#print(y)
	for m in range(M):
		if (y[m]&1) != p[m]:
			break  
	else:
		ans += 1

print(ans)


Fixed submission:
N,M = map(int,input().split())
S = []
for m in range(M):
	nums = list(map(int,input().split()))
	S.append(nums[1:])
#print(S)
p = list(map(int,input().split()))
#print(p)

ans = 0
for bits in range(1<<N):
	for m in range(M):
		on = 0
		for s in S[m]:
			on += (bits>>(s-1))&1
		if (on&1) != p[m]:
			break  
	else:
		ans += 1

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):

N,C = map(int,input().split())
h = list(map(int,input().split()))
#print(h)

dp = [0]*N
dp[0] = 0
for n in range(1,N):
	best = 99999999999999
	for k in range(1,N):
		if n-k<0: continue
		step = C+(h[n]-h[n-k])**2+dp[n-k]
		best = min(best,step)
	dp[n] = best

ans = dp[N-1]
print(ans)


Fixed submission:

class ConvexHullTrick:
	length = 0

	def __init__(self,size):
		self.A = [0]*size
		self.B = [0]*size

	def check(self,a,b):
		lhs = (self.B[self.length-2]-self.B[self.length-1])*(a-self.A[self.length-1])
		rhs = (self.B[self.length-1]-b)*(self.A[self.length-1]-self.A[self.length-2])
		return lhs>=rhs

	# 直線の傾きaは単調現象であること
	# Add a line y=a*x+b
	def add(self,a,b):
		while 2<=self.length and self.check(a,b):
			self.length -= 1
		self.A[self.length] = a
		self.B[self.length] = b
		self.length += 1
		return
	# min_i {a[i]*x+b[i]}
	def query(self,x):
		l,r = -1, self.length-1
		while l+1<r:
			m = (l+r)//2
			if self.eval(m+1,x)<=self.eval(m,x):
				l = m
			else:
				r = m
		return self.eval(r,x)

	def eval(self,k,x):
		return self.A[k]*x + self.B[k]

N,C = map(int,input().split())
h = list(map(int,input().split()))
#print(h)

cht = ConvexHullTrick(N)

dp = [0]*N
dp[0] = 0
cht.add(-2*h[0],h[0]**2+dp[0])
for i in range(1,N):
	#best = 99999999999999
	# for j in range(i):
	# 	#cost = dp[j]+(h[i]-h[j])**2+C
	# 	cost = (-2*h[j])*h[i]+(h[j]**2+dp[j])
	# 	best = min(best,cost)
	best = cht.query(h[i])
	dp[i] = best+h[i]**2+C

	cht.add(-2*h[i],h[i]**2+dp[i])

ans = dp[N-1]
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
H,W,D = map(int,input().split())

pos = [0]*(H*W)
for j in range(H):
  A = list(map(int,input().split()))
  for i in range(W):
    pos[A[i]-1] = (i,j)
#print(link)

memo = [0]*(H*W)
for x0 in range(H*W):
  for x in range(x0+D,H*W,D):
    i,j = pos[x-D][0],pos[x-D][1]
    u,v = pos[x  ][0],pos[x  ][1]
    memo[x] = memo[x-D]+abs(i-u)+abs(j-v)

Q = int(input())
for _ in range(Q):
  L,R = map(int,input().split())
  print(memo[R-1]-memo[L-1])


Fixed submission:
H,W,D = map(int,input().split())

pos = [0]*(H*W)
for j in range(H):
  A = list(map(int,input().split()))
  for i in range(W):
    pos[A[i]-1] = (i,j)
#print(link)

memo = [0]*(H*W)
for x in range(H*W):
  if x<D:
    continue
  i,j = pos[x-D][0],pos[x-D][1]
  u,v = pos[x  ][0],pos[x  ][1]
  memo[x] = memo[x-D]+abs(i-u)+abs(j-v)

Q = int(input())
for _ in range(Q):
  L,R = map(int,input().split())
  print(memo[R-1]-memo[L-1])

Buggy python submission (verdict: Time Limit Exceeded):
H,W,D = map(int,input().split())

link = [0]*(H*W)
for j in range(H):
  A = list(map(int,input().split()))
  for i in range(W):
    link[A[i]-1] = (i,j)
#print(link)

Q = int(input())
for _ in range(Q):
  L,R = map(int,input().split())
  L -= 1
  R -= 1
  #print(L,R)
  
  ans = 0
  for x in range(L+D,R+1,D):
    i,j = link[x-D][0],link[x-D][1]
    u,v = link[x  ][0],link[x  ][1]
    #print(i,j,u,v)
    ans += abs(i-u)+abs(j-v)
  print(ans)


Fixed submission:
H,W,D = map(int,input().split())

pos = [0]*(H*W)
for j in range(H):
  A = list(map(int,input().split()))
  for i in range(W):
    pos[A[i]-1] = (i,j)
#print(link)

memo = [0]*(H*W)
for x in range(H*W):
  if x<D:
    continue
  i,j = pos[x-D][0],pos[x-D][1]
  u,v = pos[x  ][0],pos[x  ][1]
  memo[x] = memo[x-D]+abs(i-u)+abs(j-v)

Q = int(input())
for _ in range(Q):
  L,R = map(int,input().split())
  print(memo[R-1]-memo[L-1])
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

N,Ma,Mb = map(int,input().split())

dp = 99999999*np.ones((N+1,402,402),dtype=int)
dp[0][0][0] = 0
for n in range(N):
  a,b,c = map(int,input().split())
  for i in range(401):
    for j in range(401):
      if dp[n][i][j]!=99999999:
        dp[n+1][i  ][j  ] = min(dp[n+1][i  ][j  ],dp[n][i][j])
        dp[n+1][i+a][j+b] = min(dp[n+1][i+a][j+b],dp[n][i][j]+c)

ans = 99999999
i,j = Ma,Mb
while i<=401 and j<=401:
  ans = min(ans,dp[N][i][j])
  i += Ma
  j += Mb
print(ans if ans!=99999999 else -1)


Fixed submission:
N,Ma,Mb = map(int,input().split())

sz = 401
table = [[99999999]*(sz+1) for _ in range(sz+1)]
table[0][0] = 0
for n in range(N):
  a,b,c = map(int,input().split())
  for i in range(sz,-1,-1):
    for j in range(sz,-1,-1):
      if table[i][j]!=99999999:
        table[i+a][j+b] = min(table[i+a][j+b],table[i][j]+c)
#print(table)

ans = 99999999
i,j = Ma,Mb
while i<=sz and j<=sz:
  ans = min(ans,table[i][j])
  i += Ma
  j += Mb
print(ans if ans!=99999999 else -1)
Buggy python submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding:utf-8 -*-

def attackSurvival(n, k, q, a):
    ans = []
    import collections
    c = collections.Counter(a)
    for i in range(n):
        if c[i+1] > q - k: ans.append('Yes')
        else: ans.append('No')
    return ans

def main():
    n, k, q = filter(int, input().split())
    a = []
    for _ in range(q):
        a.append(int(input()))
    attackSurvival(n, k, q, a)

if __name__ == '__main__':
    main()


Fixed submission:
#! /usr/bin/env python3
# -*- coding:utf-8 -*-

WEATHER = ["Sunny", "Cloudy", "Rainy"]

def next_weather(s):
    return WEATHER[(WEATHER.index(s)+1)%len(WEATHER)]

def main():
    s = input()
    print(next_weather(s))

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding:utf-8 -*-

def attackSurvival(n, k, q, a):
    ans = []
    import collections
    c = collections.Counter(a)
    for i in range(n):
        if c[i+1] > q - k: ans.append('Yes')
        else: ans.append('No')
    return ans

def main():
    n, k, q = filter(int, input().split())
    a = []
    for _ in range(q):
        a.append(int(input()))
    attackSurvival(n, k, q, a)

if __name__ == '__main__':
    main()


Fixed submission:
#! /usr/bin/env python3
# -*- coding:utf-8 -*-

def attackSurvival(n, k, q, a):
    ans = []
    import collections
    c = collections.Counter(a)
    for i in range(n):
        if c[i+1] > q - k: ans.append('Yes')
        else: ans.append('No')
    return ans

def main():
    n, k, q = map(int, input().split())
    a = []
    for _ in range(q):
        a.append(int(input()))
    for ans in attackSurvival(n, k, q, a): print(ans)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
#! /usr/bin/env python3
# -*- coding:utf-8 -*-

def attackSurvival(n, k, q, a):
    ans = []
    import collections
    c = collections.Counter(a)
    for i in range(n):
        if c[i+1] > q - k: ans.append('Yes')
        else: ans.append('No')
    return ans

def main():
    n, k, q = filter(int, input().split())
    a = []
    for _ in range(q):
        a.append(int(input()))

if __name__ == '__main__':
    main()


Fixed submission:
#! /usr/bin/env python3
# -*- coding:utf-8 -*-

def attackSurvival(n, k, q, a):
    ans = []
    import collections
    c = collections.Counter(a)
    for i in range(n):
        if c[i+1] > q - k: ans.append('Yes')
        else: ans.append('No')
    return ans

def main():
    n, k, q = map(int, input().split())
    a = []
    for _ in range(q):
        a.append(int(input()))
    for ans in attackSurvival(n, k, q, a): print(ans)

if __name__ == '__main__':
    main()