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 .
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ā. Comparison Between endl and \n in C++ - Codeforcesā%20instead%20of%20endl.
Your code passes with \n
instead of endl
.
https://www.codechef.com/viewsolution/37012683
Also
You should not evaluate time complexity using if-else conditions.