acmsguru |
---|
Finished |
*" in his notebook.
afFaAA" represents the following actions:
*" represents the periods of time when Jack went to get more popcorn and could have missed one or more Jill's actions. It is guaranteed that Jack went to get more popcorn no more than five times. So the number of characters "
*" doesn't exceed 5.
*". It is not empty and contains no more than 2500 characters. The input contains at least one letter.
-1if Jack's notes surely have a mistake and there's no solution.
sample input | sample output |
ab*bB | 3 |
sample input | sample output |
afFaAA | 3 |
sample input | sample output |
**bbB*Da* | 4 |
sample input | sample output |
a**b | -1 |
bbBdDaAB".
Name |
---|