結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
51,840 KB
testcase_01 AC 34 ms
51,712 KB
testcase_02 AC 35 ms
51,968 KB
testcase_03 AC 34 ms
51,968 KB
testcase_04 AC 34 ms
52,096 KB
testcase_05 AC 34 ms
52,224 KB
testcase_06 AC 48 ms
68,352 KB
testcase_07 AC 64 ms
85,376 KB
testcase_08 AC 58 ms
77,312 KB
testcase_09 AC 72 ms
92,416 KB
testcase_10 WA -
testcase_11 AC 77 ms
97,792 KB
testcase_12 AC 81 ms
99,328 KB
testcase_13 AC 83 ms
99,200 KB
testcase_14 AC 83 ms
97,792 KB
testcase_15 WA -
testcase_16 AC 83 ms
101,120 KB
testcase_17 AC 82 ms
98,944 KB
testcase_18 WA -
testcase_19 AC 84 ms
100,992 KB
testcase_20 AC 75 ms
96,512 KB
testcase_21 AC 74 ms
96,000 KB
testcase_22 AC 74 ms
95,744 KB
testcase_23 AC 78 ms
97,152 KB
testcase_24 AC 79 ms
96,512 KB
testcase_25 AC 79 ms
96,640 KB
testcase_26 AC 76 ms
96,896 KB
testcase_27 AC 74 ms
96,512 KB
testcase_28 AC 75 ms
96,896 KB
testcase_29 AC 76 ms
96,384 KB
testcase_30 AC 77 ms
97,024 KB
testcase_31 AC 75 ms
96,512 KB
testcase_32 AC 76 ms
96,640 KB
testcase_33 AC 75 ms
96,128 KB
testcase_34 AC 76 ms
96,512 KB
testcase_35 AC 76 ms
96,640 KB
testcase_36 AC 76 ms
96,512 KB
testcase_37 WA -
testcase_38 AC 81 ms
97,280 KB
testcase_39 WA -
testcase_40 WA -
testcase_41 AC 79 ms
97,152 KB
testcase_42 AC 75 ms
96,512 KB
testcase_43 AC 79 ms
97,152 KB
testcase_44 WA -
testcase_45 AC 77 ms
97,408 KB
testcase_46 WA -
testcase_47 AC 80 ms
97,152 KB
testcase_48 WA -
testcase_49 AC 79 ms
97,792 KB
testcase_50 AC 77 ms
96,512 KB
testcase_51 AC 79 ms
96,896 KB
testcase_52 AC 78 ms
96,640 KB
testcase_53 AC 78 ms
96,768 KB
testcase_54 AC 82 ms
96,896 KB
testcase_55 AC 77 ms
96,256 KB
testcase_56 AC 74 ms
96,000 KB
testcase_57 AC 79 ms
96,512 KB
testcase_58 AC 80 ms
96,640 KB
testcase_59 AC 77 ms
96,384 KB
testcase_60 AC 76 ms
96,640 KB
testcase_61 AC 73 ms
96,384 KB
testcase_62 AC 76 ms
96,256 KB
testcase_63 AC 75 ms
96,512 KB
testcase_64 AC 88 ms
101,120 KB
testcase_65 AC 84 ms
97,792 KB
testcase_66 AC 83 ms
101,120 KB
testcase_67 AC 77 ms
98,176 KB
testcase_68 AC 74 ms
95,744 KB
testcase_69 AC 73 ms
95,744 KB
testcase_70 AC 72 ms
96,128 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) or (right % 2 != T % 2)) and T > left:
    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