Problem:
Problem F. Nim without Zero
Alice: "Hi, Bob! Let's play Nim!"
Bob: "Are you serious? I don't want to play it. I know how to win the game."
Alice: "Right, there is an algorithm to calculate the optimal move using XOR. How about changing the rule so that a player loses a game if he or she makes the XOR to $0$?"
Bob: "It sounds much better now, but I suspect you know the surefire way to win."
Alice: "Do you wanna test me?"
This game is defined as follows.
The game starts with $N$ heaps where the $i$-th of them consists of $a_i$ stones.
A player takes any positive number of stones from any single one of the heaps in one move.
Alice moves first. The two players alternately move.
If the XOR sum, $a_1$ XOR $a_2$ XOR $...$ XOR $a_N$, of the numbers of remaining stones of these heaps becomes $0$ as a result of a player's move, the player loses.
Your task is to find which player will win if they do the best move.
Input
The input consists of a single test case in the format below.
$N$
$a_1$
$\vdots$
$a_N$
The first line contains an integer $N$ which is the number of the heaps ($1 \leq N \leq 10^5$). Each of the following $N$ lines gives the number of stones in each heap ($1 \leq a_i \leq 10^9$).
Output
Output the winner, Alice or Bob, when they do the best move.
Examples
Sample Input 1
2
1
1
Output for Sample Input 1
Alice
Sample Input 2
5
1
2
3
4
5
Output for Sample Input 2
Bob
Sample Input 3
10
1
2
3
4
5
6
7
8
9
10
Output for Sample Input 3
Alice
In the first example, the XOR sum is 0 in the initial state, but the game is going because nobody moves yet. First Alice takes a stone and the XOR sum becomes 1, then Bob takes the last stone and the XOR sum becomes 0. Therefore, Alice will win, and Bob will lose.

Submitted solutions:

code_snippet: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define vl vector<ll>
#define rep(i, n) for (ll i = 0; i < n; ++i)

int main() {
    ll n;
	cin>>n;
	vl a(n);
	ll xr=0;
	rep(i,n){
		cin>>a[i];
		xr^=a[i];
	}

	if(xr==1){
		cout<<"Bob"<<endl;
		return 0;
	}
	if(xr!=0){
		cout<<"Alice"<<endl;
		return 0;
	}

	//xorが1に出来るか
	rep(i,n){
		xr^=a[i];
		if((xr^1)<a[i]){
			cout<<"Alice"<<endl;
			return 0;
		}
		xr^=a[i];
	}

	cout<<"Bob"<<endl;
	return 0;
}
accuracy: 1
time_ms: 20
memory_kb: 3832
final_rank: 10

code_snippet: #include<bits/stdc++.h>
using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
int main() {
    int N,S=0;
    cin>>N;
    vector<int> X(N);
    rep(i,N){
        cin>>X[i];
        S^=X[i];
    }
    bool W=0;
    if(S>1)W=1;
    else if(S==1)W=0;
    else rep(i,N)if((S^X[i]^1)<X[i])W=1;
    cout<<(W?"Alice":"Bob")<<endl;
}
accuracy: 1
time_ms: 20
memory_kb: 3636
final_rank: 8

code_snippet: #include<bits/stdc++.h>
using namespace std;
using ll=long long;

/*
	考察
	自分の手番で、1の山が奇数個になっているとき、負け

	山が1つのとき:
		A0>1:Alice
		else:Bob
	山が2つのとき:
		片方が1:Alice
		両方が1:Bob
*/

int main(){
	int N; cin>>N;
	vector<ll> A(N);
	for(int i=0; i<N; i++) cin>>A[i];
	sort(A.begin(),A.end());
	A[0]--;

	ll xsum=0;
	for(int i=0; i<N; i++) xsum^=A[i];
	puts(xsum?"Alice":"Bob");
}
accuracy: 0.1956521739130435
time_ms: 20
memory_kb: 3744
final_rank: 19

code_snippet: #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define srep(i, s, t) for(int i = (s); i < (t); i++)
#define len(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
template < class T > bool chmin(T& a, T b) { if(a > b) { a = b; return true; } return false; }
template < class T > bool chmax(T& a, T b) { if(a < b) { a = b; return true; } return false; }
using ll = long long;
using ld = long double;

