JEWELRY SHOP
CodeChefOpen on judge ↗
There are $3$ types of jewelry in jewelry shop: Gold, Diamond, Silver. The prices of the three jewels are: Diamond: $3 B$, Gold: $2 B$, Silver: $1 B$ (Here $B$ is a currency of Chef Land) Jewelers has a series of jewelries represented by a sting $S$ (For example: $“GGDDDSDG”$) where $G, S, D$ represent Gold, Silver, Diamond. Jewelers can offer jewels only in a range. Thus, Chef can buy the j
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