Problems from spoj.com, topcoder, etc.