Page 1 of 1

when the judge replies - time limit exceed

Posted: Sat Jun 29, 2002 4:51 pm
by Shahid
in many problem solving and in contests as i face the problem of time of limit exceed very much, even in the today's contest. To the gr8 programmers my question is, what steps did u take at first when u r facing a time limit exceed at first?

May be solution is changing the algorithm...but it is not possible always to rethink the problem what optimization steps u take at first when getting an time limit exceed...
plz help is too much frustrating for me..... :cry:

thanx in advance

Posted: Sun Jun 30, 2002 3:39 pm
by tenshi
It is suggested that before you code you must think carefully about the time complexity. Some program seems unable to brute force or prune,so there maybe a dynamic programming algorithm or other simple algoritm. Practice more, learn more.

If you want to know more, just visit the following site,
you will get reply very soon.( A lot of excellent programmers from China there)

Welcome to visit :
Here to register:

Posted: Tue Jul 02, 2002 4:41 pm
by Shahid
can't anyone give me some more tips in this board?

Posted: Wed Jul 03, 2002 1:56 am
by dh3014
whenever I got a TLE reply, first of all, RETHINK the problem's algorithm...although it seems like a waste of time, but it may be the only way to truly solve the problem.
Only few (really few) problems I've written can be solved by just optimized my code. (there's one...10304)

By the way, if you sure the problem's solution is search, maybe you just need to use better cuts...and to extend your code.