Start of solution for Little Elephant and Balloons problem - http://www.codechef.com/MAY14/problems/LEBALONS