ACM (You are given a sequence a 1 , a 2 ,…, a n a1,a2,…,an consisting of n n integers.)
anconsistingofnnintegers.Youmayperformthefollowingoperationonthissequence:chooseanyelementandeitherincreaseordecreaseitbyone.Calculatetheminimumpossibledifference