結果

問題 No.2103 ±1s Game
ユーザー shotoyooshotoyoo
提出日時 2022-10-22 00:02:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 101 ms / 1,000 ms
コード長 1,270 bytes
コンパイル時間 276 ms
コンパイル使用メモリ 87,064 KB
実行使用メモリ 72,512 KB
最終ジャッジ日時 2023-09-14 00:06:17
合計ジャッジ時間 5,637 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
72,512 KB
testcase_01 AC 95 ms
72,172 KB
testcase_02 AC 96 ms
72,116 KB
testcase_03 AC 101 ms
72,376 KB
testcase_04 AC 97 ms
71,856 KB
testcase_05 AC 95 ms
72,064 KB
testcase_06 AC 94 ms
71,980 KB
testcase_07 AC 96 ms
71,940 KB
testcase_08 AC 97 ms
72,116 KB
testcase_09 AC 96 ms
71,944 KB
testcase_10 AC 96 ms
71,940 KB
testcase_11 AC 97 ms
72,224 KB
testcase_12 AC 96 ms
71,836 KB
testcase_13 AC 101 ms
72,476 KB
testcase_14 AC 96 ms
72,060 KB
testcase_15 AC 97 ms
72,216 KB
testcase_16 AC 95 ms
72,132 KB
testcase_17 AC 98 ms
72,264 KB
testcase_18 AC 95 ms
72,052 KB
testcase_19 AC 97 ms
72,056 KB
testcase_20 AC 96 ms
72,232 KB
testcase_21 AC 97 ms
71,976 KB
testcase_22 AC 95 ms
72,060 KB
testcase_23 AC 94 ms
72,476 KB
testcase_24 AC 96 ms
72,488 KB
testcase_25 AC 97 ms
72,048 KB
testcase_26 AC 96 ms
72,132 KB
testcase_27 AC 96 ms
72,032 KB
testcase_28 AC 94 ms
72,144 KB
testcase_29 AC 97 ms
71,988 KB
testcase_30 AC 93 ms
72,364 KB
testcase_31 AC 94 ms
72,496 KB
testcase_32 AC 96 ms
72,376 KB
testcase_33 AC 94 ms
71,872 KB
testcase_34 AC 96 ms
72,228 KB
testcase_35 AC 97 ms
72,212 KB
testcase_36 AC 97 ms
72,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, random
input = lambda : sys.stdin.readline().rstrip()


write = lambda x: sys.stdout.write(x+"\n"); writef = lambda x: print("{:.12f}".format(x))
debug = lambda x: sys.stderr.write(x+"\n")
YES="Yes"; NO="No"; pans = lambda v: print(YES if v else NO); INF=10**18
LI = lambda : list(map(int, input().split())); II=lambda : int(input()); SI=lambda : [ord(c)-ord("a") for c in input()]
def debug(_l_):
    for s in _l_.split():
        print(f"{s}={eval(s)}", end=" ")
    print()
def dlist(*l, fill=0):
    if len(l)==1:
        return [fill]*l[0]
    ll = l[1:]
    return [dlist(*ll, fill=fill) for _ in range(l[0])]

x,y,k,p = list(map(int, input().split()))
num = x+y-k
p = pow(-1,y)*p
if p==1:
    if num%2==0:
        m = min(x,y)
        if m>=num//2+1:
            v = 0
        else:
            v = (m+1)%2
    else:
        if min(x,y)>=(num+1)//2:
            v = 1
        elif x>y:
            v = (y+1)%2
        else:
            v = (x)%2
else:
    if num%2==0:
        m = min(x,y)
        if m>=num//2+1:
            v = 0
        else:
            v = m%2
    else:
        m = min(x,y)
        if m>=(num+1)//2:
            v = 1
        elif x>y:
            v = (y)%2
        else:
            v = (x+1)%2
YES = "Alice"
NO = "Bob"
pans(v)
0