Help with error

code: https://ide.codingblocks.com/s/425872

prob : https://hack.codingblocks.com/app/contests/2022/370/problem

getting tle in 2 cases please tell my mistake

Here I corrected and optimised your code https://ide.codingblocks.com/s/425909

could you please explain the purpose of line 33

It is for fast I/O, it probably didn’t make much of a difference here though. It helps when you need to take in lot of input (Like multiple testcases having multiple strings as input) or when you have to print a lot.
But you can still use it every time as an habit.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.