結果

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

ソースコード

diff #

x,y,k,p = map(int,input().split())

turn = x+y-k

first = (turn+1)//2
second = turn//2

# print(turn,first,second)
if turn%2:
    first,second = second,first

def ans(x,turn):
    turn %= 2
    # print(x,turn)
    if x == 0:
        print("Bob" if turn else "Alice")
    else:
        print("Bob" if turn == 0 else "Alice")
    exit()

if first >= y and pow(-1,y%2) == p:
    ans(0,turn)
    
if first >= x and pow(-1,(turn-x)%2) == p:
    ans(0,turn)

ans(1,turn)
    
0