結果

問題 No.2103 ±1s Game
ユーザー 👑 rin204rin204
提出日時 2022-10-28 13:59:42
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 361 bytes
コンパイル時間 176 ms
コンパイル使用メモリ 82,220 KB
実行使用メモリ 54,056 KB
最終ジャッジ日時 2024-07-05 18:53:58
合計ジャッジ時間 2,947 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

x, y, k, p = map(int, input().split())
if p == 1:
    p = 0
else:
    p = 1

r = x + y - k
def solve():
    d = r // 2

    if d > x:
        if y & 1 != p & 1:
            return 1
    if d > y:
        if p == 0:
            return 1
    return 0


if r & 1:
    ans = solve()
else:
    ans = 1 ^ solve()
if ans == 0:
    print("Alice")
else:
    print("Bob")
0