|
|
back to boardMy program is 0.656 s,how can I get faster? Posted by acmore 6 Aug 2009 08:42 My solution is O(N^4). Edited by author 06.08.2009 08:42 Edited by author 06.08.2009 08:42 Re: My program is 0.656 s,how can I get faster? You should use Dijkstra algorithm for every vertex. In algorithm you should find two different best ways from current vertex V to any other A. The summary length of this two ways is the length of the shortest cycle with vertexes A and V. |
|
|