HDU-6500 Problem A. Game with string

 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 }

 

posted @ 2019-04-21 07:43  Asurudo  阅读(517)  评论(0编辑  收藏  举报