Solutions to topcoder.com algorithm SRMs