結果

問題 No.2240 WAC
ユーザー 👑 p-adicp-adic
提出日時 2023-05-22 10:31:28
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 153 ms / 2,000 ms
コード長 174 bytes
コンパイル時間 69 ms
コンパイル使用メモリ 10,504 KB
実行使用メモリ 8,916 KB
最終ジャッジ日時 2023-08-23 20:41:45
合計ジャッジ時間 4,689 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,924 KB
testcase_01 AC 15 ms
7,956 KB
testcase_02 AC 16 ms
7,804 KB
testcase_03 AC 16 ms
7,772 KB
testcase_04 AC 16 ms
7,764 KB
testcase_05 AC 16 ms
7,912 KB
testcase_06 AC 15 ms
7,944 KB
testcase_07 AC 15 ms
7,948 KB
testcase_08 AC 15 ms
7,776 KB
testcase_09 AC 15 ms
7,780 KB
testcase_10 AC 143 ms
8,852 KB
testcase_11 AC 150 ms
8,716 KB
testcase_12 AC 153 ms
8,652 KB
testcase_13 AC 62 ms
8,440 KB
testcase_14 AC 35 ms
8,316 KB
testcase_15 AC 104 ms
8,700 KB
testcase_16 AC 117 ms
8,648 KB
testcase_17 AC 88 ms
8,392 KB
testcase_18 AC 42 ms
8,440 KB
testcase_19 AC 48 ms
8,244 KB
testcase_20 AC 111 ms
8,760 KB
testcase_21 AC 69 ms
8,480 KB
testcase_22 AC 77 ms
8,616 KB
testcase_23 AC 59 ms
8,240 KB
testcase_24 AC 104 ms
8,784 KB
testcase_25 AC 100 ms
8,448 KB
testcase_26 AC 52 ms
8,376 KB
testcase_27 AC 42 ms
8,268 KB
testcase_28 AC 57 ms
8,416 KB
testcase_29 AC 30 ms
8,128 KB
testcase_30 AC 76 ms
8,532 KB
testcase_31 AC 134 ms
8,840 KB
testcase_32 AC 40 ms
8,328 KB
testcase_33 AC 83 ms
8,596 KB
testcase_34 AC 96 ms
8,684 KB
testcase_35 AC 27 ms
7,776 KB
testcase_36 AC 105 ms
8,716 KB
testcase_37 AC 122 ms
8,544 KB
testcase_38 AC 58 ms
8,404 KB
testcase_39 AC 139 ms
8,916 KB
testcase_40 AC 77 ms
8,396 KB
testcase_41 AC 97 ms
8,880 KB
testcase_42 AC 91 ms
8,636 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

I=input
N,M=map(int,I().split())
S=I()
a=c=w=b=0
for i in range((N+M)*2):
	if S[i]<"C":a+=1
	elif S[i]>"C":
		b+=M+w<a
		w+=1
	else:
		c+=1
		b+=a<c
print("No"if b else"Yes")
0