Van 4 points on a plane. The distance between any two points is at most 1. What is the maximum possible sum of the squares of the 6 distances between the 4 points?
If two of the four points coincide, the distance between these two points is zero, and the other five distances are at most one, so the sum of the squares of the six distances is at most 5. The value 5 can also be achieved; if three points form a regular triangle with a side length of one unit, and the fourth point coincides with one of these three points.

Now we will show that if the four points are distinct, then the sum of the squares of the six distances is less than 5. It is known that if $A, B, C$ are distinct points, then $BC^2$ is less than, equal to, or greater than $\left(AC^2 + AB^2\right)$ depending on whether the angle $\angle BAC$ is less than, equal to, or greater than $90^\circ$. [This follows, for example, from the fact that by the cosine rule, $BC^2 - \left(AC^2 + AB^2\right) = 2AC \cdot AB \cdot \cos \angle BAC$.] If, therefore, among the four points, there are three, $A, B, C$, for which $\angle BAC > 90^\circ$, then $BC^2 + AB^2 + AC^2 < 3$. If, on the other hand, for all triples of points, $\angle BAC \leq 90^\circ$, then the sum of the squares of the six distances is at most 4. We will show that in this case, the four points form a rectangle. Consider the convex hull of the four points. This cannot be a segment, since then the four points would lie on a straight line, and choosing the two endpoints as $B$ and $C$, and one of the interior points as $A$, we would have $\angle BAC = 180^\circ$, which is greater than $90^\circ$. If the convex hull is a triangle, then the fourth point is inside this triangle. From this point, one of the sides is seen at an angle of $120^\circ$ or greater, and thus we have found points $A, B, C$ for which $\angle BAC \geq 120^\circ > 90^\circ$. If, finally, the convex hull is a quadrilateral, then the four points form a convex quadrilateral. This is either a rectangle or has an angle greater than $90^\circ$ at one of its vertices. In the latter case, we have again found three points for which $\angle BAC > 90^\circ$. (Here, $A$ is the vertex of the obtuse angle, and $B$ and $C$ are the two adjacent vertices.) In these cases, we are done. The only case left is when the four points form a rectangle. Let this rectangle be $ABCD$. By the Pythagorean theorem, $AB^2 + BC^2 + CD^2 + DA^2 = 2AC^2$ and, moreover, $BD = AC$, so the sum of the squares of the six distances is now $4AC^2 \leq 4$. This shows that the sum of the squares of the six distances is maximal when three of the four points form a regular triangle with a side length of one unit, and the fourth point coincides with one of these three points. The sum of the squares of the distances in this case is 5.

Remark. In the course of the proof, we essentially showed that among four points, there are always three, $A, B, C$, which either lie on a straight line or for which $\angle BAC \geq 90^\circ$.