Balancing the Scales
CodeChefOpen on judge ↗
Chef loves playing with stones so he discovered a very interesting game. Chef has three weighing scales and $X$ identical stones weighing $1$ gram each. Chef starts placing stones on the weighing scales in random order. After some time, he observes that the scales read $a, b$ and $c$ grams respectively and he has $N$ more stones left with him. Help the Chef find out if he can make the weight
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