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

Общий форум

1004 Time Limmit
Послано Ilievski Bozidar 4 окт 2000 01:19
Anybody knows a fast algorithm for this problem???
Re: 1004 Time Limmit
Послано Geno Roupsky 4 окт 2000 12:18
How fast do you need?
'couse DFS is OK
Re: 1004 Time Limmit
Послано Vasil Popovski 4 окт 2000 15:12
> Anybody knows a fast algorithm for this problem???

What do you mean "fast" ?.
Is n^3 fast enough for you?
how to write a program with n^3?
Послано tjq(killer of zju) 4 окт 2000 15:49
> > Anybody knows a fast algorithm for this problem???
>
> What do you mean "fast" ?.
> Is n^3 fast enough for you?
>

I only find a algorithm based on dijkstra with N^4, so
please tell me how to do it
Re: how to write a program with n^3?
Послано Vasil Popovski 4 окт 2000 18:27
> > > Anybody knows a fast algorithm for this problem???
> >
> > What do you mean "fast" ?.
> > Is n^3 fast enough for you?
> >
>
> I only find a algorithm based on dijkstra with N^4, so
> please tell me how to do it

Algorithm with n^3, can be based on Floyd algorithm. I
submit this program but I've got wrong answer, so I wrote
backtrack solution for this problem, which is fast enough.
I suppose you can't use floyd's dynamic method
Послано tjq(killer of zju) 4 окт 2000 21:06
> > > > Anybody knows a fast algorithm for this problem???
> > >
> > > What do you mean "fast" ?.
> > > Is n^3 fast enough for you?
> > >
> >
> > I only find a algorithm based on dijkstra with N^4, so
> > please tell me how to do it
>
> Algorithm with n^3, can be based on Floyd algorithm. I
> submit this program but I've got wrong answer, so I wrote
> backtrack solution for this problem, which is fast enough.

it's only correct if it's a graph with direction, but it's
not in the problem,
Re: I suppose you can't use floyd's dynamic method
Послано Vasil Popovski 5 окт 2000 18:19
> > > > > Anybody knows a fast algorithm for this problem???
> > > >
> > > > What do you mean "fast" ?.
> > > > Is n^3 fast enough for you?
> > > >
> > >
> > > I only find a algorithm based on dijkstra with N^4,
so
> > > please tell me how to do it
> >
> > Algorithm with n^3, can be based on Floyd algorithm. I
> > submit this program but I've got wrong answer, so I
wrote
> > backtrack solution for this problem, which is fast
enough.
>
> it's only correct if it's a graph with direction, but
it's
> not in the problem,
>

I'm sure that this problem can be solved with MODIFIED
floyd algorithm. Undirection graph is not "big" problem.