結果

問題 No.2103 ±1s Game
ユーザー chineristACchineristAC
提出日時 2022-10-21 23:17:18
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 577 bytes
コンパイル時間 166 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 57,404 KB
最終ジャッジ日時 2024-07-01 07:33:51
合計ジャッジ時間 2,975 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys,random,bisect
from collections import deque,defaultdict
from heapq import heapify,heappop,heappush
from itertools import permutations
from math import log,gcd

input = lambda :sys.stdin.buffer.readline()
mi = lambda :map(int,input().split())
li = lambda :list(mi())

X,Y,K,P = mi()

A,B = (X+Y-K+1)//2,(X+Y-K)//2

if X <= A and pow(-1,K) == P:
    exit(print("Alice"))
if Y <= A and P == 1:
    exit(print("Alice"))
if X <= B and pow(-1,K) != P:
    exit(print("Bob"))
if Y <= B and P == -1:
    exit(print("Bob"))

if K&1:
    print("Alice")
else:
    print("Bob")
0