Chefland The Great City
CodeChefOpen on judge ↗
NOOB is in bizarre habit of counting everything. So one day he decided to count number of ways in which he can visit a very popular miraculous city Chefland. Chefland is a rooted tree consisting of $n$ vertices with the root at vertex $1$. Vertex $1$ is also the only entrance in Chefland and every leaf vertex contains an exit door. But there is a problem. Some of the vertices are poisonous. If he
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