結果

問題 No.2278 Time Bomb Game 2
ユーザー minimumminimum
提出日時 2023-04-21 22:14:45
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 764 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 65,664 KB
最終ジャッジ日時 2024-04-24 08:20:48
合計ジャッジ時間 5,469 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
52,224 KB
testcase_01 AC 41 ms
51,840 KB
testcase_02 AC 41 ms
51,840 KB
testcase_03 AC 42 ms
51,584 KB
testcase_04 AC 41 ms
52,480 KB
testcase_05 AC 42 ms
51,584 KB
testcase_06 WA -
testcase_07 AC 43 ms
52,736 KB
testcase_08 AC 44 ms
52,736 KB
testcase_09 AC 43 ms
52,992 KB
testcase_10 AC 49 ms
59,904 KB
testcase_11 AC 50 ms
59,392 KB
testcase_12 WA -
testcase_13 AC 48 ms
59,776 KB
testcase_14 AC 48 ms
59,776 KB
testcase_15 AC 50 ms
61,184 KB
testcase_16 AC 49 ms
59,392 KB
testcase_17 AC 49 ms
59,392 KB
testcase_18 AC 47 ms
59,136 KB
testcase_19 AC 50 ms
61,440 KB
testcase_20 AC 43 ms
53,376 KB
testcase_21 AC 42 ms
53,248 KB
testcase_22 AC 42 ms
53,120 KB
testcase_23 AC 43 ms
53,760 KB
testcase_24 AC 43 ms
53,504 KB
testcase_25 AC 43 ms
53,376 KB
testcase_26 AC 43 ms
53,376 KB
testcase_27 AC 43 ms
53,376 KB
testcase_28 AC 43 ms
53,248 KB
testcase_29 AC 43 ms
53,504 KB
testcase_30 AC 42 ms
53,120 KB
testcase_31 AC 43 ms
53,120 KB
testcase_32 AC 43 ms
53,376 KB
testcase_33 AC 43 ms
53,120 KB
testcase_34 AC 43 ms
53,504 KB
testcase_35 AC 42 ms
52,864 KB
testcase_36 AC 42 ms
52,992 KB
testcase_37 AC 47 ms
59,648 KB
testcase_38 AC 49 ms
61,312 KB
testcase_39 AC 47 ms
59,008 KB
testcase_40 AC 52 ms
64,640 KB
testcase_41 AC 48 ms
60,544 KB
testcase_42 WA -
testcase_43 AC 50 ms
60,800 KB
testcase_44 AC 51 ms
64,000 KB
testcase_45 AC 50 ms
63,360 KB
testcase_46 AC 51 ms
64,256 KB
testcase_47 AC 49 ms
60,544 KB
testcase_48 AC 46 ms
59,136 KB
testcase_49 AC 49 ms
61,056 KB
testcase_50 AC 44 ms
53,504 KB
testcase_51 AC 43 ms
53,760 KB
testcase_52 AC 43 ms
53,760 KB
testcase_53 AC 42 ms
53,376 KB
testcase_54 AC 43 ms
53,632 KB
testcase_55 AC 42 ms
53,248 KB
testcase_56 AC 43 ms
53,376 KB
testcase_57 AC 43 ms
53,120 KB
testcase_58 AC 43 ms
53,376 KB
testcase_59 AC 43 ms
53,376 KB
testcase_60 AC 42 ms
53,504 KB
testcase_61 AC 43 ms
53,248 KB
testcase_62 AC 44 ms
53,376 KB
testcase_63 AC 44 ms
53,248 KB
testcase_64 WA -
testcase_65 AC 53 ms
65,280 KB
testcase_66 AC 53 ms
65,664 KB
testcase_67 AC 54 ms
65,536 KB
testcase_68 AC 42 ms
52,992 KB
testcase_69 AC 42 ms
52,864 KB
testcase_70 AC 43 ms
52,992 KB
testcase_71 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

INF = float('inf')
N, K, T = map(int, input().split())
S = input()
if 'A' not in S:
    print("Bob")
if 'B' not in S:
    print("Alice")


def f(S, i):
    res = []
    lres = INF
    for l in range(i - 1, -1, -1):
        if S[l] != S[i]:
            lres = abs(l - i)
            break
    rres = INF
    for r in range(i, N):
        if S[r] != S[i]:
            rres = abs(r - i)
            break
    return min(lres, rres)


K -= 1

if S[K] == 'A':
    d = f(S, K)
    if T < d:
        print("Bob")
    else:
        if (T - d) % 2:
            print("Bob")
        else:
            print("Alice")
else:
    d = f(S, K)
    if T < d:
        print("Alice")
    else:
        if (T - d) % 2:
            print("Alice")
        else:
            print("Bob")
0