Help on CSES Problem!

Revision en2, by Muhammad_mhs, 2020-09-17 18:12:52

Stick Lengths In this problem , sort the array and I have to make all sticks size equal to array[n/2] ( n/2 = median ) then answer should be the minimum. But why I choose median index. Can anyone explain, Please ? Thanks in advance.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Muhammad_mhs 2020-09-17 18:12:52 42
en1 English Muhammad_mhs 2020-09-17 18:10:53 299 Initial revision (published)