Problem:


Score : 200 points

Problem Statement

There are N participants in the CODE FESTIVAL 2016 Qualification contests. The participants are either students in Japan, students from overseas, or neither of these.

Only Japanese students or overseas students can pass the Qualification contests. The students pass when they satisfy the conditions listed below, from the top rank down. Participants who are not students cannot pass the Qualification contests.

A Japanese student passes the Qualification contests if the number of the participants who have already definitively passed is currently fewer than A+B.

An overseas student passes the Qualification contests if the number of the participants who have already definitively passed is currently fewer than A+B and the student ranks B-th or above among all overseas students.

A string S is assigned indicating attributes of all participants. If the i-th character of string S is a, this means the participant ranked i-th in the Qualification contests is a Japanese student; b means the participant ranked i-th is an overseas student; and c means the participant ranked i-th is neither of these.

Write a program that outputs for all the participants in descending rank either Yes if they passed the Qualification contests or No if they did not pass.

Constraints

1≦N,A,B≦100000

A+B≦N

S is N characters long.

S consists only of the letters a, b and c.

Input

Inputs are provided from Standard Input in the following form.

N A B
S

Output

Output N lines. On the i-th line, output Yes if the i-th participant passed the Qualification contests or No if that participant did not pass.

Sample Input 1

10 2 3
abccabaabb

Sample Output 1

Yes
Yes
No
No
Yes
Yes
Yes
No
No
No

The first, second, fifth, sixth, and seventh participants pass the Qualification contests.

Sample Input 2

12 5 2
cabbabaacaba

Sample Output 2

No
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
No
No

The sixth participant is third among overseas students and thus does not pass the Qualification contests.

Sample Input 3

5 2 2
ccccc

Sample Output 3

No
No
No
No
No



Sample input:
10 2 3
abccabaabb


Sample output:
Yes
Yes
No
No
Yes
Yes
Yes
No
No
No

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())
s = input()
ans = []
a_b_cnt = 0
b_cnt = 0
for i in range(n):
    if s[i] == 'c':
        ans.append('No')
    else:
        a_b_cnt += 1
        if s[i] == 'b':
            b_cnt += 1
            if a_b_cnt < a + b and b_cnt < b:
                ans.append('Yes')
            else:
                ans.append('No')
        else:
            if a_b_cnt < a + b:
                ans.append('Yes')
            else:
                ans.append('No')
for i in range(n):
    print(ans[i])

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())
s = input()
ans = []
a_b_cnt = 0
b_cnt = 0
for i in range(n):
    if s[i] == 'c':
        ans.append('No')
    else:
        a_b_cnt += 1
        if s[i] == 'b':
            b_cnt += 1
            if a_b_cnt < a + b and b_cnt <= b:
                ans.append('Yes')
            else:
                ans.append('No')
        else:
            if a_b_cnt < a + b:
                ans.append('Yes')
            else:
                ans.append('No')
for i in range(n):
    print(ans[i])

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())
s = input()
ans = []
a_b_cnt = 0
b_cnt = 0
for i in range(n):
    if s[i] == 'c':
        ans.append('No')
    else:
        a_b_cnt += 1
        if s[i] == 'b':
            b_cnt += 1
            if a_b_cnt <= a + b and b_cnt <= b:
                ans.append('Yes')
            else:
                ans.append('No')
        else:
            if a_b_cnt <= a + b:
                ans.append('Yes')
            else:
                ans.append('No')
for i in range(n):
    print(ans[i])

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())
s = input()
ans = []
a_b_cnt = 0
b_cnt = 0
for i in range(n):
    if s[i] == 'c':
        ans.append('No')
    else:
        a_b_cnt += 1
        b_cnt += 1
        if s[i] == 'b':
            if a_b_cnt <= a + b and b_cnt <= b:
                ans.append('Yes')
            else:
                ans.append('No')
        else:
            if a_b_cnt <= a + b:
                ans.append('Yes')
            else:
                ans.append('No')
for i in range(n):
    print(ans[i])

Submission status: Wrong Answer

