ACMIIITB2018P5
CodeChefOpen on judge ↗
A new language is developed, which has n letters in it. It has integers from 1 to n. The specialty of this language is that some of the letters can be replaced with each other. Example if x->y then x can be replaced with y and vice-versa. and If letter x can be transformed to letter y and letter y can be transformed to letter z, then letter x can be transformed to letter z as well. You may apply
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