← All problemsSign in

Persons in Lift

In a shopping mall, there is a Lift with a capacity of 500kgs only. There are $N$ persons waiting for the lift, and their weights (weights[]) are given as input. If the lift is overloaded, it will not move. Your task is to find out the maximum number of persons can use the Lift, without any overloading issue. ###Input Format: - Line-1: An integer N, number of persons - Line-2: N space s

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