|  | 
|  | 
| вернуться в форум | WA in Sightseeing Trip I read all the posts, collected input test cases posted by people, and passed all of them successfully, but, unfortunately, still i am getting WA#test case 1. Tried everything. But found no clue why my solution is getting WA. Please help me out.Re: WA in Sightseeing Trip Try this test. It helped me.2 2
 1 2 10
 1 2 20
 -1
 
 No solution.
Re: WA in Sightseeing Trip Thank you very much. It helped me as well.Re: WA in Sightseeing Trip Послано spiker  1 авг 2012 15:49Wy answer is "No solution."?Can you explain?
 
 We can make trip from 1 to 2 with price 10 and back trip from 2 to 1 with cost 20. It's a cycle with minimum cost
Re: WA in Sightseeing Trip Послано vvborz  5 авг 2012 22:25I think, it's because of
 > Each sightseeing route is a sequence of road numbers y1, …, yk, k > 2.
 
 Pay attention at "k > 2", it tricked me too.
 | 
 | 
|