結果

問題 No.2103 ±1s Game
ユーザー chineristACchineristAC
提出日時 2022-10-21 23:44:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 123 ms / 1,000 ms
コード長 582 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 86,924 KB
実行使用メモリ 74,856 KB
最終ジャッジ日時 2023-09-13 23:50:37
合計ジャッジ時間 6,532 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
74,344 KB
testcase_01 AC 121 ms
74,696 KB
testcase_02 AC 114 ms
74,632 KB
testcase_03 AC 117 ms
74,708 KB
testcase_04 AC 117 ms
74,788 KB
testcase_05 AC 115 ms
74,568 KB
testcase_06 AC 115 ms
74,712 KB
testcase_07 AC 113 ms
74,700 KB
testcase_08 AC 114 ms
74,344 KB
testcase_09 AC 113 ms
74,664 KB
testcase_10 AC 115 ms
74,236 KB
testcase_11 AC 115 ms
74,232 KB
testcase_12 AC 115 ms
74,528 KB
testcase_13 AC 116 ms
74,544 KB
testcase_14 AC 116 ms
74,460 KB
testcase_15 AC 116 ms
74,668 KB
testcase_16 AC 114 ms
74,856 KB
testcase_17 AC 114 ms
74,500 KB
testcase_18 AC 115 ms
74,528 KB
testcase_19 AC 115 ms
74,540 KB
testcase_20 AC 115 ms
74,760 KB
testcase_21 AC 116 ms
74,592 KB
testcase_22 AC 116 ms
74,632 KB
testcase_23 AC 116 ms
74,524 KB
testcase_24 AC 114 ms
74,776 KB
testcase_25 AC 116 ms
74,428 KB
testcase_26 AC 114 ms
74,432 KB
testcase_27 AC 113 ms
74,540 KB
testcase_28 AC 114 ms
74,344 KB
testcase_29 AC 115 ms
74,416 KB
testcase_30 AC 116 ms
74,664 KB
testcase_31 AC 116 ms
74,348 KB
testcase_32 AC 117 ms
74,244 KB
testcase_33 AC 115 ms
74,688 KB
testcase_34 AC 118 ms
74,348 KB
testcase_35 AC 117 ms
74,456 KB
testcase_36 AC 123 ms
74,460 KB
権限があれば一括ダウンロードができます

ソースコード

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