|
|
вернуться в форумi am puzzled! if the rods are too ways why the sample give an example saying that it is different between (1,3) and (3,1) I KNOW IT > if the rods are too ways > why the sample give an example saying that > it is different between (1,3) and (3,1) I'll tell you The author has tried to make the problem harder...if there are more than one way between two towns, you have just to take the shorter one... Althoug, the testing program of this problem is wrong, for example if you always write "No solution\n" when no cicle found and "350000\n" otherwise, you'll get accepted. :) Re: I'll tell you I don't understand. If the length of the roads is less than 500 and the answer may contain at most 100 towns, how can the answer be 350000? 100*500=50000 < 350000 Re: I'll tell you Of course, it's impossible. Answer <= 50000. |
|
|