結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,792 KB
testcase_01 AC 15 ms
7,860 KB
testcase_02 WA -
testcase_03 AC 15 ms
7,948 KB
testcase_04 AC 15 ms
7,856 KB
testcase_05 AC 16 ms
7,816 KB
testcase_06 AC 17 ms
7,788 KB
testcase_07 AC 15 ms
7,892 KB
testcase_08 AC 15 ms
7,964 KB
testcase_09 WA -
testcase_10 AC 148 ms
8,844 KB
testcase_11 AC 148 ms
8,844 KB
testcase_12 WA -
testcase_13 AC 63 ms
8,368 KB
testcase_14 WA -
testcase_15 AC 104 ms
8,752 KB
testcase_16 AC 119 ms
8,708 KB
testcase_17 AC 88 ms
8,644 KB
testcase_18 AC 42 ms
8,252 KB
testcase_19 AC 47 ms
8,172 KB
testcase_20 AC 112 ms
8,708 KB
testcase_21 AC 69 ms
8,352 KB
testcase_22 AC 75 ms
8,528 KB
testcase_23 AC 59 ms
8,184 KB
testcase_24 AC 103 ms
8,848 KB
testcase_25 AC 100 ms
8,580 KB
testcase_26 AC 53 ms
8,188 KB
testcase_27 WA -
testcase_28 AC 55 ms
8,460 KB
testcase_29 AC 29 ms
8,212 KB
testcase_30 AC 75 ms
8,384 KB
testcase_31 AC 131 ms
8,824 KB
testcase_32 AC 40 ms
8,160 KB
testcase_33 AC 83 ms
8,548 KB
testcase_34 AC 94 ms
8,492 KB
testcase_35 AC 27 ms
7,844 KB
testcase_36 AC 105 ms
8,556 KB
testcase_37 AC 122 ms
8,628 KB
testcase_38 AC 58 ms
8,284 KB
testcase_39 AC 139 ms
8,912 KB
testcase_40 WA -
testcase_41 AC 96 ms
8,716 KB
testcase_42 AC 93 ms
8,496 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":
		w+=1
		b+=M+w<a
	else:
		c+=1
		b+=a<c
print("No"if b else"Yes")
0