A set contains 4 numbers. The six sums of two elements of this set are 189, 320, 287, 264, $x$ and $y$. Find the largest possible value for $x+y$.

#
Solution

Let $a, b, c$ and $d$ be the four numbers in the set. We have two cases to consider:
I) $x=a+b$ and $y=c+d$ (sums without common addends). Then $a+c, a+d, b+c$ and $b+d$ are, in some order, the numbers 189, 320, 287 and 264. Adding these four sums, we get $a+b+c+d=530$. Thus, $x+y=530$.

II) $x=a+b$ and $y=a+c$ (sums with one addend in common). In this case, $a+d, b+c$, $b+d$ and $c+d$ are, in some order, the numbers 189, 320, 287 and 264. We have the following estimate:

$$
\begin{aligned}
x+y & =2(a+d)+2(b+c)-(b+d)-(c+d) \\
& \leq 2(320+287)-(264+189) \\
& =761
\end{aligned}
$$

This value can be achieved with the example $(a, b, c, d)=(237,181,106,83)$.