Solution code:
N,A,B = map(int,input().split())
S  = input()
t,k = 0,0
for i in range(N):
    if S[i]=="a":
        if t < A+B:
            print("YES")
            t +=1
        else:
            print("NO")
    elif S[i]=="b":
        if t < A+B and k <B:
            print("YES")
            t += 1
            k += 1
        else:
            print("NO")
    else:
        print("NO")

Submission status: Wrong Answer

Solution code:
N,A,B = [int(i) for i in input().split()]
S = list(input())

count_b = 0
count = 0
ans = ['NO']*N
for j,i in enumerate(S):
    if i == 'a':
        if count < A+B:
            ans[j] = 'YES'
            count += 1
    elif i == 'b':
        if count < A+B and count_b < B:
            ans[j] = 'YES'
            count += 1
            count_b += 1

[print(i) for i in ans]

Submission status: Wrong Answer

Solution code:
N,A,B = map(int,input().split())
S = input()
a = 0
b = 0
for s in S:
    if s == 'a':
        a += 1
        print("Yes" if a+b <= A+B else "No")
    elif s == 'b':
        b += 1
        b = min(b,B)
        print("Yes" if a+b <= A+B and b <= B else "No" )
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
N,A,B = map(int,input().split())
S = input()
a = 0
b = 0
for s in S:
    if s == 'a':
        a += 1
        print("Yes" if a+b <= A+B else "No")
    elif s == 'b':
        b += 1
        print("Yes" if a+b <= A+B and b <= B else "No" )
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
N,A,B = map(int,input().split())
S = input()
a = 0
b = 0
for s in S:
    if s == 'a':
        if a+b <= A+B:
            print("Yes")
            a += 1
        else:
            a += 1
    elif s == 'b':
        if a+b <= A+B and b <= B:
            print("Yes")
            b += 1
        else:
            print("No")
            b += 1
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
s=input()
pa,pb=0,0
for i in range(n):
  if s[i]=='a':
    if pa+pb<a+b:
      pa+=1
      print('Yes')
    else:
      print('No')
  elif s[i]=='b':
    if pa+pb<=a+b and pb<=b:
      pb+=1
      print('Yes')
    else:
      print('No')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
s=input()
pa,pb=0,0
for i in range(n):
  if s[i]=='a':
    pa+=1
    if pa+pb<=a+b:
      print('Yes')
    else:
      print('No')
  elif s[i]=='b':
    pb+=1
    if pa+pb<=a+b and pb<=b:
      print('Yes')
    else:
      print('No')
  else:
    print('No')

Submission status: Wrong Answer

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

for i in range(len(data)):
    if data[i] == "a":
        if i <= a + b:
            print("Yes")
            a = -1
        else:
            print("No")
    elif data[i] == "b":
        if i <= a + b and i <= b:
            print("Yes")
            b -= 1
        else:
            print("No")
    else:
        print("No")

Submission status: Wrong Answer

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

for i in range(len(data)):
    if data[i] == "a":
        if i <= a + b:
            print("Yes")
        else:
            print("No")
    elif data[i] == "b":
        if i <= a + b and i <= b:
            print("Yes")
        else:
            print("No")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
s=input()
cnt1=0
cnt2=0
for i in range(n):
  if s[i]=='a':
    if cnt1+cnt2<=a+b:
      cnt1+=1
      print('Yes')
    else:
      print('No')
  elif s[i]=='b':
    if cnt1+cnt2<=a+b and cnt2<b:
      cnt2+=1
      print('Yes')
    else:
      print('No')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
s=input()
c,d=0,0
for i in range(n):
  if s[i]=="a":
    if c+1<=a+b:
      print("Yes")
      c+=1
    else:
      print("No")
  if s[i]=="b":
    if c+1<=a+b and d+1<=b:
      print("Yes")
      c+=1
      d+=1
    else:
      print("No")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
