Group Them All!!!
CodeChefOpen on judge ↗
“United we stand, divided we fall” – says the professor. There are N students in the college and there is large disunity among students.The size of any group is the number of students in it. The professor wants to group them into a large single group(of size N). He knows that each student has its own skill level given by the array skill[ ] and that every student is a group of its own(of size 1).
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