Successful solution of problem Stone - http://www.codechef.com/MAY14/problems/RRSTONE/