結果

問題 No.2240 WAC
ユーザー ああいいああいい
提出日時 2023-03-18 14:58:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 384 bytes
コンパイル時間 156 ms
コンパイル使用メモリ 81,688 KB
実行使用メモリ 75,916 KB
最終ジャッジ日時 2023-10-18 17:17:54
合計ジャッジ時間 3,572 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,504 KB
testcase_01 AC 35 ms
53,504 KB
testcase_02 WA -
testcase_03 AC 35 ms
53,504 KB
testcase_04 AC 34 ms
53,504 KB
testcase_05 AC 35 ms
53,504 KB
testcase_06 AC 34 ms
53,504 KB
testcase_07 AC 35 ms
53,504 KB
testcase_08 AC 34 ms
53,504 KB
testcase_09 WA -
testcase_10 AC 61 ms
75,916 KB
testcase_11 AC 61 ms
75,828 KB
testcase_12 WA -
testcase_13 AC 34 ms
53,760 KB
testcase_14 WA -
testcase_15 AC 35 ms
54,036 KB
testcase_16 AC 62 ms
75,576 KB
testcase_17 WA -
testcase_18 AC 54 ms
72,064 KB
testcase_19 AC 50 ms
73,612 KB
testcase_20 AC 36 ms
54,088 KB
testcase_21 AC 58 ms
75,332 KB
testcase_22 AC 40 ms
53,848 KB
testcase_23 AC 36 ms
53,760 KB
testcase_24 AC 38 ms
54,024 KB
testcase_25 AC 59 ms
75,404 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 36 ms
53,504 KB
testcase_29 AC 39 ms
53,504 KB
testcase_30 AC 35 ms
53,848 KB
testcase_31 WA -
testcase_32 AC 49 ms
70,008 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 63 ms
75,448 KB
testcase_37 AC 37 ms
54,176 KB
testcase_38 AC 35 ms
53,504 KB
testcase_39 AC 36 ms
54,308 KB
testcase_40 WA -
testcase_41 AC 36 ms
53,972 KB
testcase_42 AC 36 ms
53,964 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M = map(int,input().split())
S = input()

import sys
a = 0
for s in S:
    if s == "A":
        a += 1
    elif s == "C":
        if a == 0:
            print('No')
            exit()
        else:
            a -= 1
w = 0
for s in reversed(S):
    if s == "A":a += 1
    elif s == "W":
        if a == 0:
            print('No')
            exit()
        else:a -= 1
print('Yes')
0