CHEF and HOTEL
CodeChefOpen on judge ↗
There are $N$ vacant rooms in chef’s hotel in each room maximum $K$ peoples can stay, there comes $G$ groups of peoples to stay in chef’s hotel, $i^{th}$ group have $P_{i}$ members. For each group you can allot one or more than one rooms as per their need but in a room member of **same** group can stay. A group stay in chef’s hotel if **every** member of their group gets room. Yo
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