The Thief
CodeChefOpen on judge ↗
Raju is a thief. He is a very poor guy. His daughter Selvi is very ill and has been admitted to the hospital. Raju does not have enough money to pay for the medical bills. He decides to loot houses in an area where he knows the amount of money in each house. He cannot loot in two consecutive houses. Help Raju to get the maximum amount of loot. Input Format: Line 1 : An integer N Line 2 : N sp
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