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 1701. Ostap and Partners

Time consumed by outputting large arrays to the console
Posted by Ilya 5 Mar 2018 03:51
Hello all. I am doing task #1701, but ,actually, my question is also related to other equal tasks: how can you not exceed the time limit when the task supposes large array as the answer? For instance, in mentioned task the time is limited to 2 seconds. In case when N == 50 000, if possible set of emplyee's salaries exists, you need write 50 000 strings to console. But, as i have found out by measurig, only outputting array to the console takes over 3-5 seconds. Test it using C# and C++ with array of int values set to "0".

Edited by author 05.03.2018 09:04