結果

問題 No.2278 Time Bomb Game 2
ユーザー 👑 p-adicp-adic
提出日時 2023-07-14 20:23:36
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 524 bytes
コンパイル時間 132 ms
コンパイル使用メモリ 10,920 KB
実行使用メモリ 8,772 KB
最終ジャッジ日時 2023-10-14 10:15:43
合計ジャッジ時間 5,215 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,320 KB
testcase_01 AC 16 ms
8,188 KB
testcase_02 AC 16 ms
8,168 KB
testcase_03 AC 16 ms
8,272 KB
testcase_04 AC 16 ms
8,184 KB
testcase_05 AC 15 ms
8,152 KB
testcase_06 AC 16 ms
8,336 KB
testcase_07 AC 16 ms
8,424 KB
testcase_08 AC 16 ms
8,364 KB
testcase_09 AC 17 ms
8,684 KB
testcase_10 AC 20 ms
8,720 KB
testcase_11 AC 17 ms
8,648 KB
testcase_12 AC 51 ms
8,568 KB
testcase_13 AC 20 ms
8,556 KB
testcase_14 AC 20 ms
8,648 KB
testcase_15 AC 26 ms
8,656 KB
testcase_16 AC 18 ms
8,612 KB
testcase_17 AC 17 ms
8,552 KB
testcase_18 AC 17 ms
8,520 KB
testcase_19 AC 28 ms
8,552 KB
testcase_20 AC 16 ms
8,564 KB
testcase_21 AC 16 ms
8,660 KB
testcase_22 AC 16 ms
8,584 KB
testcase_23 AC 16 ms
8,612 KB
testcase_24 AC 16 ms
8,552 KB
testcase_25 AC 17 ms
8,564 KB
testcase_26 AC 16 ms
8,580 KB
testcase_27 AC 17 ms
8,712 KB
testcase_28 AC 16 ms
8,584 KB
testcase_29 AC 16 ms
8,576 KB
testcase_30 AC 16 ms
8,568 KB
testcase_31 AC 17 ms
8,568 KB
testcase_32 AC 17 ms
8,580 KB
testcase_33 AC 16 ms
8,580 KB
testcase_34 AC 17 ms
8,700 KB
testcase_35 AC 16 ms
8,644 KB
testcase_36 AC 16 ms
8,644 KB
testcase_37 WA -
testcase_38 AC 33 ms
8,608 KB
testcase_39 WA -
testcase_40 AC 51 ms
8,716 KB
testcase_41 AC 26 ms
8,648 KB
testcase_42 AC 52 ms
8,556 KB
testcase_43 AC 31 ms
8,564 KB
testcase_44 WA -
testcase_45 AC 45 ms
8,576 KB
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 AC 29 ms
8,716 KB
testcase_50 AC 16 ms
8,516 KB
testcase_51 AC 17 ms
8,608 KB
testcase_52 AC 17 ms
8,548 KB
testcase_53 AC 16 ms
8,648 KB
testcase_54 AC 17 ms
8,532 KB
testcase_55 AC 17 ms
8,572 KB
testcase_56 AC 16 ms
8,528 KB
testcase_57 AC 16 ms
8,568 KB
testcase_58 AC 17 ms
8,584 KB
testcase_59 AC 17 ms
8,560 KB
testcase_60 AC 17 ms
8,564 KB
testcase_61 AC 17 ms
8,684 KB
testcase_62 AC 16 ms
8,728 KB
testcase_63 AC 16 ms
8,572 KB
testcase_64 AC 37 ms
8,668 KB
testcase_65 AC 50 ms
8,644 KB
testcase_66 AC 51 ms
8,664 KB
testcase_67 AC 50 ms
8,576 KB
testcase_68 AC 50 ms
8,732 KB
testcase_69 AC 53 ms
8,576 KB
testcase_70 AC 51 ms
8,576 KB
testcase_71 AC 16 ms
8,176 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-K<=T and (T-r+K)%2:P(A),E(0)
	if 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-K>T or (T-r+K)%2<1):P(A),E(0)
	if l<K and(K-l>T or (T-K+l)%2<1):P(A),E(0)
P(B),E(0)
0