Make Triangle
You are given three integers $X$, $Y$, and $Z$. In one move, you may increase exactly one of them by $1$. Formally, you may perform one of the following operations: - $X := X + 1$ - $Y := Y + 1$ - $Z := Z + 1$ Find the minimum number of moves required so that $X$, $Y$, and $Z$ can be the side lengths of a non-degenerate triangle. --- $X$, $Y$ and $Z$ can be the sides of a non-degenerate tria
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