結果
| 問題 |
No.2103 ±1s Game
|
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2022-10-21 21:58:13 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 1,000 ms |
| コード長 | 836 bytes |
| コンパイル時間 | 156 ms |
| コンパイル使用メモリ | 82,584 KB |
| 実行使用メモリ | 53,824 KB |
| 最終ジャッジ日時 | 2024-07-01 06:31:59 |
| 合計ジャッジ時間 | 2,614 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 |
ソースコード
def solve():
X,Y,K,P=map(int,input().split())
D=X-Y
if K%2==1:
if P==1:
if D>=K:
return True
elif D<=-K:
return False
else:
return D%2==0
else:
if D>=K:
return False
elif D<=-K:
return True
else:
return D%2==0
else:
if P==1:
if D>=K:
return True
elif D<=-K:
return True
else:
return D%2==1
else:
if D>=K:
return False
elif D<=-K:
return False
else:
return D%2==1
#==================================================
print("Alice" if solve() else "Bob")
Kazun