http://www.codechef.com/APRIL13/problems/MAXDIFF