1 #include <bits/stdc++.h>
2 #define _for(i,a,b) for(int i = (a);i < (b);i ++)
3 const int maxn = 100000 + 10;
4 using namespace std;
5 int main()
6 {
7 string tmp;
8 while(cin >> tmp)
9 {
10 int sz = tmp.size();
11
12 int m;
13 scanf("%d",&m);
14 int sum = 0;
15 _for(i,0,m)
16 {
17 int a,b;
18 scanf("%d %d",&a,&b);
19 sum += sz-(b-a)-1;
20 }
21 if(sum&0x1)
22 cout << "Alice" << endl;
23 else
24 cout << "Bob" << endl;
25 }
26 return 0;
27 }
来源:oschina
链接:https://my.oschina.net/u/4313367/blog/3565802