結果

問題 No.2103 ±1s Game
コンテスト
ユーザー titia
提出日時 2022-10-23 04:54:38
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 96 ms / 1,000 ms
コード長 621 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 322 ms
コンパイル使用メモリ 20,696 KB
実行使用メモリ 15,360 KB
最終ジャッジ日時 2026-03-23 05:21:20
合計ジャッジ時間 4,798 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 34
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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

toru=X+Y-K

if toru%2==0:
    if X<=toru//2:
        if K%2==0 and P==1:
            print("Alice")
            exit()
        if K%2==1 and P==-1:
            print("Alice")
            exit()

    if Y<=toru//2:
        if P==1:
            print("Alice")
            exit()
    print("Bob")

else:
    if X<=(toru-1)//2:
        if K%2==0 and P==-1:
            print("Bob")
            exit()
        if K%2==1 and P==1:
            print("Bob")
            exit()

    if Y<=(toru-1)//2:
        if P==-1:
            print("Bob")
            exit()
    print("Alice")
            
0