BNSONSTR - Editorial

Hey All, I tried the solution as per the video editorial but I’m getting TLE. Any help will be appreciated. TIA!

Solution link: CodeChef: Practical coding for everyone

AC code
Just changed long long to int

1 Like

If someone needs simple code .
My code: CodeChef: Practical coding for everyone
Thanks.

CodeChef: Practical coding for everyone I have done the same thing used vectors only and used int instead of long long but still getting TLE.Pls help me.

I have done the same thing used vectors only and used int instead of long long but still getting TLE.Pls help me. code:CodeChef: Practical coding for everyone