結果

問題 No.3460 Chocolate Divide Game
コンテスト
ユーザー おのせ
提出日時 2026-02-07 18:23:12
言語 C++17
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 589 ms / 2,000 ms
コード長 1,229 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,933 ms
コンパイル使用メモリ 281,644 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2026-02-28 13:04:46
合計ジャッジ時間 9,611 ms
ジャッジサーバーID
(参考情報)
judge7 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
#include <atcoder/all>
#include <iostream>
#include <cmath>
using namespace std;
using namespace atcoder;
using ll = long long;
using lb = long double;
using P = pair<ll, ll>;
using T = tuple<ll, ll, ll>;
using vll = vector<ll>;
using vb = vector<bool>;
using vvll = vector<vector<ll>>;
using vP = vector<P>;
using Graph = vector<vector<ll>>;
using WGraph = vector<vector<pair<ll, ll>>>; // コスト、頂点番号の順
using mint = modint998244353;
//using mint = long double;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
mt19937_64 rng(58);
long double PI = 3.14159265358979;
const ll LLMAX = 9223372036854775807;
const ll INF = 1e18;
vector<ll> di = {-1, 0, 1, 0}; // 上左下右
vector<ll> dj = {0, -1, 0, 1};
template<typename T> inline bool chmax(T &a, T b) { return ((a < b) ? (a = b, true) : (false)); }
template<typename T> inline bool chmin(T &a, T b) { return ((a > b) ? (a = b, true) : (false)); }

int main() {
    set<ll> x;
    for (ll i = 1; i <= 1e18; i = i * 2 + 1) {
        x.insert(i);
    }

    ll t;
    cin >> t;
    rep (ti, t) {
        ll n;
        cin >> n;

        if (x.count(n)) cout << "Bob" << endl;
        else cout << "Alice" << endl;
    }
    return 0;
}
0