AC!Your task is to find the Euler Path.My algo is O(V+E).At first I am worried about the menory,but 430-300k AC.

Re: AC!Your task is to find the Euler Path.My algo is O(V+E).At first I am worried about the menory,but 430-300k AC.

Posted by

Saturn 9 Jul 2004 15:36

Re: AC!Your task is to find the Euler Path.My algo is O(V+E).At first I am worried about the menory,but 430-300k AC.

Why did your program work so long?

My algo was O(V+E) too. And I got AC with 0.001s

Re: AC!Your task is to find the Euler Path.My algo is O(V+E).At first I am worried about the menory,but 430-300k AC.

Posted by

wangyin 12 Aug 2006 19:51

I got ac in 0.015s,590k

Just use eularian tour.

Re: AC!Your task is to find the Euler Path.My algo is O(V+E).At first I am worried about the menory,but 430-300k AC.

I can be solved without Euler paths. Just DFS over bus routes, walking away for a side-cycle at each of its nodes if that side-route wasn't yet traversed.