lets AC this problem!
In this problem, you are given a string and need find its longest substring which has the same number of character ‘A’ and character’C’ .
Notice that the string will only contain ‘A’ and ‘C’ which are all in uppercase letter and no longer than 1000000.
The first line contains a T which means the number of data sets
Each of next T lines contains a string mentioned above. T <= 10
for each data set, output answer in one line.
1 ACAA
2