int main() {
    int N;cin >> N;
    int cnt1 = 0, x = 0;
    rep(i, N){
        int a;cin >> a;
        x ^= a;
        if (a % 2) cnt1++;
    }
    if (x == 0){
        if (cnt1) cout << "Alice" << endl;
        else cout << "Bob" << endl;
    }else{
        if (x == 1) cout << "Bob" << endl;
        else cout << "Alice" << endl;
    }
}
accuracy: 1
time_ms: 20
memory_kb: 3432
final_rank: 2

code_snippet: #include <bits/stdc++.h>

using namespace std;

#define rep(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rrep(i, a, b) for (int i = (int)(b)-1; i >= (int)(a); i--)
#define ALL(v) (v).begin(), (v).end()
#define UNIQUE(v) sort(ALL(v)), (v).erase(unique(ALL(v)), (v).end())
#define SZ(v) (int)v.size()
#define MIN(v) *min_element(ALL(v))
#define MAX(v) *max_element(ALL(v))
#define LB(v, x) int(lower_bound(ALL(v), (x)) - (v).begin())
#define UB(v, x) int(upper_bound(ALL(v), (x)) - (v).begin())

using uint = unsigned int;
using ll = long long int;
using ull = unsigned long long;
using i128 = __int128_t;
using u128 = __uint128_t;
const int inf = 0x3fffffff;
const ll INF = 0x1fffffffffffffff;

template <typename T> inline bool chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <typename T> inline bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return 1;
    }
    return 0;
}
template <typename T, typename U> T ceil(T x, U y) {
    assert(y != 0);
    if (y < 0)
        x = -x, y = -y;
    return (x > 0 ? (x + y - 1) / y : x / y);
}
template <typename T, typename U> T floor(T x, U y) {
    assert(y != 0);
    if (y < 0)
        x = -x, y = -y;
    return (x > 0 ? x / y : (x - y + 1) / y);
}
template <typename T> int popcnt(T x) {
    return __builtin_popcountll(x);
}
template <typename T> int topbit(T x) {
    return (x == 0 ? -1 : 63 - __builtin_clzll(x));
}
template <typename T> int lowbit(T x) {
    return (x == 0 ? -1 : __builtin_ctzll(x));
}

template <class T, class U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
    os << "P(" << p.first << ", " << p.second << ")";
    return os;
}
template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec) {
    os << "{";
    for (int i = 0; i < vec.size(); i++) {
        os << vec[i] << (i + 1 == vec.size() ? "" : ", ");
    }
    os << "}";
    return os;
}
template <typename T, typename U>
ostream &operator<<(ostream &os, const map<T, U> &map_var) {
    os << "{";
    for (auto itr = map_var.begin(); itr != map_var.end(); itr++) {
        os << "(" << itr->first << ", " << itr->second << ")";
        itr++;
        if (itr != map_var.end())
            os << ", ";
        itr--;
    }
    os << "}";
    return os;
}
template <typename T> ostream &operator<<(ostream &os, const set<T> &set_var) {
    os << "{";
    for (auto itr = set_var.begin(); itr != set_var.end(); itr++) {
        os << *itr;
        ++itr;
        if (itr != set_var.end())
            os << ", ";
        itr--;
    }
    os << "}";
    return os;
}
#ifdef LOCAL
#define show(...) _show(0, #__VA_ARGS__, __VA_ARGS__)
#else
#define show(...) true
#endif
template <typename T> void _show(int i, T name) {
    cerr << '\n';
}
template <typename T1, typename T2, typename... T3>
void _show(int i, const T1 &a, const T2 &b, const T3 &...c) {
    for (; a[i] != ',' && a[i] != '\0'; i++)
        cerr << a[i];
    cerr << ":" << b << " ";
    _show(i + 1, a, c...);
}

/**
 * @brief template
 */

int main() {
    int N;
    cin >> N;
    vector<int> A(N);
    rep(i,0,N) cin >> A[i];
    int XOR = 0;
    bool odd = false;
    rep(i,0,N) XOR ^= A[i];
    rep(i,0,N) if (A[i] & 1) odd = true;
    if (XOR == 1 || (XOR == 0 && !odd)) cout << "Bob" << endl;
    else cout << "Alice" << endl;
}
accuracy: 1
time_ms: 20
memory_kb: 3632
final_rank: 7

code_snippet: #include <bits/stdc++.h>
using namespace std;

bool dp[11][11][11];

