結果

問題 No.2373 wa, wo, n
ユーザー miho-4miho-4
提出日時 2023-07-07 22:01:32
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 354 bytes
コンパイル時間 687 ms
コンパイル使用メモリ 87,232 KB
実行使用メモリ 87,860 KB
最終ジャッジ日時 2023-09-28 23:16:41
合計ジャッジ時間 7,615 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,268 KB
testcase_01 AC 70 ms
71,404 KB
testcase_02 AC 71 ms
71,172 KB
testcase_03 AC 116 ms
76,476 KB
testcase_04 AC 72 ms
71,328 KB
testcase_05 AC 72 ms
71,076 KB
testcase_06 AC 71 ms
71,456 KB
testcase_07 AC 69 ms
71,228 KB
testcase_08 AC 71 ms
71,212 KB
testcase_09 AC 71 ms
70,992 KB
testcase_10 AC 70 ms
71,212 KB
testcase_11 AC 69 ms
71,300 KB
testcase_12 AC 112 ms
76,540 KB
testcase_13 AC 70 ms
71,164 KB
testcase_14 WA -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 WA -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 AC 125 ms
86,780 KB
testcase_24 AC 111 ms
76,312 KB
testcase_25 RE -
testcase_26 AC 111 ms
76,492 KB
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 WA -
testcase_31 AC 70 ms
71,116 KB
testcase_32 RE -
testcase_33 RE -
testcase_34 RE -
testcase_35 AC 125 ms
87,468 KB
testcase_36 AC 112 ms
87,748 KB
testcase_37 AC 104 ms
87,416 KB
testcase_38 AC 106 ms
87,428 KB
testcase_39 AC 118 ms
87,496 KB
testcase_40 WA -
testcase_41 RE -
testcase_42 AC 106 ms
87,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
s=list(input())[::-1]

cnt=3*10**5
while 1<len(s):
  cnt-=1
  if cnt==0:exit(print("No"))
  x="".join(s[-2:])[::-1]
  while x=="??":
    s.pop()
  if x=="wa" or x=="wo" or x=="w?" or x=="?a" or x=="?o" or x=="?n":
    s.pop()
    s.pop()
  elif x[0]=="n":
    s.pop()
if s==[] or s==["?"] or s==["n"]:
  print("Yes")
else:
  print("No")
  
0