#include<iostream> #include<vector> #include<cstring> #include<algorithm> using namespace std; const int N=104; string s; void sov(){ int i; int len=s.size() ; s+=s; int a=0,b=0; for(i=0;i<=len;i++){ if(s[i]=='0'&&i<len) b++; if(i>0&&s[i-1]=='0'&&s[i]=='0') a++; } if(a*len<b*b) cout << "ROTATE"<<endl; else if(a*len>b*b) cout<<"SHOOT"<<endl; else cout<<"EQUAL"<<endl; } signed main(){ while(cin>>s) sov(); }
标签:&&,1636,int,Headshot,sov,UVA,include From: https://www.cnblogs.com/towboa/p/17296320.html