結果

問題 No.2103 ±1s Game
ユーザー Akijin_007
提出日時 2022-10-21 22:35:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 38 ms / 1,000 ms
コード長 765 bytes
コンパイル時間 737 ms
コンパイル使用メモリ 82,200 KB
実行使用メモリ 53,508 KB
最終ジャッジ日時 2024-07-01 07:05:02
合計ジャッジ時間 2,963 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 34
権限があれば一括ダウンロードができます

ソースコード

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 K % 2 == 0 and P == 1:
            ans = 1
        elif K % 2 == 1 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