結果

問題 No.2240 WAC
ユーザー 👑 p-adicp-adic
提出日時 2023-05-22 09:57:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 275 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 10,800 KB
実行使用メモリ 11,860 KB
最終ジャッジ日時 2023-08-23 20:37:06
合計ジャッジ時間 6,206 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,944 KB
testcase_01 AC 15 ms
7,780 KB
testcase_02 AC 16 ms
7,920 KB
testcase_03 WA -
testcase_04 AC 16 ms
7,820 KB
testcase_05 AC 16 ms
7,920 KB
testcase_06 AC 15 ms
7,772 KB
testcase_07 WA -
testcase_08 AC 15 ms
7,848 KB
testcase_09 AC 15 ms
7,712 KB
testcase_10 AC 270 ms
11,608 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 47 ms
9,336 KB
testcase_14 AC 49 ms
8,808 KB
testcase_15 AC 71 ms
10,272 KB
testcase_16 AC 195 ms
10,824 KB
testcase_17 WA -
testcase_18 AC 67 ms
8,884 KB
testcase_19 AC 68 ms
9,036 KB
testcase_20 AC 82 ms
10,560 KB
testcase_21 WA -
testcase_22 AC 47 ms
9,776 KB
testcase_23 AC 45 ms
9,484 KB
testcase_24 AC 76 ms
10,356 KB
testcase_25 AC 185 ms
10,392 KB
testcase_26 AC 75 ms
9,152 KB
testcase_27 AC 56 ms
8,920 KB
testcase_28 AC 49 ms
9,120 KB
testcase_29 AC 25 ms
8,448 KB
testcase_30 AC 68 ms
9,768 KB
testcase_31 AC 203 ms
11,232 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 146 ms
10,276 KB
testcase_35 WA -
testcase_36 AC 193 ms
10,320 KB
testcase_37 AC 91 ms
10,948 KB
testcase_38 AC 50 ms
9,188 KB
testcase_39 AC 95 ms
11,264 KB
testcase_40 AC 116 ms
9,716 KB
testcase_41 AC 71 ms
10,308 KB
testcase_42 AC 61 ms
10,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

I=input
N,M=map(int,I().split())
L=(N+M)*2
S,D,R=I(),[1]*L,range(L)
C="C"
j=L-1
for i in R[::-1]:
	if S[i]>C:
		D[j]=0
		while i<j and S[j]<C:j-=1
		if i<j:j-=1
		else:j=-1
a=0
for i in R:
	if S[i]<C:a+=D[i]
	elif S[i]==C:a-=1
	if a<0:break
print("No"if a<0 or j<0 else"Yes")
0