ENG  RUSTimus Online Judge
Online Judge
Online contests
About Online Judge
Frequently asked questions
Site news
Problem set
Submit solution
Judge status
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
back to board

Discussion of Problem 1510. Order

TLE #21
Posted by Najmaddin Akhundov 12 Dec 2014 12:56
I got TLE, but when i used Visual C++ 2010 I hot AC. It worked for me, I hope it will work also for you
Re: TLE #21
Posted by Petr Osipov 28 Nov 2016 00:18
Thank you so much for the tip. Worked fine for me as well.
Re: TLE #21
Posted by ToadMonster 28 Nov 2016 15:57
Task is compiler-independent.

Here are successful GCC runs in my recent successful runs:
7147656, 0.249 sec - using printf/scanf;
7147682, 0.28 sec - using IO streams and std::ios_base::sync_with_stdio(false).
To admins
Posted by ToadMonster 28 Nov 2016 16:02
I think it would be great to modify http://acm.timus.ru/help.aspx?topic=cpp
article - add "G++ only section" and strongly advice to use "std::ios_base::sync_with_stdio(false)" with IO streams.

Details are (for example) here:
Re: To admins
Posted by Амир Меннибаев 20 Feb 2017 21:00
I also had the same mistake, use "ios_base::sync_with_stdio(false);" and get AC