3 ms·
Solve problems. After that, solve more problems. Having done that, read some algorithms book and solve even more problems. The thing is that most problems on s
by xyzzyz 16y ago
Solve problems. After that, solve more problems. Having done that, read some algorithms book and solve even more problems.
The thing is that most problems on such contests are designed so that classical algorithms are of no use in solving them -- the jury want you to figure out the answer, not to know it beforehand. Of course, there are some algorithms that are helpful anyway, but not many -- here is an almost complete list: merge sort, quicksort, radix sort, Dijkstra, DFS/BFS, Find-Union, KMP, sometimes Manacher and various maximum flow algorithms. Regarding data structures, the following ones are useful: self-balancing binary search trees, interval trees, (mergeable) priority queues.
Learning more algorithms will not help you nearly as much as solving more problems.