Submission #3570654
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 <= 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 | 813 Byte |
Status | WA |
Exec Time | 7 ms |
Memory | 848 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||||||||
Status |
|
|
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 | AC | 7 ms | 748 KB |
02.txt | WA | 7 ms | 848 KB |
03.txt | AC | 7 ms | 848 KB |
04.txt | AC | 7 ms | 848 KB |
05.txt | AC | 6 ms | 640 KB |
06.txt | WA | 6 ms | 720 KB |
07.txt | AC | 7 ms | 848 KB |
08.txt | WA | 7 ms | 848 KB |
09.txt | AC | 6 ms | 848 KB |
10.txt | WA | 6 ms | 848 KB |
s1.txt | AC | 1 ms | 256 KB |
s2.txt | WA | 1 ms | 256 KB |
s3.txt | AC | 1 ms | 256 KB |