There are three cases of normal cell classification. 1. simple stage OA // O represents the healthy cell classification form, which indicates that the simple stage is in progress. 2. fully-grown stage OAB // O represents the healthy cellular classification form, which indicates that the fully-grown stage is in progress. 3. mutagenic stage BOA // O represents the healthy cellular classification form, which indicates that the mutagenic stage is in progress. Give a sequence for you to find the stage in progress of the current cell. If it is not the first three cases, it indicates that the cell has changed, then the output mutation stage. If there are two stages at the same time, the output is ranked at the top in the above Order. Solution: test the current sequence in sequence based on the above three stages. If none of the above conditions are met, it indicates that the cell has changed. Code: [cpp] # include <iostream> # include <cmath> # include <cstdio> # include <cstdlib> # include <string> # include <cstring> # include <algorithm> # include <vector> # include <map> # include <stack> # include <queue> # define eps 1e-6 # define INF (1 <20) # define PI acos (-1.0) using namespace std; char save [1200]; int dfs (int begin, int end) // 1 indicates the first type, 2 indicates the second type, 3 indicates the third type, and 0 indicates other types {if (begin = end & save [begin] = 'A ') // if there is only one A, return 1 is in the first stage; if (end-begin> = 1 & save [end] = 'A' & dfs (begin, end-1) // determine whether the first stage return 1 is satisfied; if (end-begin> = 2 & save [end] = 'B' & save [end-1] = 'A' & dfs (begin, end-2) // determine whether the second-stage return 2 is satisfied; if (end-begin> = 2 & save [begin] = 'B' & save [end] = 'A' & dfs (begin + 1, end-1) // determines whether the return 3; return 0;} int main () {int n; scanf ("% d", & n ); while (n --) {scanf ("% s", save); int len = strlen (save); int ans = dfs (0, len-1); switch (ans) {case 0: printf ("MUTANT \ n"); break; case 1: printf ("SIMPLE \ n"); break; case 2: printf ("FULLY-GROWN \ n"); break; case 3: printf ("MUTAGENIC \ n"); break ;};} return 0 ;}