0.79sec AC.My algo is O((m+n)lgm).But why it is so slow?

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...

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