hiho week 46 register

Ended

Participants:418

Verdict:Accepted
Score:100 / 100
Submitted:2015-05-20 20:49:02

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
    int n,ns;
    cin >> n;
    int res = 0;
    while (n)
    {
        cin >> ns;
        ns = ns%4?((ns%4)%3?ns:ns+1):ns-1;
        res ^= ns ;
        --n;
    }
    cout << (res ? "Alice" : "Bob") << endl;
    return 0;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX