|
|
10 10 4 2 2 3 3 1 1 5 5 6 6 7 2 8 8 9 9 10 10 6 answer is: 6 4 2 3 1 5 6 7 3 4 5 WA in Case #6. Could you give me the case? Edited by author 11.10.2015 17:59 Here is a special case test: Input: 2 4 1 2 3 4 Possible output: 49 1 2 50 49 Thanks for test! Your test help me to understand the problem 4 5 1 2 2 3 3 4 4 5 7 6 1 2 2 3 3 4 4 1 4 5 5 6 6 1 2 5 1 2 2 3 2 4 1 2 3 4 3 4 3 1 1 2 2 4 4 4 1 2 3 1 2 4 3 4 3 3 1 2 2 3 1 3 please, give any advice... Ive got a bug checking the disconnected graph to be correct. sorry for my english :( Maybe it's only me who is of this opinion, but the statement of the problem is really equivocal. The expressions "If Leonid is wrong in his assumptions" and "Leonid assumes that the work experience of each pilot is in the range from 1 to 50 years" obviously led me to the misunderstanding of the problem itself, as I supposed that if the graph is disconnected the answer would be -1, because Leonid might be wrong in his assumptions in case if the difference in ages between pilots from two different connected components exceeds 50 years. Therefore it would be better to say "It is known that the work experience of each pilot is in range from 1 to 50 years" as it makes people understand that this is a required restriction. I would be very grateful if authors avoided such tricky and equivocal expressions in their statements. Thank you for the time spent in order to look through this post. if unconnected graph, alway maximal difference is 49. if connected graph ?? AC!!! I found bug!!! Edited by author 22.12.2011 21:28 Edited by author 22.12.2011 21:28 TAGS: Graph Theory, Parity, Connectivity. Please, explane in more detail. =) Some new tricky tests were added. 3 authors lost their AC after rejudge. 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? 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. I think that first answer 2 1 2 2 1 is true, but wa1 Difference between max(a[i]) and min(a[i]) should be maximal The ith integer must be the work experience of the ith pilot. If there are several possible answers, output ANY of them. > Help Leonid use the available information to find out the maximum possible difference in the work experiences of pilots on the flights he had. > the maximum possible difference > maximum In the second line output n integers I think it should be "p integers" |
|
|