← All problemsSign in

Saruman of Many Colours

ACM International Collegiate Programming Contest, Asia-Amritapuri Site, 2012 Saruman of Many Colours '"For I am Saruman the Wise, Saruman Ring-maker, Saruman of Many Colours!" 'I looked then and saw that his robes, which had seemed white, were not so, but were woven of all colours. And if he moved they shimmered and changed hue so that the eye was bewildered.' - Gandalf the Grey. And so it was

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start