U can see my solution then
https://www.codechef.com/viewsolution/27811491
Read from line 334
U can see my solution then
https://www.codechef.com/viewsolution/27811491
Read from line 334
That’s really nice, but there was a much simpler way😉
Just use naive approach, and get product of all xc,fxa,xb,fxb at one place…then use logarithm on whole expression directly
Okay, will check!
Can you share your solution here?
I just took root L of the score . and recursively multiplied to get answer ( with appropriate break statement ) .
Could u tell why m getting tle in substask 1
And ac in rest
I used same approach as mentioned in thread
https://www.codechef.com/viewsolution/27867163
The same happened with me .
would be great if someone helps !
To get full score i just pust if statement and copied my solution for subtask 1 
Same here ![]()
WEIRDO - “From Zero to Infinity” - documented code; Editorial-style overview
I was also toying with the whole prime factorisation approach, but thankfully - and slightly surprisingly - using logs turned out to be accurate enough ![]()

Fantastic. I will study your code in detail actually. Since I was struggling in the input processing phase too. 
Thanks for sharing!!!
Heavy input processing in task 1.
I was facing same issue when I was using maps to shore character frequencies (check here): CodeChef: Practical coding for everyone
Then I changed my code to use vector and got AC.
Many people did wrong to check whether a string is of Alice or Bob , they just count vowels and conso and check if vowels are greater than equal to conso then it will be of Alice else Bob which is Wrong
Instead of this we have to count vowels and conso in each three consecutive character of string .
I was getting AC for subtask 1(1.41s) and WA for subtask 2. I changed from maps and strings to arrays and got AC for subtask 1(0.2s) and WA for subtask 2. Finally on using cpp_dec_float_50 to find the final answer I got AC for subtask 2. Have a look here
https://www.codechef.com/viewsolution/27868379
Did all the things mentioned here still don’t know what is wrong. Please anybody look at this.
Tried everything i knew boost etc.
Though i thought of the same approach but won’t there be cases where the resultant will be small but the power function overflows
Do not calculate power buddy see my solution above mentioned I did not calculate power bcz it will overflow
You don’t need power, just three basic log properties
log(a^b) = b*log(a)
log(a/b)= log(a) - log(b)
log(a*b)= log(a) + log(b)
Use them on the expression to get it into a one line formula which doesn’t need powers but logarithms