結果
| 問題 |
No.2103 ±1s Game
|
| コンテスト | |
| ユーザー |
risujiroh
|
| 提出日時 | 2022-10-21 21:32:41 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 594 bytes |
| コンパイル時間 | 2,916 ms |
| コンパイル使用メモリ | 243,908 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-01 06:12:09 |
| 合計ジャッジ時間 | 3,798 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 WA * 10 |
ソースコード
#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) {
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