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 1137. Bus Routes

Does this problem requires the route with minimum stops?
Posted by November Rain 16 May 2004 21:11
I think at one stop which is the start stop of another route,we can print that route start with the common stop.But this is not the solution with the minimum stops.I got wa on test 1.I'm confused.Can anybody help me?

My code:
[code cut out]

Edited by moderator 09.08.2004 02:40
Re: Does this problem requires the route with minimum stops?
Posted by UNKNOWN_LAMER 9 Aug 2004 01:00
I have WA#1 too. But I think that my program must work correctly. I always output the route with a number of stops equal to the m_1+m_2+...+m_n (m_k is a number of stops in k_th route). So I have a question: for input
2
4 1 2 3 4 1
4 1 2 3 4 1
should I output
4 1 2 3 4 1
or the output
8 1 2 3 4 1 2 3 4 1
is also OK?

I haven't looked November Rain's program yet, but I suspect he to have the same algorithm that I have.
Just find euler cycle, no stops count minimization! (-)
Posted by Dmitry 'Diman_YES' Kovalioff 9 Aug 2004 09:55
Re: Does this problem requires the route with minimum stops?
Posted by OSt[Vologda SPU] 19 Mar 2010 04:16
UNKNOWN_LAMER wrote 9 August 2004 01:00
2
4 1 2 3 4 1
4 1 2 3 4 1
Test is incorrect
"None of the routes shared the same section of road"