IIITM Student
CodeChefOpen on judge ↗
There are N groups students in IIITM each group numbered 1 to n. The ith group contains a[i] number of students. There are some classroom in IIITM and each classroom has some seats. All the students of same group have to be in same class and there shouldn't be any seat left. Moreover group shouldn't change their relative position while taken their seats in class room i.e group 3 take their seat
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