結果

問題 No.2103 ±1s Game
ユーザー 👑 rin204rin204
提出日時 2022-10-28 14:08:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 1,000 ms
コード長 512 bytes
コンパイル時間 146 ms
コンパイル使用メモリ 81,664 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-07-05 18:58:48
合計ジャッジ時間 2,480 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 34
権限があれば一括ダウンロードができます

ソースコード

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