結果
問題 |
No.2278 Time Bomb Game 2
|
ユーザー |
![]() |
提出日時 | 2025-06-12 18:50:24 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 448 bytes |
コンパイル時間 | 266 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 61,056 KB |
最終ジャッジ日時 | 2025-06-12 18:50:34 |
合計ジャッジ時間 | 5,601 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 64 WA * 6 |
ソースコード
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")