Distinct Behaviours
CodeChefOpen on judge ↗
"The blood of House of El will always bind us together." What the Kryptonians need is to be together, to be united in order to save the apocalypse. For that, Seg-El has decided to carry out some encoding. The people of the same behavior if made to stay together will lead to enhanced protection of Krypton. There are N people on Krypton. Each has a behavior A[i] associated with him/her. You need
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