← All problemsSign in

Chef And Clothes

Problem Statement Chef has a bucket with A pieces of clothes. Initially he and the bucket is at X = 0 , there is a rope on which he can put his clothes for drying. He can put his clothes at positive integer coordinates on the rope and atmost 1 clothe can be put at a point. Also he can carry atmost 1 clothe with him at a time. Chef takes B units of energy to move by 1 unit in any direction. Chef

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