https://vjudge.net/problem/51197/origin

#include<bits/stdc++.h>
#include<stdio.h>
#include<iostream>
#include<cmath>
#include<math.h>
#include<queue>
#include<set>
#include<map>
#include<iomanip>
#include<algorithm>
#include<stack>
#define inf 0x3f3f3f3f
using namespace std;
typedef long long ll;
int main()
{
#ifndef ONLINE_JUDGE
    freopen("in.txt","r",stdin);
#endif // ONLIN
    string s;
    int a,b;int n;int c;
    while(cin>>s)
    {
        n=s.size();
        a=0;b=0;c=0;
        for(int i=0;i<n;i++)
        {
            if(s[i]=='0'&&s[(i+1)%n]=='0')a++;
            if(s[i]=='0')b++;
            if(s[i]=='1')c++;
        }
        if(c==0){cout<<"EQUAL"<<endl;continue;}
        if(a*n==b*b){cout<<"EQUAL"<<endl;}
        else if(a*n>b*b){cout<<"SHOOT"<<endl;}
        else cout<<"ROTATE"<<endl;
    }
}

 

相关文章:

  • 2022-01-05
  • 2022-03-05
  • 2022-12-23
  • 2021-12-28
  • 2021-06-17
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-24
  • 2021-07-09
  • 2022-01-15
  • 2021-12-17
  • 2022-12-23
  • 2021-07-19
  • 2021-11-26
相关资源
相似解决方案