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

Общий форум

WA in 1031
Послано Rodrigo Schmidt 9 ноя 2000 03:28
I'm trying to solve problem 1031 - RailWay Tickets using the
Dijkstra's algorithm for the shortest path in graphs. My
implementation looks "right" but I've received WA.

I talked to a friend who tried to solve this problem using
Floyd's algorithm and also received WA.

What's wrong?

Thanks,
Rodrigo
Re: WA in 1031
Послано Jivko Ganev 9 ноя 2000 12:14
No need for dijkstra or floyd since the graph type is
special.It looks exactly like the graphs used for project
networks.Just use the simplest dynamic programming you can
think of.Also did you notice that the start station isn't
always with lower id than the end station, this could be
the problem.