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 1280. Topological Sorting

0.79sec AC.My algo is O((m+n)lgm).But why it is so slow?
Posted by Andrew Yu 23 Jul 2004 18:22
hm...
Posted by Dilyan 9 May 2005 05:28
for n = 10000 and m = 100000 you get approximately 2.10^6. the only way to get 0.79 is if the constant is big enough.
mine is O(m + n) and I get 0.079
Re: hm...
Posted by RedRick <<TSOGU>> 16 Sep 2009 22:19
my algo O(m+n) too, 0.046 s
Re: hm...
Posted by adamant 21 Dec 2013 14:51
O(m+n^2) algo gets AC with 0.046 :D