結果
| 問題 | No.3460 Chocolate Divide Game |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-02-28 14:22:17 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 593 bytes |
| 記録 | |
| コンパイル時間 | 3,651 ms |
| コンパイル使用メモリ | 342,360 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-02-28 14:22:22 |
| 合計ジャッジ時間 | 4,612 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 7 |
ソースコード
#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")<<"\n";
}
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int T;
cin>>T;
while(T--)solve();
}