結果

問題 No.2240 WAC
ユーザー ikomaikoma
提出日時 2023-03-11 01:08:32
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 711 bytes
コンパイル時間 192 ms
コンパイル使用メモリ 81,728 KB
実行使用メモリ 97,216 KB
最終ジャッジ日時 2023-10-18 09:28:14
合計ジャッジ時間 4,951 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,540 KB
testcase_01 AC 38 ms
53,540 KB
testcase_02 AC 38 ms
53,540 KB
testcase_03 AC 37 ms
53,540 KB
testcase_04 AC 38 ms
53,540 KB
testcase_05 AC 38 ms
53,540 KB
testcase_06 AC 37 ms
53,540 KB
testcase_07 AC 37 ms
53,540 KB
testcase_08 AC 37 ms
53,540 KB
testcase_09 AC 37 ms
53,540 KB
testcase_10 AC 92 ms
97,160 KB
testcase_11 WA -
testcase_12 AC 95 ms
97,164 KB
testcase_13 AC 78 ms
82,576 KB
testcase_14 AC 59 ms
71,280 KB
testcase_15 AC 98 ms
89,816 KB
testcase_16 WA -
testcase_17 AC 94 ms
86,764 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 95 ms
90,756 KB
testcase_21 WA -
testcase_22 AC 83 ms
84,956 KB
testcase_23 AC 85 ms
82,524 KB
testcase_24 AC 99 ms
89,296 KB
testcase_25 WA -
testcase_26 AC 82 ms
80,780 KB
testcase_27 AC 70 ms
74,744 KB
testcase_28 AC 68 ms
75,916 KB
testcase_29 AC 58 ms
68,872 KB
testcase_30 AC 80 ms
84,980 KB
testcase_31 AC 102 ms
94,224 KB
testcase_32 WA -
testcase_33 AC 85 ms
85,936 KB
testcase_34 AC 100 ms
88,140 KB
testcase_35 AC 64 ms
70,732 KB
testcase_36 WA -
testcase_37 AC 102 ms
92,604 KB
testcase_38 AC 68 ms
76,316 KB
testcase_39 AC 108 ms
95,108 KB
testcase_40 AC 92 ms
84,844 KB
testcase_41 AC 89 ms
88,720 KB
testcase_42 AC 89 ms
88,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

def solve():
    N,M=map(int,input().split())
    S=list(input().strip())

    ok=[0]*len(S)
    r=len(ok)
    for i,s in enumerate(S):
        if s=="W":
            while r>0:
                r-=1
                if S[r]=="A":
                    if i<r:
                        ok[i]=1
                        ok[r]=1
                    break
    l=-1
    for i,s in enumerate(S):
        if s=="A" and ok[i]==0:
            while l<len(ok)-1:
                l+=1
                if S[l]=="C":
                    if i<l:
                        ok[i]=1
                        ok[l]=1
                    break
    print("Yes" if sum(ok)==len(ok) else "No")

solve()
0