Submission #1518294
Source Code Expand
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 gosa = 1.0 / 10**10 mod = 10**9 + 7 def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()] def LF(): return [float(x) for x in sys.stdin.readline().split()] def LS(): return sys.stdin.readline().split() def I(): return int(sys.stdin.readline()) def F(): return float(sys.stdin.readline()) def S(): return input() def main(): N,A,B = LI() s = S() a = b = 0 r = [] for c in s: if c == 'a' and a+b < A+B: r.append('Yes') a += 1 elif c == 'b' and a+b < A+B and b<B: r.append('Yes') b += 1 else: r.append('No') return '\n'.join(r) print(main())
Submission Info
Submission Time | |
---|---|
Task | B - Qualification simulator |
User | iehn |
Language | Python (3.4.3) |
Score | 200 |
Code Size | 912 Byte |
Status | AC |
Exec Time | 66 ms |
Memory | 6844 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 | 60 ms | 6836 KB |
02.txt | AC | 61 ms | 6844 KB |
03.txt | AC | 62 ms | 6844 KB |
04.txt | AC | 62 ms | 6840 KB |
05.txt | AC | 54 ms | 6580 KB |
06.txt | AC | 57 ms | 6716 KB |
07.txt | AC | 66 ms | 6836 KB |
08.txt | AC | 64 ms | 6836 KB |
09.txt | AC | 60 ms | 6840 KB |
10.txt | AC | 63 ms | 6836 KB |
s1.txt | AC | 40 ms | 5432 KB |
s2.txt | AC | 39 ms | 5432 KB |
s3.txt | AC | 40 ms | 5432 KB |