SP18243 IITWPC4A - Maggu and Strings
Description
Maggu and Coder were playing a game with strings. In each turn of the game, Maggu gives Coder a string. Coder can replace m consecutive 'a' in the string by n consecutive 'b' any number of times. This way he has to create 2 strings, one of maximum possible length and one of minimum possible length.
Maggu and Coder were playing a game with strings. In each turn of the game, Maggu gives Coder a string. Coder can replace m consecutive 'a' in the string by
Input Format
First line of input contains a single integer T : number of test cases.(1
Output Format
For each test case, print in a single line containing two space separated integers representing minimum and maximum length of string s that Coder can obtain.