結果
問題 |
No.2103 ±1s Game
|
ユーザー |
![]() |
提出日時 | 2025-06-12 20:21:34 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 702 bytes |
コンパイル時間 | 227 ms |
コンパイル使用メモリ | 82,676 KB |
実行使用メモリ | 54,032 KB |
最終ジャッジ日時 | 2025-06-12 20:21:54 |
合計ジャッジ時間 | 2,830 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 WA * 10 |
ソースコード
X, Y, K, P = map(int, input().split()) E = X + Y - K desired_parity = 0 if P == 1 else 1 target_b_parity = (Y - desired_parity) % 2 b_min = max(0, E - X) b_max = min(Y, E) possible_parity = False if b_min <= b_max: if (b_min % 2 == target_b_parity) or (b_max % 2 == target_b_parity): possible_parity = True else: if (b_max - b_min) >= 1: possible_parity = True if not possible_parity: print("Bob") else: if E % 2 == 1: print("Alice") else: if (b_min % 2 == b_max % 2): if (b_min % 2 == target_b_parity): print("Alice") else: print("Bob") else: print("Bob")