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,b,c=map(int,input().split())
S = input()
kaigai=0
goukei=0
for i in range(0,N):
  if S[i]=='a' and goukei<b+c:
    print("Yes")
    goukei+=1
  elif S[i]=='b':
    if goukei<b+c and kaigai<=b:
      print("Yes")
      goukei+=1
      kaigai+=1
    else:
      print("No")
  else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]

N, A, B = ri_()
S = rs()
a = 0
b = 0
for i in S:
    if i == 'a':
        if a + b <= A + B:
            print('Yes')
        else:
            print('No')
        a += 1
    elif 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 = [ int(i) for i in input().split() ]
S = input()

passCount = 0
overseaPassCount = 1
for k,v in enumerate(S):
  if v == "c":
    print("No")
  elif v == "b":
    print("Yes" if passCount<=A+B and overseaPassCount<=B else "No")
    overseaPassCount += 1
    passCount += 1
  elif v == "a":
    print("Yes" if passCount<=A+B else "No")
    passCount += 1
  else :
    None

Submission status: Wrong Answer

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

passCount = 0
overseaPassCount = 1
for k,v in enumerate(S):
  if v == "c":
    print("No")
  elif v == "b":
    print("Yes" if passCount<A+B and overseaPassCount<=B else "No")
    overseaPassCount += 1
    passCount += 1
  elif v == "a":
    print("Yes" if passCount<A+B else "No")
    passCount += 1
  else :
    None

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

x = A + B
cnt = 1
rank = 1
for i in range(N):
    y = s[i : i+1]
    if cnt <= x:
        if y == "a":
            print("yes")
            cnt += 1
        elif y == "b" and rank <= B:
            print("yes")
            cnt += 1
            rank += 1
        else:
            print("No")
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
s=input()
c=a+b
A=0
B=0
for i in s:
    if A+B<=c:
        if i=="a":
            A+=1
            print("Yes")
        elif i=="b" and B<b:
            B+=1
            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 s:
    if A+B<=a+b:
        if i=="a":
            A+=1
            print("Yes")
        elif i=="b" and B<b:
            B+=1
            print("Yes")
        else:
            print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

import sys

T = A + B
Ta = B

for p in S:
  if p == "c":
    print("No")
    continue
    
  elif p == "a":
    if T > 0:
      print("Yes")
      T -= 1
    else:
      print("No")
      
  else:
    if T > 0 and Ta > 0:
      print("Yes")
      Ta -= 1
    else:
      print("No")

Submission status: Wrong Answer

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

nowA=0
nowB=0

for s in S:
    if s=='c':
        print('No')
    elif s=='a':
        if nowA+nowB<A+B:
            nowA+=1
            print('Yes')
        else:
            print('No')
    else:
        if nowA+nowB<A+B and nowB<B:
            nowB+=1
            print('Yes')
            nowB+=1
        else:
            print('No')

Submission status: Wrong Answer

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

nowA=0
nowB=0

for s in S:
    if s=='c':
        print('No')
    elif s=='a':
        if nowA+nowB<A+B:
            nowA+=1
            print('Yes')
        else:
            print('No')
    else:
        if nowA+nowB<A+B and nowB<=B:
            nowB+=1
            print('Yes')
            nowB+=1
        else:
            print('No')

Submission status: Wrong Answer

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

nowA=0
nowB=0

for s in S:
    if s=='c':
        print('No')
    elif s=='a':
        if nowA+nowB<=A+B:
            nowA+=1
            print('Yes')
        else:
            print('No')
    else:
        if nowA+nowB<=A+B and nowB<=B:
            nowB+=1
            print('Yes')
            nowB+=1
        else:
            print('No')

Submission status: Wrong Answer

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

all = list(s)
count = 0
count_b = 0
for i in all:
    if i == 'a':
        if count < a + b:
            print('Yes')
            count += 1
        else:
            print('No')
    elif i == 'b':
        if (count < a + b) and (count_b <= b):
            print('Yes')
            count += 1
            count_b += 1
        else:
            print('No')
    else:
        print('No')

Submission status: Wrong Answer

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

all = list(s)
count = 0
count_b = 0
for i in all:
    if i == 'a':
        if count < a + b:
            print('Yes')
            count += 1
        else:
            print('No')
    if i == 'b':
        if (count < a + b) and (count_b <= b):
            print('Yes')
            count += 1
            count_b += 1
        else:
            print('No')
    else:
        print('No')

Submission status: Wrong Answer

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

