What is the problem?

I am not new to codechef, but today is the first time I encounter this and it destroyed my contest.
Why adding:
ios_base::sync_with_stdio(0);
to the code, make it wrong answer on some testcases and TLE on some others???
(My second submisson must be accepted for problem “Gold Mining” in [June Lunchtime 2020 Division 1]) (which was after 23 minutes after I solved the first problem and 120 minutes after the beginning). But with this problem, I finished the contest without solving anything other than the first, because I am submitting all the time with: ios_base::sync_with_stdio(0);
What is the problem???

Not 100% sure but i guess scanf with ios_base::sync_with_stdio(0) slows the program.
cin cout should be used with that.

ig

Either use only the stdio functions or the iostream functions you can’t use both because we have made them out of sync by using stdio(0).

Ok. Yes, I used scanf and cout (this for precision) with sync. Very sad :disappointed_relieved: :disappointed_relieved: