Also look up google code jam, I think they might have some links for learning. In general the kind of solutions sought are called "dynamic programming". I think there is also a book about solving TopCoder problems, though I can't find it atm, and haven't read it.
Edit: this might be the book I meant, "The Programming Contest Training Manual" http://www.amazon.com/gp/product/0387001638?ie=UTF8&tag=...