int main() {
    int N;
    cin >> N;
    vector<int>a(N);
    int b = 0,c = 0;
    for(int i = 0; i < N; i++) {
        cin >> a[i];
        b ^= a[i];
        c += a[i]%2;
    }
    sort(a.begin(),a.end());
    cout << ((b == 1 || (c == 0 && b == 0))?"Bob":"Alice") << endl;
    /*
    for(int i = 0; i <= 10; i++) {
        for(int j = 0; j <= 10; j++) {
            for(int k = 0; k <= 10; k++) {
                if(i == 0 && j == 0 && k == 0) {
                    dp[i][j][k] = true;
                    continue;
                }
                for(int l = 0; l < i; l++) {
                    if((l^j^k) != 0 && !dp[l][j][k]) {
                        dp[i][j][k] = true;
                    }
                }
                for(int l = 0; l < j; l++) {
                    if((l^i^k) != 0 && !dp[i][l][k]) {
                        dp[i][j][k] = true;
                    }
                }
                for(int l = 0; l < k; l++) {
                    if((l^i^j) != 0 && !dp[i][j][l]) {
                        dp[i][j][k] = true;
                    }
                }
            }
        }
    }
    for(int i = 1; i <= 10; i++) {
        for(int j = i; j <= 10; j++) {
            for(int k = j; k <= 10; k++) {
                if(!dp[i][j][k]) {
                    cout << i << " " << j << " " << k << " " << (i^j^k) << endl;
                }
            }
        }
    }*/
}
accuracy: 1
time_ms: 20
memory_kb: 3556
final_rank: 5

code_snippet: #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <random>
#include <complex>
#include <bitset>
#include <iomanip>
#include <memory>
#include <chrono>
#include <functional>

#define rep(i, n, s) for(int i = (s); i < int(n); i++)
#define per(i, n, s) for(int i = (n - 1); i >= int(s); i--)
#define MM << " " <<
#define all(x) x.begin(), x.end()
#define rall(x) rbegin(x), rend(x)

template <class T>
using MinHeap = std::priority_queue<T, std::vector<T>, std::greater<T>>;
template <class T>
using MaxHeap = std::priority_queue<T>;

using ll = long long;
using Pii = std::pair<int, int>;
using Pll = std::pair<ll, ll>;
using Pdd = std::pair<double, double>;

template <class T>
bool chmin(T &a, const T b) {
    if (a > b) {
        a = b;
        return true;
    } else {
        return false;
    }
}

template <class T>
bool chmax(T &a, const T b) {
    if (a < b) {
        a = b;
        return true;
    } else {
        return false;
    }
}

template <class T>
void vdeb(const std::vector<T> &da) {
    auto n = da.size();
    for (size_t i = 0; i < n; i++) {
        if (i == n - 1)
            std::cout << da[i];
        else
            std::cout << da[i] << " ";
    }
    std::cout << std::endl;
}
template<class T>
void vdeb(const std::vector<std::vector<T>> &da) {
    auto n = da.size();
    for (size_t i = 0; i < n; i++) {
        std::cout << i << " : ";
        vdeb(da[i]);
    }
    std::cout << std::endl;
}

template <>
void vdeb(const std::vector<std::string> &da) {
    auto n = da.size();
    for (size_t i = 0; i < n; i++) { std::cout << da[i] << std::endl; }
}
using namespace std;

int main() {
    int n; cin >> n;
    vector<int> da(n);
    rep(i,n,0) cin >> da[i];
    int nim = 0;
    rep(i,n,0) nim ^= da[i];
    if(nim) cout << (nim != 1 ? "Alice" : "Bob") << endl;
    else {
        bool flg = false;
        rep(i,n,0) {
            if((nim^da[i]^1) < da[i]) {
                flg = true;
            }
        }
        cout << (flg ? "Alice" : "Bob") << endl;
    }
}
accuracy: 1
time_ms: 20
memory_kb: 3572
final_rank: 6

code_snippet: #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <random>
#include <complex>
#include <bitset>
#include <iomanip>
#include <memory>
#include <chrono>
#include <functional>

#define rep(i, n, s) for(int i = (s); i < int(n); i++)
#define per(i, n, s) for(int i = (n - 1); i >= int(s); i--)
#define MM << " " <<
#define all(x) x.begin(), x.end()
#define rall(x) rbegin(x), rend(x)

template <class T>
using MinHeap = std::priority_queue<T, std::vector<T>, std::greater<T>>;
template <class T>
using MaxHeap = std::priority_queue<T>;

