Submission #1454843
Source Code Expand
line = input().split() N = int(line[0]) A = int(line[1]) B = int(line[2]) S = input() ab = 0 bb = 0 for c in S: b = False if c == 'a' and ab < A + B: b = True ab += 1 elif c == 'b' and ab < A + B and bb < B: b = True ab += 1 bb += 1 print("Yes" if b else "No")
Submission Info
Submission Time | |
---|---|
Task | B - Qualification simulator |
User | mban |
Language | PyPy3 (2.4.0) |
Score | 200 |
Code Size | 336 Byte |
Status | AC |
Exec Time | 359 ms |
Memory | 58072 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 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 | 359 ms | 58072 KB |
02.txt | AC | 279 ms | 50136 KB |
03.txt | AC | 271 ms | 49240 KB |
04.txt | AC | 268 ms | 49368 KB |
05.txt | AC | 266 ms | 49368 KB |
06.txt | AC | 276 ms | 48984 KB |
07.txt | AC | 245 ms | 45528 KB |
08.txt | AC | 281 ms | 49368 KB |
09.txt | AC | 249 ms | 46680 KB |
10.txt | AC | 250 ms | 46680 KB |
s1.txt | AC | 166 ms | 38256 KB |
s2.txt | AC | 163 ms | 38256 KB |
s3.txt | AC | 165 ms | 38256 KB |