Hello everyone,Today, I was working on the CSES Stick Lengths problem, where the solution involves using the median as the optimal value for each element. This got me thinking: what if instead of the median, I used one of the following three values? Which type of deviation or cost would be minimized?
- Ceiling value of the mean
- Floor value of the mean
- Rounded value of the mean
I initially asked ChatGPT about it, but the explanation left me a bit confused. I’m curious to hear your insights on this. Thanks in advance!