提出 #21588099


ソースコード 拡げる

N, A, B = [int(i) for i in input().split()]
S = input()

a = 0
b = 0
for i, s in enumerate(S):
    if s == 'a' and a + b < A + B:
        a += 1
        print('Yes')
    elif s == 'b' and a + b < A + B and b < B:
        b += 1
        print('Yes')
    else:
        print('No')

提出情報

提出日時
問題 B - Qualification simulator
ユーザ lackdog
言語 PyPy3 (7.3.0)
得点 200
コード長 291 Byte
結果 AC
実行時間 138 ms
メモリ 70636 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 3
AC × 13
セット名 テストケース
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
ケース名 結果 実行時間 メモリ
01.txt AC 138 ms 69872 KiB
02.txt AC 110 ms 70636 KiB
03.txt AC 105 ms 69816 KiB
04.txt AC 106 ms 69512 KiB
05.txt AC 103 ms 69684 KiB
06.txt AC 105 ms 70528 KiB
07.txt AC 99 ms 69192 KiB
08.txt AC 105 ms 69324 KiB
09.txt AC 97 ms 69976 KiB
10.txt AC 97 ms 69968 KiB
s1.txt AC 52 ms 61936 KiB
s2.txt AC 56 ms 61864 KiB
s3.txt AC 54 ms 61848 KiB