Let 'STR' = "$$**".
There are consecutive "$$" in 'STR' and it is Ninja's turn to begin the game. So, Ninja changes the consecutive "$$" to "**". This changes 'STR' to "****".
Now, as it is his friend's turn and there are no more consecutive "$$", Ninja wins the game.
The first line of input contains an integer ‘T’ which denotes the number of test cases or queries to be run. Then the test cases follow.
The first and the only line of each test case contains an input string ‘STR’.
For each test case, print 'true' if Ninja wins the flip game otherwise print 'false'.
Print the output of each test case in a separate line.
You do not need to print anything; it has already been taken care of. Just implement the given function.
1 <= ‘T’ <= 100
1 <= |’STR’| <= 20
‘STR[i]’ = {‘*’, ‘$’}
Where ‘T’ denotes the total number of test cases, ‘STR’ represents the input string that is given to Ninja and his friend, and |’STR’| represents the length of the string.
Time Limit: 1 second
Prime Digit Sum
Prime Digit Sum
Mario And His Princess
Combination Sum III
Combination Sum III
Combination Sum III
Generate All Strings
8-Queen Problem