← All problemsSign in

Paint the Wall

Chef and Chefina are painting a wall of infinite height, they have to start painting the wall from the height $H$. They have $N$ ladders of different heights $A[i]$ (1<=$i$<=$N$). Now chef and chefina decided to join these different ladders to reach exactly or above the height $H$ to paint the wall. The ladder that is being used by one person cannot be used by the other. Now your task is to find

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