all = list(s)
count = 0
count_b = 0
for i in range(n - 1):
    if all[i] == 'a':
        if count < a + b:
            print('yes')
            count += 1
        else:
            print('no')
    if all[i] == 'b':
        if count < a + b and count_b <= b:
            print('yes')
            count += 1
            count_b += 1
        else:
            print('no')
    else:
        print('no')

Submission status: Wrong Answer

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

all = list(s)
count = 0
count_b = 0
for i in all:
    if i == 'a':
        if count < a + b:
            print('yes')
            count += 1
        else:
            print('no')
    if i == 'b':
        if count < a + b and count_b <= b:
            print('yes')
            count += 1
            count_b += 1
        else:
            print('no')
    else:
        print('no')

Submission status: Wrong Answer

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

all = list(s)
count = 0
count_b = 0
for i in all:
    if i == 'a':
        if count <= a + b:
            print('yes')
            count += 1
        else:
            print('no')
    if i == 'b':
        if count <= a + b and count_b <= b:
            print('yes')
            count += 1
            count_b += 1
        else:
            print('no')
    else:
        print('no')

Submission status: Wrong Answer

Solution code:
N, A, B = input().split(' ')
N = int(N)
A = int(A)
B = int(B)
S = []
S = list(input())
print(S)
JS = 0
AS = 0
OT = 0

for i in range(N):
  if S[i] == 'a' and A+B > JS+AS:
    print('Yes')
    JS += 1
  elif S[i] == 'b' and A+B > JS+AS and AS < B:
    print('Yes')
    AS += 1
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
N, A, B = input().split(' ')
N = int(N)
A = int(A)
B = int(B)
S = []
S = list(input())
JS = 0
AS = 0
OT = 0

for i in range(N):
  if S[i] == 'a':
    JS += 1
  elif S[i] == 'b':
    AS += 1
  elif S[i] == 'c':
    OT += 1
  
  if S[i] == 'a' and A + B >= (JS + AS):
    print('Yes')
  elif S[i] == 'b' and A + B >= (JS + AS) and AS <= B:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
N, A, B = input().split(' ')
N = int(N)
A = int(A)
B = int(B)
S = []
S = list(input())
JS = 0
AS = 0
OT = 0

for i in range(N):
  print(S[i])
  if S[i] == 'a':
    JS += 1
  elif S[i] == 'b':
    AS += 1
  elif S[i] == 'c':
    OT += 1
  
  if S[i] == 'a' and A + B >= (JS + AS):
    print('Yes')
  elif S[i] == 'b' and A + B >= (JS + AS) and AS <= B:
    print('Yes')
  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 b < B:
    b +=1
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

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

for i in range(N):
  if S[i]=='a' and i < A+B:
    print('Yes')
  elif S[i]=='b' and i < B:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())
s = input()
q = [1] * n
for i,l in enumerate(s):
    q[i] *= (l == "b" and b > 0) or (l == "a" and a + b > 0)
    b -= q[i]
print("".join(["YNeos"[1-i::2] for i in q]))

Submission status: Wrong Answer

Solution code:
N, A, B = list(map(int, input().split()))
S = input()
y, yab = 0, 1

for s in S:
    if(s == 'a'):
        if(y <= A + B):
            print("Yes")
            y += 1
        else:
            print("No")
    elif(s == 'b'):
        if(y <= A + B and yab <= B):
            print("Yes")
            y += 1
            yab += 1
        else:
            print("No")
    else:
        print("No")

Submission status: Wrong Answer

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

for s in S:
    if(s == 'a'):
        if(y <= A + B):
            print("Yes")
            y += 1
        else:
            print("No")
    elif(s == 'b'):
        if(y <= A + B and yab <= B):
            print("Yes")
            y += 1
            yab += 1
        else:
            print("No")
    else:
        print("No")

Submission status: Wrong Answer

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

#合格人数
clear = 0

flag = [False, False]

ans = []

for i, x in enumerate(s):

  if flag.count(True) == 2:
    print('\n'.join(ans))
    print('\n'.join(['No']*(n-i)))
    break
  
  #a,bそれぞれの合格人数
  cnta = s[:i+1].count('a')
  cntb = s[:i+1].count('b')
  
  #a, b, cそれぞれで場合分けして判定
  if x == 'a':
    if clear < a + b:
      ans.append('Yes')
      clear += 1
    else:
      ans.append('No')
      flag[0] = True
  
  elif x == 'b':
    if cntb <= b and clear < (a + b):
      ans.append('Yes')
      clear += 1
    else:
      ans.append('No')
      flag[1] = True
      
  else:
    ans.append('No')
                 
print('\n'.join(ans))

Submission status: Wrong Answer

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

#合格人数
clear = 0

flag = [False, False]

