Solutions for CodeChef.com algorithmic challenge problems