結果

問題 No.2278 Time Bomb Game 2
ユーザー rlangevinrlangevin
提出日時 2023-04-21 22:14:10
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 729 bytes
コンパイル時間 146 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 101,376 KB
最終ジャッジ日時 2024-04-24 08:20:29
合計ジャッジ時間 7,066 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
52,096 KB
testcase_01 AC 33 ms
51,712 KB
testcase_02 AC 35 ms
52,224 KB
testcase_03 AC 39 ms
52,224 KB
testcase_04 AC 34 ms
51,840 KB
testcase_05 AC 33 ms
52,352 KB
testcase_06 AC 46 ms
68,608 KB
testcase_07 AC 64 ms
85,376 KB
testcase_08 AC 59 ms
77,696 KB
testcase_09 AC 75 ms
92,800 KB
testcase_10 AC 82 ms
98,048 KB
testcase_11 AC 80 ms
97,792 KB
testcase_12 AC 79 ms
99,712 KB
testcase_13 AC 82 ms
98,944 KB
testcase_14 AC 77 ms
98,048 KB
testcase_15 AC 83 ms
99,072 KB
testcase_16 AC 81 ms
100,480 KB
testcase_17 AC 83 ms
98,944 KB
testcase_18 AC 78 ms
97,664 KB
testcase_19 AC 84 ms
101,376 KB
testcase_20 AC 73 ms
96,640 KB
testcase_21 AC 74 ms
96,128 KB
testcase_22 AC 80 ms
95,616 KB
testcase_23 AC 76 ms
96,768 KB
testcase_24 AC 75 ms
96,512 KB
testcase_25 AC 74 ms
96,640 KB
testcase_26 AC 76 ms
96,768 KB
testcase_27 AC 75 ms
96,512 KB
testcase_28 AC 75 ms
96,384 KB
testcase_29 AC 74 ms
96,512 KB
testcase_30 AC 75 ms
96,768 KB
testcase_31 AC 73 ms
96,256 KB
testcase_32 AC 75 ms
96,512 KB
testcase_33 AC 78 ms
96,896 KB
testcase_34 AC 77 ms
96,896 KB
testcase_35 AC 75 ms
96,512 KB
testcase_36 AC 73 ms
96,128 KB
testcase_37 WA -
testcase_38 AC 76 ms
97,152 KB
testcase_39 WA -
testcase_40 AC 78 ms
97,536 KB
testcase_41 AC 75 ms
97,536 KB
testcase_42 AC 75 ms
96,640 KB
testcase_43 AC 77 ms
97,152 KB
testcase_44 WA -
testcase_45 AC 77 ms
97,280 KB
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 AC 77 ms
97,408 KB
testcase_50 AC 76 ms
96,384 KB
testcase_51 AC 77 ms
96,640 KB
testcase_52 AC 75 ms
97,024 KB
testcase_53 AC 75 ms
96,384 KB
testcase_54 AC 78 ms
96,640 KB
testcase_55 AC 81 ms
96,640 KB
testcase_56 AC 73 ms
95,872 KB
testcase_57 AC 73 ms
96,384 KB
testcase_58 AC 75 ms
96,768 KB
testcase_59 AC 75 ms
96,384 KB
testcase_60 AC 83 ms
96,768 KB
testcase_61 AC 78 ms
96,512 KB
testcase_62 AC 78 ms
96,896 KB
testcase_63 AC 74 ms
95,744 KB
testcase_64 AC 80 ms
100,864 KB
testcase_65 AC 85 ms
97,408 KB
testcase_66 AC 85 ms
101,248 KB
testcase_67 AC 77 ms
97,792 KB
testcase_68 AC 75 ms
96,128 KB
testcase_69 AC 73 ms
95,744 KB
testcase_70 AC 75 ms
95,744 KB
testcase_71 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(c):
    if c == "A":
        return 0
    elif c == "B":
        return 1
    else:
        return c

N, K, T = map(int, input().split())
C = [None] + list(input()) + [None]
C = list(map(f, C))
D = ["Alice", "Bob"]
left, right = 0, 0
for i in range(K - 1, -1, -1):
    if C[K] == C[i]:
        left += 1
    else:
        break
for i in range(K + 1, N + 1):
    if C[K] == C[i]:
        right += 1
    else:
        break
if (left % 2 != T % 2) and T > left:
    print(D[C[K]])
elif (right % 2 != T % 2) and T > right:
    print(D[C[K]])
elif T <= left and T <= right:
    print(D[1 - C[K]])
else:
    print(D[1 - C[K]])
    
# if C[K - 1] != C[K] and C[K + 1] != C[K]:
#     print(D[C[K]]) if T % 2 else print(D[1 - C[K]])
0