結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,096 KB
testcase_01 AC 39 ms
52,096 KB
testcase_02 AC 40 ms
52,096 KB
testcase_03 WA -
testcase_04 AC 41 ms
52,096 KB
testcase_05 AC 40 ms
51,712 KB
testcase_06 AC 62 ms
71,168 KB
testcase_07 WA -
testcase_08 AC 71 ms
81,024 KB
testcase_09 AC 102 ms
104,448 KB
testcase_10 AC 92 ms
99,072 KB
testcase_11 AC 95 ms
98,816 KB
testcase_12 AC 88 ms
99,328 KB
testcase_13 AC 95 ms
99,072 KB
testcase_14 WA -
testcase_15 AC 96 ms
99,328 KB
testcase_16 AC 104 ms
101,120 KB
testcase_17 AC 94 ms
99,200 KB
testcase_18 WA -
testcase_19 AC 106 ms
101,632 KB
testcase_20 AC 89 ms
97,536 KB
testcase_21 AC 91 ms
98,432 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 99 ms
101,248 KB
testcase_27 AC 92 ms
99,200 KB
testcase_28 AC 100 ms
100,864 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 92 ms
98,048 KB
testcase_39 WA -
testcase_40 AC 98 ms
98,944 KB
testcase_41 AC 92 ms
97,792 KB
testcase_42 AC 81 ms
96,512 KB
testcase_43 AC 90 ms
99,072 KB
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 AC 93 ms
98,688 KB
testcase_48 WA -
testcase_49 AC 99 ms
98,816 KB
testcase_50 AC 89 ms
99,072 KB
testcase_51 AC 92 ms
99,072 KB
testcase_52 AC 89 ms
98,944 KB
testcase_53 WA -
testcase_54 AC 91 ms
99,200 KB
testcase_55 WA -
testcase_56 AC 84 ms
96,640 KB
testcase_57 AC 94 ms
98,944 KB
testcase_58 AC 86 ms
97,536 KB
testcase_59 WA -
testcase_60 AC 93 ms
99,200 KB
testcase_61 WA -
testcase_62 WA -
testcase_63 AC 82 ms
96,768 KB
testcase_64 AC 90 ms
100,864 KB
testcase_65 WA -
testcase_66 WA -
testcase_67 AC 87 ms
97,792 KB
testcase_68 AC 83 ms
97,280 KB
testcase_69 AC 81 ms
96,640 KB
testcase_70 AC 81 ms
96,640 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
for i in range(K, N + 1):
    if C[K] == C[i]:
        right += 1
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