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

Discussion of Problem 1085. Meeting

Time Limit on test #16
Posted by penartur 12 Oct 2008 04:12
Anybody knows what in this test?
I've optimized my algorithm after first time limit and now it runs really very fast; on my example file with 100 trains, 100 stations and 100 friends it takes only 145 milliseconds to calculate the answer - even in debug build.
I just cannot imagine why it could calculate answer on some test for more than 2 seconds...
UPD: 129ms in release build...

Edited by author 12.10.2008 04:15
Re: Time Limit on test #16
Posted by penartur 12 Oct 2008 23:36
btw, i have changed DFS to BFS in my code (i had to define abstract tasks processor and implement stack and queue processor), and, although on my large tests it takes equal time independent of the engine used (stack or queue), stack engine have failed one more time on test #16 and queue engine have passed it.