Help Martha TLE

I used fast IO too, but still got TLE again and again. Even used int in place of long long.



Please anyone help , why is it so.

I have seen solutions with even more if-else conditions that passed the test cases .

endl is very slow while printing strings, use ā€œ\nā€.,\n%20ā€™%20instead%20of%20endl.

1 Like

Your code passes with \n instead of endl.

You should not evaluate time complexity using if-else conditions.

1 Like