I'm not sure I understand your question. But M is a maximum, not a minimum. The array is smooth if the distance between neighboring pixels is *at most* M. In any case 46 and 50 are also less than 5 away.
Carlos Guía On Tue, Apr 12, 2011 at 3:30 AM, Cody <[email protected]> wrote: > http://code.google.com/codejam/contest/dashboard?c=544101#s=p1 > > [1, 6, 11, 16, 21, 26, 31, 36, 41, 46, 50, 45, 40, 35, 30, 25, 20, 15, > 10, 7] > > The output of case 2 is given like this but i guess its wrong becasue > distance between 10 and 7 is 3 right?? but the minimum cost is > 5 ,please correct me if i am wrong > > Rest all numbers are at the distance of 5 > > -- > You received this message because you are subscribed to the Google Groups > "google-codejam" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-code?hl=en. > > -- You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-code?hl=en.
