|
|
back to boardShow all messages Hide all messagestest 24 Magnitogorsk STU 30 Oct 2011 14:03 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? Are you correctly handling the case when the graph is disconnected? Re: test 24 ...†.†.†... Stigius ...†.†.†... 30 Oct 2011 20:59 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. 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. |
|
|