結果
問題 |
No.2103 ±1s Game
|
ユーザー |
![]() |
提出日時 | 2025-06-12 18:05:00 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 642 bytes |
コンパイル時間 | 170 ms |
コンパイル使用メモリ | 82,060 KB |
実行使用メモリ | 53,864 KB |
最終ジャッジ日時 | 2025-06-12 18:05:50 |
合計ジャッジ時間 | 2,885 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 WA * 12 |
ソースコード
X, Y, K, P = map(int, input().split()) min_neg = max(0, K - X) max_neg = min(Y, K) desired_parity = 0 if P == 1 else 1 # Check if there exists a number with desired parity in [min_neg, max_neg] exists = False if min_neg <= max_neg: first_candidate = min_neg if (min_neg % 2 == desired_parity) else (min_neg + 1) if first_candidate <= max_neg: exists = True if not exists: print("Bob") else: # Check the condition for Alice's win condition = (min_neg % 2 == desired_parity) or (max_neg % 2 == desired_parity) or (min_neg % 2 != max_neg % 2) if condition: print("Alice") else: print("Bob")