← All problemsSign in

Rainbow

In a Rainbow town in a Rainbow county, there was a Rainbow campaign going on. As you can guess, the participants are required to follow some ground rules to join the campaign, the most significant one being: **"you need to have all the colors of the Rainbow on your outfit."** Recall, the colors of the Rainbow are namely: **V**iolet, **I**ndigo, **B**lue, **G**reen, **Y**ellow, **O**range, and **R*

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