#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>
#include <iostream>
#include <sstream>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <bitset>
#include <complex>
#include <array>
#include <list>
#include <stack>
#include <valarray>
using namespace std;
typedef unsigned uint;
typedef long long Int;
typedef unsigned long long UInt;
const int INF = 1001001001;
const Int INFLL = 1001001001001001001LL;
template<typename T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<typename T> void chmin(T& a, T b) { if (a > b) a = b; }
template<typename T> void chmax(T& a, T b) { if (a < b) a = b; }
int in() { int x; scanf("%d", &x); return x; }
double fin() { double x; scanf("%lf", &x); return x; }
Int lin() { Int x; scanf("%lld", &x); return x; }
char S[100050];
int main() {
int N, A, B;
N = in();
A = in();
B = in();
scanf("%s", S);
int passed = 0, passed_b = 0;
for (int i = 0; i < N; ++i) {
bool p = false;
if (S[i] == 'a') {
if (passed < A + B) {
p = true;
++passed;
}
} else if (S[i] == 'b') {
if (passed < A + B && passed_b < B) {
p = true;
++passed;
++passed_b;
}
}
puts(p ? "Yes" : "No");
}
return 0;
}
./Main.cpp: In function ‘int in()’:
./Main.cpp:34:34: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
int in() { int x; scanf("%d", &x); return x; }
^
./Main.cpp: In function ‘double fin()’:
./Main.cpp:35:42: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
double fin() { double x; scanf("%lf", &x); return x; }
^
./Main.cpp: In function ‘Int lin()’:
./Main.cpp:36:37: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
Int lin() { Int x; scanf("%lld", &x); return x; }
^
./Main.cpp: In function ‘int main()’:
./Main.cpp:45:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%s", S);
...