ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Common Board

1031. Time LImmit Exceded
Posted by Ilievski Bozidar 14 Oct 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
Posted by Dmitry S. Lyubshin 14 Oct 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
Posted by Ilievski Bozidar 14 Oct 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
Posted by Ilievski Bozidar 14 Oct 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
Posted by Le Minh Hoang 14 Oct 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.