for i, x in enumerate(s):

  if flag.count(True):
    print('\n'.join(['No']*(n-i)))
    break
  
  #a,bそれぞれの合格人数
  cnta = s[:i+1].count('a')
  cntb = s[:i+1].count('b')
  
  #a, b, cそれぞれで場合分けして判定
  if x == 'a':
    if clear < a + b:
      print('Yes')
      clear += 1
    else:
      print('No')
      flag[0] = True
  
  elif x == 'b':
    if cntb <= b and clear < (a + b):
      print('Yes')
      clear += 1
    else:
      print('No')
      flag[1] = True
      
  else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
(n,an,bn) = list(map(int,input().split()))
s = list(input())
count = 1
foreign = 1
for i in s:
  if i=='a' and an+bn >= count:
    print('Yes')
    count += 1
  elif i=='b' and an+bn > count and bn >= foreign:
    print('Yes')
    count += 1
    foreign += 1
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
a_=[]
b_=[]
s=list(input())
for i in range(a):
  if s[i]=='a':
    a_.append(s[i])
    if len(a_)+len(b_)<=b+c:
      print('Yes')
    else:
      print('No')
  elif s[i]=='b':
    b_.append(s[i])
    if len(a_)+len(b_)<=c+b and len(b_)<=c:
      print('Yes')    
    else:
      print('No')
  elif s[i]=='c':
    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 == 'c':
    print('No')
  elif s == 'a':
    if a + b <= A + B:
      print('Yes')
      a += 1
    else:
      print('No')
  else:
    if a + b <= A + B and b <= B:
      print('Yes')
      b += 1
    else:
      print('No')

Submission status: Wrong Answer

Solution code:
from sys import stdin

n, a, b = [int(x) for x in stdin.readline().strip().split()]
s = stdin.readline()

a = a + b
all_num = 0
oversea_num = 0

for i, t in enumerate(s):
  if t == 'a' and all_num < a:
    print('Yes')
    all_num += 1
  elif t == 'b' and  oversea_num < b and all_num < a:
    print('Yes')
    all_num += 1
    oversea_num += 1
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
from sys import stdin

n, a, b = [int(x) for x in stdin.readline().strip().split()]
s = stdin.readline()

a = a + b
all_num = 0
oversea_num = 0

for i, t in enumerate(s):
  if t == 'a' and all_num < a:
    print('Yes', end="")
    all_num += 1
  elif t == 'b' and  oversea_num < b and all_num < a:
    print('Yes', end="")
    all_num += 1
    oversea_num += 1
  else:
    print('No', end="")
  if i != len(s)-1:
    print()

Submission status: Wrong Answer

Solution code:
from sys import stdin

n, a, b = [int(x) for x in stdin.readline().strip().split()]
s = stdin.readline()

a = a + b
all_num = 0
oversea_num = 0

for t in s:
  if t == 'a':
    if all_num < a:
      print('Yes')
      all_num += 1
    else:
      print('No')
  elif t == 'b':
    if oversea_num < b and all_num < a:
      print('Yes')
      all_num += 1
      oversea_num += 1
    else:
      print('No')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())
arr = input()
cnt = 1
abroad = 0

for i in arr:
  
  if i == "c":
    print("No")
  elif cnt <= (a + b):
    if i == "a":
      print("Yes")
      cnt += 1
      
    elif i == "b" and abroad <= b :
      print("Yes")
      cnt += 1
      abroad += 1
    else:
      print("No")
  else:
    print("No")

Submission status: Wrong Answer

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

cnt_all = 0
cnt_for = 0
ans = []
for i in range(n):
    if s[i] == "c":
        ans.append("No")
    elif s[i] == "a":
        if cnt_all < a + b:
            cnt_all += 1
            ans.append("Yes")
        else:
            ans.append("No")
    else:
        if cnt_all < a + b and cnt_for <= b:
            cnt_for += 1
            cnt_all += 1
            ans.append("Yes")
        else:
            ans.append("No")
print("\n".join(ans))

Submission status: Wrong Answer

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

cnt_s = 0
cnt_b = 0

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

Submission status: Wrong Answer

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

cnt_s = 0
cnt_b = 0

for i in range(n):
    if cnt_s <= a+b and i == 'a':
        print('Yes')
        cnt_s += 1
    elif cnt_s > a+b and i == 'a':
        print('No')
    elif cnt_s <= a+b and cnt_b <= b and i =='b':
        print('Yes')
        cnt_b += 1
        cnt_s += 1
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
cnt_s = 0
cnt_b = 0

