水题 统计0的个数和00的个数然后比较就行了= = 象征性的把代码放上来
#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
const int MAXN = 1000;
char s[MAXN+10];
int main()
{
while(~scanf("%s", s))
{
int cnt0, cnt00, cnt01;
cnt0 = cnt00 = cnt01 = 0;
int Len = strlen(s);
for(int i = 0; i < Len; i++)
{
if(s[i] == '0') {
cnt0++;
if(s[(i+1) % Len] == '0') cnt00++;
else cnt01++;
}
}
if(cnt00 * Len > cnt0 * cnt0) printf("SHOOT\n");
else if(cnt00 * Len < cnt0 * cnt0) printf("ROTATE\n");
else printf("EQUAL\n");
}
}