結果

問題 No.2103 ±1s Game
ユーザー gew1fw
提出日時 2025-06-12 20:20:29
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 333 bytes
コンパイル時間 171 ms
コンパイル使用メモリ 82,668 KB
実行使用メモリ 53,868 KB
最終ジャッジ日時 2025-06-12 20:20:42
合計ジャッジ時間 2,923 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

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

T = X + Y - K

# Compute S_req
c = 0 if P == 1 else 1
S_req = (Y - c) % 2

# Compute the required parity of F (number of -1's eaten)
# F mod 2 must be (S_req - Y) mod 2
required_sum = (S_req - Y) % 2

# Determine if Alice can win
if required_sum == 0:
    print("Alice")
else:
    print("Bob")
0