Submission #3570663


Source Code Expand

/**
 *      purpose : CODE FESTIVAL 2016 qual B
 *      author  : kyomukyomupurin
 *      created : 2018-11-10 01:10:01
**/

#include <bits/stdc++.h>
using namespace std;
#define int64 long long
#define print(x) cout << (x) << '\n'

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    int N, A, B; cin >> N >> A >> B;
    string S; cin >> S;
    int tA = 0; int tB = 0;

    for (int i = 0; i < N; ++i){
        if (S[i] == 'a'){
            if (tA + tB < A + B) print("YES");
            else print("NO");
            ++tA;
        }
        else if (S[i] == 'b'){
            if (tA + tB < A + B && tB + 1 <= B) print("YES");
            else print("NO");
            ++tB;
        }
        else {
            print("NO"); 
        }
    }
    
    return 0;
}

Submission Info

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

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 200
Status
WA × 3
WA × 13
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 7 ms 720 KB
02.txt WA 7 ms 848 KB
03.txt WA 7 ms 848 KB
04.txt WA 7 ms 848 KB
05.txt WA 6 ms 640 KB
06.txt WA 6 ms 720 KB
07.txt WA 7 ms 848 KB
08.txt WA 7 ms 848 KB
09.txt WA 6 ms 848 KB
10.txt WA 6 ms 848 KB
s1.txt WA 1 ms 256 KB
s2.txt WA 1 ms 256 KB
s3.txt WA 1 ms 256 KB