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 1056. Centers of the Net

I have the O(n) algorithm,do you want to know?
Posted by Huang Yizheng 2 Nov 2001 09:57
Re: I have the O(n) algorithm,do you want to know?
Posted by Timus Observer 2 Nov 2001 14:20
YES, you are like salesman now.
Re: I have the O(n) algorithm,do you want to know?
Posted by Piratek-(akaDK) 30 Aug 2008 15:39
I think we can find answer_depth of roots for O(N) - let's consider d - diameter of tree, if d mod 2 = 0 then ans_depth = d div 2 else ans_depth = d div 2 + 1

Edited by author 30.08.2008 15:39

Edited by author 30.08.2008 15:40
Re: I have the O(n) algorithm,do you want to know?
Posted by tiancaihb 12 Aug 2009 07:34
Everyone knows it's O(n)