hiho week 44 register

Ended

Participants:930

Verdict:Accepted
Score:100 / 100
Submitted:2015-05-05 21:05:53

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
23
24
25
26
27
28
29
#include<iostream>
#include<string>
#include<sstream>
#include<math.h>
using namespace std;
void solve(int *stone,int num){
    int res = stone[0];
    for (int i = 1; i < num; i++){
        res ^= stone[i];
    }
    if (res == 0) cout << "Bob";
    else cout << "Alice";
}
int main(){
    int num;
    cin >> num;
    int *stone = new int[num];
    for (int i = 0; i < num; i++){
        cin >> stone[i];
    }
    solve(stone,num);
 
    system("pause");
    return 0;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX