結果

問題 No.2373 wa, wo, n
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2023-07-07 22:18:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 446 bytes
コンパイル時間 421 ms
コンパイル使用メモリ 87,168 KB
実行使用メモリ 78,984 KB
最終ジャッジ日時 2023-09-28 23:41:12
合計ジャッジ時間 6,046 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,288 KB
testcase_01 AC 77 ms
71,156 KB
testcase_02 AC 77 ms
71,004 KB
testcase_03 AC 77 ms
71,240 KB
testcase_04 AC 77 ms
71,152 KB
testcase_05 AC 76 ms
70,872 KB
testcase_06 AC 74 ms
71,164 KB
testcase_07 AC 76 ms
71,332 KB
testcase_08 AC 74 ms
71,028 KB
testcase_09 AC 76 ms
71,360 KB
testcase_10 AC 76 ms
71,340 KB
testcase_11 AC 77 ms
70,964 KB
testcase_12 WA -
testcase_13 AC 77 ms
71,148 KB
testcase_14 AC 125 ms
78,204 KB
testcase_15 WA -
testcase_16 AC 122 ms
78,600 KB
testcase_17 AC 101 ms
77,260 KB
testcase_18 AC 94 ms
76,512 KB
testcase_19 AC 80 ms
76,124 KB
testcase_20 AC 81 ms
77,256 KB
testcase_21 AC 81 ms
75,832 KB
testcase_22 AC 81 ms
76,200 KB
testcase_23 AC 82 ms
77,036 KB
testcase_24 AC 77 ms
71,292 KB
testcase_25 AC 76 ms
71,280 KB
testcase_26 AC 73 ms
71,156 KB
testcase_27 AC 75 ms
71,276 KB
testcase_28 AC 76 ms
70,908 KB
testcase_29 AC 75 ms
71,144 KB
testcase_30 AC 78 ms
71,116 KB
testcase_31 AC 76 ms
71,152 KB
testcase_32 AC 128 ms
78,984 KB
testcase_33 AC 80 ms
77,376 KB
testcase_34 AC 117 ms
78,664 KB
testcase_35 AC 82 ms
77,616 KB
testcase_36 AC 120 ms
78,720 KB
testcase_37 AC 112 ms
78,768 KB
testcase_38 AC 112 ms
78,884 KB
testcase_39 AC 116 ms
78,596 KB
testcase_40 AC 124 ms
78,764 KB
testcase_41 AC 122 ms
78,788 KB
testcase_42 AC 110 ms
78,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
S = input()
dp = [0]*(n+1)
dp[0] = 1
l = ["wa","wo","n"]

for i in range(n):
    if dp[i] == 0:
        continue

    for x in l:
        if len(x) + i > n:
            continue
        ok = 1
        for j in range(len(x)):
            if x[j] == S[i+j] or S[i+j] == "?":
                ok = 1
            else:
                ok = 0
        if ok:
            dp[i+len(x)] = 1
    # print(dp)
print("Yes" if dp[-1] else "No")
0