for i in range(n):
    if cnt_s <= a+b and i == 'a':
        print('Yes')
        cnt_s += 1
    elif cnt_s > a+b and i == 'a':
        print('No')
    elif cnt_s <= a+b and cnt_b <= b and i =='b':
        print('Yes')
        cnt_b += 1
        cnt_s += 1
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
cnt_s = 0
cnt_b = 0

for i in range(n):
    if cnt_s <= a+b and i == a:
        print('Yes')
        cnt_s += 1
    elif cnt_s > a+b and i == a:
        print('No')
    elif cnt_s <= a+b and cnt_b <= b and i ==b:
        print('Yes')
        cnt_b += 1
        cnt_s += 1
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
n,a,b=map(int,input().split())
cnt_s = 0
cnt_b = 0

for i in range(n):
    if cnt_s <= a+b:
        print('Yes')
        cnt_s += 1
    elif cnt_s > a+b:
        print('No')
    elif cnt_s <= a+b and cnt_b <= b:
        print('Yes')
        cnt_b += 1
        cnt_s += 1
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
N, A, B = (int(x) for x in input().split())

x = input()
y = list(x)
count_a = 0
count_b = 0

for i in range(0, N):
    if (y[i] == "a"):
        if(count_a + count_b < (A + B)):
            print("Yes")
            count_a += 1
        else:
            print("No")
    
    elif(y[i] == "b"):
        if(count_a + count_b < (A + B) and count_b <= B):
            print("Yes")
            count_b += 1
        else:
            print("No")
    
    elif(y[i] == "c"):
        print("No")

Submission status: Wrong Answer

Solution code:
N, A, B = (int(x) for x in input().split())

x = input()
y = list(x)
count_a = 0
count_b = 0

for i in range(0, N):
    if (y[i] == "a"):
        if(count_a + count_b < (A + B)):
            print("Yes")
            count_a += 1
        elif(count_a + count_b >= (A + B)):
            print("No")
    
    elif(y[i] == "b"):
        if(count_a + count_b < (A + B) and count_b < B):
            print("Yes")
            count_b += 1
        elif(count_a + count_b >= (A + B)):
            print("No")
    
    elif(y[i] == "c"):
        print("No")

Submission status: Wrong Answer

Solution code:
N, A, B = (int(x) for x in input().split())

x = input()
y = list(x)
count_a = 0
count_b = 0

for i in range(0, N):
    if (y[i] == "a"):
        if(count_a + count_b < (A + B)):
            print("Yes")
            count_a += 1
        elif(count_a + count_b >= (A + B)):
            print("No")
    
    elif(y[i] == "b"):
        if(count_a + count_b < (A + B) and count_b <= B):
            print("Yes")
            count_b += 1
        elif(count_a + count_b >= (A + B)):
            print("No")
    
    elif(y[i] == "c"):
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(N):
  if S[i] == 'a':
    if a < A:
      print('Yes')
      a += 1
    else:
      print('No')
  elif S[i] == 'b':
    if a < A and b < B:
      print('yes')
      a += 1
      b += 1
    else:
      print('No')
  else:
    print('No')

Submission status: Wrong Answer

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

for i in range(N):
  if S[i] == 'a':
    if a < A:
      print('Yes')
      a += 1
    else:
      print('No')
  if S[i] == 'b':
    if a < A and b < B:
      print('yes')
      a += 1
      b += 1
    else:
      print('No')
  else:
    print('No')

Submission status: Wrong Answer

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

for i in range(N):
  if S[i] == 'a':
    if a < A:
      print('Yes')
      a += 1
    else:
      print('No')
  if S[i] == 'b':
    if a < A and b < B:
      print('yes')
      a += 1
      b += 1
    else:
      print('No')

Submission status: Wrong Answer

Solution code:
N,A,B=map(int,input().split())
S=input()
t_count=0
b_count=0
flag=None

for i in S:
  if i=="c":
    print("No")
  else:
    if i=="a":
      t_count+=1
      if t_count<=A+B:
        print("Yes")
      else:
        print("No")
    else:
      b_count+=1
      if b_count<=B:
        t_count+=1
        print("Yes")
      else:
        print("No")

Submission status: Wrong Answer

Solution code:
N,A,B=map(int,input().split())
S=input()
t_count=0
b_count=0
flag=None

for i in S:
  if i=="c":
    print("No")
  else:
    t_count+=1
    if t_count>A+B:
      print("No")
    else:
      if i=="b":
        b_count+=1
        if b_count<=B:
          print("Yes")
        else:
          print("No")
      else:
        print("Yes")

Submission status: Wrong Answer

Solution code:
x = list(map(int,input().split()))

n = x[0]
a = x[1]
b = x[2]

s = input()
c = 0
k = 0

