結果
問題 | No.2373 wa, wo, n |
ユーザー | uuuus17 |
提出日時 | 2023-07-07 22:36:14 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 167 ms / 2,000 ms |
コード長 | 1,265 bytes |
コンパイル時間 | 285 ms |
コンパイル使用メモリ | 87,052 KB |
実行使用メモリ | 97,124 KB |
最終ジャッジ日時 | 2023-09-29 00:07:21 |
合計ジャッジ時間 | 7,422 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 109 ms
73,836 KB |
testcase_01 | AC | 111 ms
74,200 KB |
testcase_02 | AC | 111 ms
74,048 KB |
testcase_03 | AC | 112 ms
73,920 KB |
testcase_04 | AC | 111 ms
73,980 KB |
testcase_05 | AC | 109 ms
74,092 KB |
testcase_06 | AC | 110 ms
73,860 KB |
testcase_07 | AC | 112 ms
74,020 KB |
testcase_08 | AC | 112 ms
73,964 KB |
testcase_09 | AC | 112 ms
73,916 KB |
testcase_10 | AC | 121 ms
73,928 KB |
testcase_11 | AC | 111 ms
74,224 KB |
testcase_12 | AC | 112 ms
73,912 KB |
testcase_13 | AC | 112 ms
73,708 KB |
testcase_14 | AC | 164 ms
93,192 KB |
testcase_15 | AC | 128 ms
79,168 KB |
testcase_16 | AC | 163 ms
93,692 KB |
testcase_17 | AC | 134 ms
79,808 KB |
testcase_18 | AC | 119 ms
78,792 KB |
testcase_19 | AC | 112 ms
75,508 KB |
testcase_20 | AC | 118 ms
78,408 KB |
testcase_21 | AC | 112 ms
75,476 KB |
testcase_22 | AC | 114 ms
76,548 KB |
testcase_23 | AC | 125 ms
79,044 KB |
testcase_24 | AC | 112 ms
73,848 KB |
testcase_25 | AC | 110 ms
74,204 KB |
testcase_26 | AC | 112 ms
73,928 KB |
testcase_27 | AC | 111 ms
73,980 KB |
testcase_28 | AC | 113 ms
74,136 KB |
testcase_29 | AC | 113 ms
73,864 KB |
testcase_30 | AC | 115 ms
74,012 KB |
testcase_31 | AC | 114 ms
74,040 KB |
testcase_32 | AC | 167 ms
93,952 KB |
testcase_33 | AC | 123 ms
79,476 KB |
testcase_34 | AC | 163 ms
97,124 KB |
testcase_35 | AC | 143 ms
95,000 KB |
testcase_36 | AC | 160 ms
94,228 KB |
testcase_37 | AC | 156 ms
96,980 KB |
testcase_38 | AC | 152 ms
96,916 KB |
testcase_39 | AC | 123 ms
74,300 KB |
testcase_40 | AC | 166 ms
94,636 KB |
testcase_41 | AC | 164 ms
94,552 KB |
testcase_42 | AC | 162 ms
96,896 KB |
ソースコード
# import sys # sys.setrecursionlimit(10**7) # input = sys.stdin.readline # import pypyjit # pypyjit.set_param('max_unroll_recursion=-1') def mp():return map(int,input().split()) def lmp():return list(map(int,input().split())) def lm1(LIST): return list(map(lambda x:x-1, LIST)) def mps(A):return [tuple(map(int, input().split())) for _ in range(A)] def stoi(LIST):return list(map(int,LIST)) def itos(LIST):return list(map(str,LIST)) def atoi(LIST): return [ord(i)-ord("a") for i in LIST] def Atoi(LIST): return [ord(i)-ord("A") for i in LIST] def bitA(X,A):return X & 1<<A == 1<<A import math import bisect import heapq import time from copy import copy as cc from copy import deepcopy as dc from itertools import accumulate, product from collections import Counter, defaultdict, deque def ceil(U,V):return (U+V-1)//V def modf1(N,MOD):return (N-1)%MOD+1 inf = (1<<63)-1 mod = 998244353 n = int(input()) s = list(input().replace("n","")) s = deque(s+["n"]) #print(s) while len(s) >= 2: a = s.popleft() b = s.popleft() if a+b in ["wa","wo","w?","?a","?o"]: continue elif a == "?": s.appendleft(b) else: s.appendleft(b) s.appendleft(a) break #print(s) if len(s) >= 2: print("No") else: print("Yes")