s=input()
c,d=0,0
for i in range(n):
  if s[i]=="a":
    c+=1
    if c<=a+b:
      print("Yes")
    else:
      print("No")
  if s[i]=="b":
    c+=1
    d+=1
    if c<=a+b and d<=b:
      print("Yes")
    else:
      print("No")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
N, A, B = map(int, input().split())
S = input()
a = 0
b = 0
for i in range(N):
  if S[i] == 'a' and a+b < A+B:
    a += 1
    print('Yes')
  elif S[i] == 'b' and a+b < A+B and b < B:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split());s=input();r,f=0,0
for i in range(n):
  if s[i]=="a":
    if r<a+b:
      print("Yes");r+=1
    else:print("No")
  elif s[i]=="b":
    if r<a+b and f<b:
      print("Yes");r+=1
    else:print("No");f+=1
  else:print("No")

Submission status: Wrong Answer

Solution code:
N,A,B = map(int,input().split())
S = input()

win = 0  
abr = 0 
for c in S:
    if c == "a":
        if win<A+B:
            print("Yes") 
            win += 1
        else:
            print("No")
    elif c == "b":
        if win < A+B and abr <= B:
            print("Yes")
            win += 1
            abr += 1
        else:
            print("No")
    else:   
        print("No")

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
s=input()
japan=0
abroad=0
for i in range(n):
    p=s[i]
    if p == 'c':
        print('No')
        continue
    if p == 'a' and japan+abroad <= a+b:
        japan+=1
        print('Yes')
        continue
    elif p=='a':
        print('No')
        continue
    if p=='b' and japan+abroad <= a+b and abroad <= b:
        print('Yes')
        abroad+=1
        continue
    else:
        print('No')
        continue

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
s=input()
japan=0
abroad=0
for i in range(n):
    p=s[i]
    if p == 'c':
        print('No')
        continue
    if p == 'a' and japan+abroad < a+b:
        japan+=1
        print('Yes')
        continue
    elif p=='a':
        print('No')
        continue
    if p=='b' and japan+abroad < a+b and abroad <= b:
        print('Yes')
        abroad+=1
        continue
    else:
        print('No')
        continue

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
s=input()
x,y=0,0
for i in range(n):
    if s[i]=='a':
        if x+y<a+b:
            x+=1
            print("Yes")
        else:
            print("NO")
    elif s[i]=='b':
        if x+y<a+b and y<b:
            y+=1
            print("YES")
        else:
            print("NO")
    else:
        print("NO")

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())
s = list(input())
p = 0
ab = 0
for i in s:
  if i == "c":
    print("No")
  elif i == "a":
    if p < a + b:
      p += 1
      print("Yes")
  else:
    if p < a + b and ab < b:
      p += 1
      ab += 1
      print("Yes")

Submission status: Wrong Answer

Solution code:
N, A, B = list(map(int, input().split()))
S = list(input())
a = 0
b = 0
for i in range(N):
	if S[i] == "a":
		if a + b < A + B:
			print("Yes")
		else:
			print("No")
		a += 1
	elif S[i] == "b":
		if a + b < A + B and  b < B:
			print("Yes")
		else:
			print("No")
		b += 1
	else:
		print("No")

Submission status: Wrong Answer

Solution code:
N, A, B = list(map(int, input().split()))
S = list(input())
a = 0
b = 0
for i in range(N):
	if S[i] == "a":
		if a < A + B:
			print("Yes")
		else:
			print("No")
		a += 1
	elif S[i] == "b":
		if a + b < A + B and  b < B:
			print("Yes")
		else:
			print("No")
		b += 1
	else:
		print("No")

Submission status: Wrong Answer

Solution code:
N,A,B=map(int,input().split())
s = input().rstrip()
count = 0
countB = 0
for i in range(N):
  if A+B <= count:
    print('No')
  else:
    if s[i] == 'a':
      print('Yes')
      count += 1
    elif s[i] =='b':
      if countB <= B:
        print('Yes')
        countB += 1
        count += 1
      else:
        print('No')
    else:
      print('No')

Submission status: Wrong Answer

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

s = input()