using ll = long long;
using Pii = std::pair<int, int>;
using Pll = std::pair<ll, ll>;
using Pdd = std::pair<double, double>;

template <class T>
bool chmin(T &a, const T b) {
    if (a > b) {
        a = b;
        return true;
    } else {
        return false;
    }
}

template <class T>
bool chmax(T &a, const T b) {
    if (a < b) {
        a = b;
        return true;
    } else {
        return false;
    }
}

template <class T>
void vdeb(const std::vector<T> &da) {
    auto n = da.size();
    for (size_t i = 0; i < n; i++) {
        if (i == n - 1)
            std::cout << da[i];
        else
            std::cout << da[i] << " ";
    }
    std::cout << std::endl;
}
template<class T>
void vdeb(const std::vector<std::vector<T>> &da) {
    auto n = da.size();
    for (size_t i = 0; i < n; i++) {
        std::cout << i << " : ";
        vdeb(da[i]);
    }
    std::cout << std::endl;
}

template <>
void vdeb(const std::vector<std::string> &da) {
    auto n = da.size();
    for (size_t i = 0; i < n; i++) { std::cout << da[i] << std::endl; }
}
using namespace std;

int main() {
    int n; cin >> n;
    vector<int> da(n);
    rep(i,n,0) cin >> da[i];
    int nim = 0;
    rep(i,n,0) nim ^= da[i];
    cout << (nim != 1 ? "Alice" : "Bob") << endl;
}
accuracy: 0.21739130434782608
time_ms: 20
memory_kb: 3456
final_rank: 17

code_snippet: #include <bits/stdc++.h>
using namespace std;

int main() {
    int N;
    cin >> N;
    vector<int>a(N);
    for(int i = 0; i < N; i++) {
        cin >> a[i];
    }
    sort(a.rbegin(),a.rend());
    int sum = a[0];
    for(int i = 1; i < N; i++) {
        sum -= a[i];
    }
    if(abs(sum)%2 == 1 && abs(sum) <= N) {
        cout << "Bob" << endl;
    }
    else {
        cout << "Alice" << endl;
    }
}
accuracy: 0.10869565217391304
time_ms: 20
memory_kb: 3460
final_rank: 20

code_snippet: #include <bits/stdc++.h>
using namespace std;

int main() {
    int N;
    cin >> N;
    int x = 0;
    for(int i = 0; i < N; i++) {
        int a;
        cin >> a;
        x ^= a;
    }
    cout << ((x != 1)?"Alice":"Bob") << endl;
}
accuracy: 0.21739130434782608
time_ms: 20
memory_kb: 3416
final_rank: 15

code_snippet: #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

//template
#define rep(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define ALL(v) (v).begin(),(v).end()
using ll=long long int;
const int inf = 0x3fffffff; const ll INF = 0x1fffffffffffffff; const double eps=1e-12;
template<typename T>inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<typename T>inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}



int main(){
   int n;
   cin>>n;
   vector<int> a(n);
   rep(i,0,n)cin>>a[i];

   int g=0,odd=0;
   rep(i,0,n){
      g^=a[i];
      if(a[i]&1)odd=1;
   }
   if(g==1 or (g==0 and odd==0))puts("Bob");
   else puts("Alice");
   return 0;
}
accuracy: 1
time_ms: 20
memory_kb: 3636
final_rank: 8

code_snippet: #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

//template
#define rep(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define ALL(v) (v).begin(),(v).end()
using ll=long long int;
const int inf = 0x3fffffff; const ll INF = 0x1fffffffffffffff; const double eps=1e-12;
template<typename T>inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<typename T>inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}



int main(){
   int n;
   cin>>n;
   vector<int> a(n);
   rep(i,0,n)cin>>a[i];

   int g=0;
   rep(i,0,n)g^=a[i];
   if(g==1)puts("Bob");
   else puts("Alice");
   return 0;
}
accuracy: 0.21739130434782608
time_ms: 20
memory_kb: 3516
final_rank: 18

code_snippet: #pragma GCC target("avx2")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
//#include <atcoder/all>
using namespace std;
//using namespace atcoder;
#define DEBUG
#ifdef DEBUG
template <class T, class U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
    os << '(' << p.first << ',' << p.second << ')';
    return os;
}
template <class T> ostream &operator<<(ostream &os, const vector<T> &v) {
    os << '{';
    for(int i = 0; i < (int)v.size(); i++) {
        if(i) { os << ','; }
        os << v[i];
    }
    os << '}';
    return os;
}
void debugg() { cerr << endl; }
template <class T, class... Args>
void debugg(const T &x, const Args &... args) {
    cerr << " " << x;
    debugg(args...);
}
#define debug(...)                                                             \
    cerr << __LINE__ << " [" << #__VA_ARGS__ << "]: ", debugg(__VA_ARGS__)
