Submission #916672


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
#define all(c) (c).begin(),(c).end()
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;i--)
#define REP(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
#define iter(c) __typeof((c).begin())
#define tr(it,c) for(iter(c) it=(c).begin();it!=(c).end();it++)
#define mem(a) memset(a,0,sizeof(a))
#define pd(a) printf("%.10f\n",a)
#define pb(a) push_back(a)
#define in(a) insert(a)
#define pi M_PI
#define R cin>>
#define F first
#define S second
#define C class
#define ll long long
#define ln cout<<'\n'
template<C T>void pr(T a){cout<<a;ln;}
template<C T,C T2>void pr(T a,T2 b){cout<<a<<' '<<b;ln;}
template<C T,C T2,C T3>void pr(T a,T2 b,T3 c){cout<<a<<' '<<b<<' '<<c;ln;}
template<C T>void PR(T a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}ln;}
ll check(ll n,ll m,ll x,ll y){return x>=0&&x<n&&y>=0&&y<m;}
const ll MAX=1000000007,MAXL=1LL<<60,dx[4]={-1,0,1,0},dy[4]={0,1,0,-1};
typedef pair<int,int> P;

void Main() {
  int n,a,b;
  string s;
  cin >> n >> a >> b >> s;
  int x=0,y=0;
  rep(i,n) {
    if(s[i]=='a') {
      if(x<a+b) {
        pr("Yes");
        x++;
      } else pr("No");
    } else {
      if(x<a+b&&y<b) {
        x++;
        y++;
        pr("Yes");
      } else pr("No");
    }
  }
}

int main() {
  ios::sync_with_stdio(0);cin.tie(0);
  Main();return 0;
}

Submission Info

Submission Time
Task B - Qualification simulator
User kzyKT
Language C++14 (GCC 5.4.1)
Score 0
Code Size 1391 Byte
Status WA
Exec Time 9 ms
Memory 848 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 200
Status
WA × 3
AC × 5
WA × 8
Set Name Test Cases
Sample s1.txt, s2.txt, s3.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, s1.txt, s2.txt, s3.txt
Case Name Status Exec Time Memory
01.txt WA 9 ms 720 KB
02.txt WA 9 ms 848 KB
03.txt WA 9 ms 848 KB
04.txt WA 9 ms 848 KB
05.txt AC 8 ms 640 KB
06.txt WA 8 ms 720 KB
07.txt AC 9 ms 848 KB
08.txt AC 9 ms 848 KB
09.txt AC 9 ms 848 KB
10.txt AC 9 ms 848 KB
s1.txt WA 3 ms 384 KB
s2.txt WA 3 ms 256 KB
s3.txt WA 3 ms 256 KB