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

is it correct?
Posted by RASTA 18 Mar 2009 16:02
input:
6 7
1 2 1
2 3 1
3 2 1
2 1 1
4 5 2
5 6 2
6 4 2
-1
output:
1 2 3 2
many progs answer on this test
4 5 6
am I right?

Edited by author 18.03.2009 16:09
Re: is it correct?
Posted by Kalina_Petrova 7 Oct 2009 11:02
Answer is 4 5 6. First, the graph is not orientated, and second, as it is said in the task, "All the numbers x1, …, xk should be different.", so you can't use the second vertex twice.

Edited by author 07.10.2009 11:03
Re: is it correct?
Posted by ibra (TNU) 3 Jan 2012 23:35
as far as I understand right answer is "1 2"