|
|
back to boardHelp me! Could anybody give me any hint? (I know algoritm with O(n^4), but I always receive Time Limit Exceeded.)E-mail me to vok@sbor.ru Thanks! Isn't difficult (+) Facts: 1.You must find the minimal ring 2.Traveling in DFS let you see rings 3. The minimum ring is related to the minimum distance In fact this is a just a minimum distance problem, which can be solved in O(n log n), but with a fast algorithm in O(n^2). Doubts: miguelangelhdz@hotmail.com |
|
|