結果
| 問題 |
No.2813 Cookie
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-07-18 00:08:07 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 86 ms / 2,000 ms |
| コード長 | 843 bytes |
| コンパイル時間 | 2,018 ms |
| コンパイル使用メモリ | 196,424 KB |
| 最終ジャッジ日時 | 2025-02-23 16:06:53 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 30 |
ソースコード
#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
using ll = long long;
const ll mod = 998244353;
#define fi first
#define se second
#define rep(i,n) for(ll i=0;i<n;i++)
#define all(x) x.begin(),x.end()
#define faster ios::sync_with_stdio(false);cin.tie(nullptr)
ll f(ll a){
if(a==1) return 1;
if(a==2) return 1;
if(a==3) return 2;
if(a==4) return 2;
if(a==5) return 4;
return (a/3-1)*4+(a%3)*2;
}
int main() {
ll T;
cin >> T;
while(T--){
ll N;
cin >> N;
ll ans=0;
rep(i,N){
ll a;
cin >> a;
ans^=f(a);
}
if(ans!=0){
cout << "Alice" << endl;
}else{
cout << "Bob" << endl;
}
}
return 0;
}