## Task A-1.5.

In the plane, 15 points are marked. Some are colored red, some blue, and the rest green. It is known that the number of red points is greater than both the number of blue points and the number of green points. The sum of the lengths of all segments where one endpoint is red and the other is green is 31. The sum of the lengths of all segments where one endpoint is green and the other is blue is 25. The sum of the lengths of all segments where one endpoint is blue and the other is red is 5.

Determine the number of points of each color.
## Solution.

Let $c, p$ and $z$ be the numbers of red, blue, and green points, respectively. According to the conditions of the problem, we have $c+p+z=15, c>p$ and $c>z$.

Let $C, P$ and $Z$ be arbitrary red, blue, and green points, respectively. By the triangle inequality, we have

$$
|C P|+|P Z| \geqslant|C Z|
$$

If we sum these inequalities for all red, blue, and green points, we get

$$
5 z+25 c \geqslant 31 p
$$

Similarly, we derive

$$
31 p+5 z \geqslant 25 c, \quad 25 c+31 p \geqslant 5 z
$$

Substituting $c=15-p-z$ into the first inequality, we get $375 \geqslant 20 z+56 p$.

Thus, we have $375 \geqslant 56 p$, i.e., $p \leqslant 6$.

Substituting $z=15-c-p$ into the second inequality, we get $75+26 p \geqslant 30 c$. Since $p \leqslant 6$, we conclude $75+156 \geqslant 30 c$, i.e., $c \leqslant 7$.

Substituting $z=15-c-p$ into the first inequality, we get $75+20 c \geqslant 36 p$. Since $c \leqslant 7$, we conclude $75+140 \geqslant 36 p$, i.e., $p \leqslant 5$. From $75+26 p \geqslant 30 c$ and $p \leqslant 5$, we now get $c \leqslant 6$.

Furthermore, $z=15-p-c \geqslant 15-5-6=4$.

Since $6 \geqslant c>p, 6 \geqslant c>z \geqslant 4$ and $c+p+z=15$, we conclude that $c=6$, $p=5, z=4$ or $c=6, p=4, z=5$.

The only triplet that satisfies all three inequalities we derived for $c, p$ and $z$ is $c=6, p=5$ and $z=4$, so this is the only possibility.

Note: Since the problem statement mentions that a configuration of points is given, it is not necessary to construct an example to show that the obtained numbers are possible. However, an example that demonstrates this is given as follows.

On the number line, color the points of the form $\frac{k}{120}$ (since $z \cdot p \cdot c=120$) such that the green points are for $k = -2, -1, 1, 2$, the blue points are for $k = 148, 149, 150, 151, 152$, and the red points are for $k = 134, 135, 136, 174, 175, 176$. The example was constructed by first grouping the green points at 0, the red points at $\frac{135}{120}$ and $\frac{175}{120}$, and the blue points at $\frac{150}{120}$, and then spacing the points out.

## NATIONAL MATHEMATICS COMPETITION

2nd grade - high school - A variant

Primošten, April 5, 2016.