結果

問題 No.2373 wa, wo, n
ユーザー KudeKude
提出日時 2023-07-07 21:38:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 99 ms / 2,000 ms
コード長 270 bytes
コンパイル時間 667 ms
コンパイル使用メモリ 86,916 KB
実行使用メモリ 77,196 KB
最終ジャッジ日時 2023-09-28 22:38:44
合計ジャッジ時間 5,515 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,368 KB
testcase_01 AC 72 ms
71,124 KB
testcase_02 AC 73 ms
71,560 KB
testcase_03 AC 73 ms
71,624 KB
testcase_04 AC 74 ms
71,372 KB
testcase_05 AC 73 ms
71,500 KB
testcase_06 AC 74 ms
71,536 KB
testcase_07 AC 75 ms
71,376 KB
testcase_08 AC 75 ms
71,596 KB
testcase_09 AC 74 ms
71,320 KB
testcase_10 AC 74 ms
71,420 KB
testcase_11 AC 74 ms
71,332 KB
testcase_12 AC 74 ms
71,368 KB
testcase_13 AC 75 ms
71,228 KB
testcase_14 AC 96 ms
76,980 KB
testcase_15 AC 89 ms
76,292 KB
testcase_16 AC 96 ms
77,092 KB
testcase_17 AC 88 ms
76,268 KB
testcase_18 AC 87 ms
76,280 KB
testcase_19 AC 91 ms
76,432 KB
testcase_20 AC 97 ms
77,036 KB
testcase_21 AC 90 ms
76,404 KB
testcase_22 AC 95 ms
76,864 KB
testcase_23 AC 97 ms
77,160 KB
testcase_24 AC 74 ms
71,228 KB
testcase_25 AC 75 ms
71,424 KB
testcase_26 AC 74 ms
71,244 KB
testcase_27 AC 74 ms
71,368 KB
testcase_28 AC 74 ms
71,412 KB
testcase_29 AC 73 ms
71,360 KB
testcase_30 AC 73 ms
71,652 KB
testcase_31 AC 75 ms
71,376 KB
testcase_32 AC 99 ms
77,124 KB
testcase_33 AC 98 ms
77,096 KB
testcase_34 AC 86 ms
76,804 KB
testcase_35 AC 96 ms
77,044 KB
testcase_36 AC 95 ms
77,112 KB
testcase_37 AC 89 ms
77,024 KB
testcase_38 AC 89 ms
77,196 KB
testcase_39 AC 85 ms
76,864 KB
testcase_40 AC 98 ms
77,124 KB
testcase_41 AC 99 ms
76,884 KB
testcase_42 AC 91 ms
77,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

dp = [1, 0]
input()
for c in input():
    ndp = [0, 0]
    if c == 'w' or c == '?':
        ndp[1] |= dp[0]
    if c == 'a' or c == 'o' or c == '?':
        ndp[0] |= dp[1]
    if c == 'n' or c == '?':
        ndp[0] |= dp[0]
    dp = ndp
print('Yes' if dp[0] else 'No')
0