結果

問題 No.2278 Time Bomb Game 2
ユーザー rlangevinrlangevin
提出日時 2023-04-21 22:08:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 736 bytes
コンパイル時間 356 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 101,248 KB
最終ジャッジ日時 2024-04-24 08:15:51
合計ジャッジ時間 8,139 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
51,968 KB
testcase_01 AC 43 ms
51,968 KB
testcase_02 AC 41 ms
51,968 KB
testcase_03 AC 41 ms
51,840 KB
testcase_04 AC 41 ms
51,712 KB
testcase_05 AC 40 ms
51,840 KB
testcase_06 AC 56 ms
68,096 KB
testcase_07 AC 73 ms
85,632 KB
testcase_08 AC 68 ms
77,568 KB
testcase_09 AC 83 ms
92,928 KB
testcase_10 AC 87 ms
97,920 KB
testcase_11 AC 88 ms
97,664 KB
testcase_12 AC 89 ms
99,456 KB
testcase_13 AC 92 ms
99,072 KB
testcase_14 AC 93 ms
99,200 KB
testcase_15 WA -
testcase_16 AC 92 ms
100,608 KB
testcase_17 AC 92 ms
98,944 KB
testcase_18 AC 89 ms
97,920 KB
testcase_19 AC 93 ms
101,248 KB
testcase_20 AC 86 ms
96,384 KB
testcase_21 AC 82 ms
95,744 KB
testcase_22 AC 81 ms
95,744 KB
testcase_23 AC 89 ms
97,152 KB
testcase_24 AC 87 ms
96,384 KB
testcase_25 AC 84 ms
96,896 KB
testcase_26 AC 84 ms
96,640 KB
testcase_27 AC 85 ms
96,640 KB
testcase_28 AC 85 ms
96,384 KB
testcase_29 AC 85 ms
96,384 KB
testcase_30 AC 86 ms
96,384 KB
testcase_31 AC 83 ms
96,384 KB
testcase_32 AC 85 ms
96,640 KB
testcase_33 AC 84 ms
97,024 KB
testcase_34 AC 84 ms
96,768 KB
testcase_35 AC 87 ms
96,640 KB
testcase_36 AC 82 ms
96,512 KB
testcase_37 WA -
testcase_38 AC 88 ms
97,664 KB
testcase_39 WA -
testcase_40 AC 89 ms
97,536 KB
testcase_41 AC 85 ms
97,408 KB
testcase_42 AC 85 ms
96,768 KB
testcase_43 AC 89 ms
97,152 KB
testcase_44 WA -
testcase_45 AC 86 ms
97,408 KB
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 AC 91 ms
97,408 KB
testcase_50 AC 85 ms
96,512 KB
testcase_51 AC 88 ms
97,024 KB
testcase_52 AC 86 ms
96,768 KB
testcase_53 AC 84 ms
96,384 KB
testcase_54 AC 85 ms
96,768 KB
testcase_55 AC 83 ms
96,384 KB
testcase_56 AC 84 ms
95,744 KB
testcase_57 AC 94 ms
96,640 KB
testcase_58 AC 85 ms
96,384 KB
testcase_59 AC 86 ms
96,640 KB
testcase_60 AC 88 ms
96,640 KB
testcase_61 AC 85 ms
96,256 KB
testcase_62 AC 87 ms
96,512 KB
testcase_63 AC 83 ms
95,616 KB
testcase_64 AC 91 ms
100,864 KB
testcase_65 AC 89 ms
97,920 KB
testcase_66 AC 93 ms
101,248 KB
testcase_67 AC 88 ms
98,176 KB
testcase_68 AC 83 ms
96,000 KB
testcase_69 AC 81 ms
95,616 KB
testcase_70 AC 82 ms
95,872 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 and T > left:
    print(D[C[K]])
elif right % 2 and T > right:
    print(D[C[K]])
elif T <= left and T <= right:
    print(D[1 - C[K]])
else:
    print(D[C[K]]) if T % 2 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