ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1137. Автобусные маршруты

Does this problem requires the route with minimum stops?
Послано November Rain 16 май 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?
Послано UNKNOWN_LAMER 9 авг 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! (-)
Послано Dmitry 'Diman_YES' Kovalioff 9 авг 2004 09:55
Re: Does this problem requires the route with minimum stops?
Послано OSt[Vologda SPU] 19 мар 2010 04:16
UNKNOWN_LAMER писал(a) 9 августа 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"