結果

問題 No.2103 ±1s Game
ユーザー roaris
提出日時 2022-10-21 23:22:27
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 292 bytes
コンパイル時間 169 ms
コンパイル使用メモリ 82,792 KB
実行使用メモリ 54,176 KB
最終ジャッジ日時 2024-07-01 07:36:05
合計ジャッジ時間 2,669 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

X, Y, K, P = map(int, input().split())

if Y%2==1:
    if P==1:
        P = -1
    else:
        P = 1

if (K%2==0 and P==1) or (K%2==1 and P==-1):
    c = 1+max(0, Y-K-1)
else:
    c = max(0, Y-K)
    
if c%2==0:
    Q = 1
else:
    Q = -1

if P==Q:
    print('Alice')
else:
    print('Bob')
0