結果
| 問題 | No.2103 ±1s Game |
| コンテスト | |
| ユーザー |
risujiroh
|
| 提出日時 | 2022-10-21 21:32:41 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 594 bytes |
| 記録 | |
| コンパイル時間 | 2,358 ms |
| コンパイル使用メモリ | 331,476 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-03-22 01:23:31 |
| 合計ジャッジ時間 | 3,291 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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