for i in s:
    if i == 'c':
        print('no')
    elif i == 'a' and (a+b>=1):
        if a>0:
            a -= 1
        else:
            b -= 1
        print('yes')
    elif i =='b' and b > 0:
        b -= 1
        print('yes')
    else:
        print('no')

Submission status: Wrong Answer

Solution code:
n,a,b = map(int,input().split())
s = str(input())
border = a + b
cou = 0
ans = 0
for i in range(n):
    if s[i] == "c":
        print("No")
    elif s[i] == "b":
        if cou < a + b:
            if ans + 1 <= b:
                ans += 1
                cou += 1
                print("Yes")
            else:
                print("No")
        else:
            print("No")
    else:
        if cou < a + b:
            cou += 1
            print("Yes")

Submission status: Wrong Answer

Solution code:
N, A, B = list(map(int, input().split()))
S = input()
cnt1 = 0
cnt2 = 0
for x in S:
    if x == 'a':
        if cnt1 < A+B:
            print("YES")
            cnt1 += 1
        else:
            print("NO")
    elif x == 'b':
        if cnt1 < A+B and cnt2 < B:
            print("YES")
            cnt1 += 1
            cnt2 += 1
        else:
            print("NO")
    else:
        print("NO")

Submission status: Wrong Answer

Solution code:
NAB = map(int, raw_input().split())
N = NAB[0]
A = NAB[1]
B = NAB[2]
S = raw_input()
passed_student = 0
foreign_student_rank = -1

for n in range(0, N):
    if(S[n] == 'a'):
        if(A+B > passed_student):
            print 'Yes'
            passed_student = passed_student + 1
        else:
            print 'No'
    elif(S[n] == 'b'):
        foreign_student_rank = foreign_student_rank + 1
        if(A+B > passed_student):
            if(foreign_student_rank <= B):
                print 'Yes'
                passed_student = passed_student + 1
            else:
                print 'No'
        else:
            print 'No'
    else:
        print 'No'

Submission status: Wrong Answer

Solution code:
NAB = map(int, raw_input().split())
N = NAB[0]
A = NAB[1]
B = NAB[2]
S = raw_input()
passed_student = 0
foreign_student_rank = -1

for n in range(0, N):
    if(S[n] == 'a'):
        if(A+B > passed_student):
            print 'Yes'
            passed_student = passed_student + 1
        else:
            print 'No'
    elif(S[n] == 'b'):
        foreign_student_rank = foreign_student_rank + 1
        if(A+B > passed_student):
            if(foreign_student_rank <= B):
                print 'Yes'
                passed_student = passed_student + 1
            else:
                print 'No'
        else:
            print 'No'
    else:
        print'No'

Submission status: Wrong Answer

Solution code:
NAB = map(int, raw_input().split())
N = NAB[0]
A = NAB[1]
B = NAB[2]
S = raw_input()

passed_student = 0
for n in range(0, N):
    if(A+B > passed_student):
        if(S[n] == 'a'):
            print 'Yes'
            passed_student = passed_student + 1
        elif(S[n] == 'b'):
            if(B >= n):
                print 'Yes'
                passed_student = passed_student + 1
            else: print 'No'    
        else: print 'No'
    else: print 'No'

Submission status: Wrong Answer

Solution code:
import os
import sys
import numpy as np


def dump(x):
    print >> sys.stderr, "{0}".format(x)

l = map(int, raw_input().split())
S = raw_input()
AB = l[1]+l[2]
B = l[2]
N = l[0]

count_array = np.zeros((2,), dtype=np.uint8)
pass_list = [0]*N
for i, s in enumerate(S):
    now_AB = count_array.sum()
    if now_AB >= AB:
        break
    if s == "c":
        continue
    elif s == "a":
        count_array[0] += 1
        pass_list[i] = 1
    elif s == "b" and count_array[1] < B:
        count_array[1] += 1
        pass_list[i] = 1

for pass_ in pass_list:
    if pass_ == 1:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
import os
import sys
import numpy as np


def dump(x):
    print >> sys.stderr, "{0}".format(x)

