Page 2 of 2
Posted: Tue Dec 27, 2005 11:37 am
Thanks. I understand it now. I'll give it a try.
Posted: Wed Feb 15, 2006 10:58 am
I think this problem's tip is..
Mutant : len is 1, and str='B'
Simple : if len is 1, and str='A'
Fully-Grown : str[len-1]='B', and str[len-2]='A'
Mutagenic : str='B', and str[len-1]='A'
Else : Mutant
In case of Mutant, it has 2 cases to print.
I got AC thie problem in C, line 18.
Posted: Sat Jul 08, 2006 7:26 pm
How could "BAAB" become "MUTANT" ??? Shouldn't it be "FULLY-GROWN" ??? because in the problem statement :
fully-grown stage O = OAB
and in this case, "BAAB", BA = O, and AB,so BAAB should be "FULLY-GROWN"
Posted: Fri Jan 05, 2007 8:36 am
"BAAB", BA = O, and AB,so BAAB should be "FULLY-GROWN"
How do you know BA = o ?
BA does not match with any of the given patterns.
Code: Select all
A <- simple
OAB <- fully-grown
BOA <- mutagenic
So it must be treated as 'mutant'. And since the input string has a substring who is mutant, the entire string is actually mutant.