結果

問題 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
コンパイル時間 274 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 14,292 KB
最終ジャッジ日時 2024-06-01 18:00:29
合計ジャッジ時間 7,374 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,624 KB
testcase_01 AC 30 ms
10,624 KB
testcase_02 AC 31 ms
10,880 KB
testcase_03 WA -
testcase_04 AC 31 ms
10,880 KB
testcase_05 AC 31 ms
10,752 KB
testcase_06 AC 31 ms
10,752 KB
testcase_07 WA -
testcase_08 AC 31 ms
10,752 KB
testcase_09 AC 30 ms
10,752 KB
testcase_10 AC 326 ms
14,292 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 67 ms
11,904 KB
testcase_14 AC 67 ms
11,392 KB
testcase_15 AC 96 ms
13,092 KB
testcase_16 AC 246 ms
13,392 KB
testcase_17 WA -
testcase_18 AC 88 ms
11,392 KB
testcase_19 AC 95 ms
11,648 KB
testcase_20 AC 111 ms
13,372 KB
testcase_21 WA -
testcase_22 AC 67 ms
12,156 KB
testcase_23 AC 64 ms
11,776 KB
testcase_24 AC 98 ms
13,212 KB
testcase_25 AC 212 ms
12,916 KB
testcase_26 AC 98 ms
11,776 KB
testcase_27 AC 79 ms
11,520 KB
testcase_28 AC 68 ms
11,776 KB
testcase_29 AC 40 ms
11,008 KB
testcase_30 AC 97 ms
12,372 KB
testcase_31 AC 251 ms
13,748 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 183 ms
12,928 KB
testcase_35 WA -
testcase_36 AC 231 ms
13,092 KB
testcase_37 AC 113 ms
13,532 KB
testcase_38 AC 67 ms
11,904 KB
testcase_39 AC 118 ms
14,092 KB
testcase_40 AC 142 ms
12,504 KB
testcase_41 AC 93 ms
12,692 KB
testcase_42 AC 81 ms
12,820 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