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

any tricks to avoid TIME LIMIT for 1022?? help please.
Posted by Chinese Li Rui 9 Oct 2001 12:38

  It seems to be a very normal BFS.

 but...I ,can't get through in time limit .
Re: Strange... The problem's complexity is O(n+e)
Posted by Ivan Georgiev 9 Oct 2001 14:47
It is impossible to make TLE on this problem if your
algorithm is topological sort (you can do it by DFS).

Good luck.
Maybe your program never finished on some test case
Posted by Andrey Popyk (popyk@ukr.net) 9 Oct 2001 15:14
I don't think this will happens,what a mess!
Posted by Chinese Li Rui 9 Oct 2001 15:20
>
Sorry all,the problem I want is 1122,not 1022,forgive my mistake,and please do help.
Posted by Chinese Li Rui 9 Oct 2001 15:24
>
>   It seems to be a very normal BFS.
>
>  but...I ,can't get through in time limit .
Can who pass this problem with fast ,tell me the good method?
Posted by Chinese Li Rui 9 Oct 2001 15:45
> >
> >   It seems to be a very normal BFS.
> >
> >  but...I ,can't get through in time limit .
Hehe, 1122 --> 1022. BFS ---> Complete Search
Posted by Dinh Hong Minh 9 Oct 2001 15:58


> >
> >   It seems to be a very normal BFS.
> >
> >  but...I ,can't get through in time limit .
Maybe some tricks can make the program much faster,mine is too slow,and I want to get the fastest method
Posted by Chinese Li Rui 9 Oct 2001 17:12
If you use Complete Search, You wont' get Timelimit. Belive me!!
Posted by Dinh Hong Minh 9 Oct 2001 19:28
>