B - Reverse Game
博弈
#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long LL;
typedef pair<int,int> PII;
const int mod=998244353;
const int inf=0x3f3f3f3f;
const double PI = acos(-1);
string s;
int main()
{
cin>>s;
int n=s.size();
LL res=0;
LL ans=0;
for(int i=n-1; i>=0; i--)
{
if(s[i]=='0')
{
res++;
}
else
{
ans=ans+res;
}
}
if(ans%3==0)
{
cout<<"Bob"<<endl;
}
else
{
cout<<"Alice"<<endl;
}
return 0;
}