Solutions to problems solved on codechef, spoj and hackerrank.