Prove answer of a problem

Правка en1, от NVGU, 2023-08-27 07:45:12

Today I read the following problem that makes all elements in a sequence the same, using the minimum number of steps. Where each step increments or decrements an element by a constant integer d. And I know the minimum number of steps is the number of steps that make all elements the median of all elements. But I don't know how to prove it. please can someone help me prove it. Thanks for taking the time to read this blog,

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский NVGU 2023-08-27 07:45:12 453 Initial revision (published)