Solutions to CodeChef contest problems