結果

問題 No.2240 WAC
ユーザー 👑 tatt61880tatt61880
提出日時 2023-03-16 00:00:20
言語 Kuin
(KuinC++ v.2021.9.17)
結果
WA  
実行時間 -
コード長 427 bytes
コンパイル時間 2,080 ms
コンパイル使用メモリ 145,328 KB
実行使用メモリ 5,964 KB
最終ジャッジ日時 2023-10-18 12:38:55
合計ジャッジ時間 3,743 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 1 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 1 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 WA -
testcase_08 AC 2 ms
4,348 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 4 ms
4,860 KB
testcase_14 WA -
testcase_15 AC 5 ms
5,908 KB
testcase_16 WA -
testcase_17 AC 4 ms
4,860 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 6 ms
5,908 KB
testcase_21 AC 5 ms
4,860 KB
testcase_22 AC 4 ms
4,860 KB
testcase_23 AC 4 ms
4,860 KB
testcase_24 AC 4 ms
4,860 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 3 ms
4,348 KB
testcase_29 AC 2 ms
4,348 KB
testcase_30 AC 4 ms
4,860 KB
testcase_31 AC 6 ms
5,908 KB
testcase_32 AC 3 ms
4,348 KB
testcase_33 AC 4 ms
4,860 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 AC 6 ms
5,908 KB
testcase_38 AC 3 ms
4,348 KB
testcase_39 AC 6 ms
5,908 KB
testcase_40 WA -
testcase_41 AC 4 ms
4,860 KB
testcase_42 AC 4 ms
4,860 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var n: int :: cui@inputInt()
	var m: int :: cui@inputInt()
	var s: []char :: cui@input()
	
	var w: int :: 0
	var a: int :: 0
	var c: int :: 0
	
	var ans: bool :: true
	for i(0, ^s - 1)
		switch(s[i])
		case 'W'
			do w :+ 1
		case 'A'
			do a :+ 1
		case 'C'
			do c :+ 1
			if(a < c)
				do ans :: false
				break i
			end if
			do a :- 1
		end switch
	end for
	do cui@print((ans ?("Yes", "No")) ~ "\n")
end func
0