#define dump(x) cerr << __LINE__ << " " << #x << " = " << (x) << endl
#else
#define debug(...) (void(0))
#define dump(x) (void(0))
#endif
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef pair<ll,ll> P;
typedef pair<int,int> pii;
typedef vector<P> vpl;
typedef tuple<ll,ll,ll> tapu;
#define rep(i,n) for(int i=0; i<(n); i++)
#define REP(i,a,b) for(int i=(a); i<(b); i++)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
const int inf = (1<<30)-1;
const ll linf = 1LL<<61;
const int MAX = 25000000;
int dy[8] = {0,1,0,-1,1,-1,-1,1};
int dx[8] = {-1,0,1,0,1,-1,1,-1};
const double pi = acos(-1);
const double eps = 1e-7;
template<typename T1,typename T2> inline bool chmin(T1 &a,T2 b){
	if(a>b){
		a = b; return true;
	}
	else return false;
}
template<typename T1,typename T2> inline bool chmax(T1 &a,T2 b){
	if(a<b){
		a = b; return true;
	}
	else return false;
}
template<typename T> inline void print(T &a){
    int sz = a.size();
    for(auto itr = a.begin(); itr != a.end(); itr++){
		cout << *itr;
        sz--;
        if(sz) cout << " ";
	}
    cout << "\n";
}
template<typename T1,typename T2> inline void print2(T1 a, T2 b){
	cout << a << " " << b << "\n";
}
template<typename T1,typename T2,typename T3> inline void print3(T1 a, T2 b, T3 c){
	cout << a << " " << b << " " << c << "\n";
}
void mark() {cout << "#" << "\n";}
ll pcount(ll x) {return __builtin_popcountll(x);}
//const int mod = 1e9 + 7;
const int mod = 998244353;

int main(){
    int n; cin >> n;
    int exor = 0;
    bool one = false;
    rep(i,n){
        int a; cin >> a;
        exor ^= a;
        if(a & 1) one = true;
    }
    if(exor == 1) cout << "Bob\n";
    else if(exor == 0 && !one) cout << "Bob\n";
    else cout << "Alice\n"; 
}
accuracy: 1
time_ms: 20
memory_kb: 3440
final_rank: 3

code_snippet: #pragma GCC target("avx2")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
//#include <atcoder/all>
using namespace std;
//using namespace atcoder;
#define DEBUG
#ifdef DEBUG
template <class T, class U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
    os << '(' << p.first << ',' << p.second << ')';
    return os;
}
template <class T> ostream &operator<<(ostream &os, const vector<T> &v) {
    os << '{';
    for(int i = 0; i < (int)v.size(); i++) {
        if(i) { os << ','; }
        os << v[i];
    }
    os << '}';
    return os;
}
void debugg() { cerr << endl; }
template <class T, class... Args>
void debugg(const T &x, const Args &... args) {
    cerr << " " << x;
    debugg(args...);
}
#define debug(...)                                                             \
    cerr << __LINE__ << " [" << #__VA_ARGS__ << "]: ", debugg(__VA_ARGS__)
#define dump(x) cerr << __LINE__ << " " << #x << " = " << (x) << endl
#else
#define debug(...) (void(0))
#define dump(x) (void(0))
#endif
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef pair<ll,ll> P;
typedef pair<int,int> pii;
typedef vector<P> vpl;
typedef tuple<ll,ll,ll> tapu;
#define rep(i,n) for(int i=0; i<(n); i++)
#define REP(i,a,b) for(int i=(a); i<(b); i++)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
const int inf = (1<<30)-1;
const ll linf = 1LL<<61;
const int MAX = 25000000;
int dy[8] = {0,1,0,-1,1,-1,-1,1};
int dx[8] = {-1,0,1,0,1,-1,1,-1};
const double pi = acos(-1);
const double eps = 1e-7;
template<typename T1,typename T2> inline bool chmin(T1 &a,T2 b){
	if(a>b){
		a = b; return true;
	}
	else return false;
}
template<typename T1,typename T2> inline bool chmax(T1 &a,T2 b){
	if(a<b){
		a = b; return true;
	}
	else return false;
}
template<typename T> inline void print(T &a){
    int sz = a.size();
    for(auto itr = a.begin(); itr != a.end(); itr++){
		cout << *itr;
        sz--;
        if(sz) cout << " ";
	}
    cout << "\n";
}
template<typename T1,typename T2> inline void print2(T1 a, T2 b){
	cout << a << " " << b << "\n";
}
template<typename T1,typename T2,typename T3> inline void print3(T1 a, T2 b, T3 c){
	cout << a << " " << b << " " << c << "\n";
}
void mark() {cout << "#" << "\n";}
ll pcount(ll x) {return __builtin_popcountll(x);}
//const int mod = 1e9 + 7;
const int mod = 998244353;

