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

Общий форум

1031. Time LImmit Exceded
Послано Ilievski Bozidar 14 окт 2000 07:01
I use simple dynamic programing and get TLE.
Have you calculated your time for this problem,
becose almost everyone has got TLE.???
Re: 1031. Time Limit Exceded
Послано Dmitry S. Lyubshin 14 окт 2000 13:15
Do you use loops like

for(i=CurrentStation-1; i>=InitialStation; i--) {
  if(Cost[i]+ticketcost(i,CurrentStation)<Cost[Current...] ?

If yes, you should get TLE if you traverse all stations but
not those nearer that L3. I got accepted in 1.94 sec on my
first try.
Re: 1031. Time Limit Exceded
Послано Ilievski Bozidar 14 окт 2000 15:43
> Do you use loops like
>
> for(i=CurrentStation-1; i>=InitialStation; i--) {
>   if(Cost[i]+ticketcost(i,CurrentStation)<Cost
[Current...] ?
>
>>>I think no.

> If yes, you should get TLE if you traverse all stations
but
> not those nearer that L3. I got accepted in 1.94 sec on my
> first try.

I use this
i:=Curent_Statin;
while  (i>Initial_Station) and (Distance(Curent,i)<L3) do
....
Re: 1031. Time Limit Exceded
Послано Ilievski Bozidar 14 окт 2000 17:46
Ha.
I got ACC with 2:89 sek.
I think the time limmit was 2:00 sek?????
Re: 1031. Time Limit Exceded
Послано Le Minh Hoang 14 окт 2000 22:28
> Ha.
> I got ACC with 2:89 sek.
> I think the time limmit was 2:00 sek?????
>
New time limit is 3 seconds.