Harry and Hogwarts
CodeChefOpen on judge ↗
It’s Harry Potter’s first day at Hogwarts school of Witchcraft and Wizardry. Harry is very anxious about the house sorting ceremony which is about to take place.The headmaster of the school, Albus Dumbledore has introduced a new way of sorting the students .For every student, Dumbledore will create a special string $S$ out of his magic and each student has to create his/her own special string $P$
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