l = map(int, raw_input().split())
S = raw_input()
AB = l[1]+l[2]
B = l[2]
N = l[0]

count_array = np.zeros((2,), dtype=np.uint8)
pass_list = []
for i in range(N):
    s = S[i]
    now_AB = count_array.sum()
    # dump(count_array)
    # dump(s)
    if s == "a" and now_AB < AB:
        count_array[0] += 1
        pass_list.append("Yes")
    elif s == "b" and now_AB < AB and count_array[1] < B:
        count_array[1] += 1
        pass_list.append("Yes")
    else:
        pass_list.append("No")

for pass_ in pass_list:
    print(pass_)

Submission status: Wrong Answer

Solution code:
import os
import sys
import numpy as np


def dump(x):
    print >> sys.stderr, "{0}".format(x)

l = map(int, raw_input().split())
S = raw_input()
AB = l[1]+l[2]
B = l[2]

count_array = np.zeros((2,), dtype=np.uint8)
pass_list = []
for s in S:
    now_AB = count_array.sum()
    # dump(count_array)
    # dump(s)
    if s == "a" and now_AB < AB:
        count_array[0] += 1
        pass_list.append("Yes")
    elif s == "b" and now_AB < AB and count_array[1] <= B:
        count_array[1] += 1
        pass_list.append("Yes")
    else:
        pass_list.append("No")

for pass_ in pass_list:
    print(pass_)

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np


def dump(x):
    print >> sys.stderr, "{0}".format(x)

l = map(int, raw_input().split())
S = raw_input()
AB = l[1]+l[2]
B = l[2]

count_array = np.zeros((2,), dtype=np.uint8)
pass_list = []
for s in S:
    now_AB = count_array.sum()
    # dump(count_array)
    # dump(s)
    if s == "a" and now_AB < AB:
        count_array[0] += 1
        pass_list.append("Yes")
    elif s == "b" and now_AB < AB and count_array[1] < B:
        count_array[1] += 1
        pass_list.append("Yes")
    else:
        pass_list.append("No")

for pass_ in pass_list:
    print(pass_)

Submission status: Wrong Answer

Solution code:
import os
import sys
import numpy as np


def dump(x):
    print >> sys.stderr, "{0}".format(x)

l = map(int, raw_input().split())
S = raw_input()
AB = l[1]+l[2]
B = l[2]

count_array = np.zeros((2,), dtype=np.uint8)
pass_list = []
for s in S:
    now_AB = count_array.sum()
    # dump(count_array)
    # dump(s)
    if s == "a" and now_AB < AB:
        count_array[0] += 1
        pass_list.append("Yes")
    elif s == "b" and now_AB < AB and count_array[1] < B:
        count_array[1] += 1
        pass_list.append("Yes")
    else:
        pass_list.append("No")

for pass_ in pass_list:
    print(pass_)

Submission status: Wrong Answer

Solution code:
n, a, b = (int(s) for s in input().strip().split(' '))
s = input()
passed = 0
b_passed = 0
for c in range(0,len(s)):
    if s[c] == "a" and passed < a+b:
        passed += 1
        print("yes")
    elif s[c] == "b" and passed < a+b and b_passed < b:
        passed+=1
        b_passed+=1
        print("yes")
    else:
        print("no")

Submission status: Wrong Answer

Solution code:
nums = input().split()
N = int(nums[0])
A = int(nums[1])
B = int(nums[2])
S = input()
count = 0
bcount = 0
for x in S:
	if x == 'a' and A+B > count:
		count += 1
		print("YES")
	elif x == 'b' and A+B > count and bcount < B :
		count += 1
		bcount += 1
		print("YES")
	else :
		print("NOT")

Submission status: Wrong Answer

Solution code:
l = input().split()
s = input()
 
n = int(l[0])
a = int(l[1])
b = int(l[2])
 
count = 0
countt = 0
for i in s:
    if i == 'a':
        if count < a+b:
            count = count + 1
            print('YES')
        else:
            print('NO')
    if i == 'b':
        if (count < a+b) and (countt < b):
            count = count + 1
            countt = countt + 1
            print('YES')
        else:
            print('NO')
    if i == 'c':
        print('NO')

