結果
| 問題 |
No.2103 ±1s Game
|
| コンテスト | |
| ユーザー |
risujiroh
|
| 提出日時 | 2022-10-21 21:33:44 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 612 bytes |
| コンパイル時間 | 2,639 ms |
| コンパイル使用メモリ | 243,256 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-01 06:12:59 |
| 合計ジャッジ時間 | 6,275 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 RE * 1 |
| other | AC * 10 WA * 3 RE * 21 |
ソースコード
#include <bits/stdc++.h>
using namespace std::literals;
bool solve(std::istream& is, std::ostream& os) {
int X, Y, K, P;
is >> X >> Y >> K >> P;
K = X + Y - K;
if (Y & 1) {
P = -P;
}
if (K & 1) {
std::abort();
if (P == 1) {
return ~Y & 1 || K - 1 <= Y;
} else {
return Y & 1 || K <= Y;
}
} else {
P = -P;
if (P == 1) {
return !(~Y & 1 || K <= Y);
} else {
return !(Y & 1 || K <= Y);
}
}
}
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cout << (solve(std::cin, std::cout) ? "Alice\n" : "Bob\n");
}
risujiroh