結果

問題 No.2103 ±1s Game
ユーザー shotoyooshotoyoo
提出日時 2022-10-21 23:25:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,250 bytes
コンパイル時間 679 ms
コンパイル使用メモリ 87,012 KB
実行使用メモリ 72,508 KB
最終ジャッジ日時 2023-09-13 23:32:37
合計ジャッジ時間 5,346 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
72,044 KB
testcase_01 AC 88 ms
71,864 KB
testcase_02 AC 86 ms
71,936 KB
testcase_03 AC 84 ms
72,308 KB
testcase_04 AC 85 ms
71,864 KB
testcase_05 AC 85 ms
72,140 KB
testcase_06 AC 86 ms
72,220 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 86 ms
71,864 KB
testcase_10 AC 85 ms
72,180 KB
testcase_11 AC 86 ms
72,244 KB
testcase_12 AC 87 ms
72,364 KB
testcase_13 AC 85 ms
71,852 KB
testcase_14 AC 89 ms
72,036 KB
testcase_15 AC 86 ms
72,040 KB
testcase_16 AC 86 ms
71,852 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 88 ms
72,460 KB
testcase_20 AC 86 ms
72,504 KB
testcase_21 AC 88 ms
72,048 KB
testcase_22 AC 88 ms
71,868 KB
testcase_23 AC 89 ms
72,044 KB
testcase_24 AC 87 ms
72,336 KB
testcase_25 AC 87 ms
72,024 KB
testcase_26 AC 87 ms
72,252 KB
testcase_27 AC 87 ms
71,940 KB
testcase_28 AC 87 ms
72,036 KB
testcase_29 AC 86 ms
72,092 KB
testcase_30 AC 86 ms
71,940 KB
testcase_31 WA -
testcase_32 AC 88 ms
72,340 KB
testcase_33 WA -
testcase_34 AC 93 ms
72,336 KB
testcase_35 AC 90 ms
71,940 KB
testcase_36 AC 87 ms
72,240 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
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%2
        else:
            v = (x+1)%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+1)%2
        else:
            v = x%2
YES = "Alice"
NO = "Bob"
pans(v)
0