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

Обсуждение задачи 1004. Экскурсия

How to find minimal ring in the graph,(I got AC but it's very slow)
Послано TheBlaNK 6 фев 2003 23:09
How to find minimal ring in the graph,(I got AC but it's very slow)
Mine is
 for(from=0;from<n;from++)
  for(to=from+1;to<n;to++)
    {
      delete path(from,to)
      find m=the shortest path(from,to)
      ringpath=m+dis(from,to);
      if( ringpath < minring ) minring=ringpath;
    }
Re: How to find minimal ring in the graph,(I got AC but it's very slow)
Послано Saber 10 мар 2003 20:03
you should use N dijkestra to find it ...
if u cant mail me : SSF_DIGI@hotmail.com i'll help u !!! :p
Re: How to find minimal ring in the graph,(I got AC but it's very slow)
Послано zhanghe 15 июн 2003 09:08
why? i use pascal and i also use n dijkstra but it's time out???
Re: How to find minimal ring in the graph,(I got AC but it's very slow)
Послано liuzhiyu 17 апр 2004 21:43
yes!I use dijkstra for every edge!tle!!!
Re: How to find minimal ring in the graph,(I got AC but it's very slow)
Послано felicia2 8 май 2004 14:31
mine is tle....
Re: How to find minimal ring in the graph,(I got AC but it's very slow)
Послано somebody 17 май 2004 20:28
but why u use it for edges? u can just use it for every points.
Re: How to find minimal ring in the graph,(I got AC but it's very slow)
Послано somebody 17 май 2004 20:29
sorry, points->point
Re: How to find minimal ring in the graph,(I got AC but it's very slow)
Послано YingShanMingZhi 10 авг 2004 22:09
I tle on test1,why?????????????????????????????