← All problemsSign in

Room Allocation

CodeChefRating 729Open on judge ↗

Jadavpur University wants to find out the number of rooms they need to accommodate the teams coming for their fest. A total of $N$ colleges are coming, where, the $i^{th}$ college has a team of $A_i$ members. Each room can accommodate **at most** $2$ people. Moreover, people from **different** colleges **dislike** staying together. Find the **minimum** number of rooms Jadavpur University wil

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