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: Accepted

Solution code:
x=raw_input()

n,a,b = [int(i) for i in x.split()]


s = raw_input()

a_c = 0
b_c = 0

for p in s:
    if(p=='a' and a_c+b_c<a+b):
        print 'Yes'
        a_c += 1
    
    elif(p=='b' and a_c+b_c<a+b and b_c<b):
        print 'Yes'
        b_c += 1

    else:
        print 'No'

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math,string,itertools,fractions,heapq,collections,re,array,bisect

def s():
    return raw_input().strip()
def n():
    return int(raw_input())
def d():
    return float(raw_input())

def ls():
    return raw_input().strip().split()
def ln():
    return map(int, raw_input().strip().split())
def ld():
    return map(float, raw_input().strip().split())

def fs():
    return [raw_input().strip() for i in xrange(input())]
def fn():
    return [int(raw_input().strip()) for i in xrange(input())]
def fd():
    return [float(raw_input().strip()) for i in xrange(input())]

EPS = 1e-9

#http://www.deqnotes.net/acmicpc/2d_geometry/lines
def dot(a, b):
    return a.real * b.real + a.imag * b.imag

def cross(a, b):
    return a.real * b.imag - a.imag * b.real

def distance(a, b, c):
    if dot(b-a, c-a) <= EPS:
        return abs(c-a)
    if dot(a-b, c-b) <= EPS:
        return abs(c-b)
    return abs(cross(b-a, c-a)/(b-a))

N, A, B = ln()
S = s()

AB = A + B
d = 0
f = 0
for i in S:
    if i == 'a' and d < AB:
        d += 1
        print 'Yes'
    elif i == 'b':
        f += 1
        if d < AB and f <= B:
            d += 1
            print 'Yes'
        else:
            print 'No'
    else:
        print 'No'

Submission status: Accepted

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

Submission status: Accepted

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

n_ab = 0
n_b = 0

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

Submission status: Accepted

Solution code:

n, a, b = list(map(lambda x: int(x), input().split()))
s = input()


num_a = 0
num_b = 0

rank_b = 0

for i in range(len(s)):
    if s[i] == 'c':
        print('No')

    elif s[i] == 'a':
        if num_a + num_b < a + b:
            print('Yes')
            num_a += 1
        else:
            print('No')

    elif s[i] == 'b':
        rank_b += 1

        if num_a + num_b < a + b and rank_b <= b:
            print('Yes')
            num_b += 1
        else:
            print('No')

Submission status: Accepted

Solution code:
N, A, B = map(int, raw_input().split())
S = raw_input()
jp, x = 0, 0

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

Submission status: Accepted

Solution code:
N, A, B = list(map(int, input().split()))
S = input()
a_cnt = 0
b_cnt = 0
ab_cnt = 0

for c in S:
    if c == 'a':
        if ab_cnt < A+B:
            print('Yes')
            a_cnt += 1
            ab_cnt += 1
        else:
            print('No')
    elif c == 'b':
        if ab_cnt < A+B and b_cnt < B:
            print('Yes')
            b_cnt += 1
            ab_cnt += 1
        else:
            print('No')
    else:
        print('No')

Submission status: Accepted

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

x, y = 0, 0
for i, p in enumerate(s):
    if p=="a":
        if x < A+B:
            print("Yes")
            x+=1
        else:
            print("No")
    elif p=="b":
        if x < A+B and y < B:
            print("Yes")
            x+=1
            y+=1
        else:
            print("No")
    else:
        print("No")

Submission status: Accepted

Solution code:
def read():
    return int(input())

def reads(sep=None):
    return list(map(int, input().split(sep)))

def main():
    n, a, b = reads()
    s = input()
    
    ai, bi = 0, 0
    for c in s:
        if c == 'a':
            if ai+bi < a+b:
                print('Yes')
                ai += 1
            else:
                print('No')
        elif c == 'b':
            if ai+bi < a+b and bi < b:
                print('Yes')
                bi += 1
            else:
                print('No')
        else:
            print('No')

main()

Submission status: Accepted

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


t = 0
o = 0
for s in S:
    if s == 'a':
        if t < A + B:
            print('Yes')
            t += 1
        else:
            print('No')

    if s == 'b':
        if t < A + B and o < B:
            print('Yes')
            t += 1
            o += 1
        else:
            print('No')

    if s == 'c':
        print('No')

