Proof of solution of Problem 700B connecting universities?
Here is the problem. Can anyone give me more detail proof of why the answer to the problem is always summation of min(S[v], 2*k - S[v]).
The editorial is not clear.