結果
| 問題 |
No.2373 wa, wo, n
|
| コンテスト | |
| ユーザー |
Kude
|
| 提出日時 | 2023-07-07 21:38:26 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 78 ms / 2,000 ms |
| コード長 | 270 bytes |
| コンパイル時間 | 219 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 75,904 KB |
| 最終ジャッジ日時 | 2024-07-21 17:22:55 |
| 合計ジャッジ時間 | 3,799 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 39 |
ソースコード
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')
Kude