ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1004. Sightseeing Trip

smile_iff WA in Sightseeing Trip [4] // Problem 1004. Sightseeing Trip 11 Nov 2011 12:10
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.
Demon Jester Re: WA in Sightseeing Trip [3] // Problem 1004. Sightseeing Trip 22 Dec 2011 00:41
Try this test. It helped me.
2 2
1 2 10
1 2 20
-1

No solution.
bill125 Re: WA in Sightseeing Trip // Problem 1004. Sightseeing Trip 17 Jan 2012 23:19
Thank you very much. It helped me as well.
spiker Re: WA in Sightseeing Trip [1] // Problem 1004. Sightseeing Trip 1 Aug 2012 15:49
Wy 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
vvborz Re: WA in Sightseeing Trip // Problem 1004. Sightseeing Trip 5 Aug 2012 22:25
I 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.