|
|
back to boardtest 24 Can you public this test or tell about idea in it? Yesterday we can't got "Accepted", because always got "WA 24" (Magnitogorsk STU). We have no idea about our mistake. Maybe test is incorrect? Re: test 24 Are you correctly handling the case when the graph is disconnected? Re: test 24 Test is correct, you have already asked it during the contest and have already had an answer. Idea of you mistake is that you cannot assume that the most distant vertex from some randomly chosen is an end of diameter. It is true for a tree, but not for an arbitrary graph. If you are still unsure, I can send you this test via email, if you tell me your address. Re: test 24 Posted by svr 30 Oct 2011 21:27 I also had many WAs. I used only 1 bfs. But when I applied n bfs for each vertex as a root and took best with respect of height of bfs-tree I got Ac. |
|
|