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

Who can help to write the code (1102),I always get 'Time limited'
Posted by qwt 25 Mar 2002 18:10
Re: Who can help to write the code (1102),I always get 'Time limited'
Posted by Sam Green 26 Mar 2002 14:26
in case you use string matching + dynamic programming. it's O(nm) ,
even m is only 6, the over head is too big for this 2 sec time limit.

so use an automaton instead.