In fact, this question won't be explained. I just want to say: this question is very simple, just AC. (With d's sense of accomplishment)
# Include <stdio. h> # include <iostream> # include <math. h> # include <string. h> using namespace STD; int main () {char STR [105]; while (CIN> Str) {double P1, P2; // P1 indicates the survival rate without conversion, p2 is the int Huo = 0, SI = 0, Len = strlen (STR); For (INT I = 0; I <len-1; I ++) {If (STR [I] = '0' & STR [I + 1] = '1') Si ++; if (STR [I] = '0' & STR [I + 1] = '0') Huo ++ ;} if (STR [Len-1] = '0' & STR [0] = '1') Si ++; if (STR [Len-1] = '0' & STR [0] = '0') Huo ++; P1 = (double) huo * 1.0/(HUO + Si); int huo2 = 0; For (INT I = 0; I <Len; I ++) if (STR [I] = '0') huo2 ++; P2 = (double) huo2 * 1.0/Len; double P3 = p1-P2; // printf ("% lf \ n", P1, P2); If (P3 <1e-6 & P3>-1e-6) printf ("Equal \ n "); else if (P3> 0) printf ("shoot \ n"); else printf ("rotate \ n");} return 0 ;}