You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
838 B

#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 10;
int a[N];
int n, k;
int main() {
while (cin >> n >> k) {
memset(a, 0, sizeof a);
for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
if (k == 1)
puts("Alice");
else {
int res = 0;
if (n & 1) {
if (k == 2)
res ^= a[1] - 1;
else
res ^= a[1];
for (int i = 3; i <= n; i += 2)
res ^= a[i] - a[i - 1] - 1;
} else {
for (int i = 2; i <= n; i += 2)
res ^= a[i] - a[i - 1] - 1;
}
if (res)
puts("Alice");
else
puts("Bob");
}
}
return 0;
}