Submission status: Wrong Answer

Solution code:
l = input().split()
s = input()

n = int(l[0])
a = int(l[1])
b = int(l[2])

count = 0
countt = 0
for i in s:
    if i == 'a':
        if count < a+b:
            count = count + 1
            print('YES')
        else:
            print('No')
    if i == 'b':
        if (count < a+b) and (countt < b):
            count = count + 1
            countt = countt + 1
            print('YES')
        else:
            print('NO')
    if i == 'c':
        print('NO')

Submission status: Wrong Answer

Solution code:
nums = list(map(int, input().split()))
s=input()
#print(nums[0], nums[1], nums[2])
#print(s)
N=nums[0]
A=nums[1]
B=nums[2]
cA=0
cB=0
for i in range(N):
	if(s[i:i+1] == "a"):
#		print(s[i:i+1])
		if((cA+cB)<(A+B)):
			print("Yes")
		else:
			print("No")
		cA+=1
	elif(s[i:i+1]=="b"):
#		print(s[i:i+1])
		if((cA+cB)<(A+B)):
			if(cB<=B):
				print("Yes")
			else:
				print("No")
		else:
			print("No")	
		cB += 1
	elif(s[i:i+1]=="c"):
		print("No")

Submission status: Wrong Answer

Solution code:
nums = list(map(int, input().split()))
s=input()
#print(nums[0], nums[1], nums[2])
#print(s)
N=nums[0]
A=nums[1]
B=nums[2]
cA=0
cB=0
for i in range(N):
	if(s[i:i+1] == "a"):
#		print(s[i:i+1])
		if((cA+cB)<(A+B)):
			print("Yes")
		else:
			print("No")
		cA+=1
	elif(s[i:i+1]=="b"):
#		print(s[i:i+1])
		if((cA+cB)<(A+B)):
			if(cB<B):
				print("Yes")
			else:
				print("No")
		else:
			print("No")	
		cB += 1
	elif(s[i:i+1]=="c"):
		print("No")

Submission status: Wrong Answer

Solution code:
nums = list(map(int, input().split()))
s=input()
print(nums[0], nums[1], nums[2])
print(s)
N=nums[0]
A=nums[1]
B=nums[2]
cA=0
cB=0
for i in range(N):
	if(s[i:i+1] == "a"):
#		print(s[i:i+1])
		if((cA+cB)<(A+B)):
			print("Yes")
		else:
			print("No")
		cA+=1
	elif(s[i:i+1]=="b"):
#		print(s[i:i+1])
		if((cA+cB)<(A+B)):
			if(cB<B):
				print("Yes")
			else:
				print("No")
		else:
			print("No")	
		cB += 1
	elif(s[i:i+1]=="c"):
		print("No")

Submission status: Wrong Answer

Solution code:
N, A, B = map(int, input().split())
S = input()
through = 0
oversee_thr = 0
for i in range(N):
    if S[i] == "c":
        if i + 1 == N:
            print("no", end="")
        else:
            print("no")
    elif S[i] == "a":
        if through < A + B:
            if i + 1 == N:
                print("yes", end="")
            else:
                print("yes")
                through += 1
        else:
            if i + 1 == N:
                print("no", end="")
            else:
                print("no")
    elif S[i] == "b":
        if through < A + B and oversee_thr < B:
            if i + 1 == N:
                print("yes", end="")
            else:
                print("yes")
                through += 1
                oversee_thr += 1
        else:
            if i + 1 == N:
                print("no", end="")
            else:
                print("no")

Submission status: Wrong Answer

Solution code:
input1 = raw_input()
s = raw_input()

n, a, b = map(int, input1.split(' '))

n_a, n_b = 0, 0

for i in range(n):
    c = s[i]
    if c == 'a':
        n_a += 1
        if n_a + n_b <= a + b:
            print 'Yes'
        else:
            print 'No'

    elif c == 'b':
        n_b += 1
        if n_a + n_b <= a + b and n_b <= b:
            print 'Yes'
        else:
            print 'No'
    else:
        print 'No'

Submission status: Wrong Answer

Solution code:
input1 = raw_input()
s = raw_input()

n, a, b = map(int, input1.split(' '))

n_a, n_b = 0, 0

for c in s:
    if c == 'a':
        n_a += 1
        if n_a + n_b <= a + b:
            print 'Yes'
        else:
            print 'No'
            
    elif c == 'b':
        n_b += 1
        if n_a + n_b <= a + b and n_b <= b:
            print 'Yes'
        else:
            print 'No'
    else:
        print 'No'

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,raw_input().split())
ab=a+b
s=list(raw_input())
p=0
r=[]
ro=0
for i in range(n):
    if s[i]=="a" and p<ab:
        r.append("Yes")
        p+=1
    elif s[i]=="b" and p<ab and ro<=b:
        ro+=1
        p+=1
        r.append("Yes")
    elif s[i]=="c":
        r.append("No")
    else:
        r.append("No")
for i in range(n):
    print(r[i])

Submission status: Wrong Answer

Solution code:
N, A, B = map(int, input().split())
S = input()
through = 0
oversee_thr = 0
for i in range(N):
    if S[i] == "c":
        print("no")
    elif S[i] == "a":
        if through < A + B:
            print("yes")
            through += 1
        else:
            print("no")
    elif S[i] == "b":
        if through < A + B and oversee_thr < B:
            print("yes")
            through += 1
            oversee_thr += 1
        else:
            print("no")

Submission status: Wrong Answer

Solution code:
n, a, b = map(int ,raw_input().split())
s = raw_input()

kaigai = 0
for i in range(len(s)):
    if s[i] == 'a':
        if i < a+b:
            print "Yes"
        else:
            print "No"
    elif s[i] == 'b':
        if i < a+b and kaigai<b:
            print "Yes"
        else:
            print "No"
        kaigai+= 1
    else:
        print "No"

Submission status: Wrong Answer

Solution code:
n, a, b = map(int ,raw_input().split())
s = raw_input()

kaigai = 0
for i in range(len(s)):
    if s[i] == 'a':
        if i < a+b-1:
            print "Yes"
        else:
            print "No"
    elif s[i] == 'b':
        if i < a+b-1 and kaigai<b:
            print "Yes"
        else:
            print "No"
        kaigai+= 1
    else:
        print "No"

Submission status: Wrong Answer

Solution code:
n, a, b = map(int ,raw_input().split())
s = raw_input()

kaigai = 0
for i in range(len(s)):
    if s[i] == 'a':
        if i < a+b-1:
            print "Yes"
        else:
            print "No"
    elif s[i] == 'b':
        kaigai+= 1
        if i < a+b-1 and kaigai<b:
            print "Yes"
        else:
            print "No"
    else:
        print "No"

Submission status: Wrong Answer

Solution code:
N, A, B = map(int, raw_input().split())
S = raw_input()
acc_b = 0
acc_t = 0
for x in range(N):
    app = S[x]
    under = (acc_t < (A + B))
    if app == "a" and under:
        print "yes"
        acc_t += 1
    elif app == "b" and acc_b < B and under:
        print "yes"
        acc_t += 1
        acc_b += 1
    else:
        print "no"

Submission status: Wrong Answer

Solution code:
n, a, b = map(int ,raw_input().split())
s = raw_input()

kaigai = 0
for i in range(len(s)):
    if s[i] == 'a':
        if i < a+b:
            print "Yes"
        else:
            print "No"
    elif s[i] == 'b':
        kaigai+= 1
        if i < a+b and kaigai<b:
            print "Yes"
        else:
            print "No"
    else:
        print "No"

Submission status: Wrong Answer

Solution code:
n, a, b = map(int ,raw_input().split())
s = raw_input()

