結果

問題 No.2103 ±1s Game
ユーザー chineristAC
提出日時 2022-10-21 23:44:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 48 ms / 1,000 ms
コード長 582 bytes
コンパイル時間 686 ms
コンパイル使用メモリ 82,232 KB
実行使用メモリ 57,832 KB
最終ジャッジ日時 2024-07-01 07:50:06
合計ジャッジ時間 2,941 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 34
権限があれば一括ダウンロードができます

ソースコード

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 (X+Y-K)&1:
    print("Alice")
else:
    print("Bob")
0