Necklace
CodeChefOpen on judge ↗
Given a necklace containing n beads. Colour of beads can be red, green and blue. You consider necklace good if it doesn't contain blue colour. Find if the given necklace is good or bad. Input - There is only one line in input which is a string describing beads of necklace. String can contain r, g and b denoting red, green and blue colour. Output - Print good if the given necklace doesn't
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