結果

問題 No.2103 ±1s Game
ユーザー 👑 rin204rin204
提出日時 2022-10-28 14:08:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 1,000 ms
コード長 512 bytes
コンパイル時間 386 ms
コンパイル使用メモリ 87,144 KB
実行使用メモリ 71,468 KB
最終ジャッジ日時 2023-09-19 06:50:18
合計ジャッジ時間 4,936 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,236 KB
testcase_01 AC 78 ms
71,076 KB
testcase_02 AC 78 ms
71,252 KB
testcase_03 AC 78 ms
71,072 KB
testcase_04 AC 79 ms
71,368 KB
testcase_05 AC 78 ms
71,444 KB
testcase_06 AC 78 ms
71,228 KB
testcase_07 AC 77 ms
71,460 KB
testcase_08 AC 78 ms
71,260 KB
testcase_09 AC 78 ms
71,076 KB
testcase_10 AC 77 ms
71,288 KB
testcase_11 AC 76 ms
71,360 KB
testcase_12 AC 78 ms
71,468 KB
testcase_13 AC 80 ms
71,368 KB
testcase_14 AC 78 ms
71,292 KB
testcase_15 AC 80 ms
71,328 KB
testcase_16 AC 79 ms
71,464 KB
testcase_17 AC 78 ms
71,332 KB
testcase_18 AC 79 ms
71,296 KB
testcase_19 AC 79 ms
71,232 KB
testcase_20 AC 78 ms
71,076 KB
testcase_21 AC 80 ms
71,320 KB
testcase_22 AC 81 ms
71,416 KB
testcase_23 AC 79 ms
71,292 KB
testcase_24 AC 80 ms
71,200 KB
testcase_25 AC 79 ms
71,444 KB
testcase_26 AC 78 ms
71,388 KB
testcase_27 AC 78 ms
71,328 KB
testcase_28 AC 79 ms
71,468 KB
testcase_29 AC 80 ms
71,304 KB
testcase_30 AC 79 ms
71,296 KB
testcase_31 AC 79 ms
71,372 KB
testcase_32 AC 79 ms
71,288 KB
testcase_33 AC 79 ms
71,124 KB
testcase_34 AC 79 ms
71,352 KB
testcase_35 AC 78 ms
71,464 KB
testcase_36 AC 80 ms
71,232 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x, y, k, p = map(int, input().split())
if p == 1:
    p = 0
else:
    p = 1

r = x + y - k
if r & 1:
    d = r // 2
    if d >= x:
        if k & 1 != p:
            print("Bob")
            exit()
    if d >= y:        
        if p == 1:
            print("Bob")
            exit()
    print("Alice")
else:
    d = r // 2
    if d >= x:
        if k & 1 == p:
            print("Alice")
            exit()
    if d >= y:        
        if p == 0:
            print("Alice")
            exit()
    print("Bob")
0