結果
| 問題 |
No.2103 ±1s Game
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 20:20:58 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 599 bytes |
| コンパイル時間 | 150 ms |
| コンパイル使用メモリ | 82,008 KB |
| 実行使用メモリ | 53,828 KB |
| 最終ジャッジ日時 | 2025-06-12 20:21:03 |
| 合計ジャッジ時間 | 2,493 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 WA * 12 |
ソースコード
X, Y, K, P = map(int, input().split())
target_p = 0 if P == 1 else 1
Y_mod = Y % 2
T = (Y_mod - target_p) % 2
M = X + Y - K
B_min = max(0, M - X)
B_max = min(Y, M)
if B_min == B_max:
if (B_min % 2) == T:
print("Alice")
else:
print("Bob")
else:
if (B_min % 2) == (B_max % 2):
possible = {B_min % 2}
else:
possible = {0, 1}
if T not in possible:
print("Bob")
else:
if M % 2 == 1:
print("Alice")
else:
if T == 0:
print("Alice")
else:
print("Bob")
gew1fw