HDU-6500 Problem A. Game with string
Posted asurudo
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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 }
以上是关于HDU-6500 Problem A. Game with string的主要内容,如果未能解决你的问题,请参考以下文章
CF 815 A. Karen and Game(暴力,模拟)
Educational Codeforces Round 73 (Rated for Div. 2) A. 2048 Game