結果
| 問題 | No.3460 Chocolate Divide Game |
| コンテスト | |
| ユーザー |
くらげ
|
| 提出日時 | 2026-01-04 17:32:29 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 578 ms / 2,000 ms |
| コード長 | 503 bytes |
| 記録 | |
| コンパイル時間 | 1,924 ms |
| コンパイル使用メモリ | 211,820 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-02-28 13:02:49 |
| 合計ジャッジ時間 | 6,658 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 7 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
#define rep(i,n) for(int (i) = 0; i<(n); i++)
int pc(ll n){
int count = 0;
while(n){
count += n%2;
n /= 2;
}
return count;
}
int main(){
int t;
cin >> t;
assert(1<=t && t<=200000);
rep(_,t){
ll n;
cin >> n;
assert(2<=n && n<=1000000000000000000);
if(pc(n+1)==1) cout << "Bob" << endl;
else cout << "Alice" << endl;
}
}
くらげ