Gold Diamond Platinum
CodeChefOpen on judge ↗
Our chef has been assigned a task to make a necklace of length **N**, from gold, diamond and platinum.There is **single** kind of gold, **two** types of diamond and **three** types of platinum available. A necklace can be represented as strings of the form $ (G)*(D1|D2)*(P1|P2|P3)* $ where **(x|y)** means we can use x or y and $ * $ means we can repeat the previous parenthesized expression **0 or
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