結果

問題 No.2103 ±1s Game
ユーザー tassei903tassei903
提出日時 2022-10-21 21:57:33
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,064 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 87,240 KB
実行使用メモリ 71,668 KB
最終ジャッジ日時 2023-09-13 22:15:28
合計ジャッジ時間 4,252 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,460 KB
testcase_01 AC 70 ms
71,184 KB
testcase_02 AC 68 ms
71,344 KB
testcase_03 AC 67 ms
71,540 KB
testcase_04 AC 67 ms
71,232 KB
testcase_05 WA -
testcase_06 AC 71 ms
71,196 KB
testcase_07 AC 69 ms
71,348 KB
testcase_08 AC 70 ms
71,552 KB
testcase_09 AC 70 ms
71,340 KB
testcase_10 AC 68 ms
71,668 KB
testcase_11 AC 69 ms
71,448 KB
testcase_12 AC 72 ms
71,664 KB
testcase_13 AC 69 ms
71,520 KB
testcase_14 AC 68 ms
71,380 KB
testcase_15 WA -
testcase_16 AC 69 ms
71,592 KB
testcase_17 WA -
testcase_18 AC 67 ms
71,340 KB
testcase_19 AC 68 ms
71,336 KB
testcase_20 AC 68 ms
71,552 KB
testcase_21 WA -
testcase_22 AC 68 ms
71,396 KB
testcase_23 AC 68 ms
71,264 KB
testcase_24 AC 66 ms
71,376 KB
testcase_25 AC 64 ms
71,560 KB
testcase_26 AC 65 ms
71,572 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 66 ms
71,552 KB
testcase_30 AC 66 ms
71,456 KB
testcase_31 WA -
testcase_32 AC 66 ms
71,284 KB
testcase_33 AC 66 ms
71,180 KB
testcase_34 AC 66 ms
71,588 KB
testcase_35 AC 65 ms
71,368 KB
testcase_36 AC 67 ms
71,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################

def f(x,y,k,p,z):
    if k == x + y:
        if p == y % 2:
            return 1
        return 0
    if z:
        res = 0
        if x:
            res |= f(x-1, y, k, p, 0)
        if y:
            res |= f(x, y-1, k, p, 0)
        return res
    else:
        res = 1
        if x:
            res &= f(x-1, y, k, p, 1)
        if y:
            res &= f(x, y-1, k, p, 1)
        return res
x,y,k,p = na()
if p == 1:
    if y <= (x + y - k  + 1)//2:
        ans = 1
    elif (x + y - k) % 2:
        ans = 1
    else:
        ans = 0
else:
    if y <= (x + y - k + 1)//2:
        ans = 0
    elif (x + y - k) % 2:
        ans = 1
    else:
        ans = 0
if ans:
    print("Alice")
else:
    print("Bob")
0