Submission #1478951


Source Code Expand

#include "bits/stdc++.h"
#define MOD 1000000007
#define INF 11234567890
#define in std::cin
#define out std::cout
#define rep(i,N) for(int i=0;i<N;++i)
typedef long long int LL;

int N, A, B;
std::string S;
int all_cou, fore_rank = 1;

int main()
{
	in >> N >> A >> B >> S;
	for (auto c : S)
	{
		if (c == 'a')
		{
			if (all_cou < A + B)
			{
				out << "Yes" << std::endl;
				++all_cou;
			}
			else { out << "No" << std::endl; }
		}
		if (c == 'b')
		{
			if (all_cou < A + B && fore_rank <= B)
			{
				out << "Yes" << std::endl;
				++all_cou; ++fore_rank;
			}
			else { out << "No" << std::endl; }
		}
		if (c == 'c') { out << "No" << std::endl; }
	}
	return 0;
}

Submission Info

Submission Time
Task B - Qualification simulator
User Bwambocos
Language C++14 (GCC 5.4.1)
Score 200
Code Size 709 Byte
Status AC
Exec Time 157 ms
Memory 896 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 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 AC 153 ms 768 KB
02.txt AC 155 ms 768 KB
03.txt AC 155 ms 768 KB
04.txt AC 156 ms 768 KB
05.txt AC 135 ms 768 KB
06.txt AC 157 ms 768 KB
07.txt AC 155 ms 896 KB
08.txt AC 155 ms 896 KB
09.txt AC 155 ms 768 KB
10.txt AC 156 ms 768 KB
s1.txt AC 1 ms 256 KB
s2.txt AC 1 ms 256 KB
s3.txt AC 1 ms 256 KB