Approach hintTry it first, then revealHide
First rule out the cases where u > v or where u and v differ in parity. With x = (v - u) / 2, the array [u, x, x] always works, so the real question is when one or two elements suffice.
First rule out the cases where u > v or where u and v differ in parity. With x = (v - u) / 2, the array [u, x, x] always works, so the real question is when one or two elements suffice.