杭电 6500 Problem A. Game with string
题目大意:奇奇怪怪的题目。
AC代码:
#include <iostream>
#include <cstring>
#include <algorithm>
#include <stdlib.h>
#include <cmath>
#include <map>
using namespace std;
typedef long long ll;
const ll MOD = 1000000007;
int n;
char a[100005];
int m;
int st,ed;
int main() {
memset(a,0,sizeof(a));
while(cin >> a) {
// cout << a;
cin >> m;
int lena = strlen(a);
int ans = 0;
int sum = 0;
while(m--) {
st = 0;
ed = 0;
cin >> st >> ed;
ans = ed - st + 1;
sum +=(lena - ans);
}
if(sum % 2 ) cout<< "Alice" << endl;
else cout << "Bob" << endl;
}
return 0;
}