結果

問題 No.2103 ±1s Game
ユーザー hellopra
提出日時 2022-10-21 22:23:59
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 518 bytes
コンパイル時間 195 ms
コンパイル使用メモリ 82,348 KB
実行使用メモリ 54,188 KB
最終ジャッジ日時 2024-07-01 06:56:52
合計ジャッジ時間 2,711 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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