Sorted Adjacent Differences

CodeForces - 1339B