結果

問題 No.2278 Time Bomb Game 2
ユーザー ShirotsumeShirotsume
提出日時 2023-04-21 22:45:53
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 871 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 82,160 KB
実行使用メモリ 68,096 KB
最終ジャッジ日時 2024-04-24 09:39:16
合計ジャッジ時間 5,532 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
53,632 KB
testcase_01 AC 48 ms
54,016 KB
testcase_02 AC 45 ms
53,632 KB
testcase_03 AC 47 ms
53,632 KB
testcase_04 AC 47 ms
53,504 KB
testcase_05 AC 45 ms
53,760 KB
testcase_06 AC 44 ms
54,528 KB
testcase_07 AC 48 ms
55,040 KB
testcase_08 AC 46 ms
54,400 KB
testcase_09 AC 46 ms
55,040 KB
testcase_10 AC 51 ms
61,824 KB
testcase_11 AC 50 ms
61,696 KB
testcase_12 AC 47 ms
54,784 KB
testcase_13 AC 54 ms
62,248 KB
testcase_14 AC 52 ms
62,080 KB
testcase_15 AC 51 ms
63,744 KB
testcase_16 AC 51 ms
61,824 KB
testcase_17 AC 51 ms
61,312 KB
testcase_18 AC 53 ms
61,696 KB
testcase_19 AC 50 ms
63,488 KB
testcase_20 AC 46 ms
55,296 KB
testcase_21 AC 49 ms
55,296 KB
testcase_22 AC 46 ms
54,912 KB
testcase_23 AC 44 ms
55,552 KB
testcase_24 AC 44 ms
55,040 KB
testcase_25 AC 46 ms
55,552 KB
testcase_26 AC 44 ms
55,040 KB
testcase_27 AC 45 ms
55,296 KB
testcase_28 AC 45 ms
54,912 KB
testcase_29 AC 45 ms
55,168 KB
testcase_30 AC 46 ms
55,680 KB
testcase_31 AC 46 ms
54,912 KB
testcase_32 AC 47 ms
55,296 KB
testcase_33 AC 48 ms
55,016 KB
testcase_34 AC 46 ms
55,208 KB
testcase_35 AC 46 ms
55,040 KB
testcase_36 AC 45 ms
55,296 KB
testcase_37 AC 49 ms
61,952 KB
testcase_38 AC 50 ms
63,488 KB
testcase_39 AC 49 ms
61,568 KB
testcase_40 AC 51 ms
67,072 KB
testcase_41 AC 49 ms
63,104 KB
testcase_42 AC 46 ms
55,040 KB
testcase_43 AC 50 ms
63,488 KB
testcase_44 AC 51 ms
66,432 KB
testcase_45 AC 55 ms
65,792 KB
testcase_46 AC 52 ms
66,432 KB
testcase_47 AC 51 ms
62,976 KB
testcase_48 AC 50 ms
61,056 KB
testcase_49 AC 52 ms
63,148 KB
testcase_50 AC 45 ms
55,040 KB
testcase_51 AC 46 ms
55,168 KB
testcase_52 AC 45 ms
55,168 KB
testcase_53 AC 47 ms
55,296 KB
testcase_54 AC 46 ms
54,912 KB
testcase_55 AC 46 ms
55,168 KB
testcase_56 AC 44 ms
55,424 KB
testcase_57 AC 46 ms
55,552 KB
testcase_58 AC 46 ms
54,784 KB
testcase_59 AC 45 ms
55,040 KB
testcase_60 AC 46 ms
55,168 KB
testcase_61 AC 44 ms
55,168 KB
testcase_62 AC 46 ms
55,104 KB
testcase_63 AC 44 ms
55,096 KB
testcase_64 AC 54 ms
65,408 KB
testcase_65 AC 55 ms
67,584 KB
testcase_66 AC 52 ms
68,096 KB
testcase_67 AC 52 ms
67,712 KB
testcase_68 AC 45 ms
55,296 KB
testcase_69 AC 45 ms
55,296 KB
testcase_70 AC 47 ms
55,424 KB
testcase_71 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from collections import deque, Counter
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 63 - 1
mod = 998244353

n, k, t = mi()
k -= 1
c = input()

if 'A' not in c:
    print('Alice')
    exit()
if 'B' not in c:
    print('Bob')
    exit()
cnt = 0
l = r = k
for l in range(k - 1, -1, -1):
    if c[l] == c[k]:
        cnt += 1
    else:
        l += 1
        break
for r in range(k + 1, n):
    if c[r] == c[k]:
        cnt += 1
    else:
        r -= 1
        break
if r - k <= t and t % 2 == (r - k + 1) % 2:
    if r + 1 < n:
        print('Alice' if c[k] == 'A' else 'Bob')
        exit()

if k - l <= t and t % 2 == (l - k + 1) % 2:
    if l - 1 >= 0:
        print('Alice' if c[k] == 'A' else 'Bob')
        exit()

print('Bob' if c[k] == 'A' else 'Alice')
0