码迷,mamicode.com
首页 > 其他好文 > 详细

HDU-6500 Problem A. Game with string

时间:2019-04-21 09:33:04      阅读:223      评论:0      收藏:0      [点我收藏+]

标签:const   with   string   ret   color   else   tmp   def   scan   

 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 }

 

HDU-6500 Problem A. Game with string

标签:const   with   string   ret   color   else   tmp   def   scan   

原文地址:https://www.cnblogs.com/Asurudo/p/10743765.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!