Consecutive Numbers:->RUBIX4 : Getting Wrong Answer

question->http://www.codechef.com/problems/RUBIX4/
my answer->http://www.codechef.com/viewsolution/3106566
getting wrong answer.i have taken two arrays both having same N elements and then changed one of the array in consecutive numbers,and then mathed both array .the number of differences in elements in both array is counted as number of change.also i have changed the array from both side(after sorting the second array) and taken min from both…

//