← All problemsSign in

Cake Making

CodeChefRating 279Open on judge ↗

There are exactly $100$ colours in the world, numbered $1$ to $100$. Chef is making a $2$-layered cake, and all that is left is deciding the colours of the $2$ layers. Chef has decided that we can choose any of the colours $1, 2, \ldots, A$ for the first layer, and any of the colours $1, 2, \ldots, B$ for the second layer. However, there is an **extra constraint**. To encourage diversity, the

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