結果
問題 |
No.2103 ±1s Game
|
ユーザー |
![]() |
提出日時 | 2025-04-15 22:19:12 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 482 bytes |
コンパイル時間 | 674 ms |
コンパイル使用メモリ | 82,132 KB |
実行使用メモリ | 53,740 KB |
最終ジャッジ日時 | 2025-04-15 22:20:41 |
合計ジャッジ時間 | 2,426 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 WA * 12 |
ソースコード
X, Y, K, P = map(int, input().split()) desired_parity = 0 if P == 1 else 1 Y_initial_parity = Y % 2 s = Y_initial_parity ^ desired_parity # XOR to find required parity of taken_Y T = X + Y - K a = max(0, T - X) b = min(T, Y) if a > b: print("Bob") else: # Check if there's a number in [a, b] with parity s a_parity = a % 2 b_parity = b % 2 if (a_parity == s) or (b_parity == s) or (a_parity != b_parity): print("Alice") else: print("Bob")