結果

問題 No.2278 Time Bomb Game 2
ユーザー 👑 p-adicp-adic
提出日時 2023-07-14 20:26:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 52 ms / 2,000 ms
コード長 560 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 11,000 KB
実行使用メモリ 8,752 KB
最終ジャッジ日時 2023-10-14 10:19:11
合計ジャッジ時間 4,231 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,260 KB
testcase_01 AC 15 ms
8,152 KB
testcase_02 AC 15 ms
8,296 KB
testcase_03 AC 15 ms
8,284 KB
testcase_04 AC 16 ms
8,212 KB
testcase_05 AC 15 ms
8,284 KB
testcase_06 AC 15 ms
8,400 KB
testcase_07 AC 16 ms
8,624 KB
testcase_08 AC 15 ms
8,472 KB
testcase_09 AC 16 ms
8,648 KB
testcase_10 AC 19 ms
8,684 KB
testcase_11 AC 17 ms
8,668 KB
testcase_12 AC 51 ms
8,616 KB
testcase_13 AC 18 ms
8,672 KB
testcase_14 AC 19 ms
8,696 KB
testcase_15 AC 26 ms
8,752 KB
testcase_16 AC 19 ms
8,548 KB
testcase_17 AC 17 ms
8,616 KB
testcase_18 AC 17 ms
8,732 KB
testcase_19 AC 27 ms
8,600 KB
testcase_20 AC 16 ms
8,620 KB
testcase_21 AC 15 ms
8,636 KB
testcase_22 AC 16 ms
8,696 KB
testcase_23 AC 16 ms
8,684 KB
testcase_24 AC 16 ms
8,724 KB
testcase_25 AC 16 ms
8,692 KB
testcase_26 AC 15 ms
8,752 KB
testcase_27 AC 16 ms
8,660 KB
testcase_28 AC 15 ms
8,640 KB
testcase_29 AC 16 ms
8,672 KB
testcase_30 AC 16 ms
8,748 KB
testcase_31 AC 16 ms
8,692 KB
testcase_32 AC 17 ms
8,688 KB
testcase_33 AC 16 ms
8,688 KB
testcase_34 AC 16 ms
8,732 KB
testcase_35 AC 15 ms
8,636 KB
testcase_36 AC 16 ms
8,620 KB
testcase_37 AC 21 ms
8,592 KB
testcase_38 AC 32 ms
8,620 KB
testcase_39 AC 19 ms
8,548 KB
testcase_40 AC 50 ms
8,680 KB
testcase_41 AC 25 ms
8,684 KB
testcase_42 AC 50 ms
8,752 KB
testcase_43 AC 30 ms
8,724 KB
testcase_44 AC 45 ms
8,548 KB
testcase_45 AC 42 ms
8,584 KB
testcase_46 AC 46 ms
8,588 KB
testcase_47 AC 26 ms
8,616 KB
testcase_48 AC 18 ms
8,736 KB
testcase_49 AC 28 ms
8,672 KB
testcase_50 AC 16 ms
8,680 KB
testcase_51 AC 15 ms
8,696 KB
testcase_52 AC 16 ms
8,748 KB
testcase_53 AC 16 ms
8,636 KB
testcase_54 AC 16 ms
8,620 KB
testcase_55 AC 16 ms
8,624 KB
testcase_56 AC 15 ms
8,608 KB
testcase_57 AC 15 ms
8,728 KB
testcase_58 AC 16 ms
8,680 KB
testcase_59 AC 16 ms
8,740 KB
testcase_60 AC 15 ms
8,640 KB
testcase_61 AC 15 ms
8,732 KB
testcase_62 AC 16 ms
8,624 KB
testcase_63 AC 16 ms
8,744 KB
testcase_64 AC 37 ms
8,660 KB
testcase_65 AC 49 ms
8,676 KB
testcase_66 AC 51 ms
8,548 KB
testcase_67 AC 49 ms
8,684 KB
testcase_68 AC 50 ms
8,664 KB
testcase_69 AC 51 ms
8,696 KB
testcase_70 AC 52 ms
8,660 KB
testcase_71 AC 15 ms
8,260 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

I,R,P,E=input,range,print,exit
N,K,T=map(int,I().split())
K-=1
c=I()
a="A"
b="B"
A="Alice"
B="Bob"
if c[K]>a:a,b,A,B=b,a,B,A
for i in R(K,N):
	if c[i]==a:r=i
	else:break
for i in R(K,-1,-1):
	if c[i]==a:l=i
	else:break
if l<r:
	if r<N-1 and r-K<=T and (T-r+K)%2:P(A),E(0)
	if l>0 and K-l<=T and (T-K+l)%2:P(A),E(0)
	P(B),E(0)
if T%2:
	l=r=K
	for i in R(K+1,N):
		if c[i]==b:r=i
		else:break
	for i in R(K-1,-1,-1):
		if c[i]==b:l=i
		else:break
	if K<r and(r==N-1 or r-K>T or (T-r+K)%2<1):P(A),E(0)
	if l<K and(l==0 or K-l>T or (T-K+l)%2<1):P(A),E(0)
P(B),E(0)
0