I was solving MYSARA and I was getiing back to back TLE. To check which portion of the code is making the timeout, I commented out some portion of the code but it was still giving TLE. I am not able to find why is it happening.
My solution: CodeChef: Practical coding for everyone

I also had problem in submission for that problem. Even though the time complexity was in range, it was giving TLE. I submitted again with some changes and it gave AC. It even took 2-3 mins for submission.

1 Like

Yes. But after commenting out almost all the portion of the codes, I am only taking inputs and outputing 1. This should not timeout. I think I have some syntax error or anything else. I am new to this so don’t mind.

@chitreshapte Yes. today, my every submission took 2-3 mins to submit. Why?

You are using c style input and output and unsyncing with stdio. I’m not sure why this happens, but I know using both causes problems.

1 Like

Thank you. That was the issue.