kaigai = 0
for i in range(len(s)):
    if s[i] == 'a':
        if i < a+b-1:
            print "Yes"
        else:
            print "No"
    elif s[i] == 'b':
        kaigai+= 1
        if i < a+b-1 and kaigai<=b:
            print "Yes"
        else:
            print "No"
    else:
        print "No"

Submission status: Wrong Answer

Solution code:
N, A, B = map(int, raw_input().split())
S = raw_input()
acc_b = 0
acc_t = 0
for x in range(N):
    app = S[x]
    under = (acc_t < (A + B))
    if app == "a" and under:
        print "yes"
        acc_t += 1
    elif app == "b" and acc_b < B and under:
        print "yes"
        acc_t += 1
        acc_b += 1
    else:
        print "no"

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# !/usr/bin/env python
# vim: set fileencoding=utf-8 :

"""
#
# Author:   Noname
# URL:      https://github.com/pettan0818
# License:  MIT License
# Created:  2016-10-10
#

# Usage
#
"""

def read_value():
    first_line = input()
    status = first_line.split(" ")

    num_of_contestant = int(status[0])
    basis = int(status[1])
    oversea_limit = int(status[2])

    second_line = input()
    rank_str = second_line

    return [num_of_contestant, basis, oversea_limit, rank_str]


def check_japan(rank, basis, oversea_limit):
    if rank <= basis + oversea_limit:
        return "Yes"
    else:
        return "No"

def check_overseas(rank, oversea_rank, basis, oversea_limit):
    if rank <= basis + oversea_limit and oversea_rank <= oversea_limit:
        return "Yes"
    else:
        return "No"


if __name__ == "__main__":
    input_items = read_value()

    basis = input_items[1]
    oversea_limit = input_items[2]
    rank_str = input_items[3]

    oversea_rank = 0
    passed = 0

    for rank, type in enumerate(rank_str):
        if type == "a":
            if check_japan(passed, basis, oversea_limit) == "Yes":
                print("Yes")
                passed += 1
            else:
                print("No")

        if type == "b":
            oversea_rank += 1
            if check_overseas(passed, oversea_rank, basis, oversea_limit) == "Yes":
                print("Yes")
                passed += 1
            else:
                print("No")

        if type == "c":
            print("No")

Submission status: Wrong Answer

Solution code:
n, a, b = map(int ,raw_input().split())
s = raw_input()

kaigai = 0
for i in range(len(s)):
    if s[i] == 'a':
        if i < a+b:
            print "Yes"
        else:
            print "No"
    elif s[i] == 'b':
        kaigai+= 1
        if i < a+b and kaigai<=b:
            print "Yes"
        else:
            print "No"
    else:
        print "No"

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# !/usr/bin/env python
# vim: set fileencoding=utf-8 :

"""
#
# Author:   Noname
# URL:      https://github.com/pettan0818
# License:  MIT License
# Created:  2016-10-10
#

# Usage
#
"""

def read_value():
    first_line = input()
    status = first_line.split(" ")

    num_of_contestant = int(status[0])
    basis = int(status[1])
    oversea_limit = int(status[2])

    second_line = input()
    rank_str = second_line

    return [num_of_contestant, basis, oversea_limit, rank_str]


def check_japan(rank, basis, oversea_limit):
    if rank < basis + oversea_limit:
        return "Yes"
    else:
        return "No"

def check_overseas(rank, oversea_rank, basis, oversea_limit):
    if rank < basis + oversea_limit and oversea_rank < oversea_limit:
        return "Yes"
    else:
        return "No"


if __name__ == "__main__":
    input_items = read_value()

    basis = input_items[1]
    oversea_limit = input_items[2]
    rank_str = input_items[3]

    oversea_rank = 0
    passed = 0

    for rank, type in enumerate(rank_str):
        if type == "a":
            if check_japan(passed, basis, oversea_limit) == "Yes":
                print("Yes")
                passed += 1
            else:
                print("No")

        if type == "b":
            oversea_rank += 1
            if check_overseas(passed, oversea_rank, basis, oversea_limit) == "Yes":
                print("Yes")
                passed += 1
            else:
                print("No")

        if type == "c":
            print("No")