← All problemsSign in

Help Raj maximize his pay without getting caught

Raj works in a brick factory that produces bricks of variable weights. Raj is given the task of moving bricks from one room to another using a backpack. Raj’s supervisor keeps a close eye on his work due to his laziness. But from his office, Raj’s supervisor can only see the top brick in his opaque backpack. The supervisor wants Raj to carry 40 kilograms weight in a single trip and assumes that fo

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start