結果

問題 No.2103 ±1s Game
ユーザー helloprahellopra
提出日時 2022-10-21 22:26:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 516 bytes
コンパイル時間 287 ms
コンパイル使用メモリ 81,908 KB
実行使用メモリ 53,428 KB
最終ジャッジ日時 2024-07-01 06:58:20
合計ジャッジ時間 2,571 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 29 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

X,Y,K,P = map(int,input().split())
cnt = X+Y-K #引く回数
A_cnt = cnt//2+cnt%2
B_cnt = cnt//2
if P==1:
    if A_cnt >= Y: print("Alice");exit()
    if cnt == 1 and Y%2==0: print("Bob");exit()
    if B_cnt > X: print("Alice");exit()
    if A_cnt == B_cnt: print("Bob");exit()
    else:print("Alice");exit()

else:
    if B_cnt >= Y: print("Bob");exit()
    if cnt == 1 and Y%2==1: print("Bob");exit()
    if B_cnt > X: print("Alice");exit()
    if A_cnt == B_cnt: print("Bob");exit()
    else:print("Alice");exit()
0