Submission status: Accepted

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

ab = a+b
abcount = 0
bcount = 0
for c in s:
    if c == 'a' and abcount < ab:
        abcount += 1
        print 'Yes'
    elif c == 'b' and abcount < ab and bcount < b:
        abcount += 1
        bcount += 1
        print 'Yes'
    else:
        print 'No'

Submission status: Accepted

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

S =input()

total = 0
kaigai = 0
for i,s in enumerate(S):
    if s=='a':
        if total<A+B:
            print("Yes")
            total +=1
        else:
            print("No")
    elif s=="b":
        if total <A+B and kaigai <B:
            print("Yes")
            total+=1
            kaigai+=1
        else:
            print("No")
    else:
        print("No")

Submission status: Accepted

Solution code:
N,A,B = map(int,raw_input().split(" "))
S = raw_input()
C = A+B


a = 0
b = 0

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

Submission status: Accepted

Solution code:
import collections


n, a, b = map(int, input().split())
s = collections.deque(input())
total = 0
oversea = 0
while s:
    x = s.popleft()
    if x == "c":
        print("No")
    elif x == "a":
        if total < a + b:
            total += 1
            print("Yes")
        else:
            print("No")
    elif x == "b":
        if total >= a + b:
            print("No")
        elif oversea >= b:
            print("No")
        else:
            total += 1
            oversea += 1
            print("Yes")

Submission status: Accepted

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

ca = 0
cb = 0
ans = [0]*n
for i in xrange(n):
    if ca+cb == a+b:
        break
    if s[i] == 'a':
        ca += 1
        ans[i] = 1
    if s[i] == 'b' and cb < b:
        cb += 1
        ans[i] = 1
for i in xrange(n):
    if ans[i]:
        print "Yes"
    else:
        print "No"

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

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

passed = 0
overseas = 0
for ch in S:
    if ch == 'a':
        if passed < A + B:
            print('Yes')
            passed += 1
        else:
            print('No')
    elif ch == 'b':
        if passed < A + B and overseas < B:
            print('Yes')
            passed += 1
            overseas += 1
        else:
            print('No')
    else:
        print('No')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll

N, A, B = map(int, raw_input().split())
S = raw_input()
p, q = 0, 0
for s in S:
    if s == "a":
        if p + q < A + B:
            print "Yes"
            p += 1
        else:
            print "No"
    if s == "b":
        if p + q < A + B and q < B:
            print "Yes"
            q += 1
        else:
            print "No"
    if s == "c":
        print "No"

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, a, b = map(int, raw_input().split())
s = raw_input()
for e in s:
    if e == "a":
        if a > 0:
            print "Yes"
            a -= 1
        elif b > 0:
            print "Yes"
            b -= 1
        else:
            print "No"
    elif e == "b":
        if b > 0:
            print "Yes"
            b -= 1
        else:
            print "No"
    else:
        print "No"

Submission status: Accepted

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

ac, bc = 0, 0

for i in range(n):
    if users[i] == 'a':
        if ac + bc < a + b:
            print 'Yes'
            ac += 1
        else:
            print 'No'
    elif users[i] == 'b':
        if ac + bc < a + b and bc < b:
            print 'Yes'
            bc += 1
        else:
            print 'No'
    else:
        print 'No'

Submission status: Runtime Error

Solution code:
n,x,y=map(int,input().split())
s= input()
c=0
d=x+y
f= False
for i in range(n):
    if s[i]=="A":
        if c<d:
            f=True
    elif s[i]=="B":
        if c<d and c<=b:
            f=True
    if f:
        print("YES")
            c+=1
    else:
        print("NO")
    f=False

Submission status: Runtime Error

Solution code:
5 2 2
ccccc

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

ok_count = 0
ok_fcount = 0
for s in S:
  if s == a:
    if ok_count < A+B-1
      print('Yes')
      ok_count +=1
      
    else:
      print('No')
      
  elif s == b:
    if ok_count <= A+B-1 and ok_fcount < B-1:
      print('Yes')
      ok_count+=1
      ok_fcount+=1
      
    else:
      print('No')
      
  else:
    print('No')

Submission status: Runtime Error

Solution code:
"""Boot-camp-for-Beginners_Easy003_B_Qualification-simulator_19-August-2020.py"""
import numpy as np
import sys

N, A, B = map(int, input().split())
S = str(input())

