結果

問題 No.2373 wa, wo, n
ユーザー 👑 tatt61880tatt61880
提出日時 2023-07-10 22:20:47
言語 Kuin
(KuinC++ v.2021.9.17)
結果
AC  
実行時間 8 ms / 2,000 ms
コード長 565 bytes
コンパイル時間 3,091 ms
コンパイル使用メモリ 147,516 KB
実行使用メモリ 4,620 KB
最終ジャッジ日時 2023-10-10 01:25:41
合計ジャッジ時間 4,824 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,352 KB
testcase_01 AC 2 ms
4,480 KB
testcase_02 AC 2 ms
4,356 KB
testcase_03 AC 2 ms
4,352 KB
testcase_04 AC 2 ms
4,352 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,352 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 2 ms
4,352 KB
testcase_09 AC 2 ms
4,352 KB
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 2 ms
4,352 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 2 ms
4,352 KB
testcase_14 AC 7 ms
4,484 KB
testcase_15 AC 3 ms
4,352 KB
testcase_16 AC 7 ms
4,480 KB
testcase_17 AC 3 ms
4,352 KB
testcase_18 AC 2 ms
4,352 KB
testcase_19 AC 4 ms
4,348 KB
testcase_20 AC 7 ms
4,620 KB
testcase_21 AC 3 ms
4,348 KB
testcase_22 AC 5 ms
4,352 KB
testcase_23 AC 7 ms
4,596 KB
testcase_24 AC 2 ms
4,348 KB
testcase_25 AC 2 ms
4,348 KB
testcase_26 AC 3 ms
4,348 KB
testcase_27 AC 2 ms
4,352 KB
testcase_28 AC 2 ms
4,348 KB
testcase_29 AC 2 ms
4,348 KB
testcase_30 AC 2 ms
4,352 KB
testcase_31 AC 2 ms
4,348 KB
testcase_32 AC 7 ms
4,612 KB
testcase_33 AC 8 ms
4,532 KB
testcase_34 AC 6 ms
4,464 KB
testcase_35 AC 8 ms
4,616 KB
testcase_36 AC 7 ms
4,580 KB
testcase_37 AC 6 ms
4,476 KB
testcase_38 AC 6 ms
4,484 KB
testcase_39 AC 7 ms
4,600 KB
testcase_40 AC 7 ms
4,608 KB
testcase_41 AC 7 ms
4,436 KB
testcase_42 AC 6 ms
4,524 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var n: int :: cui@inputInt()
	var s: []char :: cui@input()
	
	var ans: bool :: true
	var prev: char :: '-'
	for i(0, n - 1)
		switch(s[i])
		case 'w'
			if(i = n - 1)
				do ans :: false
			else
				if(s[i + 1] <> 'a' & s[i + 1] <> 'o' & s[i + 1] <> '?')
					do ans :: false
				else
					do s[i + 1] :: 'a'
				end if
			end if
		case 'a', 'o'
			if(prev <> '?' & prev <> 'w')
				do ans :: false
			end if
		case 'n'
		case '?'
		default
			do ans :: false
		end switch
		do prev :: s[i]
	end for
	do cui@print((ans ?("Yes", "No")) ~ "\n")
end func
0