Amazing challenge by Chef
CodeChefOpen on judge ↗
It is Math-e-Codia time and Chef has come up with an amazing challenge for all participants. Let $F(i)$ be the number of ways in which a stack can be filled with $2*i$ digits were $i$ of them are $0's$ and remaining are $1's$. Also at any moment the number of $0's$ in the stack should be greater than or equal to the number of $1's$ when counted from the bottom. Chef has challenged you with
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