for i in range(len(N)):
    if(S[i] == "c"):
        print("No")
    else:
        if(i >= A+B):
            print("No")
        else:
            if(S[i] == "b" and i < B):
                print("No")
            else:
                print("Yes")

Submission status: Runtime Error

Solution code:
# input 参加人数n, 予選通過人数a, 予選通過人数b
n, a, b =  map(int, input().split())
# input 参加者情報s
s = input().split()

counter = 0
count_b = 0
for i in s:
    counter += 1
    
    # cの場合はNo
    if i == "c":
        print("No")
    
    # aの場合、counter <= A+BであればYes
    if counter < (a+b):
        print("Yes")
    else:
        print("No")
    
    # bの場合、counter <= A+B かつ count_b < B であれば"Yes"
    if counter < (a+b) && count_b < b:
        print("Yes")
        count_b += 1
    else:
        print("No")

Submission status: Runtime Error

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

HP = []
for p in range(1, 101, 1):
    P = [p] * len(X)
    delta = sum([(i - j) ** 2 for (i, j) in zip(X, P)])
    HP.append(delta)

print(min(HP))

Submission status: Runtime Error

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

result = []
cnt = 0
cnt_b = 0
limit = a + b

for student in s:
    if student == c:
        result.append("No")
    elif (student == "a") & (cnt < limit):
        result.append("Yes")
        cnt += 1
    elif (student == "b") & (cnt < limit) & (cnt_b < b):
        result.append("Yes")
        cnt += 1
        cnt_b += 1
    else:
        result.append("No")
print("\n".join(result))

Submission status: Runtime Error

Solution code:
n,a,b=map(int, input().split())
s=list(input())
num=0
qual=[]
s_b=[i for i,x in enumerate(s) if x=='b']
for i in range(n):
  if num<a+b:
    if s[i]=='c':
      qual.append('No')
    elif s[i]=='a':
      num+=1
      qual.append('Yes')     
    else:
      if s_b.index(i)<b:
        num+=1
        qual.append('Yes')
      else:
        qual.append('No')   
  else:
    qual.append('No')
print(qual, split='\n')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
#define rep(i, n) for (int i=0; i < n; i++)
typedef long long ll;
using namespace std;

int main()
{
    int n, a, b;
    cin >> n >> a >> b;
    int total = a + b;
    string s; cin >> s;
    int cnt = 0, cntb = 0;
    rep(i,n){
        string ans = "Yes";
        if (s[i] == 'c') {
            ans = "No";
        }
        else if (s[i] == 'a')
        {
            if (cnt < a+b) cnt++;
            else ans = "No";
        }
        else {
            cntb++;
            if (cnt < a+b && cntb <= b) cnt++;
            else ans = "No";
        }
        cout << ans << endl;
    }
}

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
#define rep(i, n) for (int i=0; i < n; i++)
typedef long long ll;
using namespace std;

