Bob the Builder
CodeChefOpen on judge ↗
Bob has taken a contract to complete two walls $w1$ and $w2$. Since, previous builder left the walls incomplete, bob needs the complete the walls. Formally, the two walls will be having height $w1$ and $w2$ before Bob starts the work. The height of a wall increases by one unit with each brick kept on top of this wall. Bob has $k$ number of bricks with him and he needs to spend all of these
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