prob: https://atcoder.jp/contests/abc156/tasks/abc156_c
editorial: https://img.atcoder.jp/abc156/editorial.pdf
Strictly speaking, when holding a meeting at coordinate x which can be represented as x =
R + d (d > 0) for example, the points of stamina that i-th person will spend is:
(Xi − (R + d))2 = ((R + d) − Xi)
2 = (R − Xi)
2 + d(R − Xi) + d
2
,
and since the second term of the rightmost hand side is non-negative and the third term is
positive, the points of stamina spent is strictly greater than when holding a meeting at coordinate
R. It is the same when holding a meeting at coordinate x such that x < L.
I’m not able to understand how they derived that equation among other things