結果

問題 No.2103 ±1s Game
ユーザー lam6er
提出日時 2025-04-15 22:19:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 480 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 81,820 KB
実行使用メモリ 53,528 KB
最終ジャッジ日時 2025-04-15 22:21:34
合計ジャッジ時間 2,393 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

X, Y, K, P = map(int, input().split())

T = X + Y - K
desired_parity = 1 if P == -1 else 0
T_parity = (Y % 2) ^ desired_parity

min_remove = max(0, T - X)
max_remove = min(T, Y)

if min_remove > max_remove:
    print("Bob")
else:
    if (min_remove % 2) == (max_remove % 2):
        if (min_remove % 2) == T_parity:
            print("Alice")
        else:
            print("Bob")
    else:
        if T % 2 == 1:
            print("Alice")
        else:
            print("Bob")
0