for i in range(0,n):
  if(s[i] == "a"):
    if(c < a + b):
      print("yes")
      c = c + 1
    else:
      print("No")
  elif(s[i] == "b"):
    if(c < a + b and k < b):
      print("Yes")
      c = c + 1
      k = k + 1
    else:
      print("No")
      k = k + 1
  elif(s[i] == "c"):
    print("No")
    continue

Submission status: Wrong Answer

Solution code:
x = list(map(int,input().split()))

n = x[0]
a = x[1]
b = x[2]

s = input()
c = 0
k = 0

for i in range(0,n):
  if(s[i] == "c"):
    print("No")
    continue
  elif(s[i] == "a"):
    if(c < a + b):
      print("yes")
      c = c + 1
    else:
      print("No")
  else:
    if(c < a + b and k < b):
      print("Yes")
      c = c + 1
      k = k + 1
    else:
      print("No")
      k = k + 1

Submission status: Wrong Answer

Solution code:
x = list(map(int,input().split()))

n = x[0]
a = x[1]
b = x[2]

s = input()
c = 0
k = 0

for i in range(0,n):
  if(s[i] == "c"):
    print("No")
    continue
  elif(s[i] == "a"):
    if(c < a + b):
      print("yes")
      c = c + 1
    else:
      print("No")
  else:
    if(c < a + b and k < b):
      print("Yes")
      c = c + 1
      k = k + 1
    else:
      print("No")

Submission status: Wrong Answer

Solution code:
x = list(map(int,input().split()))

n = x[0]
a = x[1]
b = x[2]

s = input()
c = 0
k = 0

for i in range(0,n):
  #print(c)
  if(s[i] == "c"):
    print("No")
  elif(s[i] == "a"):
    if(c < a + b):
      print("yes")
      c = c + 1
    else:
      print("No")
  else:
    if(c < a + b and k < b):
      print("Yes")
      c = c + 1
      k = k + 1
    else:
      print("No")

Submission status: Wrong Answer

Solution code:
x = list(map(int,input().split()))

n = x[0]
a = x[1]
b = x[2]

s = input()
c = 0
k = 0

for i in range(0,n):
  #print(c)
  if(s[i] == "c"):
    print("No")
  elif(s[i] == "a"):
    if(c <= a + b):
      print("yes")
      c = c + 1
    else:
      print("No")
  else:
    if(c <= a + b and k <= b):
      print("Yes")
      c = c + 1
      k = k + 1
    else:
      print("No")

Submission status: Wrong Answer

Solution code:
x = list(map(int,input().split()))

n = x[0]
a = x[1]
b = x[2]

s = input()
c = a + b
k = b
j = 0
for i in range(0,n):
  #print(c)
  if(s[i] == "c"):
    print("No")
  elif(s[i] == "a"):
    if(c > 0):
      print("yes")
      c = c - 1
    else:
      print("No")
  else:
    if(c > 0 and k > 0):
      print("Yes")
      c = c - 1
      k = k - 1
    else:
      print("No")

Submission status: Wrong Answer

Solution code:
x = list(map(int,input().split()))

n = x[0]
a = x[1]
b = x[2]

s = input()
c = a + b
k = b
j = 0
for i in range(0,n):
  #print(c)
  if(s[i] == "c"):
    print("No")
  elif(s[i] == "a"):
    c = c - 1
    if(c >= 0):
      print("yes")
    else:
      print("No")
  else:
    k = k - 1
    if(c >= 0 and k >= 0):
      print("Yes")
      c = c - 1
    else:
      print("No")

Submission status: Wrong Answer

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

cnt = 0
fcnt = 0
for i in range(N):
    s = S[i]
    if s == "c":
        print("No")
        continue
    if cnt < A + B:
        if s == "a":
            cnt += 1
            print("Yes")
        elif s == "b" and fcnt + 1 <= B:
            fcnt += 1
            if fcnt <= B:
                cnt += 1
                print("Yes")
            else:
                print("No")
    else:
        print("No")

Submission status: Wrong Answer

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

cnt = 0
fcnt = 0
for i in range(N):
    s = S[i]
    if cnt < A + B:
        if s == "c":
            print("No")
            continue
        if s == "a":
            cnt += 1
            print("Yes")
        elif s == "b" and fcnt <= B:
            fcnt += 1
            if fcnt <= B:
                cnt += 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())
for i in s:
  if i == "a" and a != 0:
    a -= 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 = list(input())
for i in s:
  if i == "a" and a != 0:
    a -= 1
    print("Yes")
  elif i == b and b != 0:
    b -=1
    print("Yes")
  else:
    print("No")