Binary Dish
CodeChefOpen on judge ↗
Chef is preparing a _Binary Dish_ for her girlfriend on Valentine's day. A _Binary Dish_ is one which is made up of exactly $2$ ingredients, $A$ and $B$. A dish is made by performing $N$ number of steps. At $i^{th}$ step, we can add either: $\quad$ $1$ unit of $A$ $\quad$ $\quad$ $\quad$ or $\quad$ $1$ unit of $B$ if $1$ unit of $A$ is added in ${(i-1)}^{th}$ step. In 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.
Sign in to chat with the tutor and save your progress.
Sign in to start