int main(){
    int n; cin >> n;
    int exor = 0;
    rep(i,n){
        int a; cin >> a;
        exor ^= a;
    }
    if(exor == 1) cout << "Bob\n";
    else cout << "Alice\n";
}
accuracy: 0.21739130434782608
time_ms: 20
memory_kb: 3440
final_rank: 16

code_snippet: #include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; i++){
    cin >> a[i];
  }
  int X = 0;
  bool even = true;
  for (int i = 0; i < N; i++){
    X ^= a[i];
    if (a[i] % 2 == 1){
      even = false;
    }
  }
  if (X == 0){
    if (even){
      cout << "Bob" << endl;
    } else {
      cout << "Alice" << endl;
    }
  } else if (X == 1){
    cout << "Bob" << endl;
  } else {
    cout << "Alice" << endl;
  }
}
accuracy: 1
time_ms: 30
memory_kb: 3204
final_rank: 11

code_snippet: #include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; i++){
    cin >> a[i];
  }
  int X1 = 0, X2 = 0;
  for (int i = 0; i < N; i++){
    X1 ^= a[i];
    X2 ^= a[i] / 2;
  }
  if (X1 == 0){
    cout << "Alice" << endl;
  } else if (X2 == 0){
    cout << "Bob" << endl;
  } else {
    cout << "Alice" << endl;
  }
}
accuracy: 0.21739130434782608
time_ms: 20
memory_kb: 3092
final_rank: 13

code_snippet: #include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; i++){
    cin >> a[i];
  }
  int X = 0;
  for (int i = 0; i < N; i++){
    X ^= a[i];
  }
  if (X == 0){
    cout << "Alice" << endl;
  } else if (X == 1){
    cout << "Bob" << endl;
  } else {
    cout << "Alice" << endl;
  }
}
accuracy: 0.21739130434782608
time_ms: 20
memory_kb: 3180
final_rank: 14

code_snippet: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main(){
    int n;
    cin >> n;
    int odd = 0;
    int g = 0;
    for(int i=0; i<n; i++){
        int a;
        cin >> a;
        g ^= a;
        if(a%2 == 1) odd++;
    }
    if(g>1 or (g==0 and odd>0)){
        cout << "Alice" << endl;
    }else{
        cout << "Bob" << endl;
    }
    return 0;
}
accuracy: 1
time_ms: 20
memory_kb: 3444
final_rank: 4

code_snippet: #include<iostream>
using namespace std;
int N,A[1<<17];
main()
{
	cin>>N;
	int X=0;
	for(int i=0;i<N;i++)
	{
		cin>>A[i];
		X^=A[i];
	}
	if(X>1)cout<<"Alice"<<endl;
	else if(X==1)cout<<"Bob"<<endl;
	else
	{
		for(int i=0;i<N;i++)
		{
			int n=A[i]-(X^A[i]^1);
			if(1<=n&&n<=A[i])
			{
				cout<<"Alice"<<endl;
				return 0;
			}
		}
		cout<<"Bob"<<endl;
	}
}
accuracy: 1
time_ms: 30
memory_kb: 3504
final_rank: 12

code_snippet: #include <bits/stdc++.h>
using namespace std;

int main() {
    int n, s=0, odd=0;
    cin >> n;
    for(int i=0;i<n;i++){
        int a;
        cin >> a;
        s ^= a;
        odd |= a&1;
    }
    cout << (s == 1 || (s == 0 && odd == 0) ? "Bob" : "Alice") << endl;
    return 0;
}
accuracy: 1
time_ms: 20
memory_kb: 3112
final_rank: 1