結果

問題 No.2103 ±1s Game
ユーザー zeronosu77108
提出日時 2022-10-21 22:05:53
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 518 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-07-01 06:38:34
合計ジャッジ時間 2,234 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

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

res = x + y - k

def bob(): print("Bob"); exit()
def alice(): print("Alice"); exit()

if (res+1)//2 >= y:
    if y % 2 == 1 and p == -1: alice()
    if y % 2 == 0 and p == 1: alice()

if res//2 >= y:
    if y % 2 == 1 and p == 1: bob()
    if y % 2 == 0 and p == -1: bob()

if p==1: x -= 1
else: y -= 1

if res % 2 == 0: bob()


if min(x, y) >= res // 2:
    alice()


if x < y:
    if (res - x) % 2 == 0 and p == -1: alice()
    if (res - x) % 2 == 1 and p == 1: alice()

bob()
0