A Tale of Three Squares
CodeChefOpen on judge ↗
There are three squares, each with side length $a$ placed on the x-axis. The coordinates of centers of these squares are $(x_1, a/2)$, $(x_2, a/2)$ and $(x_3, a/2)$ respectively. All of them are placed with one of their sides resting on the x-axis. You are allowed to move the centers of each of these squares along the x-axis (either to the left or to the right) by a distance of at most $K$. Find
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start