結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 94 ms
72,396 KB
testcase_01 AC 91 ms
72,252 KB
testcase_02 AC 95 ms
72,544 KB
testcase_03 AC 93 ms
71,948 KB
testcase_04 AC 94 ms
72,192 KB
testcase_05 AC 93 ms
72,240 KB
testcase_06 AC 91 ms
72,140 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 94 ms
72,064 KB
testcase_12 AC 95 ms
72,516 KB
testcase_13 AC 97 ms
72,052 KB
testcase_14 AC 95 ms
71,952 KB
testcase_15 AC 93 ms
72,200 KB
testcase_16 AC 94 ms
72,192 KB
testcase_17 AC 93 ms
72,200 KB
testcase_18 AC 95 ms
72,248 KB
testcase_19 AC 91 ms
72,372 KB
testcase_20 AC 90 ms
72,220 KB
testcase_21 AC 89 ms
72,152 KB
testcase_22 AC 91 ms
72,072 KB
testcase_23 AC 92 ms
72,364 KB
testcase_24 AC 91 ms
72,112 KB
testcase_25 AC 91 ms
72,064 KB
testcase_26 AC 92 ms
72,536 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 94 ms
72,200 KB
testcase_30 AC 98 ms
72,008 KB
testcase_31 AC 94 ms
72,144 KB
testcase_32 AC 92 ms
72,156 KB
testcase_33 AC 92 ms
72,544 KB
testcase_34 AC 92 ms
72,524 KB
testcase_35 AC 92 ms
72,544 KB
testcase_36 AC 91 ms
72,064 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+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