結果
| 問題 | No.3460 Chocolate Divide Game |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-02-28 14:23:32 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 587 bytes |
| 記録 | |
| コンパイル時間 | 3,108 ms |
| コンパイル使用メモリ | 342,316 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-02-28 14:23:50 |
| 合計ジャッジ時間 | 4,613 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge7 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 6 WA * 1 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
#include<atcoder/modint>
using namespace atcoder;
using mint=modint998244353;
map<ll,ll> ISW;
bool W(ll N){
if(N==1)return 0;
if(ISW.count(N))return ISW[N];
for(int i=1;i<=N/2;i++){
if(!W(N-i)){
ISW[N]=1;
return 1;
}
}
ISW[N]=0;
return 0;
}
void solve(){
ll N;
cin>>N;
cout<<(__builtin_popcount(N+1)==1?"Bob\n":"Alice\n");
}
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int T;
cin>>T;
while(T--)solve();
}