Coloured Orbs
Chef has $R$ red orbs, $B$ blue orbs and $0$ green orbs. He can buy $1$ green orb at the cost of $1$ red orb + $1$ blue orb. (He needs to give both the red and blue orbs in order to buy). Initially, Chef has a skill of $0$. However each orb that he has at the end, increases his skill by some predetermined quantity. - $1$ red orb increases his skill by $1$. - $1$ blue orb increases his skill by
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