結果

問題 No.2278 Time Bomb Game 2
ユーザー gew1fw
提出日時 2025-06-12 13:50:58
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 448 bytes
コンパイル時間 417 ms
コンパイル使用メモリ 82,320 KB
実行使用メモリ 62,932 KB
最終ジャッジ日時 2025-06-12 13:52:11
合計ジャッジ時間 4,988 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 64 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k, t = map(int, input().split())
c = input().strip()

k -= 1  # Convert to 0-based index

min_steps = float('inf')
# Find the minimal distance to any 'B' from position k
for i in range(n):
    if c[i] == 'B':
        distance = abs(i - k)
        if distance < min_steps:
            min_steps = distance

if min_steps > t:
    print("Bob")
else:
    rem = t - min_steps
    if rem % 2 == 0:
        print("Alice")
    else:
        print("Bob")
0