3 ms·
North American competitions usually allow C/C++/Java and sometimes Pascal. Good books on these are: * Programming Challenges by Skiena and Revilla * Algorith
by ianbishop 16y ago
North American competitions usually allow C/C++/Java and sometimes Pascal.
Good books on these are:
* Programming Challenges by Skiena and Revilla
* Algorithm Design Manual by Skiena
* Introduction to Algorithms by Cormen
The biggest trouble of these competitions is being able to recognize what you're trying to solve. If you can say 'THIS IS DYNAMIC PROGRAMMING', you'll be a lot closer than someone who writes a backtracking solution and times out. From there, knowing what kind of problem (or combination of them) within the domain will help you design the proper algorithm.
Number theory, graph theory, geometry and combinatorics based problems appear often. There is sometimes some necessary knowledge required to be able to solve problems altogether. For example, if the problem makes reference to Catalan numbers and you don't know what they are - you won't be getting very far.
The UVa website (http://uva.onlinejudge.org/ http://uva.onlinejudge.org/) offers a pretty horrible experience but an unforgiving judge which will help you practice a lot. It also has a judge for every book in the above text, Programming Challenges. There are also judges for live contests which you can participate in.
The Algorithmist (www.algorithmist.com) gives you some good test data and hints along the way if you get stuck on any of the UVa problems.
Project Euler is fun but it is slightly more algebraic and you do not (often) run into these kind of problems in these sort of competitions. It's still a good idea to try them out though.