結果

問題 No.2373 wa, wo, n
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2023-07-07 22:55:52
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 469 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 87,032 KB
実行使用メモリ 79,132 KB
最終ジャッジ日時 2023-09-29 00:32:13
合計ジャッジ時間 6,265 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,352 KB
testcase_01 AC 75 ms
71,256 KB
testcase_02 AC 78 ms
70,996 KB
testcase_03 AC 74 ms
71,212 KB
testcase_04 AC 75 ms
71,272 KB
testcase_05 AC 74 ms
71,140 KB
testcase_06 AC 74 ms
71,352 KB
testcase_07 AC 75 ms
71,204 KB
testcase_08 AC 74 ms
71,428 KB
testcase_09 AC 74 ms
71,456 KB
testcase_10 AC 76 ms
71,396 KB
testcase_11 AC 75 ms
71,000 KB
testcase_12 WA -
testcase_13 AC 76 ms
71,368 KB
testcase_14 AC 125 ms
78,300 KB
testcase_15 WA -
testcase_16 AC 126 ms
78,620 KB
testcase_17 AC 104 ms
77,196 KB
testcase_18 AC 100 ms
76,436 KB
testcase_19 AC 82 ms
76,060 KB
testcase_20 AC 83 ms
77,144 KB
testcase_21 AC 80 ms
75,948 KB
testcase_22 AC 80 ms
76,304 KB
testcase_23 AC 80 ms
77,452 KB
testcase_24 AC 75 ms
71,160 KB
testcase_25 AC 75 ms
71,276 KB
testcase_26 AC 75 ms
71,456 KB
testcase_27 AC 75 ms
71,364 KB
testcase_28 AC 77 ms
71,504 KB
testcase_29 AC 76 ms
71,380 KB
testcase_30 AC 74 ms
71,232 KB
testcase_31 AC 77 ms
71,160 KB
testcase_32 AC 128 ms
79,092 KB
testcase_33 AC 80 ms
77,568 KB
testcase_34 AC 116 ms
78,884 KB
testcase_35 AC 82 ms
77,524 KB
testcase_36 AC 115 ms
78,780 KB
testcase_37 AC 112 ms
78,836 KB
testcase_38 AC 112 ms
79,132 KB
testcase_39 AC 116 ms
78,964 KB
testcase_40 AC 125 ms
78,916 KB
testcase_41 AC 121 ms
78,836 KB
testcase_42 AC 122 ms
78,972 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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


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

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