結果

問題 No.2103 ±1s Game
ユーザー Akijin_007Akijin_007
提出日時 2022-10-21 22:28:46
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 749 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 82,140 KB
実行使用メモリ 52,288 KB
最終ジャッジ日時 2024-07-01 06:59:50
合計ジャッジ時間 2,658 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 32 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#int(input())
#map(int, input().split())
#list(map(int, input().split()))

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

ans = 0

t = X + Y - K
a = t // 2 + t % 2
b = t // 2

if t % 2 == 1:
    if a <= min(X, Y):
        ans = 1
    elif X < a:
        if b == X:
            ans = 2
        elif K % 2 == 0 and P == 1:
            ans = 1
        else:
            ans = 2
    else: # Y < a
        if P == 1:
            ans = 1
        else:
            ans = 2
else:
    if b < min(X, Y):
        ans = 2
    elif X <= b:
        if K % 2 == -P:
            ans = 1
        else:
            ans = 2
    else: # Y <= b
        if P == 1:
            ans = 1
        else:
            ans = 2

if ans == 1:
    print("Alice")
else:
    print("Bob")



0