int main()
{
    int n, a, b;
    cin >> n >> a >> b;
    int total = a + b;
    string s; cin >> s;
    int cnt = 0, cntb = 0;
    rep(i,n){
        string ans = "Yes";
        if (s[i] == 'c') {
            ans = "No";
        }
        else if (s[i] == 'a')
        {
            if (cnt < a+b) cnt++;
            else ans = "No";
        }
        else {
            cntb++;
            if (cnt < a+b and cntb <= b) cnt++;
            else ans = "No";
        }
        cout << ans << endl;
    }
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x, s = *open(0),
print(x)
print(s)
n, a, b = map(int, x.rstrip.split())

p = 0
wp = 0

for char in s:
    if char == 'c' or p >= a+b:
        print('No')
        continue
    if char == 'a':
        p += 1
        print('Yes')
        continue
    if wp < b:
        p += 1
        wp += 1
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

Solution code:
N,A,B = map(int, input().split())
S = input().split()
s=[]
for i in S:
    s.append(i)
list=[]
H = list.count('b')
for i in range(N):
  if s[i] == 'c'
    print('No')
  elif s[i] =='a' and len(list) <= A+B:
    print('Yes')
    list.append(a)
  elif s[i] =='a':
    print('No')
  elif len(list) <= A+B and H <= B:
    print('Yes')
  else:
    print('No')

Submission status: Runtime Error

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

total = 0
kaigai = 0

for i in range(0, len(S)):
    if L[i] == 'a':
        if total < A+B:
            print('Yes')
            total += 1
        else:
            print('No')
    elif L[i] == 'b':
        if total < A+B & kaigai <B:
            print('Yes')
            total += 1
            kaigai += 1
        else:
            print('No')
    else:
        print('No')

Submission status: Runtime Error

Solution code:
def main():
    n,a,b=mi()
    s=input()
    nover=0
    tot=0
    for i in range(n):
        if tot<a+b:
            if s[i]=='a':
                print('Yes')
                tot+=1
            elif s[i]=='b' and nover<b:
                print('Yes')
                nover+=1
                tot+=1
            else:
                print('No')
        else:
            print('No')
main()

Submission status: Runtime Error

Solution code:
def main():
    n,a,b=mi()
    s=list(input())
    nover=0
    tot=0
    for i in range(n):
        if tot<a+b:
            if s[i]=='a':
                print('Yes')
                tot+=1
            elif s[i]=='b' and nover<b:
                print('Yes')
                nover+=1
                tot+=1
            else:
                print('No')
        else:
            print('No')
main()

Submission status: Runtime Error

Solution code:
import numpy as np
N,A,B = map(int,input().split())
S = input()
total = A+B
for i in range(N):
    if S[i]=='c':
        print('No')
    elif total>0:
        if S[i] == 'a':
            print('Yes')
            total = total-1
        elif S[i] =='b' and B>0:
            print('Yes')
            total = total-1
            B = B-1
        else:
            print('No')
    else:
        print('No')

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

## Library

import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter

## input

# n=int(input())
# A,B,C,D=map(int, input().split())
# string = input()
# yoko = list(map(int, input().split()))
# tate = [int(input()) for _ in range(N)]
# N, M = map(int,input().split()) 
#    P = [list(map(int,input().split())) for i in range(M)]

N,A,B=map(int, input().split())
S = input()
tmp1 = 0
tmp2 = 0

for i in range(0,N):
    if tmp1 < A+B:
        if S[i] == "a":
            tmp1 += 1
            print("Yes")
        elif S[i] == "b" & tmp2 < B:
            tmp1 += 1
            tmp2 += 1
            print("Yes")
        else:
            print("No")
    else:
        print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,A,B=map(int,input(),())
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: Runtime Error

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

Submission status: Runtime Error

Solution code:
def resolve():
    N, A, B = list(map(int, input().split()))
    S = str(input())
    num = 0
    foreignnum = 1
    for i in range(N):
        if S[i] == 'a':
            if (num < A + B):
                num += 1
                print('Yes')
            else:
                print('No')

        if S[i] == 'b':
            if (num < A + B) and (foreignnum <= B):
                num += 1
                foreignnum += 1
                print('Yes')
            else:
                print('No')

        if S[i] == 'c':
            print('No')

    return

 resolve()

Submission status: Runtime Error

Solution code:
j = 0
for n in s:
  if n == "a":
    if i + j < a + b:
      i += 1
      print("Yes")
    else:
      print("No")
  elif n == "b":
    if (i + j < a + b) and j < b:
      j += 1
      print("Yes")
    else:
      print("No")
  else:
    print("No")

Submission status: Runtime Error

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: Runtime Error

Solution code:
import math
n = int(input())
x1 = math.ceil(n/1.08)
print(':(' if math.floor(x1*1.08) != n else x1)

Submission status: Runtime Error

Solution code:
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 i+1 <=b:
        print('Yes')
        cnt+=1
    elif s[i] == 'c':
        print('No')
    else:
        print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,A,B = map(int,input().split())
student = input()
passp = 0
passb = 0
for s in student:
	if s == "a":
		if passp < (A+B):
			passp += 1
			print("YES")
 		else:
			print("NO")
	elif s == "b":
		if passp < (A+B) and passb < B:
			passp += 1
			passb += 1
			print("YES")
		else:
			print("NO")
	else:
		print("NO")

Submission status: Runtime Error

Solution code:
N, A, B = input().split()
s = [str(x) for x in input().split()]
count = 0
sb = 0

for i in range(len(s)):
  if s[i] == a:
    if count <= A+B:
      print('Yes')
      count +=1
    else:
      print('No')
  
  elif s[i] == b:
    if count <= A+B && sb <= B:
      print('Yes')
      count += 1
      sb += 1
    else:
      print('No')
      
  else:
    print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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